agent-device 0.20.10 → 0.21.1
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 -2
- package/android/ime-helper/dist/{agent-device-android-ime-helper-0.20.10.apk → agent-device-android-ime-helper-0.21.1.apk} +0 -0
- package/android/ime-helper/dist/agent-device-android-ime-helper-0.21.1.apk.sha256 +1 -0
- package/android/ime-helper/dist/{agent-device-android-ime-helper-0.20.10.manifest.json → agent-device-android-ime-helper-0.21.1.manifest.json} +4 -4
- package/android/snapshot-helper/dist/agent-device-android-snapshot-helper-0.21.1.apk +0 -0
- package/android/snapshot-helper/dist/agent-device-android-snapshot-helper-0.21.1.apk.sha256 +1 -0
- package/android/snapshot-helper/dist/{agent-device-android-snapshot-helper-0.20.10.manifest.json → agent-device-android-snapshot-helper-0.21.1.manifest.json} +6 -6
- package/apple/macos-helper/Sources/AgentDeviceMacOSHelper/AudioProbe.swift +35 -33
- package/apple/macos-helper/Sources/AgentDeviceMacOSHelper/main.swift +6 -1
- package/apple/snapshot-bridge/LICENSE.idb +23 -0
- package/apple/snapshot-bridge/README.md +106 -0
- package/apple/snapshot-bridge/SnapshotBridge.m +286 -0
- package/apple/snapshot-bridge/SnapshotBridgeCapture.h +25 -0
- package/apple/snapshot-bridge/SnapshotBridgeCapture.m +138 -0
- package/apple/snapshot-bridge/SnapshotBridgeRuntime.h +34 -0
- package/apple/snapshot-bridge/SnapshotBridgeRuntime.m +411 -0
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunner/AgentDeviceRunnerApp.m +58 -0
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunner.xcodeproj/project.pbxproj +19 -0
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerAXSnapshotBridge.h +12 -0
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerAXSnapshotBridge.m +20 -0
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerAlertVerification.swift +36 -0
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerSelectorMatchPolicy.swift +15 -15
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerStringNormalization.swift +8 -0
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerSynthesizedGesture.h +12 -1
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerSynthesizedGesture.m +100 -6
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerSystemSurfaceHostPolicy.swift +72 -0
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTapPointPolicy.swift +63 -14
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+AXSnapshotFallback.swift +677 -83
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Alert.swift +35 -92
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+AlertObservation.swift +124 -0
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+BlockingSystemModalResolution.swift +39 -4
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+CommandExecution.swift +1058 -213
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+CommandJournal.swift +296 -14
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Environment.swift +1 -1
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Exceptions.swift +10 -10
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Interaction.swift +309 -149
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Keyboard.swift +101 -42
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Lifecycle.swift +24 -17
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Models.swift +124 -199
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Navigation.swift +71 -4
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+PrivateAXElementTypes.swift +12 -0
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+PrivateAXPresentation.swift +211 -78
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+ScreenRecorder.swift +30 -10
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+ScrollGesture.swift +254 -24
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+SequenceExecution.swift +206 -22
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Snapshot.swift +465 -494
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+SnapshotBackendCapabilities.swift +168 -0
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+SnapshotCapturePlan.swift +802 -247
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+SnapshotPresentationInvariant.swift +19 -0
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+SnapshotTiming.swift +185 -0
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+SynthesizedCommitDeadline.swift +206 -0
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+SynthesizedGesturePolicy.swift +83 -5
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+SynthesizedTextEntry.swift +156 -34
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+SystemModal.swift +5 -4
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+TextEntry.swift +35 -318
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+TextEntryFocus.swift +206 -0
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+TextEntryReadiness.swift +158 -0
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+TextInputCandidatePolicy.swift +28 -0
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+TextInputProbe.swift +101 -0
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+TextTyping.swift +56 -23
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Transport.swift +56 -27
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+TvRemote.swift +30 -24
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests.swift +126 -80
- package/dist/apple/runner/AgentDeviceRunner/RecordingScripts/RecordingExportSupport.swift +111 -0
- package/dist/apple/runner/AgentDeviceRunner/RecordingScripts/recording-overlay.swift +47 -86
- package/dist/apple/runner/AgentDeviceRunner/RecordingScripts/recording-trim.swift +32 -79
- package/dist/apple/snapshot-presentation/Package.swift +21 -0
- package/dist/apple/snapshot-presentation/Sources/AgentDeviceSnapshotPresentation/SnapshotGeometry.swift +56 -0
- package/dist/apple/snapshot-presentation/Sources/AgentDeviceSnapshotPresentation/SnapshotModels.swift +259 -0
- package/dist/apple/snapshot-presentation/Sources/AgentDeviceSnapshotPresentation/SnapshotPresentation.swift +153 -0
- package/dist/apple/snapshot-presentation/Sources/AgentDeviceSnapshotPresentation/SnapshotPresentationFailure.swift +27 -0
- package/dist/apple/snapshot-presentation/Sources/AgentDeviceSnapshotPresentation/SnapshotPresentationInvariant.swift +91 -0
- package/dist/apple/snapshot-presentation/Sources/AgentDeviceSnapshotPresentation/SnapshotPresentationProjection.swift +161 -0
- package/dist/apple/snapshot-presentation/Sources/AgentDeviceSnapshotPresentation/SnapshotScopePolicy.swift +53 -0
- package/dist/apple/snapshot-presentation/Sources/AgentDeviceSnapshotPresentation/SnapshotVisibilityFold.swift +242 -0
- package/dist/apple/snapshot-presentation/Sources/AgentDeviceSnapshotPresentation/SnapshotVisibilityFoldProjection.swift +97 -0
- package/dist/src/adapter.js +1 -0
- package/dist/src/adb-executor.js +2 -0
- package/dist/src/adb-failure.js +1 -0
- package/dist/src/adb-host.js +1 -0
- package/dist/src/adb.js +1 -0
- package/dist/src/agent-browser-lifecycle.js +1 -0
- package/dist/src/agent-browser-process-record.js +1 -0
- package/dist/src/agent-browser-provider.js +1 -0
- package/dist/src/agent-browser-tool.js +1 -1
- package/dist/src/agent-device-client.js +2 -2
- package/dist/src/ai-sdk.d.ts +2 -2
- package/dist/src/ai-sdk.js +1 -1
- package/dist/src/alert-contract.js +1 -0
- package/dist/src/alert-runtime.js +1 -0
- package/dist/src/android-adb.d.ts +27 -19
- package/dist/src/android-adb.js +1 -1
- package/dist/src/android-input-ownership.js +1 -0
- package/dist/src/android-system-chrome.js +1 -0
- package/dist/src/android.js +1 -1
- package/dist/src/api.js +11 -0
- package/dist/src/app-catalog.js +1 -0
- package/dist/src/app-deployment-resolution.js +2 -0
- package/dist/src/app-helpers.js +1 -1
- package/dist/src/app-inventory-contract.js +1 -0
- package/dist/src/app-inventory.js +1 -0
- package/dist/src/app-launch.js +2 -0
- package/dist/src/app-lifecycle-facade.js +1 -0
- package/dist/src/app-lifecycle.js +3 -6
- package/dist/src/app-lifecycle2.js +2 -2
- package/dist/src/app-lifecycle3.js +1 -0
- package/dist/src/app-log-files.js +1 -1
- package/dist/src/app-log-reconnect.js +1 -1
- package/dist/src/app-log-runtime.js +1 -4
- package/dist/src/app-log-runtime2.js +4 -0
- package/dist/src/app-parsers.js +4 -0
- package/dist/src/app-resolution-cache.js +1 -0
- package/dist/src/app-resolution-facade.js +1 -0
- package/dist/src/app-resolution.js +2 -2
- package/dist/src/app-state.js +1 -2
- package/dist/src/apple-runner-platform.js +1 -0
- package/dist/src/application-lifecycle-interaction.js +1 -0
- package/dist/src/application-lifecycle-runtime.js +1 -0
- package/dist/src/apps-simctl.js +1 -0
- package/dist/src/archive.js +4 -0
- package/dist/src/artifact-download.js +1 -0
- package/dist/src/artifacts.d.ts +6 -2
- package/dist/src/artifacts.js +1 -1
- package/dist/src/async-lifecycle.js +1 -0
- package/dist/src/audio-probe-result.js +1 -0
- package/dist/src/audio-probe-runtime.js +1 -0
- package/dist/src/audio-probe-support.js +1 -0
- package/dist/src/auth-session.js +1 -1
- package/dist/src/auth.js +1 -1
- package/dist/src/backend-snapshot-options.js +1 -1
- package/dist/src/{url.js → base-url.js} +1 -1
- package/dist/src/boot-diagnostics.js +2 -2
- package/dist/src/byte-limit-stream.js +1 -1
- package/dist/src/capabilities.js +1 -0
- package/dist/src/capture.js +1 -0
- package/dist/src/catalog.js +1 -0
- package/dist/src/cli-command-aliases.js +1 -0
- package/dist/src/cli-config.js +1 -1
- package/dist/src/cli-help.js +74 -51
- package/dist/src/cli-output.js +1 -1
- package/dist/src/cli-runner.js +1 -1
- package/dist/src/cli.js +4 -6
- package/dist/src/click-button.js +1 -0
- package/dist/src/client-metro-companion.js +1 -0
- package/dist/src/client-metro.js +1 -1
- package/dist/src/client-types.d.ts +280 -242
- package/dist/src/clipboard.js +1 -0
- package/dist/src/code-signature-cache.js +1 -0
- package/dist/src/code-signature.js +1 -0
- package/dist/src/color.js +1 -0
- package/dist/src/command-metadata.js +1 -1
- package/dist/src/command-schema.js +3 -3
- package/dist/src/command-surface.js +1 -1
- package/dist/src/command-tools.js +2 -2
- package/dist/src/command.js +1 -0
- package/dist/src/compatibility-policy.js +1 -0
- package/dist/src/config.js +1 -1
- package/dist/src/config2.js +1 -0
- package/dist/src/connection-runtime.js +1 -1
- package/dist/src/connection.js +5 -5
- package/dist/src/contracts.d.ts +1 -1
- package/dist/src/contracts.js +1 -1
- package/dist/src/daemon-client-lifecycle.js +1 -0
- package/dist/src/daemon-process.js +1 -0
- package/dist/src/daemon-registration.js +1 -0
- package/dist/src/daemon-shutdown-report.js +1 -1
- package/dist/src/daemon.js +2 -2
- package/dist/src/debug-symbols-facade.js +5 -0
- package/dist/src/deploy-result-target.js +1 -0
- package/dist/src/device-claim-inspection.js +1 -1
- package/dist/src/device-claim-rule.js +1 -0
- package/dist/src/device-input-state.d.ts +190 -3
- package/dist/src/device-inventory-context.js +1 -0
- package/dist/src/device-isolation.js +1 -0
- package/dist/src/device-release.js +1 -0
- package/dist/src/device-rotation.js +1 -0
- package/dist/src/device-selection-resolver.js +1 -0
- package/dist/src/device-session.js +1 -0
- package/dist/src/device.js +1 -1
- package/dist/src/device2.js +3 -2
- package/dist/src/diagnostics.js +3 -0
- package/dist/src/diagnostics2.js +1 -0
- package/dist/src/dispatch-resolve.js +1 -0
- package/dist/src/doctor-facade.js +1 -0
- package/dist/src/doctor-output.js +1 -0
- package/dist/src/doctor.js +1 -0
- package/dist/src/doctor2.js +1 -0
- package/dist/src/doctor3.js +1 -0
- package/dist/src/durable-resource.js +1 -0
- package/dist/src/entities.js +1 -1
- package/dist/src/error.js +2 -0
- package/dist/src/exec.js +1 -0
- package/dist/src/file.js +1 -0
- package/dist/src/find.js +1 -1
- package/dist/src/finders.js +1 -1
- package/dist/src/generic-settle.js +1 -1
- package/dist/src/generic.js +1 -1
- package/dist/src/gesture-admission.js +1 -0
- package/dist/src/gesture-plan-types.js +1 -0
- package/dist/src/gesture-plan.js +1 -0
- package/dist/src/gesture-runtime.js +1 -0
- package/dist/src/harmonyos.js +1 -1
- package/dist/src/hdc.js +1 -1
- package/dist/src/helper.js +2 -2
- package/dist/src/host-file.js +1 -0
- package/dist/src/human-control-contract.js +1 -0
- package/dist/src/human-control.js +1 -0
- package/dist/src/index.d.ts +1 -1
- package/dist/src/index.js +1 -1
- package/dist/src/input-actions.js +1 -4
- package/dist/src/input-actions2.js +2 -1
- package/dist/src/install-artifact-facade.js +1 -0
- package/dist/src/install-source-network-transport.js +1 -0
- package/dist/src/install-source.d.ts +3 -10
- package/dist/src/install-source2.js +1 -1
- package/dist/src/interaction-positionals.js +1 -0
- package/dist/src/interaction-ref-policy.js +1 -0
- package/dist/src/interaction.js +1 -1
- package/dist/src/interaction2.js +1 -1
- package/dist/src/interactor-operation-catalog.js +1 -0
- package/dist/src/interactor-types.js +1 -0
- package/dist/src/interactor.js +6 -2
- package/dist/src/interactor2.js +1 -1
- package/dist/src/interactors.js +1 -1
- package/dist/src/internal/bin.d.ts +1 -1
- package/dist/src/internal/bin.js +1 -2
- package/dist/src/internal/companion-tunnel.d.ts +1 -1
- package/dist/src/internal/companion-tunnel.js +1 -1
- package/dist/src/internal/daemon.d.ts +1 -1
- package/dist/src/internal/daemon.js +2 -4
- package/dist/src/internal/png-worker.d.ts +4 -4
- package/dist/src/internal/png-worker.js +1 -1
- package/dist/src/internal/run-script-http-child.d.ts +4 -0
- package/dist/src/internal/run-script-http-child.js +1 -0
- package/dist/src/internal/update-check-entry.d.ts +1 -1
- package/dist/src/inventory.js +4 -4
- package/dist/src/inventory2.js +1 -1
- package/dist/src/inventory3.js +1 -1
- package/dist/src/inventory5.js +1 -1
- package/dist/src/inventory6.js +1 -1
- package/dist/src/ios-client.js +16 -0
- package/dist/src/ios-snapshot-acquisition.js +1 -0
- package/dist/src/ios-snapshot-adapter.js +1 -0
- package/dist/src/ios-snapshot-planning.js +1 -0
- package/dist/src/ios-snapshot-runtime.js +1 -0
- package/dist/src/ios-system-surface.js +1 -0
- package/dist/src/json.js +1 -0
- package/dist/src/keyboard-actions.js +1 -0
- package/dist/src/launch-console.js +1 -0
- package/dist/src/lease-context.js +1 -1
- package/dist/src/lease-scope.js +1 -0
- package/dist/src/lease.js +1 -1
- package/dist/src/limrun-runtime-dependencies.js +1 -1
- package/dist/src/limrun.d.ts +1610 -7
- package/dist/src/limrun.js +1 -1
- package/dist/src/linux.js +1 -1
- package/dist/src/local-interactor-operation-set.js +1 -0
- package/dist/src/location-coordinates.js +1 -1
- package/dist/src/logcat.js +1 -1
- package/dist/src/macos-facade.js +1 -0
- package/dist/src/managed-device-scope.js +1 -0
- package/dist/src/mechanics.js +19 -0
- package/dist/src/metro.d.ts +4 -2
- package/dist/src/metro.js +1 -1
- package/dist/src/metro2.js +1 -1
- package/dist/src/mobile-snapshot-semantics.js +1 -1
- package/dist/src/multitouch-support.js +1 -0
- package/dist/src/numeric.js +1 -0
- package/dist/src/observability.js +1 -1
- package/dist/src/observation.js +2 -0
- package/dist/src/open-target-resolution.js +1 -0
- package/dist/src/output-path.js +1 -1
- package/dist/src/owner-identity.js +3 -1
- package/dist/src/parameterized-recorded-fill.js +1 -0
- package/dist/src/parser.js +1 -1
- package/dist/src/perf-facade.js +2 -0
- package/dist/src/perf-process-identity.js +1 -0
- package/dist/src/perf-runtime-operation-builder.js +1 -0
- package/dist/src/perf-runtime-plan.js +1 -0
- package/dist/src/perf-runtime.js +1 -0
- package/dist/src/perf.js +1 -4
- package/dist/src/physical-device-control.js +1 -1
- package/dist/src/physical-device-facade.js +1 -0
- package/dist/src/platform-request-scope.js +1 -0
- package/dist/src/platform-runtime-android-adb-host.js +1 -0
- package/dist/src/platform-runtime-android-mechanics.js +1 -0
- package/dist/src/platform-runtime-app-log-android-transport.js +1 -1
- package/dist/src/platform-runtime-app-log-process.js +1 -1
- package/dist/src/platform-runtime-host.js +1 -1
- package/dist/src/platform-runtime-managed-owner.js +1 -0
- package/dist/src/platform-runtime-network-web-transport.js +1 -1
- package/dist/src/platform-runtime-open-target.js +1 -1
- package/dist/src/platform-runtime-operation-host.js +4 -4
- package/dist/src/platform-runtime-runtime-hints.js +2 -2
- package/dist/src/platform-runtime-screen-recording-android-host.js +1 -1
- package/dist/src/platform-runtime-screen-recording-apple-runner-host.js +1 -1
- package/dist/src/platform-runtime-screen-recording-apple-runner-transport.js +1 -1
- package/dist/src/platform-runtime-screen-recording-apple-simulator-host.js +1 -1
- package/dist/src/platform-runtime-screen-recording-apple-transport.js +1 -1
- package/dist/src/platform-runtime-screen-recording-finalizer-host.js +1 -1
- package/dist/src/platform-runtime-screen-recording-harmony-host.js +1 -1
- package/dist/src/platform-runtime-screen-recording-process-host.js +1 -0
- package/dist/src/platform-runtime-screen-recording-web-host.js +1 -1
- package/dist/src/platform-runtime-unavailable.js +1 -0
- package/dist/src/platform-runtime.js +1 -1
- package/dist/src/platform-runtime2.js +1 -1
- package/dist/src/plist.js +1 -1
- package/dist/src/png-worker-contract.js +1 -1
- package/dist/src/prepare-kind.js +1 -0
- package/dist/src/process-exit.js +1 -1
- package/dist/src/process.js +1 -0
- package/dist/src/provider-device-runtime.js +1 -0
- package/dist/src/provider-session-ownership.js +2 -0
- package/dist/src/provider-webdriver.js +1 -1
- package/dist/src/provider.js +1 -1
- package/dist/src/providers.js +1 -0
- package/dist/src/proxy.js +2 -2
- package/dist/src/react-native-overlay.js +1 -0
- package/dist/src/react-native.js +1 -1
- package/dist/src/record-runtime.js +1 -1
- package/dist/src/record-trace.js +1 -1
- package/dist/src/rect-center.js +1 -0
- package/dist/src/register-builtins.js +1 -0
- package/dist/src/registry.js +40 -28
- package/dist/src/remote-config2.js +1 -1
- package/dist/src/replay-divergence.js +2 -0
- package/dist/src/replay.js +2 -2
- package/dist/src/reporting.js +8 -7
- package/dist/src/request-admission.js +1 -0
- package/dist/src/request-cancel.js +1 -0
- package/dist/src/request-cancellation.js +1 -0
- package/dist/src/request-progress-protocol.js +1 -0
- package/dist/src/request-providers.js +1 -0
- package/dist/src/request-runtime-binding.js +1 -0
- package/dist/src/request.js +1 -0
- package/dist/src/result-serialization.js +1 -0
- package/dist/src/retry.js +1 -0
- package/dist/src/rolldown-runtime.js +1 -1
- package/dist/src/runner-cache-metadata.js +2 -0
- package/dist/src/runner-client.js +1 -1
- package/dist/src/runner-disposal.js +1 -1
- package/dist/src/runner-operations-facade.js +1 -0
- package/dist/src/runner-owner-facade.js +1 -0
- package/dist/src/runner-owner-state.js +1 -0
- package/dist/src/runner-presentation.js +1 -0
- package/dist/src/runner.js +1 -0
- package/dist/src/{runtime-transport.js → runtime-transport-hints.js} +1 -1
- package/dist/src/runtime.js +3 -3
- package/dist/src/runtime2.js +4 -4
- package/dist/src/runtime3.js +1 -1
- package/dist/src/runtime4.js +5 -3
- package/dist/src/runtime5.js +1 -1
- package/dist/src/runtime6.js +1 -1
- package/dist/src/runtime7.js +1 -1
- package/dist/src/runtime8.js +1 -1
- package/dist/src/runtime9.js +1 -1
- package/dist/src/scoped-provider.js +1 -1
- package/dist/src/screen-recording-completion.js +1 -0
- package/dist/src/screen-recording-live-handle.js +1 -0
- package/dist/src/screen-recording-options.js +1 -0
- package/dist/src/screen-recording-resource-recovery.js +1 -0
- package/dist/src/screen-recording-runtime.js +1 -0
- package/dist/src/screenshot-density.js +1 -1
- package/dist/src/screenshot-result.js +1 -6
- package/dist/src/screenshot-runtime.js +1 -0
- package/dist/src/screenshot.js +1 -1
- package/dist/src/screenshot2.js +1 -0
- package/dist/src/screenshot3.js +5 -0
- package/dist/src/script.js +1 -0
- package/dist/src/scroll-command.js +1 -0
- package/dist/src/scroll-gesture.js +1 -0
- package/dist/src/scroll-indicator.js +1 -0
- package/dist/src/sdk-batch-runner.d.ts +23 -6
- package/dist/src/sdk-batch-runner.js +2 -3
- package/dist/src/sdk-batch.js +2 -0
- package/dist/src/sdk-contracts.d.ts +170 -41
- package/dist/src/sdk-contracts.js +2 -2
- package/dist/src/sdk-device.js +1 -1
- package/dist/src/sdk-finders.d.ts +1 -1
- package/dist/src/sdk-finders.js +1 -1
- package/dist/src/sdk-io.js +1 -1
- package/dist/src/sdk-remote-config.d.ts +1 -1
- package/dist/src/sdk-remote-config.js +1 -1
- package/dist/src/sdk-selectors.d.ts +524 -140
- package/dist/src/sdk-selectors.js +1 -1
- package/dist/src/selection.js +1 -0
- package/dist/src/selector-runtime.js +1 -1
- package/dist/src/selectors.js +1 -1
- package/dist/src/semantic-index.js +1 -0
- package/dist/src/server.js +4 -4
- package/dist/src/session-allocation.js +1 -0
- package/dist/src/session-artifact-paths.js +1 -0
- package/dist/src/session-observation.js +1 -0
- package/dist/src/session-paths.js +1 -0
- package/dist/src/session-repair-tombstone.js +1 -0
- package/dist/src/session-routing.js +1 -0
- package/dist/src/session-runtime-admission.js +1 -0
- package/dist/src/session-snapshot.js +1 -0
- package/dist/src/session-store.js +4 -0
- package/dist/src/session-target-evidence.js +1 -1
- package/dist/src/session2.js +5 -27
- package/dist/src/settings.js +1 -0
- package/dist/src/shared.js +2 -2
- package/dist/src/simctl-facade.js +1 -0
- package/dist/src/simctl.js +1 -1
- package/dist/src/simulator-facade.js +1 -0
- package/dist/src/simulator.js +1 -1
- package/dist/src/snapshot-capture-annotations.js +1 -0
- package/dist/src/snapshot-desktop-projection.js +1 -0
- package/dist/src/snapshot-diagnostics.js +1 -0
- package/dist/src/snapshot-process.js +1 -0
- package/dist/src/snapshot-quality-backend-capabilities.js +1 -0
- package/dist/src/snapshot-quality-verdict.js +1 -0
- package/dist/src/snapshot-runtime-binding.js +1 -0
- package/dist/src/snapshot-runtime.js +1 -1
- package/dist/src/snapshot-scope.js +1 -1
- package/dist/src/snapshot-state.js +1 -0
- package/dist/src/snapshot.js +1 -8
- package/dist/src/snapshot2.js +1 -1
- package/dist/src/snapshot3.js +1 -1
- package/dist/src/snapshot4.js +1 -0
- package/dist/src/src.js +1 -1
- package/dist/src/src2.js +1 -1
- package/dist/src/src3.js +1 -2
- package/dist/src/src4.js +1 -1
- package/dist/src/src5.js +1 -0
- package/dist/src/src6.js +1 -0
- package/dist/src/src7.js +2 -0
- package/dist/src/src8.js +115 -0
- package/dist/src/startup-recovery-fence.js +1 -0
- package/dist/src/status-markers.js +1 -0
- package/dist/src/string-enum.js +1 -1
- package/dist/src/success-text.js +1 -0
- package/dist/src/surface-snapshot.js +1 -0
- package/dist/src/surface-snapshot2.js +1 -0
- package/dist/src/takeover.js +5 -0
- package/dist/src/tool-provider-facade.js +1 -0
- package/dist/src/tool-provider.js +4 -3
- package/dist/src/tool-provider2.js +1 -1
- package/dist/src/tool-provider3.js +1 -1
- package/dist/src/toolchain-probe.js +2 -0
- package/dist/src/touch-reference-frame.js +1 -0
- package/dist/src/touch-runtime.js +1 -0
- package/dist/src/transport.js +3 -0
- package/dist/src/tree.js +1 -0
- package/dist/src/ttl-memo.js +1 -0
- package/dist/src/tv-remote.js +1 -0
- package/dist/src/type-text-runtime.js +1 -0
- package/dist/src/undici.js +99 -0
- package/dist/src/update-check.js +1 -1
- package/dist/src/verified-file.js +1 -1
- package/dist/src/version.js +1 -1
- package/dist/src/video.js +2 -2
- package/dist/src/web.js +2 -1
- package/dist/src/web2.js +1 -0
- package/dist/src/webdriver-ios-snapshot.js +1 -0
- package/dist/src/webdriver-source.js +1 -0
- package/dist/src/window-state.js +1 -0
- package/linux/atspi-dump.py +54 -9
- package/package.json +58 -35
- package/server.json +9 -3
- package/android/ime-helper/dist/agent-device-android-ime-helper-0.20.10.apk.sha256 +0 -1
- package/android/snapshot-helper/dist/agent-device-android-snapshot-helper-0.20.10.apk +0 -0
- package/android/snapshot-helper/dist/agent-device-android-snapshot-helper-0.20.10.apk.sha256 +0 -1
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+CoordinateTextEntryTests.swift +0 -4
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+FlatSnapshotFiltering.swift +0 -168
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+LifecycleCacheTests.swift +0 -6
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+RecordingTests.swift +0 -4
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+SelectorMatchPolicyTests.swift +0 -4
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+SnapshotPresentation.swift +0 -183
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+SnapshotPresentationTests.swift +0 -0
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+SnapshotTraversalIdentityTests.swift +0 -4
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+TextEntryPolicyTests.swift +0 -4
- package/dist/src/appearance.js +0 -1
- package/dist/src/apps.js +0 -5
- package/dist/src/audio-probe.js +0 -1
- package/dist/src/cli-grammar.js +0 -1
- package/dist/src/command-catalog.js +0 -1
- package/dist/src/debug-symbols.js +0 -5
- package/dist/src/device-input-state.js +0 -2
- package/dist/src/device-ready.js +0 -1
- package/dist/src/dispatch.js +0 -1
- package/dist/src/handler-utils.js +0 -1
- package/dist/src/helper-package-install.js +0 -1
- package/dist/src/host-process.js +0 -3
- package/dist/src/ime-lifecycle.js +0 -2
- package/dist/src/ime-recovery-marker.js +0 -1
- package/dist/src/input-actions3.js +0 -1
- package/dist/src/install-artifact.js +0 -1
- package/dist/src/install-artifact2.js +0 -1
- package/dist/src/interaction-common.js +0 -1
- package/dist/src/interaction-runtime.js +0 -1
- package/dist/src/interaction-snapshot.js +0 -1
- package/dist/src/manifest.js +0 -1
- package/dist/src/method-scope.js +0 -1
- package/dist/src/png-resize.js +0 -1
- package/dist/src/process-lock.js +0 -1
- package/dist/src/runner-lease.js +0 -1
- package/dist/src/runner-sequence.js +0 -1
- package/dist/src/script-source-bundle.js +0 -16
- package/dist/src/sdk-android-adb.d.ts +0 -245
- package/dist/src/sdk-android-adb.js +0 -4
- package/dist/src/sdk.js +0 -1
- package/dist/src/setting-state.js +0 -1
- package/dist/src/shell-quote.js +0 -1
- package/dist/src/snapshot-session.js +0 -1
- package/dist/src/timing-safe-equal.js +0 -1
- package/dist/src/unsupported-interactor.js +0 -1
- package/dist/src/verdict.js +0 -1
- /package/dist/src/{recording-telemetry.js → telemetry.js} +0 -0
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { B as
|
|
1
|
+
import { A as SnapshotVisibility, B as DaemonError, C as SnapshotCommandOptionFields, D as SnapshotQualityVerdict, F as DeviceTarget, L as PlatformSelector, M as AppleOS, P as DeviceKind, R as PublicPlatform, V as NormalizedError, _ as SessionIsolationMode, a as DaemonRequest, f as LeaseBackend, g as ResponseLevel, i as DaemonLockPolicy, k as SnapshotUnchanged, m as NetworkIncludeMode, o as DaemonResponse, r as DaemonInstallSource, s as DaemonResponseData, t as DaemonArtifact, v as SessionRuntimeHints, w as SnapshotNode } from "./sdk-contracts.js";
|
|
2
2
|
import { t as AppsFilter } from "./app-inventory.js";
|
|
3
|
-
import { C as
|
|
3
|
+
import { A as ScrollInputDirection, C as BackMode, F as AndroidSnapshotBackendMetadata, I as FindLocator, L as ScreenshotResultData, M as SwipePreset, N as TransformGestureParams, P as ClickButton, R as SnapshotDiagnosticsSummary, S as DeviceRotation, _ as HoverCommandResponseData, b as SettleObservation, g as FindCommandResponseData, h as FillCommandResponseData, j as SwipePattern, k as ScrollDirection, m as ClickCommandResponseData, p as ScrollCommandResult, v as LongPressCommandResponseData, w as GesturePointerCount, x as TvRemoteButton, y as PressCommandResponseData, z as SessionSurface } from "./sdk-selectors.js";
|
|
4
4
|
import { a as RemoteConnectionProfileFields, c as MetroPrepareResult, i as CloudProviderProfileFields, l as MetroReloadOptions, s as MetroPrepareOptions, u as MetroReloadResult } from "./sdk-remote-config.js";
|
|
5
|
-
import { c as ScrollDirection, d as SwipePreset, f as TransformGestureParams, l as ScrollInputDirection, s as GesturePointerCount, u as SwipePattern } from "./sdk-android-adb.js";
|
|
6
5
|
import { t as BatchRunResult } from "./sdk-batch-runner.js";
|
|
7
6
|
import { r as CloudProviderSessionResult, t as AgentArtifactsResult } from "./cloud-artifacts.js";
|
|
8
7
|
//#region packages/contracts/src/json.d.ts
|
|
@@ -79,6 +78,15 @@ type AgentDeviceDevice = {
|
|
|
79
78
|
*/
|
|
80
79
|
appleOs?: AppleOS;
|
|
81
80
|
identifiers: AgentDeviceIdentifiers;
|
|
81
|
+
/**
|
|
82
|
+
* Present when a host-local device claim currently blocks foreign use of
|
|
83
|
+
* this device (#1320). Provably dead owners are not projected — the next
|
|
84
|
+
* open reconciles and replaces them automatically.
|
|
85
|
+
*/
|
|
86
|
+
claimedBy?: {
|
|
87
|
+
session: string;
|
|
88
|
+
workspace: string;
|
|
89
|
+
};
|
|
82
90
|
ios?: {
|
|
83
91
|
udid: string;
|
|
84
92
|
};
|
|
@@ -123,6 +131,13 @@ type AgentDeviceSessionDevice = {
|
|
|
123
131
|
};
|
|
124
132
|
type AgentDeviceSession = {
|
|
125
133
|
name: string;
|
|
134
|
+
/**
|
|
135
|
+
* The exact value `--session` must carry to address this session, which is not always `name`:
|
|
136
|
+
* a session opened without `--session` is named `default` but stored — and addressed — as
|
|
137
|
+
* `cwd:<hash>:default` (#2031/#1394). Optional only because a daemon older than the field does
|
|
138
|
+
* not send it.
|
|
139
|
+
*/
|
|
140
|
+
address?: string;
|
|
126
141
|
createdAt: number;
|
|
127
142
|
sessionStateDir?: string;
|
|
128
143
|
runnerLogPath?: string;
|
|
@@ -142,6 +157,16 @@ type DeviceBootOptions = DeviceCommandBaseOptions & {
|
|
|
142
157
|
type DeviceShutdownOptions = DeviceCommandBaseOptions;
|
|
143
158
|
//#endregion
|
|
144
159
|
//#region packages/contracts/src/client-app.d.ts
|
|
160
|
+
type DeviceSelectionReason = 'explicit-selector' | 'existing-session' | 'single-booted-local' | 'single-bootable-local' | 'single-app-installed-local' | 'preferred-local' | 'single-provider-device';
|
|
161
|
+
type DeviceSelectionSource = 'session' | 'local' | 'provider';
|
|
162
|
+
/** Deterministic device-selection evidence shared by daemon responses and the published client. */
|
|
163
|
+
type DeviceSelectionMetadata = {
|
|
164
|
+
reason: DeviceSelectionReason;
|
|
165
|
+
source: DeviceSelectionSource;
|
|
166
|
+
candidateCount: number;
|
|
167
|
+
/** Whether this request booted a previously stopped local virtual target during open. */
|
|
168
|
+
bootOccurred: boolean;
|
|
169
|
+
};
|
|
145
170
|
type AppInstallOptions = AgentDeviceRequestOverrides & AgentDeviceSelectionOptions & {
|
|
146
171
|
app?: string;
|
|
147
172
|
appPath: string;
|
|
@@ -167,10 +192,12 @@ type AppOpenOptions = AgentDeviceRequestOverrides & AgentDeviceSelectionOptions
|
|
|
167
192
|
launchConsole?: string;
|
|
168
193
|
launchArgs?: string[];
|
|
169
194
|
relaunch?: boolean;
|
|
195
|
+
/** Startup budget in milliseconds: bounds the Simulator boot wait on a cold device. */
|
|
196
|
+
timeoutMs?: number;
|
|
170
197
|
/**
|
|
171
|
-
* Include
|
|
172
|
-
*
|
|
173
|
-
* simulator
|
|
198
|
+
* Include an initial interactive snapshot in a fresh open response. With no
|
|
199
|
+
* app argument, discover the sole running app on the sole booted iOS
|
|
200
|
+
* simulator; ambiguous environments fail closed.
|
|
174
201
|
*/
|
|
175
202
|
foreground?: boolean;
|
|
176
203
|
saveScript?: boolean | string;
|
|
@@ -193,6 +220,7 @@ type AppOpenResult = {
|
|
|
193
220
|
appId?: string;
|
|
194
221
|
startup?: StartupPerfSample;
|
|
195
222
|
runtime?: SessionRuntimeHints;
|
|
223
|
+
selection?: DeviceSelectionMetadata;
|
|
196
224
|
device?: AgentDeviceSessionDevice;
|
|
197
225
|
/**
|
|
198
226
|
* Initial interactive snapshot captured immediately after an open that
|
|
@@ -291,14 +319,17 @@ type PublicSnapshotCaptureAnnotations = Pick<SnapshotCaptureAnnotations, 'androi
|
|
|
291
319
|
};
|
|
292
320
|
//#endregion
|
|
293
321
|
//#region packages/contracts/src/client-capture.d.ts
|
|
294
|
-
type CaptureSnapshotOptions = AgentDeviceRequestOverrides & AgentDeviceSelectionOptions & {
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
322
|
+
type CaptureSnapshotOptions = AgentDeviceRequestOverrides & AgentDeviceSelectionOptions & Omit<SnapshotCommandOptionFields, 'customActions'> & {
|
|
323
|
+
/**
|
|
324
|
+
* Name the affordances an element merged away (iOS UIAccessibilityCustomAction,
|
|
325
|
+
* React Native accessibilityActions) — a card whose reply/options controls are not
|
|
326
|
+
* separate elements still lists them here. The names are for PLANNING, not
|
|
327
|
+
* invocation: there is no API to trigger them, so reach the affordance through the
|
|
328
|
+
* element detail screen, through the same control exposed as a labeled element
|
|
329
|
+
* elsewhere, or by coordinates from its rect. iOS simulator only; costs one
|
|
330
|
+
* accessibility round trip per merged element.
|
|
331
|
+
*/
|
|
332
|
+
customActions?: SnapshotCommandOptionFields['customActions'];
|
|
302
333
|
timeoutMs?: number;
|
|
303
334
|
/**
|
|
304
335
|
* #1271 stage 2 (ADR 0012 amendment): `snapshot` is observation-only and
|
|
@@ -310,7 +341,8 @@ type CaptureSnapshotOptions = AgentDeviceRequestOverrides & AgentDeviceSelection
|
|
|
310
341
|
};
|
|
311
342
|
type CaptureSnapshotResult = {
|
|
312
343
|
nodes: SnapshotNode[];
|
|
313
|
-
truncated
|
|
344
|
+
/** Present only when the capture owner establishes whether the tree was truncated. */
|
|
345
|
+
truncated?: boolean;
|
|
314
346
|
appName?: string;
|
|
315
347
|
appBundleId?: string;
|
|
316
348
|
visibility?: SnapshotVisibility;
|
|
@@ -341,6 +373,8 @@ type CaptureSnapshotResult = {
|
|
|
341
373
|
type CaptureScreenshotOptions = AgentDeviceRequestOverrides & {
|
|
342
374
|
path?: string;
|
|
343
375
|
overlayRefs?: boolean;
|
|
376
|
+
/** Crop the capture to the frame of the selector resolved on the same screen. */
|
|
377
|
+
cropOn?: string;
|
|
344
378
|
pixelDensity?: number;
|
|
345
379
|
fullscreen?: boolean;
|
|
346
380
|
scale?: number;
|
|
@@ -489,6 +523,8 @@ type ScrollOptions = DeviceCommandBaseOptions & SettleCommandOptions & {
|
|
|
489
523
|
amount?: number;
|
|
490
524
|
pixels?: number;
|
|
491
525
|
durationMs?: number;
|
|
526
|
+
/** Repeat scroll passes until this selector is visible on screen, then stop. */
|
|
527
|
+
until?: string;
|
|
492
528
|
};
|
|
493
529
|
//#endregion
|
|
494
530
|
//#region packages/contracts/src/client-lease.d.ts
|
|
@@ -530,13 +566,31 @@ type CloudArtifactsOptions = AgentDeviceRequestOverrides & {
|
|
|
530
566
|
provider?: string;
|
|
531
567
|
providerSessionId?: string;
|
|
532
568
|
};
|
|
569
|
+
type HumanControlHoldScope = {
|
|
570
|
+
backend: LeaseBackend;
|
|
571
|
+
leaseProvider?: string;
|
|
572
|
+
deviceKey: string;
|
|
573
|
+
};
|
|
574
|
+
type HumanControlHold = {
|
|
575
|
+
id: string;
|
|
576
|
+
scope: HumanControlHoldScope;
|
|
577
|
+
reason?: string;
|
|
578
|
+
state: 'activating' | 'active';
|
|
579
|
+
createdAt: number;
|
|
580
|
+
updatedAt: number;
|
|
581
|
+
expiresAt?: number;
|
|
582
|
+
};
|
|
583
|
+
type HumanControlHoldOptions = {
|
|
584
|
+
reason?: string;
|
|
585
|
+
ttlMs?: number;
|
|
586
|
+
};
|
|
533
587
|
//#endregion
|
|
534
588
|
//#region packages/contracts/src/logs.d.ts
|
|
535
589
|
declare const LOG_ACTION_VALUES: readonly ['path', 'start', 'stop', 'doctor', 'mark', 'clear'];
|
|
536
590
|
type LogAction = (typeof LOG_ACTION_VALUES)[number];
|
|
537
591
|
//#endregion
|
|
538
592
|
//#region packages/contracts/src/perf.d.ts
|
|
539
|
-
declare const PERF_AREA_VALUES: readonly ['
|
|
593
|
+
declare const PERF_AREA_VALUES: readonly ['frames', 'memory', 'cpu', 'trace'];
|
|
540
594
|
declare const PERF_ACTION_VALUES: readonly ['sample', 'snapshot', 'start', 'stop', 'report'];
|
|
541
595
|
declare const PERF_SUBJECT_VALUES: readonly ['profile'];
|
|
542
596
|
declare const PERF_KIND_VALUES: readonly ['xctrace', 'simpleperf', 'perfetto', 'android-hprof', 'memgraph'];
|
|
@@ -555,11 +609,8 @@ type RecordingScope = (typeof RECORDING_SCOPE_VALUES)[number];
|
|
|
555
609
|
//#endregion
|
|
556
610
|
//#region packages/contracts/src/client-observability.d.ts
|
|
557
611
|
type PerfOptions = DeviceCommandBaseOptions & {
|
|
558
|
-
/**
|
|
559
|
-
|
|
560
|
-
* metrics response for compatibility; prefer an explicit area.
|
|
561
|
-
*/
|
|
562
|
-
area?: PerfArea;
|
|
612
|
+
/** Select focused performance evidence. */
|
|
613
|
+
area: PerfArea;
|
|
563
614
|
subject?: PerfSubject;
|
|
564
615
|
action?: PerfAction;
|
|
565
616
|
kind?: PerfKind;
|
|
@@ -718,6 +769,8 @@ type ReplaySuiteTestFailed = {
|
|
|
718
769
|
attempts: number;
|
|
719
770
|
artifactsDir?: string;
|
|
720
771
|
error: DaemonError;
|
|
772
|
+
/** Present when the owning runtime classified the failure as device/runner infrastructure. */
|
|
773
|
+
infrastructure?: true;
|
|
721
774
|
shardIndex?: number;
|
|
722
775
|
shardCount?: number;
|
|
723
776
|
deviceId?: string;
|
|
@@ -743,12 +796,24 @@ type ReplaySuiteResult = {
|
|
|
743
796
|
durationMs: number;
|
|
744
797
|
failures: ReplaySuiteTestFailed[];
|
|
745
798
|
tests: ReplaySuiteTestResult[];
|
|
799
|
+
/**
|
|
800
|
+
* The suite's own artifacts root (the parent of every test's `artifactsDir`), as resolved on
|
|
801
|
+
* the host that ran the suite. Absent when the suite produced no attempt (e.g. every source
|
|
802
|
+
* was filtered out). #2246: a remote daemon rewrites this to the caller-local path once the
|
|
803
|
+
* directory has been transferred back, so it always names a path the caller can open.
|
|
804
|
+
*/
|
|
805
|
+
artifactsDir?: string;
|
|
746
806
|
snapshotDiagnostics?: SnapshotDiagnosticsSummary;
|
|
747
807
|
};
|
|
748
808
|
//#endregion
|
|
749
809
|
//#region packages/contracts/src/client-request.d.ts
|
|
750
810
|
type CommandRequestResult = DaemonResponseData;
|
|
751
811
|
//#endregion
|
|
812
|
+
//#region packages/contracts/src/is-predicate.d.ts
|
|
813
|
+
/** The complete predicate vocabulary accepted by the `is` command. */
|
|
814
|
+
declare const IS_PREDICATES: readonly ['visible', 'hidden', 'exists', 'absent', 'editable', 'selected', 'focused', 'text'];
|
|
815
|
+
type IsPredicate = (typeof IS_PREDICATES)[number];
|
|
816
|
+
//#endregion
|
|
752
817
|
//#region packages/contracts/src/client-selector-read.d.ts
|
|
753
818
|
/**
|
|
754
819
|
* #1271 stage 2 (ADR 0012 amendment): `get`/`is`/`find` are observation-only
|
|
@@ -764,12 +829,12 @@ type GetOptions = DeviceCommandBaseOptions & SelectorSnapshotCommandOptions & El
|
|
|
764
829
|
format: 'text' | 'attrs';
|
|
765
830
|
};
|
|
766
831
|
type IsTextPredicateOptions = DeviceCommandBaseOptions & SelectorSnapshotCommandOptions & RecordControlOptions & {
|
|
767
|
-
predicate: 'text'
|
|
832
|
+
predicate: Extract<IsPredicate, 'text'>;
|
|
768
833
|
selector: string;
|
|
769
834
|
value: string;
|
|
770
835
|
};
|
|
771
836
|
type IsStatePredicateOptions = DeviceCommandBaseOptions & SelectorSnapshotCommandOptions & RecordControlOptions & {
|
|
772
|
-
predicate:
|
|
837
|
+
predicate: Exclude<IsPredicate, 'text'>;
|
|
773
838
|
selector: string;
|
|
774
839
|
value?: never;
|
|
775
840
|
};
|
|
@@ -821,6 +886,9 @@ type SettingsUpdateOptions = (DeviceCommandBaseOptions & {
|
|
|
821
886
|
setting: 'clear-app-state';
|
|
822
887
|
state: 'clear';
|
|
823
888
|
app?: string;
|
|
889
|
+
}) | (DeviceCommandBaseOptions & {
|
|
890
|
+
setting: 'reset-keychain';
|
|
891
|
+
state: 'clear';
|
|
824
892
|
}) | (DeviceCommandBaseOptions & {
|
|
825
893
|
setting: 'wifi' | 'airplane' | 'location';
|
|
826
894
|
state: 'on' | 'off';
|
|
@@ -858,6 +926,7 @@ type WaitCommandTarget = {
|
|
|
858
926
|
text?: never;
|
|
859
927
|
ref?: never;
|
|
860
928
|
selector?: never;
|
|
929
|
+
absent?: never;
|
|
861
930
|
stable?: never;
|
|
862
931
|
quietMs?: never;
|
|
863
932
|
timeoutMs?: never;
|
|
@@ -866,6 +935,7 @@ type WaitCommandTarget = {
|
|
|
866
935
|
durationMs?: never;
|
|
867
936
|
ref?: never;
|
|
868
937
|
selector?: never;
|
|
938
|
+
absent?: never;
|
|
869
939
|
stable?: never;
|
|
870
940
|
quietMs?: never;
|
|
871
941
|
timeoutMs?: number;
|
|
@@ -874,6 +944,7 @@ type WaitCommandTarget = {
|
|
|
874
944
|
durationMs?: never;
|
|
875
945
|
text?: never;
|
|
876
946
|
selector?: never;
|
|
947
|
+
absent?: never;
|
|
877
948
|
stable?: never;
|
|
878
949
|
quietMs?: never;
|
|
879
950
|
timeoutMs?: number;
|
|
@@ -882,6 +953,16 @@ type WaitCommandTarget = {
|
|
|
882
953
|
durationMs?: never;
|
|
883
954
|
text?: never;
|
|
884
955
|
ref?: never;
|
|
956
|
+
absent?: never;
|
|
957
|
+
stable?: never;
|
|
958
|
+
quietMs?: never;
|
|
959
|
+
timeoutMs?: number;
|
|
960
|
+
}) | (SelectorSnapshotCommandOptions & {
|
|
961
|
+
absent: string;
|
|
962
|
+
durationMs?: never;
|
|
963
|
+
text?: never;
|
|
964
|
+
ref?: never;
|
|
965
|
+
selector?: never;
|
|
885
966
|
stable?: never;
|
|
886
967
|
quietMs?: never;
|
|
887
968
|
timeoutMs?: number;
|
|
@@ -891,6 +972,7 @@ type WaitCommandTarget = {
|
|
|
891
972
|
text?: never;
|
|
892
973
|
ref?: never;
|
|
893
974
|
selector?: never;
|
|
975
|
+
absent?: never;
|
|
894
976
|
quietMs?: number;
|
|
895
977
|
timeoutMs?: number;
|
|
896
978
|
});
|
|
@@ -900,6 +982,19 @@ type AlertCommandOptions = DeviceCommandBaseOptions & {
|
|
|
900
982
|
timeoutMs?: number;
|
|
901
983
|
};
|
|
902
984
|
type AppStateCommandOptions = DeviceCommandBaseOptions;
|
|
985
|
+
/** #1638: `back` carries the shared `--settle` triple, and its result may carry the settled diff. */
|
|
986
|
+
type BackCommandOptions = DeviceCommandBaseOptions & {
|
|
987
|
+
mode?: BackMode;
|
|
988
|
+
} & SettleCommandOptions;
|
|
989
|
+
type HomeCommandOptions = DeviceCommandBaseOptions;
|
|
990
|
+
type OrientationCommandOptions = DeviceCommandBaseOptions & {
|
|
991
|
+
orientation: DeviceRotation;
|
|
992
|
+
};
|
|
993
|
+
type AppSwitcherCommandOptions = DeviceCommandBaseOptions;
|
|
994
|
+
type TvRemoteCommandOptions = DeviceCommandBaseOptions & {
|
|
995
|
+
button: TvRemoteButton;
|
|
996
|
+
durationMs?: number;
|
|
997
|
+
};
|
|
903
998
|
type KeyboardCommandOptions = DeviceCommandBaseOptions & {
|
|
904
999
|
action?: 'status' | 'dismiss' | 'enter' | 'return';
|
|
905
1000
|
};
|
|
@@ -1009,136 +1104,6 @@ type ShutdownCommandResult = {
|
|
|
1009
1104
|
appleOs?: AppleOS;
|
|
1010
1105
|
};
|
|
1011
1106
|
//#endregion
|
|
1012
|
-
//#region packages/contracts/src/clipboard.d.ts
|
|
1013
|
-
/**
|
|
1014
|
-
* Closed result of the `clipboard` command. Mirrors the dispatch handler's
|
|
1015
|
-
* literal return EXACTLY (src/core/dispatch.ts `handleClipboardCommand`): a
|
|
1016
|
-
* discriminated union on `action`. `read` returns the clipboard `text`; `write`
|
|
1017
|
-
* reports the written `textLength` plus the `successText` message. The handler
|
|
1018
|
-
* spreads nothing else, so each branch is closed.
|
|
1019
|
-
*/
|
|
1020
|
-
type ClipboardCommandResult = {
|
|
1021
|
-
action: 'read';
|
|
1022
|
-
text: string;
|
|
1023
|
-
} | {
|
|
1024
|
-
action: 'write';
|
|
1025
|
-
textLength: number;
|
|
1026
|
-
message: string;
|
|
1027
|
-
};
|
|
1028
|
-
//#endregion
|
|
1029
|
-
//#region packages/contracts/src/keyboard.d.ts
|
|
1030
|
-
/**
|
|
1031
|
-
* Closed result of the `keyboard` command, grounded in the dispatch handlers'
|
|
1032
|
-
* literal returns (src/core/dispatch.ts `handleAndroidKeyboardCommand` /
|
|
1033
|
-
* `handleIosKeyboardCommand`).
|
|
1034
|
-
*
|
|
1035
|
-
* `platform` and `action` are always present; the remaining fields appear per
|
|
1036
|
-
* branch (Android `status`/`dismiss` carry the keyboard-state fields; `enter`
|
|
1037
|
-
* and iOS `dismiss` carry a `message`). It is kept as a flat closed shape rather
|
|
1038
|
-
* than a five-way `platform`×`action` union because the per-branch field sets
|
|
1039
|
-
* overlap heavily and the underlying Android keyboard-state types live in the
|
|
1040
|
-
* platform layer (below the public contract). The `Record` index signature of
|
|
1041
|
-
* the previous hand-written mirror is dropped, and the spurious `| null`s are
|
|
1042
|
-
* removed (the handler never returns `null` for these).
|
|
1043
|
-
*/
|
|
1044
|
-
type KeyboardCommandResult = {
|
|
1045
|
-
platform: 'android' | 'ios';
|
|
1046
|
-
action: 'status' | 'dismiss' | 'enter';
|
|
1047
|
-
visible?: boolean;
|
|
1048
|
-
wasVisible?: boolean;
|
|
1049
|
-
dismissed?: boolean;
|
|
1050
|
-
attempts?: number;
|
|
1051
|
-
inputType?: string;
|
|
1052
|
-
type?: 'text' | 'number' | 'email' | 'phone' | 'password' | 'datetime' | 'unknown';
|
|
1053
|
-
inputMethodPackage?: string;
|
|
1054
|
-
focusedPackage?: string;
|
|
1055
|
-
focusedResourceId?: string;
|
|
1056
|
-
inputOwner?: 'app' | 'ime' | 'unknown';
|
|
1057
|
-
message?: string;
|
|
1058
|
-
/** iOS `dismiss` only (#1598): which mechanism actually resigned the
|
|
1059
|
-
* keyboard — 'dismissKey' (tapped the keyboard's own Hide/Dismiss/Done
|
|
1060
|
-
* key). Generic background-tap dismissal is deliberately unsupported
|
|
1061
|
-
* (#1606 review): no query can prove a coordinate is side-effect-free,
|
|
1062
|
-
* so the runner only ever taps the keyboard's own control. Absent when
|
|
1063
|
-
* the keyboard was not dismissed. */
|
|
1064
|
-
mechanism?: 'dismissKey';
|
|
1065
|
-
};
|
|
1066
|
-
//#endregion
|
|
1067
|
-
//#region packages/contracts/src/navigation.d.ts
|
|
1068
|
-
/**
|
|
1069
|
-
* Closed results of the navigation/global action commands. Each mirrors the
|
|
1070
|
-
* dispatch handler's literal return EXACTLY (src/core/dispatch.ts
|
|
1071
|
-
* `DISPATCH_HANDLERS`): a fixed `action` discriminant plus the always-present
|
|
1072
|
-
* `successText` message (the handlers always pass a non-empty message, so it is
|
|
1073
|
-
* required here). The handlers spread nothing else, so the shapes are closed —
|
|
1074
|
-
* consistent with the `viewport` contract, the generic-dispatch Android
|
|
1075
|
-
* dialog-recovery `warning` annotation is intentionally not part of the contract.
|
|
1076
|
-
*/
|
|
1077
|
-
/** `home` — `{ action: 'home', message: 'Home' }`. */
|
|
1078
|
-
type HomeCommandResult = {
|
|
1079
|
-
action: 'home';
|
|
1080
|
-
message: string;
|
|
1081
|
-
};
|
|
1082
|
-
/**
|
|
1083
|
-
* `back` — `{ action: 'back', mode, message: 'Back' }`; `mode` defaults to
|
|
1084
|
-
* `'in-app'`. The one field the generic route may add on top of the dispatch
|
|
1085
|
-
* handler's literal return: `settle`, the opt-in `--settle` observation
|
|
1086
|
-
* (#1638), attached after the command by the generic dispatcher.
|
|
1087
|
-
*/
|
|
1088
|
-
type BackCommandResult = {
|
|
1089
|
-
action: 'back';
|
|
1090
|
-
mode: BackMode;
|
|
1091
|
-
message: string;
|
|
1092
|
-
settle?: SettleObservation;
|
|
1093
|
-
};
|
|
1094
|
-
/** `orientation` — `{ action: 'orientation', orientation, message: 'Rotated to <orientation>' }`. */
|
|
1095
|
-
type OrientationCommandResult = {
|
|
1096
|
-
action: 'orientation';
|
|
1097
|
-
orientation: DeviceRotation;
|
|
1098
|
-
message: string;
|
|
1099
|
-
};
|
|
1100
|
-
/**
|
|
1101
|
-
* @deprecated The `rotate` command was renamed to `orientation`. This is the
|
|
1102
|
-
* legacy response contract (`action: 'rotate'`) that shipped in v0.18/v0.19,
|
|
1103
|
-
* retained for existing SDK consumers until the next major version. New code
|
|
1104
|
-
* should use {@link OrientationCommandResult}.
|
|
1105
|
-
*/
|
|
1106
|
-
type RotateCommandResult = {
|
|
1107
|
-
action: 'rotate';
|
|
1108
|
-
orientation: DeviceRotation;
|
|
1109
|
-
message: string;
|
|
1110
|
-
};
|
|
1111
|
-
/** `app-switcher` — `{ action: 'app-switcher', message: 'Opened app switcher' }`. */
|
|
1112
|
-
type AppSwitcherCommandResult = {
|
|
1113
|
-
action: 'app-switcher';
|
|
1114
|
-
message: string;
|
|
1115
|
-
};
|
|
1116
|
-
/** `tv-remote` — `{ action: 'tv-remote', button, durationMs?, message }`. */
|
|
1117
|
-
type TvRemoteCommandResult = {
|
|
1118
|
-
action: 'tv-remote';
|
|
1119
|
-
button: TvRemoteButton;
|
|
1120
|
-
durationMs?: number;
|
|
1121
|
-
message: string;
|
|
1122
|
-
};
|
|
1123
|
-
//#endregion
|
|
1124
|
-
//#region packages/contracts/src/wait.d.ts
|
|
1125
|
-
/**
|
|
1126
|
-
* Public daemon result for `wait`. The runtime-local result carries a `kind`
|
|
1127
|
-
* discriminant, but `toDaemonWaitData` intentionally projects the normal daemon
|
|
1128
|
-
* payload to this compact shape. The direct iOS selector fast path may still
|
|
1129
|
-
* include `kind: 'selector'` additively.
|
|
1130
|
-
*/
|
|
1131
|
-
type WaitCommandResult = {
|
|
1132
|
-
waitedMs: number;
|
|
1133
|
-
kind?: 'selector';
|
|
1134
|
-
text?: string;
|
|
1135
|
-
selector?: string;
|
|
1136
|
-
captures?: number;
|
|
1137
|
-
nodeCount?: number;
|
|
1138
|
-
hint?: string;
|
|
1139
|
-
warning?: string;
|
|
1140
|
-
};
|
|
1141
|
-
//#endregion
|
|
1142
1107
|
//#region packages/contracts/src/prepare.d.ts
|
|
1143
1108
|
type PrepareIosRunnerCacheKind = 'exact' | 'restore-key' | 'miss' | 'external';
|
|
1144
1109
|
type PrepareIosRunnerArtifactState = 'valid' | 'rebuilt';
|
|
@@ -1193,55 +1158,6 @@ type PushCommandResult = {
|
|
|
1193
1158
|
message: string;
|
|
1194
1159
|
};
|
|
1195
1160
|
//#endregion
|
|
1196
|
-
//#region src/commands/command-contract.d.ts
|
|
1197
|
-
type JsonSchema = {
|
|
1198
|
-
type?: string | readonly string[];
|
|
1199
|
-
description?: string;
|
|
1200
|
-
properties?: Record<string, JsonSchema>;
|
|
1201
|
-
required?: readonly string[];
|
|
1202
|
-
additionalProperties?: boolean | JsonSchema;
|
|
1203
|
-
items?: JsonSchema;
|
|
1204
|
-
prefixItems?: readonly JsonSchema[];
|
|
1205
|
-
oneOf?: readonly JsonSchema[];
|
|
1206
|
-
not?: JsonSchema;
|
|
1207
|
-
enum?: readonly unknown[];
|
|
1208
|
-
const?: unknown;
|
|
1209
|
-
minimum?: number;
|
|
1210
|
-
maximum?: number;
|
|
1211
|
-
};
|
|
1212
|
-
type ExecutableCommandProjection<ClientMethod extends string = string> = {
|
|
1213
|
-
clientMethod: ClientMethod;
|
|
1214
|
-
outputSchema: JsonSchema;
|
|
1215
|
-
};
|
|
1216
|
-
//#endregion
|
|
1217
|
-
//#region src/commands/system/navigation-projection.d.ts
|
|
1218
|
-
declare const navigationCommandProjectionType: unique symbol;
|
|
1219
|
-
type NavigationCommandProjection<Options, Result, Required extends boolean, ClientMethod extends string> = ExecutableCommandProjection<ClientMethod> & {
|
|
1220
|
-
readonly [navigationCommandProjectionType]?: {
|
|
1221
|
-
options: Options;
|
|
1222
|
-
result: Result;
|
|
1223
|
-
required: Required;
|
|
1224
|
-
};
|
|
1225
|
-
};
|
|
1226
|
-
declare const NAVIGATION_COMMAND_PROJECTIONS: {
|
|
1227
|
-
readonly back: NavigationCommandProjection<{
|
|
1228
|
-
mode?: BackMode;
|
|
1229
|
-
} & SettleCommandOptions, BackCommandResult, false, "back">;
|
|
1230
|
-
readonly home: NavigationCommandProjection<{}, HomeCommandResult, false, "home">;
|
|
1231
|
-
readonly orientation: NavigationCommandProjection<{
|
|
1232
|
-
orientation: DeviceRotation;
|
|
1233
|
-
}, OrientationCommandResult, true, "orientation">;
|
|
1234
|
-
readonly 'app-switcher': NavigationCommandProjection<{}, AppSwitcherCommandResult, false, "appSwitcher">;
|
|
1235
|
-
readonly 'tv-remote': NavigationCommandProjection<{
|
|
1236
|
-
button: TvRemoteButton;
|
|
1237
|
-
durationMs?: number;
|
|
1238
|
-
}, TvRemoteCommandResult, true, "tvRemote">;
|
|
1239
|
-
};
|
|
1240
|
-
type NavigationCommandName = keyof typeof NAVIGATION_COMMAND_PROJECTIONS;
|
|
1241
|
-
type NavigationCommandOptions<Name extends NavigationCommandName> = (typeof NAVIGATION_COMMAND_PROJECTIONS)[Name] extends NavigationCommandProjection<infer Options, unknown, boolean, string> ? Options : never;
|
|
1242
|
-
type ProjectedNavigationCommandMethod<BaseOptions, Projection> = Projection extends NavigationCommandProjection<infer Options, infer Result, infer Required, string> ? Required extends true ? (options: BaseOptions & Options) => Promise<Result> : (options?: BaseOptions & Options) => Promise<Result> : never;
|
|
1243
|
-
type ProjectedNavigationCommandClient<BaseOptions> = { [Name in NavigationCommandName as (typeof NAVIGATION_COMMAND_PROJECTIONS)[Name]['clientMethod']]: ProjectedNavigationCommandMethod<BaseOptions, (typeof NAVIGATION_COMMAND_PROJECTIONS)[Name]>; };
|
|
1244
|
-
//#endregion
|
|
1245
1161
|
//#region packages/contracts/src/debug-symbols.d.ts
|
|
1246
1162
|
type DebugSymbolsOptions = {
|
|
1247
1163
|
action?: 'symbols';
|
|
@@ -1340,19 +1256,138 @@ type DiffSnapshotCommandResult = {
|
|
|
1340
1256
|
};
|
|
1341
1257
|
//#endregion
|
|
1342
1258
|
//#region packages/contracts/src/viewport.d.ts
|
|
1343
|
-
/**
|
|
1344
|
-
* Closed result of the `viewport` command. Mirrors the dispatch handler's return
|
|
1345
|
-
* EXACTLY (src/core/dispatch.ts `handleViewportCommand`) — `{ width, height }`
|
|
1346
|
-
* plus the always-present `successText` message. The generic dispatch path
|
|
1347
|
-
* returns this object unchanged (viewport has no Android dialog guard, so no
|
|
1348
|
-
* `warning` is ever appended), so the shape is intentionally closed.
|
|
1349
|
-
*/
|
|
1350
1259
|
type ViewportCommandResult = {
|
|
1351
1260
|
width: number;
|
|
1352
1261
|
height: number;
|
|
1353
1262
|
message: string;
|
|
1354
1263
|
};
|
|
1355
1264
|
//#endregion
|
|
1265
|
+
//#region packages/contracts/src/navigation.d.ts
|
|
1266
|
+
/**
|
|
1267
|
+
* Closed results of the navigation/global action commands. Each mirrors its
|
|
1268
|
+
* request-scoped runtime's literal return: a fixed `action` discriminant plus the always-present
|
|
1269
|
+
* `successText` message (the handlers always pass a non-empty message, so it is
|
|
1270
|
+
* required here). The handlers spread nothing else, so the shapes are closed —
|
|
1271
|
+
* consistent with the `viewport` contract, the generic-dispatch Android
|
|
1272
|
+
* dialog-recovery `warning` annotation is intentionally not part of the contract.
|
|
1273
|
+
*/
|
|
1274
|
+
/** `home` — `{ action: 'home', message: 'Home' }`. */
|
|
1275
|
+
type HomeCommandResult = {
|
|
1276
|
+
action: 'home';
|
|
1277
|
+
message: string;
|
|
1278
|
+
};
|
|
1279
|
+
/**
|
|
1280
|
+
* `back` — `{ action: 'back', mode, message: 'Back' }`; `mode` defaults to
|
|
1281
|
+
* `'in-app'`. The one field the generic route may add on top of the dispatch
|
|
1282
|
+
* runtime's literal return: `settle`, the opt-in `--settle` observation
|
|
1283
|
+
* (#1638), attached after the command by the generic dispatcher.
|
|
1284
|
+
*/
|
|
1285
|
+
type BackCommandResult = {
|
|
1286
|
+
action: 'back';
|
|
1287
|
+
mode: BackMode;
|
|
1288
|
+
message: string;
|
|
1289
|
+
settle?: SettleObservation;
|
|
1290
|
+
};
|
|
1291
|
+
/**
|
|
1292
|
+
* `orientation` — `{ action: 'orientation', orientation, message: 'Rotated to <orientation>' }`.
|
|
1293
|
+
*
|
|
1294
|
+
* An owner that reports no resulting rotation is not evidence that the device
|
|
1295
|
+
* rotated. That case keeps the requested `orientation` for compatibility, but
|
|
1296
|
+
* discloses `confirmed: false` plus a `warning`, and names the request in
|
|
1297
|
+
* `message` (`Rotation requested: <orientation> (unconfirmed)`).
|
|
1298
|
+
*/
|
|
1299
|
+
type OrientationCommandResult = {
|
|
1300
|
+
action: 'orientation';
|
|
1301
|
+
orientation: DeviceRotation;
|
|
1302
|
+
message: string;
|
|
1303
|
+
confirmed?: boolean;
|
|
1304
|
+
warning?: string;
|
|
1305
|
+
};
|
|
1306
|
+
/** `app-switcher` — `{ action: 'app-switcher', message: 'Opened app switcher' }`. */
|
|
1307
|
+
type AppSwitcherCommandResult = {
|
|
1308
|
+
action: 'app-switcher';
|
|
1309
|
+
message: string;
|
|
1310
|
+
};
|
|
1311
|
+
/** `tv-remote` — `{ action: 'tv-remote', button, durationMs?, message }`. */
|
|
1312
|
+
type TvRemoteCommandResult = {
|
|
1313
|
+
action: 'tv-remote';
|
|
1314
|
+
button: TvRemoteButton;
|
|
1315
|
+
durationMs?: number;
|
|
1316
|
+
message: string;
|
|
1317
|
+
};
|
|
1318
|
+
//#endregion
|
|
1319
|
+
//#region packages/contracts/src/clipboard.d.ts
|
|
1320
|
+
/**
|
|
1321
|
+
* Closed result of the `clipboard` command. Mirrors the session runtime's
|
|
1322
|
+
* literal return exactly (`src/daemon/handlers/session-clipboard.ts`): a
|
|
1323
|
+
* discriminated union on `action`. `read` returns the clipboard `text`; `write`
|
|
1324
|
+
* reports the written `textLength` plus the `successText` message. The handler
|
|
1325
|
+
* spreads nothing else, so each branch is closed.
|
|
1326
|
+
*/
|
|
1327
|
+
type ClipboardCommandResult = {
|
|
1328
|
+
action: 'read';
|
|
1329
|
+
text: string;
|
|
1330
|
+
} | {
|
|
1331
|
+
action: 'write';
|
|
1332
|
+
textLength: number;
|
|
1333
|
+
message: string;
|
|
1334
|
+
};
|
|
1335
|
+
//#endregion
|
|
1336
|
+
//#region packages/contracts/src/keyboard.d.ts
|
|
1337
|
+
/**
|
|
1338
|
+
* Closed result of the `keyboard` command, grounded in the runtime operation
|
|
1339
|
+
* results projected by `src/daemon/keyboard-runtime.ts`.
|
|
1340
|
+
*
|
|
1341
|
+
* `platform` and `action` are always present; the remaining fields appear per
|
|
1342
|
+
* branch (Android `status`/`dismiss` carry the keyboard-state fields; `enter`
|
|
1343
|
+
* and iOS `dismiss` carry a `message`). It is kept as a flat closed shape rather
|
|
1344
|
+
* than a five-way `platform`×`action` union because the per-branch field sets
|
|
1345
|
+
* overlap heavily and the underlying Android keyboard-state types live in the
|
|
1346
|
+
* platform layer (below the public contract). The `Record` index signature of
|
|
1347
|
+
* the previous hand-written mirror is dropped, and the spurious `| null`s are
|
|
1348
|
+
* removed (the handler never returns `null` for these).
|
|
1349
|
+
*/
|
|
1350
|
+
type KeyboardCommandResult = {
|
|
1351
|
+
platform: 'android' | 'ios';
|
|
1352
|
+
action: 'status' | 'dismiss' | 'enter';
|
|
1353
|
+
visible?: boolean;
|
|
1354
|
+
wasVisible?: boolean;
|
|
1355
|
+
dismissed?: boolean;
|
|
1356
|
+
attempts?: number;
|
|
1357
|
+
inputType?: string;
|
|
1358
|
+
type?: 'text' | 'number' | 'email' | 'phone' | 'password' | 'datetime' | 'unknown';
|
|
1359
|
+
inputMethodPackage?: string;
|
|
1360
|
+
focusedPackage?: string;
|
|
1361
|
+
focusedResourceId?: string;
|
|
1362
|
+
inputOwner?: 'app' | 'ime' | 'unknown';
|
|
1363
|
+
message?: string;
|
|
1364
|
+
/** iOS `dismiss` only (#1598): which mechanism actually resigned the
|
|
1365
|
+
* keyboard — 'dismissKey' (tapped the keyboard's own Hide/Dismiss/Done
|
|
1366
|
+
* key). Generic background-tap dismissal is deliberately unsupported
|
|
1367
|
+
* (#1606 review): no query can prove a coordinate is side-effect-free,
|
|
1368
|
+
* so the runner only ever taps the keyboard's own control. Absent when
|
|
1369
|
+
* the keyboard was not dismissed. */
|
|
1370
|
+
mechanism?: 'dismissKey';
|
|
1371
|
+
};
|
|
1372
|
+
//#endregion
|
|
1373
|
+
//#region packages/contracts/src/wait.d.ts
|
|
1374
|
+
/**
|
|
1375
|
+
* Public daemon result for `wait`. The runtime-local result carries a `kind`
|
|
1376
|
+
* discriminant, but `toDaemonWaitData` intentionally projects the normal daemon
|
|
1377
|
+
* payload to this compact shape. The direct iOS selector fast path may still
|
|
1378
|
+
* include `kind: 'selector'` additively.
|
|
1379
|
+
*/
|
|
1380
|
+
type WaitCommandResult = {
|
|
1381
|
+
waitedMs: number;
|
|
1382
|
+
kind?: 'selector';
|
|
1383
|
+
text?: string;
|
|
1384
|
+
selector?: string;
|
|
1385
|
+
captures?: number;
|
|
1386
|
+
nodeCount?: number;
|
|
1387
|
+
hint?: string;
|
|
1388
|
+
warning?: string;
|
|
1389
|
+
};
|
|
1390
|
+
//#endregion
|
|
1356
1391
|
//#region packages/contracts/src/recording.d.ts
|
|
1357
1392
|
type RecordingAppIdentity = {
|
|
1358
1393
|
bundleId: string;
|
|
@@ -1396,7 +1431,7 @@ type TraceCommandResult = {
|
|
|
1396
1431
|
artifacts: DaemonArtifact[];
|
|
1397
1432
|
};
|
|
1398
1433
|
//#endregion
|
|
1399
|
-
//#region
|
|
1434
|
+
//#region packages/command-registry/src/command-result.d.ts
|
|
1400
1435
|
/**
|
|
1401
1436
|
* The additive typed-result spine (ADR-0008, Phase 1 step 6).
|
|
1402
1437
|
*
|
|
@@ -1413,37 +1448,42 @@ type TraceCommandResult = {
|
|
|
1413
1448
|
* `appstate` (a closed `platform` union — Apple session state with the iOS-only
|
|
1414
1449
|
* device locators, or Android package/activity). Batch 4 adds `keyboard` (a
|
|
1415
1450
|
* closed flat shape). Batch 5 adds the compact daemon projections for `wait`,
|
|
1416
|
-
* `prepare`, `push`, and `trigger-app-event`.
|
|
1451
|
+
* `prepare`, `push`, and `trigger-app-event`. #1652 adds `scroll`
|
|
1452
|
+
* (ScrollCommandResult): the shared dispatch vocabulary plus the opt-in
|
|
1453
|
+
* settle observation, so the settle-capable generic-route pair (`back`,
|
|
1454
|
+
* `scroll`) is fully typed and its MCP output schema derives from the trait.
|
|
1455
|
+
* Each entry is grounded in a
|
|
1417
1456
|
* re-read of the handler's literal return; see the per-type docstrings.
|
|
1418
1457
|
*/
|
|
1419
1458
|
interface CommandResultMap {
|
|
1420
|
-
|
|
1459
|
+
'app-switcher': AppSwitcherCommandResult;
|
|
1460
|
+
appstate: AppStateCommandResult;
|
|
1461
|
+
back: BackCommandResult;
|
|
1462
|
+
boot: BootCommandResult;
|
|
1421
1463
|
click: ClickCommandResponseData;
|
|
1464
|
+
clipboard: ClipboardCommandResult;
|
|
1465
|
+
diff: DiffSnapshotCommandResult;
|
|
1466
|
+
doctor: DoctorCommandResult;
|
|
1422
1467
|
fill: FillCommandResponseData;
|
|
1423
|
-
longpress: LongPressCommandResponseData;
|
|
1424
|
-
hover: HoverCommandResponseData;
|
|
1425
1468
|
find: FindCommandResponseData;
|
|
1426
|
-
boot: BootCommandResult;
|
|
1427
|
-
shutdown: ShutdownCommandResult;
|
|
1428
|
-
viewport: ViewportCommandResult;
|
|
1429
1469
|
home: HomeCommandResult;
|
|
1430
|
-
|
|
1431
|
-
orientation: OrientationCommandResult;
|
|
1432
|
-
'app-switcher': AppSwitcherCommandResult;
|
|
1433
|
-
clipboard: ClipboardCommandResult;
|
|
1434
|
-
appstate: AppStateCommandResult;
|
|
1470
|
+
hover: HoverCommandResponseData;
|
|
1435
1471
|
keyboard: KeyboardCommandResult;
|
|
1436
|
-
|
|
1437
|
-
|
|
1472
|
+
longpress: LongPressCommandResponseData;
|
|
1473
|
+
orientation: OrientationCommandResult;
|
|
1438
1474
|
prepare: PrepareCommandResult;
|
|
1475
|
+
press: PressCommandResponseData;
|
|
1439
1476
|
push: PushCommandResult;
|
|
1440
|
-
|
|
1441
|
-
doctor: DoctorCommandResult;
|
|
1442
|
-
diff: DiffSnapshotCommandResult;
|
|
1477
|
+
record: RecordingCommandResult;
|
|
1443
1478
|
replay: ReplayCommandResult;
|
|
1479
|
+
scroll: ScrollCommandResult;
|
|
1480
|
+
shutdown: ShutdownCommandResult;
|
|
1444
1481
|
test: ReplaySuiteResult;
|
|
1445
|
-
record: RecordingCommandResult;
|
|
1446
1482
|
trace: TraceCommandResult;
|
|
1483
|
+
'trigger-app-event': TriggerAppEventCommandResult;
|
|
1484
|
+
'tv-remote': TvRemoteCommandResult;
|
|
1485
|
+
viewport: ViewportCommandResult;
|
|
1486
|
+
wait: WaitCommandResult;
|
|
1447
1487
|
}
|
|
1448
1488
|
/**
|
|
1449
1489
|
* The typed result for a command named `N`. Seeded commands resolve to their
|
|
@@ -1455,10 +1495,12 @@ interface CommandResultMap {
|
|
|
1455
1495
|
type CommandResult<N extends string> = N extends keyof CommandResultMap ? CommandResultMap[N] : Record<string, unknown>;
|
|
1456
1496
|
//#endregion
|
|
1457
1497
|
//#region src/client/client-types.d.ts
|
|
1458
|
-
type
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1498
|
+
type AgentDeviceCommandClient = {
|
|
1499
|
+
back: (options?: BackCommandOptions) => Promise<CommandResult<'back'>>;
|
|
1500
|
+
home: (options?: HomeCommandOptions) => Promise<CommandResult<'home'>>;
|
|
1501
|
+
orientation: (options: OrientationCommandOptions) => Promise<CommandResult<'orientation'>>;
|
|
1502
|
+
appSwitcher: (options?: AppSwitcherCommandOptions) => Promise<CommandResult<'app-switcher'>>;
|
|
1503
|
+
tvRemote: (options: TvRemoteCommandOptions) => Promise<CommandResult<'tv-remote'>>;
|
|
1462
1504
|
wait: (options: WaitCommandOptions) => Promise<CommandResult<'wait'>>;
|
|
1463
1505
|
alert: (options?: AlertCommandOptions) => Promise<CommandRequestResult>;
|
|
1464
1506
|
appState: (options?: AppStateCommandOptions) => Promise<CommandResult<'appstate'>>;
|
|
@@ -1473,15 +1515,6 @@ type NonNavigationCommandClient = {
|
|
|
1473
1515
|
prepare: (options: PrepareCommandOptions) => Promise<CommandResult<'prepare'>>;
|
|
1474
1516
|
viewport: (options: ViewportCommandOptions) => Promise<CommandResult<'viewport'>>;
|
|
1475
1517
|
};
|
|
1476
|
-
type AgentDeviceCommandClient = ProjectedNavigationCommandClient<DeviceCommandBaseOptions> & NonNavigationCommandClient & DeprecatedCommandClient;
|
|
1477
|
-
/** Renamed command methods retained for existing consumers until the next major. */
|
|
1478
|
-
type DeprecatedCommandClient = {
|
|
1479
|
-
/**
|
|
1480
|
-
* @deprecated Renamed to `orientation`. Delegates to it and returns the legacy
|
|
1481
|
-
* `action: 'rotate'` response contract. Retained until the next major version.
|
|
1482
|
-
*/
|
|
1483
|
-
rotate: (options: RotateCommandOptions) => Promise<RotateCommandResult>;
|
|
1484
|
-
};
|
|
1485
1518
|
type AgentDeviceClient = {
|
|
1486
1519
|
command: AgentDeviceCommandClient;
|
|
1487
1520
|
devices: {
|
|
@@ -1522,6 +1555,11 @@ type AgentDeviceClient = {
|
|
|
1522
1555
|
released: boolean;
|
|
1523
1556
|
provider?: CloudProviderSessionResult;
|
|
1524
1557
|
}>;
|
|
1558
|
+
humanControl: {
|
|
1559
|
+
list: (options?: AgentDeviceRequestOverrides) => Promise<HumanControlHold[]>;
|
|
1560
|
+
put: (id: string, input?: HumanControlHoldOptions, options?: AgentDeviceRequestOverrides) => Promise<HumanControlHold>;
|
|
1561
|
+
remove: (id: string, options?: AgentDeviceRequestOverrides) => Promise<boolean>;
|
|
1562
|
+
};
|
|
1525
1563
|
};
|
|
1526
1564
|
metro: {
|
|
1527
1565
|
prepare: (options: MetroPrepareOptions) => Promise<MetroPrepareResult>;
|
|
@@ -1561,7 +1599,7 @@ type AgentDeviceClient = {
|
|
|
1561
1599
|
run: (options: BatchRunOptions) => Promise<BatchRunResult>;
|
|
1562
1600
|
};
|
|
1563
1601
|
observability: {
|
|
1564
|
-
perf: (options
|
|
1602
|
+
perf: (options: PerfOptions) => Promise<CommandRequestResult>;
|
|
1565
1603
|
logs: (options?: LogsOptions) => Promise<CommandRequestResult>;
|
|
1566
1604
|
events: (options?: EventsOptions) => Promise<CommandRequestResult>;
|
|
1567
1605
|
network: (options?: NetworkOptions) => Promise<CommandRequestResult>;
|