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
|
@@ -6,7 +6,6 @@ import { applyResultBudget } from "../core/truncate.js";
|
|
|
6
6
|
import { buildCollectExpression, dropHandle } from "../core/promiseHandles.js";
|
|
7
7
|
import { DEVICE_ARG_DESC } from "./_deviceArg.js";
|
|
8
8
|
export function registerExecutionTools(server) {
|
|
9
|
-
// Tool: Execute JavaScript in app
|
|
10
9
|
registerToolWithTelemetry(server, "execute_in_app", {
|
|
11
10
|
description: "Execute JavaScript code in the connected React Native app and return the result. Use this for inspecting app state, calling methods on exposed global objects, or running diagnostic code. Hermes compatible: 'global' is automatically polyfilled to 'globalThis', so both global.__REDUX_STORE__ and globalThis.__REDUX_STORE__ work.\n\n" +
|
|
12
11
|
"RECOMMENDED WORKFLOW: 1) list_debug_globals to discover available objects, 2) inspect_global to see properties/methods, 3) execute_in_app to call methods or read values.\n\n" +
|
|
@@ -88,8 +87,6 @@ export function registerExecutionTools(server) {
|
|
|
88
87
|
}
|
|
89
88
|
if (!result.success) {
|
|
90
89
|
let errorText = `Error: ${result.error}`;
|
|
91
|
-
// If the error is a ReferenceError (accessing a global that doesn't exist),
|
|
92
|
-
// guide the agent to expose the variable as a global first
|
|
93
90
|
if (result.error?.includes("ReferenceError")) {
|
|
94
91
|
errorText +=
|
|
95
92
|
"\n\nNOTE: This variable is not exposed as a global. To access it, first assign it to a global variable in your app code (e.g., `globalThis.__MY_VAR__ = myVar;`), then use execute_in_app to read `__MY_VAR__`. You can also use list_debug_globals to see what globals ARE currently available.";
|
|
@@ -104,17 +101,10 @@ export function registerExecutionTools(server) {
|
|
|
104
101
|
}
|
|
105
102
|
],
|
|
106
103
|
isError: true,
|
|
107
|
-
// Include expression as context for telemetry (helps debug syntax errors)
|
|
108
104
|
_errorContext: expression
|
|
109
105
|
};
|
|
110
106
|
}
|
|
111
107
|
let resultText = result.result ?? "undefined";
|
|
112
|
-
// Bound the result unless verbose or explicitly unlimited.
|
|
113
|
-
//
|
|
114
|
-
// Structural bounding rather than a mid-string clip: a clip can cut
|
|
115
|
-
// JSON in half, which tells the reader nothing about what was lost
|
|
116
|
-
// and cannot be parsed. Bounding keeps the shape and reports real
|
|
117
|
-
// array lengths and key counts, so the next read can be targeted.
|
|
118
108
|
if (!verbose && maxResultLength > 0) {
|
|
119
109
|
const bounded = applyResultBudget(resultText, maxResultLength);
|
|
120
110
|
resultText = bounded.text;
|
|
@@ -138,15 +128,12 @@ export function registerExecutionTools(server) {
|
|
|
138
128
|
}
|
|
139
129
|
]
|
|
140
130
|
};
|
|
141
|
-
},
|
|
142
|
-
// Empty result detector: successful execution but no meaningful output
|
|
143
|
-
(result) => {
|
|
131
|
+
}, (result) => {
|
|
144
132
|
if (result?.isError)
|
|
145
133
|
return false;
|
|
146
134
|
const text = result?.content?.[0]?.text;
|
|
147
135
|
return text === undefined || text === "" || text === "undefined" || text === "null";
|
|
148
136
|
});
|
|
149
|
-
// Tool: List debug globals available in the app
|
|
150
137
|
registerToolWithTelemetry(server, "list_debug_globals", {
|
|
151
138
|
description: "List globally available debugging objects in the connected app (Apollo, Redux, React DevTools, etc.).\n" +
|
|
152
139
|
"PURPOSE: Enumerate the app's globalThis.* surface so you know which stores, clients, and debug hooks you can drill into.\n" +
|
|
@@ -181,7 +168,6 @@ export function registerExecutionTools(server) {
|
|
|
181
168
|
]
|
|
182
169
|
};
|
|
183
170
|
});
|
|
184
|
-
// Tool: Inspect a global object to see its properties and types
|
|
185
171
|
registerToolWithTelemetry(server, "inspect_global", {
|
|
186
172
|
description: "Inspect a global object (or a dotted path into one) to see its properties, types, and whether they are callable functions. Use this BEFORE calling methods on unfamiliar objects to avoid errors.\n" +
|
|
187
173
|
"PURPOSE: Surface the shape of a global (Apollo client, Redux store, Expo Router, SDK-registered store, etc.) — keys, types, and which members are callable — without executing arbitrary code.\n" +
|
|
@@ -201,8 +187,6 @@ export function registerExecutionTools(server) {
|
|
|
201
187
|
const result = await inspectGlobal(objectName, device);
|
|
202
188
|
if (!result.success) {
|
|
203
189
|
let errorText = `Error: ${result.error}`;
|
|
204
|
-
// If the global (or path) doesn't resolve, guide the agent toward
|
|
205
|
-
// either exposing it manually or registering it via the SDK.
|
|
206
190
|
const looksMissing = result.error?.includes("ReferenceError") || result.error?.includes("NotFound") || result.error?.includes("not found");
|
|
207
191
|
if (looksMissing) {
|
|
208
192
|
const isPath = objectName.includes(".");
|
|
@@ -233,7 +217,6 @@ export function registerExecutionTools(server) {
|
|
|
233
217
|
]
|
|
234
218
|
};
|
|
235
219
|
});
|
|
236
|
-
// Tool: Did the JS runtime accept a Fast Refresh update since `since`?
|
|
237
220
|
registerToolWithTelemetry(server, "get_refresh_status", {
|
|
238
221
|
description: "Pull-style probe: did the JS runtime accept a Fast Refresh (HMR) update since `since`? Returns lastUpdateAt, updateCount, and recentUpdates from a 32-entry ring buffer fed by a recorder around __ReactRefresh.performReactRefresh (preferred) or \\$RefreshReg\\$ (fallback).\n\n" +
|
|
239
222
|
"PURPOSE: Confirm an edit landed in the running app without polling logs or screenshots. After editing TSX, wait ~2s then call with `since` = a Date.now() captured BEFORE the edit. updateCount > 0 means Fast Refresh accepted.\n\n" +
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"executionTools.js","sourceRoot":"","sources":["../../src/tools/executionTools.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjF,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,sBAAsB,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAC/E,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAElD,MAAM,UAAU,sBAAsB,CAAC,MAAiB;
|
|
1
|
+
{"version":3,"file":"executionTools.js","sourceRoot":"","sources":["../../src/tools/executionTools.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjF,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,sBAAsB,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAC/E,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAElD,MAAM,UAAU,sBAAsB,CAAC,MAAiB;IAEpD,yBAAyB,CACrB,MAAM,E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B,KAAK,CAAC,IAAI,CAAC,uDAAuD,CAAC,CAAC;QACxE,CAAC;QAED,OAAO;YACH,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;SACtD,CAAC;IACN,CAAC,CACJ,CAAC;AACN,CAAC"}
|
|
@@ -1,17 +1,7 @@
|
|
|
1
1
|
import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
2
2
|
import { type TextEntryResult } from "../core/textEntry.js";
|
|
3
|
-
/**
|
|
4
|
-
* Default swipe gesture duration. Android has always used 300ms; iOS passed no
|
|
5
|
-
* duration at all and inherited AXe's ~1s drag, which was both slower and too
|
|
6
|
-
* slow to trigger inertial scrolling. Shared so the platforms cannot drift again.
|
|
7
|
-
*/
|
|
8
3
|
export declare const SWIPE_DEFAULT_DURATION_MS = 300;
|
|
9
4
|
export declare function registerInteractionTools(server: McpServer): void;
|
|
10
|
-
/**
|
|
11
|
-
* Renders a text-entry outcome. Two rules carry the whole design:
|
|
12
|
-
* an unverified write must never read as a plain success, and a failed
|
|
13
|
-
* keyboard raise must never read as a failed write.
|
|
14
|
-
*/
|
|
15
5
|
export declare function formatTextEntryResponse(r: TextEntryResult): {
|
|
16
6
|
content: Array<{
|
|
17
7
|
type: "text";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interactionTools.d.ts","sourceRoot":"","sources":["../../src/tools/interactionTools.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;
|
|
1
|
+
{"version":3,"file":"interactionTools.d.ts","sourceRoot":"","sources":["../../src/tools/interactionTools.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAwBzE,OAAO,EAAa,KAAK,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAcvE,eAAO,MAAM,yBAAyB,MAAM,CAAC;AAE7C,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CAs/BhE;AAOD,wBAAgB,uBAAuB,CAAC,CAAC,EAAE,eAAe,GAAG;IACzD,OAAO,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC/C,OAAO,CAAC,EAAE,OAAO,CAAC;CACrB,CA+CA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { registerToolWithTelemetry } from "../core/register.js";
|
|
3
|
-
import { androidLongPress, androidSwipe, androidInputText, androidKeyEvent, ANDROID_KEY_EVENTS, iosButton, iosInputText, iosSwipe, IOS_BUTTON_TYPES, getDevicePixelRatio, connectedApps, } from "../core/index.js";
|
|
3
|
+
import { androidLongPress, androidSwipe, androidPinch, androidInputText, androidKeyEvent, ANDROID_KEY_EVENTS, iosButton, iosInputText, iosSwipe, IOS_BUTTON_TYPES, getDevicePixelRatio, connectedApps, } from "../core/index.js";
|
|
4
4
|
import { tap, convertScreenshotToTapCoords, computeSwipeFromDirection } from "../pro/tap.js";
|
|
5
5
|
import { captureScreenshot, verifyAndCapture, burstCaptureAndVerify, } from "../pro/verifyAction.js";
|
|
6
6
|
import { clearFocusedInput, dismissKeyboard, inputTextWithReplace } from "../core/focusedInputTools.js";
|
|
@@ -11,14 +11,8 @@ import { readNativeFields } from "../core/nativeInputValue.js";
|
|
|
11
11
|
import { primaryInteractionBanner, platformFallbackBanner, platformUniqueBanner } from "../core/toolHelpers.js";
|
|
12
12
|
import { resolveDeviceTarget, formatResolverError } from "../core/deviceResolver.js";
|
|
13
13
|
import { resolveAndroidDeviceId, resolveIosUdid, ANDROID_ARG_DESC, IOS_ARG_DESC } from "./_deviceArg.js";
|
|
14
|
-
/**
|
|
15
|
-
* Default swipe gesture duration. Android has always used 300ms; iOS passed no
|
|
16
|
-
* duration at all and inherited AXe's ~1s drag, which was both slower and too
|
|
17
|
-
* slow to trigger inertial scrolling. Shared so the platforms cannot drift again.
|
|
18
|
-
*/
|
|
19
14
|
export const SWIPE_DEFAULT_DURATION_MS = 300;
|
|
20
15
|
export function registerInteractionTools(server) {
|
|
21
|
-
// Tool: Unified tap — tries fiber, accessibility, OCR, coordinate strategies
|
|
22
16
|
registerToolWithTelemetry(server, "tap", {
|
|
23
17
|
description: "Tap a UI element. Automatically tries multiple strategies: fiber tree (React), accessibility tree (native), and OCR (visual)." +
|
|
24
18
|
primaryInteractionBanner() + "\n" +
|
|
@@ -118,10 +112,6 @@ export function registerInteractionTools(server) {
|
|
|
118
112
|
});
|
|
119
113
|
const { screenshot: screenshotData, ...resultWithoutScreenshot } = result;
|
|
120
114
|
const text = JSON.stringify(resultWithoutScreenshot, null, 2);
|
|
121
|
-
// Pack predicate + strategy mode + attempted strategies into errorContext for telemetry.
|
|
122
|
-
// Always include the predicate so unmeaningful outcomes (no isError, no _errorMessage) still
|
|
123
|
-
// carry triage context — otherwise blob8 ends up blank and the dashboard shows empty rows.
|
|
124
|
-
// e.g. "p={\"text\":\"Save\"}|s=ocr|fiber:no_pressable|ocr:no_match"
|
|
125
115
|
const stratPrefix = args.strategy && args.strategy !== "auto" ? `s=${args.strategy}|` : "";
|
|
126
116
|
let predicatePrefix = "";
|
|
127
117
|
try {
|
|
@@ -130,7 +120,6 @@ export function registerInteractionTools(server) {
|
|
|
130
120
|
}
|
|
131
121
|
}
|
|
132
122
|
catch {
|
|
133
|
-
// query may contain non-serializable values — drop the prefix rather than fail.
|
|
134
123
|
}
|
|
135
124
|
const attemptedPart = result.attempted?.length
|
|
136
125
|
? result.attempted.map(a => `${a.strategy}:${a.reason.slice(0, 40)}`).join("|")
|
|
@@ -165,9 +154,6 @@ export function registerInteractionTools(server) {
|
|
|
165
154
|
_appRoute: result.appRoute,
|
|
166
155
|
};
|
|
167
156
|
});
|
|
168
|
-
// Android UI Input Tools (Phase 2)
|
|
169
|
-
// ============================================================================
|
|
170
|
-
// Tool: Android long press
|
|
171
157
|
registerToolWithTelemetry(server, "android_long_press", {
|
|
172
158
|
description: "Long press at specific coordinates on an Android device/emulator screen" +
|
|
173
159
|
platformFallbackBanner("`tap` for short taps; keep android_long_press for long-press gestures specifically") +
|
|
@@ -197,7 +183,6 @@ export function registerInteractionTools(server) {
|
|
|
197
183
|
isError: !result.success
|
|
198
184
|
};
|
|
199
185
|
});
|
|
200
|
-
// Tool: Cross-platform swipe — auto-routes to iOS or Android backend
|
|
201
186
|
registerToolWithTelemetry(server, "swipe", {
|
|
202
187
|
description: "Swipe gesture that auto-routes to the correct platform (iOS or Android), with pixel-diff verification." +
|
|
203
188
|
primaryInteractionBanner() + "\n" +
|
|
@@ -276,8 +261,6 @@ export function registerInteractionTools(server) {
|
|
|
276
261
|
const coordCount = [startX, startY, endX, endY].filter((v) => v !== undefined).length;
|
|
277
262
|
const hasAllCoords = coordCount === 4;
|
|
278
263
|
const useDirection = !hasAllCoords;
|
|
279
|
-
// Partial coordinates are only an error when no direction was given; an
|
|
280
|
-
// explicit direction takes the shorthand path and ignores stray coords.
|
|
281
264
|
if (!hasAllCoords && coordCount > 0 && direction === undefined) {
|
|
282
265
|
return {
|
|
283
266
|
content: [{
|
|
@@ -287,14 +270,11 @@ export function registerInteractionTools(server) {
|
|
|
287
270
|
isError: true,
|
|
288
271
|
};
|
|
289
272
|
}
|
|
290
|
-
// Capture before-screenshot only if we'll need it (verify or burst).
|
|
291
273
|
const wantBefore = shouldVerify || shouldBurst;
|
|
292
274
|
let beforeCapture = wantBefore
|
|
293
275
|
? await captureScreenshot(resolvedPlatform, resolvedUdid)
|
|
294
276
|
: null;
|
|
295
277
|
if (useDirection) {
|
|
296
|
-
// Need screen dimensions to compute the centered gesture. Reuse the
|
|
297
|
-
// before-frame if we captured one; otherwise grab one measurement frame.
|
|
298
278
|
let dims = beforeCapture;
|
|
299
279
|
if (!dims) {
|
|
300
280
|
dims = await captureScreenshot(resolvedPlatform, resolvedUdid);
|
|
@@ -308,7 +288,8 @@ export function registerInteractionTools(server) {
|
|
|
308
288
|
isError: true,
|
|
309
289
|
};
|
|
310
290
|
}
|
|
311
|
-
const
|
|
291
|
+
const shotScale = dims.scaleFactor || 1;
|
|
292
|
+
const computed = computeSwipeFromDirection((direction ?? "up"), distance, dims.width / shotScale, dims.height / shotScale);
|
|
312
293
|
startX = computed.startX;
|
|
313
294
|
startY = computed.startY;
|
|
314
295
|
endX = computed.endX;
|
|
@@ -316,10 +297,6 @@ export function registerInteractionTools(server) {
|
|
|
316
297
|
}
|
|
317
298
|
const beforeBuffer = beforeCapture?.buffer ?? null;
|
|
318
299
|
const beforeScaleFactor = beforeCapture?.scaleFactor;
|
|
319
|
-
// Prefer the scale factor of the frame captured for THIS device this
|
|
320
|
-
// turn over `connectedApps[0].lastScreenshot`, which may be stale or
|
|
321
|
-
// belong to another device on a multi-device setup — the same fix tap
|
|
322
|
-
// carries for its coordinate strategy (Bug #5, 2026-05-20).
|
|
323
300
|
const swipeScaleFactor = beforeCapture?.scaleFactor
|
|
324
301
|
?? connectedApps.values().next().value?.lastScreenshot?.scaleFactor
|
|
325
302
|
?? 1;
|
|
@@ -331,11 +308,6 @@ export function registerInteractionTools(server) {
|
|
|
331
308
|
const dpr = await getDevicePixelRatio(resolvedUdid, dprHint);
|
|
332
309
|
const start = convertScreenshotToTapCoords(startX, startY, "ios", dpr, swipeScaleFactor);
|
|
333
310
|
const end = convertScreenshotToTapCoords(endX, endY, "ios", dpr, swipeScaleFactor);
|
|
334
|
-
// Without an explicit duration, AXe drags for ~1s (measured
|
|
335
|
-
// 2026-08-01) — slower than the Android path, which has always
|
|
336
|
-
// defaulted to 300ms, and slow enough that iOS never produced the
|
|
337
|
-
// inertial fling a real scroll gesture has. Default both platforms
|
|
338
|
-
// to the same 300ms flick.
|
|
339
311
|
const duration = (durationMs ?? SWIPE_DEFAULT_DURATION_MS) / 1000;
|
|
340
312
|
driverResult = await iosSwipe(start.x, start.y, end.x, end.y, { duration, delta, udid: resolvedUdid });
|
|
341
313
|
}
|
|
@@ -350,7 +322,6 @@ export function registerInteractionTools(server) {
|
|
|
350
322
|
isError: true
|
|
351
323
|
};
|
|
352
324
|
}
|
|
353
|
-
// Driver succeeded — run verification.
|
|
354
325
|
const verifyResult = shouldBurst
|
|
355
326
|
? await burstCaptureAndVerify({
|
|
356
327
|
platform: resolvedPlatform,
|
|
@@ -399,7 +370,193 @@ export function registerInteractionTools(server) {
|
|
|
399
370
|
_changeRate: verification && !verification.skipped ? verification.changeRate : undefined,
|
|
400
371
|
};
|
|
401
372
|
});
|
|
402
|
-
|
|
373
|
+
registerToolWithTelemetry(server, "pinch", {
|
|
374
|
+
description: "Pinch-to-zoom using REAL two-finger touch events, with pixel-diff verification. ANDROID EMULATOR ONLY (iOS in progress)." +
|
|
375
|
+
primaryInteractionBanner() + "\n" +
|
|
376
|
+
"PURPOSE: Zoom a map, image gallery, photo viewer, or any zoomable surface. pinch({ direction: \"out\" }) zooms in at screen centre; \"in\" zooms out. Pass x/y to zoom around a specific point.\n" +
|
|
377
|
+
"HOW IT WORKS: Two independent contacts sent through the emulator's multi-touch bridge as real kernel touch events. It works below the app, so it drives React Native, native views, WebViews — anything on screen.\n" +
|
|
378
|
+
"VERIFICATION: verify=true (default) returns `verification.meaningful` — false means nothing zoomed (not zoomable, already at a zoom limit, or the focal point missed).\n" +
|
|
379
|
+
"WORKFLOW: pinch({ direction: \"out\" }) -> read verification.meaningful. Take x/y from get_screen_state or a screenshot; no conversion needed.\n" +
|
|
380
|
+
"IF direction=\"in\" DOES NOTHING: lower `span` (try 0.5). A pinch-in starts with the fingers far apart, so at span 1 they land at the screen extremes where a top bar or bottom sheet can take the gesture.\n" +
|
|
381
|
+
"LIMITATIONS: Physical Android devices and iOS have no multi-touch channel and return an explicit error, never a partial result. Success means real fingers moved — this never fakes zoom by calling app code.\n",
|
|
382
|
+
inputSchema: {
|
|
383
|
+
direction: z
|
|
384
|
+
.enum(["in", "out"])
|
|
385
|
+
.optional()
|
|
386
|
+
.default("out")
|
|
387
|
+
.describe("\"out\" spreads the fingers apart and zooms IN (default). " +
|
|
388
|
+
"\"in\" brings them together and zooms OUT."),
|
|
389
|
+
scale: z.coerce
|
|
390
|
+
.number()
|
|
391
|
+
.positive()
|
|
392
|
+
.optional()
|
|
393
|
+
.default(3)
|
|
394
|
+
.describe("How far the fingers travel, as a ratio between their start and end separation. " +
|
|
395
|
+
"Default 3. Large values are split automatically into several chained gestures."),
|
|
396
|
+
x: z.coerce
|
|
397
|
+
.number()
|
|
398
|
+
.optional()
|
|
399
|
+
.describe("Focal point X in screenshot pixels — the point the zoom centres on. Default: screen centre."),
|
|
400
|
+
y: z.coerce
|
|
401
|
+
.number()
|
|
402
|
+
.optional()
|
|
403
|
+
.describe("Focal point Y in screenshot pixels — the point the zoom centres on. Default: screen centre."),
|
|
404
|
+
angle: z.coerce
|
|
405
|
+
.number()
|
|
406
|
+
.optional()
|
|
407
|
+
.default(0)
|
|
408
|
+
.describe("Axis the two fingers sit on, in degrees. 0 = horizontal (default), 90 = vertical."),
|
|
409
|
+
span: z.coerce
|
|
410
|
+
.number()
|
|
411
|
+
.min(0.05)
|
|
412
|
+
.max(1)
|
|
413
|
+
.optional()
|
|
414
|
+
.default(1)
|
|
415
|
+
.describe("How much of the screen the gesture occupies, as a fraction 0-1 (default 1 = as wide as fits). " +
|
|
416
|
+
"Lower it when direction=\"in\" fails: a pinch-in STARTS with the fingers far apart, so at span 1 " +
|
|
417
|
+
"they land at the screen extremes and a top bar or bottom sheet can take the gesture instead of " +
|
|
418
|
+
"the zoomable surface. span 0.5 keeps both contacts near the focal point. Does not change the " +
|
|
419
|
+
"zoom ratio — that is `scale`."),
|
|
420
|
+
durationMs: z.coerce
|
|
421
|
+
.number()
|
|
422
|
+
.optional()
|
|
423
|
+
.describe(`Gesture duration in milliseconds (default: ${SWIPE_DEFAULT_DURATION_MS}).`),
|
|
424
|
+
device: z
|
|
425
|
+
.string()
|
|
426
|
+
.optional()
|
|
427
|
+
.describe("Target device. Accepts (a) an Android adb serial like 'emulator-5554', " +
|
|
428
|
+
"(b) the emulator name (substring match), or " +
|
|
429
|
+
"(c) a connected RN app's deviceName (substring match against get_apps output). " +
|
|
430
|
+
"Omit when exactly one device is available. Call list_devices to enumerate."),
|
|
431
|
+
verify: z
|
|
432
|
+
.boolean()
|
|
433
|
+
.optional()
|
|
434
|
+
.default(true)
|
|
435
|
+
.describe("Compare before/after screenshots to detect whether the pinch produced a visual change. " +
|
|
436
|
+
"Set false to skip. When skipped, the response contains `verification: { skipped: true, skippedReason }`."),
|
|
437
|
+
screenshot: z
|
|
438
|
+
.boolean()
|
|
439
|
+
.optional()
|
|
440
|
+
.default(true)
|
|
441
|
+
.describe("Return the post-pinch image bytes in the response. Default true. Set to false to drop the PNG bytes — " +
|
|
442
|
+
"verification still runs (set verify=false to skip that too)."),
|
|
443
|
+
burst: z
|
|
444
|
+
.boolean()
|
|
445
|
+
.optional()
|
|
446
|
+
.default(false)
|
|
447
|
+
.describe("Capture rapid sequential frames after the pinch to catch transient feedback (rubber-band " +
|
|
448
|
+
"snap-back at a zoom limit) even when the final state is unchanged. Frames land in the image " +
|
|
449
|
+
"buffer; retrieve with get_images(groupId=verification.burstGroupId)."),
|
|
450
|
+
}
|
|
451
|
+
}, async ({ direction, scale, x, y, angle, span, durationMs, device, verify, screenshot, burst }) => {
|
|
452
|
+
const resolved = await resolveDeviceTarget(device);
|
|
453
|
+
if (!resolved.ok) {
|
|
454
|
+
return {
|
|
455
|
+
content: [{ type: "text", text: `Error: ${formatResolverError(resolved.error)}` }],
|
|
456
|
+
isError: true
|
|
457
|
+
};
|
|
458
|
+
}
|
|
459
|
+
if (resolved.target.platform !== "android") {
|
|
460
|
+
return {
|
|
461
|
+
content: [{
|
|
462
|
+
type: "text",
|
|
463
|
+
text: "Error: pinch is not available on iOS yet. Multi-touch on the iOS simulator needs an " +
|
|
464
|
+
"Indigo HID helper that does not ship in any released idb build; it is planned as a " +
|
|
465
|
+
"follow-up. Android emulators are supported today.",
|
|
466
|
+
}],
|
|
467
|
+
isError: true,
|
|
468
|
+
};
|
|
469
|
+
}
|
|
470
|
+
const shouldVerify = verify !== false;
|
|
471
|
+
const shouldScreenshot = screenshot !== false;
|
|
472
|
+
const shouldBurst = burst === true;
|
|
473
|
+
const wantBefore = shouldVerify || shouldBurst || x === undefined || y === undefined;
|
|
474
|
+
const beforeCapture = wantBefore
|
|
475
|
+
? await captureScreenshot("android", undefined)
|
|
476
|
+
: null;
|
|
477
|
+
if ((x === undefined || y === undefined) && (!beforeCapture || !beforeCapture.width || !beforeCapture.height)) {
|
|
478
|
+
return {
|
|
479
|
+
content: [{
|
|
480
|
+
type: "text",
|
|
481
|
+
text: "Error: could not read screen dimensions to place the pinch. Pass explicit x and y instead.",
|
|
482
|
+
}],
|
|
483
|
+
isError: true,
|
|
484
|
+
};
|
|
485
|
+
}
|
|
486
|
+
const pinchScaleFactor = beforeCapture?.scaleFactor
|
|
487
|
+
?? connectedApps.values().next().value?.lastScreenshot?.scaleFactor
|
|
488
|
+
?? 1;
|
|
489
|
+
const focalScreenshotX = x ?? beforeCapture.width / pinchScaleFactor / 2;
|
|
490
|
+
const focalScreenshotY = y ?? beforeCapture.height / pinchScaleFactor / 2;
|
|
491
|
+
const focal = convertScreenshotToTapCoords(focalScreenshotX, focalScreenshotY, "android", 1, pinchScaleFactor);
|
|
492
|
+
const driverResult = await androidPinch({
|
|
493
|
+
focalX: focal.x,
|
|
494
|
+
focalY: focal.y,
|
|
495
|
+
direction: (direction ?? "out"),
|
|
496
|
+
scale: scale ?? 3,
|
|
497
|
+
angleDeg: angle ?? 0,
|
|
498
|
+
durationMs: durationMs ?? SWIPE_DEFAULT_DURATION_MS,
|
|
499
|
+
span: span ?? 1,
|
|
500
|
+
serial: resolved.target.androidSerial,
|
|
501
|
+
});
|
|
502
|
+
if (!driverResult.success) {
|
|
503
|
+
return {
|
|
504
|
+
content: [{ type: "text", text: `Error: ${driverResult.error}` }],
|
|
505
|
+
isError: true
|
|
506
|
+
};
|
|
507
|
+
}
|
|
508
|
+
const verifyResult = shouldBurst
|
|
509
|
+
? await burstCaptureAndVerify({
|
|
510
|
+
platform: "android",
|
|
511
|
+
beforeBuffer: beforeCapture?.buffer ?? null,
|
|
512
|
+
udid: undefined,
|
|
513
|
+
beforeScaleFactor: beforeCapture?.scaleFactor,
|
|
514
|
+
source: "pinch-burst",
|
|
515
|
+
})
|
|
516
|
+
: await verifyAndCapture({
|
|
517
|
+
platform: "android",
|
|
518
|
+
shouldVerify,
|
|
519
|
+
shouldScreenshot,
|
|
520
|
+
beforeBuffer: beforeCapture?.buffer ?? null,
|
|
521
|
+
udid: undefined,
|
|
522
|
+
beforeScaleFactor: beforeCapture?.scaleFactor,
|
|
523
|
+
source: "pinch-verify",
|
|
524
|
+
});
|
|
525
|
+
const { screenshot: screenshotData, verification } = verifyResult;
|
|
526
|
+
const warning = verification && !verification.skipped && verification.meaningful === false
|
|
527
|
+
? "Pinch executed but no visual change detected — the surface may not be zoomable, may already be at its zoom limit, or the focal point may have missed the zoomable view. Inspect the screenshot and retry with a different focal point if needed."
|
|
528
|
+
: undefined;
|
|
529
|
+
const responseBody = {
|
|
530
|
+
success: true,
|
|
531
|
+
platform: "android",
|
|
532
|
+
direction: direction ?? "out",
|
|
533
|
+
focal: { x: focalScreenshotX, y: focalScreenshotY },
|
|
534
|
+
span: span ?? 1,
|
|
535
|
+
separation: { start: driverResult.startHalf, end: driverResult.endHalf },
|
|
536
|
+
gestureCount: driverResult.gestureCount,
|
|
537
|
+
frameCount: driverResult.frameCount,
|
|
538
|
+
driverMessage: driverResult.result,
|
|
539
|
+
...(verification && { verification }),
|
|
540
|
+
...(warning && { warning }),
|
|
541
|
+
deviceNote: resolved.note,
|
|
542
|
+
};
|
|
543
|
+
const content = [
|
|
544
|
+
{ type: "text", text: JSON.stringify(responseBody, null, 2) },
|
|
545
|
+
];
|
|
546
|
+
if (shouldScreenshot && screenshotData) {
|
|
547
|
+
content.push({
|
|
548
|
+
type: "image",
|
|
549
|
+
data: screenshotData.image,
|
|
550
|
+
mimeType: "image/jpeg",
|
|
551
|
+
});
|
|
552
|
+
}
|
|
553
|
+
return {
|
|
554
|
+
content,
|
|
555
|
+
isError: false,
|
|
556
|
+
_meaningful: verification && !verification.skipped ? verification.meaningful : undefined,
|
|
557
|
+
_changeRate: verification && !verification.skipped ? verification.changeRate : undefined,
|
|
558
|
+
};
|
|
559
|
+
});
|
|
403
560
|
registerToolWithTelemetry(server, "android_input_text", {
|
|
404
561
|
description: "Type text on an Android device/emulator." +
|
|
405
562
|
platformFallbackBanner("`input_text` — it targets, focuses, writes and verifies in one call") +
|
|
@@ -438,7 +595,6 @@ export function registerInteractionTools(server) {
|
|
|
438
595
|
isError: !result.success
|
|
439
596
|
};
|
|
440
597
|
});
|
|
441
|
-
// Tool: Android key event
|
|
442
598
|
registerToolWithTelemetry(server, "android_key_event", {
|
|
443
599
|
description: "Send a key event to an Android device/emulator." +
|
|
444
600
|
platformUniqueBanner("sending Android key events (BACK, HOME, MENU, etc.)") +
|
|
@@ -453,7 +609,6 @@ export function registerInteractionTools(server) {
|
|
|
453
609
|
.describe(ANDROID_ARG_DESC)
|
|
454
610
|
}
|
|
455
611
|
}, async ({ key, deviceId }) => {
|
|
456
|
-
// Try to parse as number first, otherwise treat as key name
|
|
457
612
|
const keyCode = /^\d+$/.test(key) ? parseInt(key, 10) : key.toUpperCase();
|
|
458
613
|
const r = await resolveAndroidDeviceId(deviceId);
|
|
459
614
|
if (!r.ok)
|
|
@@ -469,19 +624,6 @@ export function registerInteractionTools(server) {
|
|
|
469
624
|
isError: !result.success
|
|
470
625
|
};
|
|
471
626
|
});
|
|
472
|
-
// ============================================================================
|
|
473
|
-
// Android Accessibility Tools (UI Hierarchy)
|
|
474
|
-
// ============================================================================
|
|
475
|
-
// ============================================================================
|
|
476
|
-
// iOS Simulator Tools
|
|
477
|
-
// ============================================================================
|
|
478
|
-
// Tool: iOS install app
|
|
479
|
-
// ============================================================================
|
|
480
|
-
// iOS UI Interaction Tools (require an iOS UI driver)
|
|
481
|
-
// Default: AXe — brew install cameroncooke/axe/axe
|
|
482
|
-
// Alternative: IDB — brew install idb-companion (set IOS_DRIVER=idb)
|
|
483
|
-
// ============================================================================
|
|
484
|
-
// Tool: iOS button
|
|
485
627
|
server.registerTool("ios_button", {
|
|
486
628
|
description: "Press a hardware button on an iOS simulator." +
|
|
487
629
|
platformUniqueBanner("pressing iOS hardware buttons (HOME, LOCK, SIRI, APPLE_PAY)") +
|
|
@@ -510,8 +652,6 @@ export function registerInteractionTools(server) {
|
|
|
510
652
|
isError: !result.success
|
|
511
653
|
};
|
|
512
654
|
});
|
|
513
|
-
// Tool: Clear focused text input
|
|
514
|
-
// Tool: Dismiss keyboard
|
|
515
655
|
registerToolWithTelemetry(server, "dismiss_keyboard", {
|
|
516
656
|
description: "Blur the currently focused TextInput, dismissing the on-screen keyboard." +
|
|
517
657
|
"\nPURPOSE: Close the keyboard when it's blocking content beneath the input, or move focus off an input before a tap that would otherwise be intercepted." +
|
|
@@ -538,7 +678,6 @@ export function registerInteractionTools(server) {
|
|
|
538
678
|
isError: !result.success
|
|
539
679
|
};
|
|
540
680
|
});
|
|
541
|
-
// Tool: iOS input text
|
|
542
681
|
registerToolWithTelemetry(server, "ios_input_text", {
|
|
543
682
|
description: "Type text on an iOS simulator." +
|
|
544
683
|
platformFallbackBanner("`input_text` — it targets, focuses, writes and verifies in one call") +
|
|
@@ -574,7 +713,6 @@ export function registerInteractionTools(server) {
|
|
|
574
713
|
isError: !result.success
|
|
575
714
|
};
|
|
576
715
|
});
|
|
577
|
-
// Tool: cross-platform text entry
|
|
578
716
|
registerToolWithTelemetry(server, "input_text", {
|
|
579
717
|
description: "Write text into a React Native TextInput and verify it landed." +
|
|
580
718
|
primaryInteractionBanner() +
|
|
@@ -632,11 +770,6 @@ export function registerInteractionTools(server) {
|
|
|
632
770
|
return formatTextEntryResponse(result);
|
|
633
771
|
});
|
|
634
772
|
}
|
|
635
|
-
/**
|
|
636
|
-
* Renders a text-entry outcome. Two rules carry the whole design:
|
|
637
|
-
* an unverified write must never read as a plain success, and a failed
|
|
638
|
-
* keyboard raise must never read as a failed write.
|
|
639
|
-
*/
|
|
640
773
|
export function formatTextEntryResponse(r) {
|
|
641
774
|
const lines = [];
|
|
642
775
|
if (r.success) {
|
|
@@ -651,8 +784,6 @@ export function formatTextEntryResponse(r) {
|
|
|
651
784
|
if (r.landed !== undefined)
|
|
652
785
|
lines.push(` landed: ${JSON.stringify(r.landed)}`);
|
|
653
786
|
if (r.candidates?.length) {
|
|
654
|
-
// Never let a capped list read as the complete picture — that is how
|
|
655
|
-
// a caller concludes its field is absent when it is past the cut.
|
|
656
787
|
const hidden = !r.ambiguous && r.totalInputs !== undefined && r.totalInputs > r.candidates.length
|
|
657
788
|
? ` (showing ${r.candidates.length} of ${r.totalInputs})`
|
|
658
789
|
: "";
|