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,28 +1,3 @@
|
|
|
1
|
-
//#region packages/kernel/src/device.d.ts
|
|
2
|
-
declare const APPLE_OS_VALUES: readonly ['ios', 'ipados', 'tvos', 'watchos', 'visionos', 'macos'];
|
|
3
|
-
type AppleOS = (typeof APPLE_OS_VALUES)[number];
|
|
4
|
-
declare const PLATFORMS: readonly ['apple', 'android', 'harmonyos', 'vega', 'linux', 'web'];
|
|
5
|
-
type Platform = (typeof PLATFORMS)[number];
|
|
6
|
-
declare const PUBLIC_PLATFORMS: readonly ['ios', 'macos', 'android', 'harmonyos', 'vega', 'linux', 'web'];
|
|
7
|
-
type PublicPlatform = (typeof PUBLIC_PLATFORMS)[number];
|
|
8
|
-
declare const PLATFORM_SELECTORS: readonly ["apple", "android", "harmonyos", "vega", "linux", "web", "ios", "macos"];
|
|
9
|
-
type PlatformSelector = (typeof PLATFORM_SELECTORS)[number];
|
|
10
|
-
declare const DEVICE_KINDS: readonly ['simulator', 'emulator', 'device'];
|
|
11
|
-
type DeviceKind = (typeof DEVICE_KINDS)[number];
|
|
12
|
-
declare const DEVICE_TARGETS: readonly ['mobile', 'tv', 'desktop'];
|
|
13
|
-
type DeviceTarget = (typeof DEVICE_TARGETS)[number];
|
|
14
|
-
type DeviceInfo = {
|
|
15
|
-
platform: Platform;
|
|
16
|
-
id: string;
|
|
17
|
-
name: string;
|
|
18
|
-
kind: DeviceKind;
|
|
19
|
-
target?: DeviceTarget;
|
|
20
|
-
appleOs?: AppleOS;
|
|
21
|
-
booted?: boolean;
|
|
22
|
-
simulatorSetPath?: string;
|
|
23
|
-
iosPhysicalDeviceBackend?: 'coredevice' | 'xctest';
|
|
24
|
-
};
|
|
25
|
-
//#endregion
|
|
26
1
|
//#region packages/kernel/src/errors.d.ts
|
|
27
2
|
/**
|
|
28
3
|
* The known error codes as a value, so gates can enumerate them: every code
|
|
@@ -46,6 +21,10 @@ type DiagnosticsRecordRef = {
|
|
|
46
21
|
session: string;
|
|
47
22
|
requestId: string;
|
|
48
23
|
};
|
|
24
|
+
type ErrorCause = {
|
|
25
|
+
message: string;
|
|
26
|
+
code?: string;
|
|
27
|
+
};
|
|
49
28
|
/**
|
|
50
29
|
* Details bag for AppError. Free-form context is allowed, but these keys carry
|
|
51
30
|
* meaning at normalize/render time and must keep their types:
|
|
@@ -54,7 +33,7 @@ type DiagnosticsRecordRef = {
|
|
|
54
33
|
* lifted onto the normalized error, stripped from details.
|
|
55
34
|
* - `processExitError` + `stdout`/`stderr`/`exitCode` — marks a wrap of a real
|
|
56
35
|
* process exit so normalizeError can surface the first meaningful stderr line;
|
|
57
|
-
* build these via `execFailureDetails`/`requireExecSuccess` in
|
|
36
|
+
* build these via `execFailureDetails`/`requireExecSuccess` in @agent-device/host-kit/command
|
|
58
37
|
* rather than by hand.
|
|
59
38
|
* - `retriable` — typed retry signal hoisted to the wire error shape.
|
|
60
39
|
* - `reason` — machine-dispatchable sub-classification within a code.
|
|
@@ -76,6 +55,7 @@ type AppErrorDetails = Record<string, unknown> & {
|
|
|
76
55
|
type NormalizedError = {
|
|
77
56
|
code: string;
|
|
78
57
|
message: string;
|
|
58
|
+
cause?: ErrorCause;
|
|
79
59
|
hint?: string;
|
|
80
60
|
diagnosticId?: string;
|
|
81
61
|
/**
|
|
@@ -111,6 +91,7 @@ type NormalizedError = {
|
|
|
111
91
|
type DaemonError = {
|
|
112
92
|
code: string;
|
|
113
93
|
message: string;
|
|
94
|
+
cause?: ErrorCause;
|
|
114
95
|
hint?: string;
|
|
115
96
|
diagnosticId?: string;
|
|
116
97
|
/** Path on the DAEMON host. Meaningful to a local caller only (#1801). */
|
|
@@ -144,9 +125,34 @@ declare function normalizeAgentDeviceError(err: unknown, context?: NormalizeErro
|
|
|
144
125
|
declare function normalizeError(err: unknown, context?: NormalizeErrorContext): NormalizedError;
|
|
145
126
|
declare function defaultHintForCode(code: string): string | undefined;
|
|
146
127
|
//#endregion
|
|
128
|
+
//#region packages/kernel/src/device.d.ts
|
|
129
|
+
declare const APPLE_OS_VALUES: readonly ['ios', 'ipados', 'tvos', 'watchos', 'visionos', 'macos'];
|
|
130
|
+
type AppleOS = (typeof APPLE_OS_VALUES)[number];
|
|
131
|
+
declare const PLATFORMS: readonly ['apple', 'android', 'harmonyos', 'vega', 'linux', 'web'];
|
|
132
|
+
type Platform = (typeof PLATFORMS)[number];
|
|
133
|
+
declare const PUBLIC_PLATFORMS: readonly ['ios', 'macos', 'android', 'harmonyos', 'vega', 'linux', 'web'];
|
|
134
|
+
type PublicPlatform = (typeof PUBLIC_PLATFORMS)[number];
|
|
135
|
+
declare const PLATFORM_SELECTORS: readonly ["apple", "android", "harmonyos", "vega", "linux", "web", "ios", "macos"];
|
|
136
|
+
type PlatformSelector = (typeof PLATFORM_SELECTORS)[number];
|
|
137
|
+
declare const DEVICE_KINDS: readonly ['simulator', 'emulator', 'device'];
|
|
138
|
+
type DeviceKind = (typeof DEVICE_KINDS)[number];
|
|
139
|
+
declare const DEVICE_TARGETS: readonly ['mobile', 'tv', 'desktop'];
|
|
140
|
+
type DeviceTarget = (typeof DEVICE_TARGETS)[number];
|
|
141
|
+
type DeviceInfo = {
|
|
142
|
+
platform: Platform;
|
|
143
|
+
id: string;
|
|
144
|
+
name: string;
|
|
145
|
+
kind: DeviceKind;
|
|
146
|
+
target?: DeviceTarget;
|
|
147
|
+
appleOs?: AppleOS;
|
|
148
|
+
booted?: boolean;
|
|
149
|
+
simulatorSetPath?: string;
|
|
150
|
+
iosPhysicalDeviceBackend?: 'coredevice' | 'xctest';
|
|
151
|
+
};
|
|
152
|
+
//#endregion
|
|
147
153
|
//#region packages/kernel/src/snapshot.d.ts
|
|
148
154
|
/**
|
|
149
|
-
* Structured quality verdict computed once by
|
|
155
|
+
* Structured quality verdict computed once by a platform snapshot capture/presentation plan.
|
|
150
156
|
* The daemon renders it; it never re-derives degradation from node shapes.
|
|
151
157
|
*
|
|
152
158
|
* Defined here (the foundational snapshot type module) rather than in
|
|
@@ -156,16 +162,22 @@ declare function defaultHintForCode(code: string): string | undefined;
|
|
|
156
162
|
/**
|
|
157
163
|
* Which capture STRATEGY produced a snapshot, within one platform's plan —
|
|
158
164
|
* distinct from `SnapshotBackend`, which names the platform channel
|
|
159
|
-
* (`xctest`/`android`/…).
|
|
160
|
-
*
|
|
161
|
-
*
|
|
165
|
+
* (`xctest`/`android`/…). A platform plan may change strategy mid-sequence, and two strategies do
|
|
166
|
+
* not return comparable views of one screen (#1569). Android's helper presentation is included
|
|
167
|
+
* here so its quality verdict uses the same typed contract as the iOS strategy chain.
|
|
162
168
|
*/
|
|
163
|
-
type SnapshotCaptureBackend = 'tree' | 'queries' | 'private-ax';
|
|
169
|
+
type SnapshotCaptureBackend = 'tree' | 'queries' | 'private-ax' | 'android-helper';
|
|
170
|
+
/** Internal backends that evidence probes may select explicitly. */
|
|
171
|
+
type SnapshotPreferredBackend = 'tree' | 'private-ax';
|
|
172
|
+
type SnapshotQualityTiming = {
|
|
173
|
+
acquisitionMs: number;
|
|
174
|
+
presentationMs: number;
|
|
175
|
+
};
|
|
164
176
|
type SnapshotQualityVerdict = {
|
|
165
177
|
state: 'healthy' | 'recovered' | 'sparse';
|
|
166
178
|
backend: SnapshotCaptureBackend;
|
|
167
179
|
reason?: string;
|
|
168
|
-
reasonCode?: 'ax-rejected' | 'sparse-tree' | 'budget' | 'no-nodes' | 'capture-failed' | 'deferred' | 'requested-backend';
|
|
180
|
+
reasonCode?: 'ax-rejected' | 'sparse-tree' | 'budget' | 'no-nodes' | 'capture-failed' | 'presentation-failed' | 'deferred' | 'requested-backend';
|
|
169
181
|
effectiveDepth?: number;
|
|
170
182
|
collapsedLeafIndexes?: number[];
|
|
171
183
|
/**
|
|
@@ -180,6 +192,8 @@ type SnapshotQualityVerdict = {
|
|
|
180
192
|
truncated: number;
|
|
181
193
|
blocked: boolean;
|
|
182
194
|
};
|
|
195
|
+
/** Response-level phase timing for the backend named by `backend`. */
|
|
196
|
+
timing?: SnapshotQualityTiming;
|
|
183
197
|
};
|
|
184
198
|
type Rect = {
|
|
185
199
|
x: number;
|
|
@@ -202,7 +216,7 @@ type SnapshotOptions = {
|
|
|
202
216
|
* are not comparable views of a screen), so a corroboration probe must be
|
|
203
217
|
* captured the way its baseline was.
|
|
204
218
|
*/
|
|
205
|
-
preferredBackend?:
|
|
219
|
+
preferredBackend?: SnapshotPreferredBackend;
|
|
206
220
|
/**
|
|
207
221
|
* Read accessibility custom actions for elements that merge their children
|
|
208
222
|
* away. Opt-in because each such element costs its own accessibility round
|
|
@@ -210,6 +224,43 @@ type SnapshotOptions = {
|
|
|
210
224
|
*/
|
|
211
225
|
customActions?: boolean;
|
|
212
226
|
};
|
|
227
|
+
/** The CLI/daemon flag key for each snapshot capture option, by option name. */
|
|
228
|
+
declare const SNAPSHOT_OPTION_FLAGS: {
|
|
229
|
+
readonly interactiveOnly: 'snapshotInteractiveOnly';
|
|
230
|
+
readonly depth: 'snapshotDepth';
|
|
231
|
+
readonly scope: 'snapshotScope';
|
|
232
|
+
readonly raw: 'snapshotRaw';
|
|
233
|
+
readonly customActions: 'snapshotCustomActions';
|
|
234
|
+
readonly forceFull: 'snapshotForceFull';
|
|
235
|
+
readonly includeHiddenContentHints: 'snapshotIncludeHiddenContentHints';
|
|
236
|
+
readonly preferredBackend: 'snapshotPreferredBackend';
|
|
237
|
+
};
|
|
238
|
+
type SnapshotOptionKey = keyof typeof SNAPSHOT_OPTION_FLAGS;
|
|
239
|
+
type SnapshotOptionValues = {
|
|
240
|
+
interactiveOnly: boolean;
|
|
241
|
+
depth: number;
|
|
242
|
+
scope: string;
|
|
243
|
+
raw: boolean;
|
|
244
|
+
customActions: boolean;
|
|
245
|
+
forceFull: boolean;
|
|
246
|
+
includeHiddenContentHints: boolean;
|
|
247
|
+
preferredBackend: SnapshotPreferredBackend;
|
|
248
|
+
};
|
|
249
|
+
/** The option-vocabulary view of the declared pairs, narrowed to `TKeys`. */
|
|
250
|
+
type SnapshotOptionFields<TKeys extends SnapshotOptionKey = SnapshotOptionKey> = { [TKey in TKeys]?: SnapshotOptionValues[TKey]; };
|
|
251
|
+
/**
|
|
252
|
+
* Option keys a `snapshot`/`diff` command request carries end to end. `scope` is
|
|
253
|
+
* resolved against the session before capture, so seams that resolve it spread
|
|
254
|
+
* this projection and then override that one key.
|
|
255
|
+
*/
|
|
256
|
+
declare const SNAPSHOT_COMMAND_OPTION_KEYS: readonly ['interactiveOnly', 'depth', 'scope', 'raw', 'customActions', 'forceFull'];
|
|
257
|
+
/**
|
|
258
|
+
* The snapshot capture options a `snapshot`/`diff` request is stated in, in
|
|
259
|
+
* every vocabulary that names them: the public SDK type, the internal request
|
|
260
|
+
* bag and the command runtime options each reference THIS type instead of
|
|
261
|
+
* re-listing the same six keys.
|
|
262
|
+
*/
|
|
263
|
+
type SnapshotCommandOptionFields = SnapshotOptionFields<(typeof SNAPSHOT_COMMAND_OPTION_KEYS)[number]>;
|
|
213
264
|
type RawSnapshotNode = {
|
|
214
265
|
index: number;
|
|
215
266
|
type?: string;
|
|
@@ -222,6 +273,13 @@ type RawSnapshotNode = {
|
|
|
222
273
|
enabled?: boolean;
|
|
223
274
|
selected?: boolean;
|
|
224
275
|
focused?: boolean;
|
|
276
|
+
/** Native accessibility facts; absent means unavailable, not false. */
|
|
277
|
+
editable?: boolean;
|
|
278
|
+
password?: boolean;
|
|
279
|
+
hintShowing?: boolean;
|
|
280
|
+
/** Accessibility selection offsets, never a character count or proof of value equality. */
|
|
281
|
+
selectionStart?: number;
|
|
282
|
+
selectionEnd?: number;
|
|
225
283
|
visibleToUser?: boolean;
|
|
226
284
|
hittable?: boolean;
|
|
227
285
|
depth?: number;
|
|
@@ -235,6 +293,15 @@ type RawSnapshotNode = {
|
|
|
235
293
|
hiddenContentBelow?: boolean;
|
|
236
294
|
interactionBlocked?: 'covered';
|
|
237
295
|
presentationHints?: string[];
|
|
296
|
+
/**
|
|
297
|
+
* Backend-minted ref for this node, when the capture backend already assigns a
|
|
298
|
+
* stable, actionable ref (e.g. the web/agent-browser backend resolves actions
|
|
299
|
+
* against its own `@eN` refs). `attachRefs` preserves this instead of re-minting
|
|
300
|
+
* a dense positional ref, so the ref an agent sees in the snapshot is the same
|
|
301
|
+
* ref the backend can resolve on the next action. Absent for backends that do
|
|
302
|
+
* not mint refs — those fall back to dense `e${index}` numbering.
|
|
303
|
+
*/
|
|
304
|
+
ref?: string;
|
|
238
305
|
/**
|
|
239
306
|
* Accessibility custom actions the element exposes (iOS
|
|
240
307
|
* `UIAccessibilityCustomAction`, React Native `accessibilityActions`). Merged
|
|
@@ -255,22 +322,78 @@ type SnapshotNode = RawSnapshotNode & {
|
|
|
255
322
|
inheritsLabel?: true;
|
|
256
323
|
inheritsIdentifier?: true;
|
|
257
324
|
};
|
|
258
|
-
|
|
325
|
+
/**
|
|
326
|
+
* The channel↔producer pairs that can actually occur. One channel is fed by several producers
|
|
327
|
+
* with different guarantees: `xctest` trees come from the local Apple runner, Appium
|
|
328
|
+
* page-source XML, or a limrun element tree, and only the runner's output has been through the
|
|
329
|
+
* runner's presentation (clip fold, effective geometry, scope). Logic that assumes
|
|
330
|
+
* presentation, scope, or geometry guarantees must key on the producer, never on the channel
|
|
331
|
+
* alone.
|
|
332
|
+
*
|
|
333
|
+
* This table is the single owner of both vocabularies: the platform channel
|
|
334
|
+
* (`SnapshotBackend` is its `backend` projection) and the acquisition producer (the third
|
|
335
|
+
* axis beside the channel and the in-plan capture strategy `SnapshotCaptureBackend`). Every
|
|
336
|
+
* carrier embeds the pair atomically — a cross-channel pair does not compile (pinned by
|
|
337
|
+
* snapshot-provenance.test.ts).
|
|
338
|
+
*/
|
|
339
|
+
type SnapshotProvenance = {
|
|
340
|
+
backend: 'xctest';
|
|
341
|
+
producer: 'apple-runner' | 'simulator-ax-bridge' | 'appium-source' | 'limrun-ios-tree';
|
|
342
|
+
} | {
|
|
343
|
+
backend: 'android';
|
|
344
|
+
producer: 'android-uiautomator' | 'appium-source';
|
|
345
|
+
} | {
|
|
346
|
+
backend: 'harmonyos-arkui';
|
|
347
|
+
producer: 'harmonyos-uitest';
|
|
348
|
+
} | {
|
|
349
|
+
backend: 'macos-helper';
|
|
350
|
+
producer: 'macos-helper';
|
|
351
|
+
} | {
|
|
352
|
+
backend: 'linux-atspi';
|
|
353
|
+
producer: 'linux-atspi';
|
|
354
|
+
} | {
|
|
355
|
+
backend: 'web';
|
|
356
|
+
producer: 'agent-browser';
|
|
357
|
+
};
|
|
358
|
+
type OptionalProducerProvenance<Pair> = Pair extends {
|
|
359
|
+
backend: infer Backend;
|
|
360
|
+
producer: infer Producer;
|
|
361
|
+
} ? {
|
|
362
|
+
backend: Backend;
|
|
363
|
+
producer?: Producer;
|
|
364
|
+
} : never;
|
|
365
|
+
/**
|
|
366
|
+
* The provenance carrier for {@link SnapshotState}: the producer may be absent (a client-side
|
|
367
|
+
* fallback that rebuilds a state from a bare backend result knows the channel and nothing more),
|
|
368
|
+
* but a present pair still has to come from the {@link SnapshotProvenance} table — the channel
|
|
369
|
+
* may not carry a foreign producer.
|
|
370
|
+
*/
|
|
371
|
+
type SnapshotStateProvenance = OptionalProducerProvenance<SnapshotProvenance> | {
|
|
372
|
+
backend?: undefined;
|
|
373
|
+
producer?: undefined;
|
|
374
|
+
};
|
|
259
375
|
type SnapshotState = {
|
|
260
376
|
nodes: SnapshotNode[];
|
|
261
377
|
createdAt: number;
|
|
262
378
|
truncated?: boolean;
|
|
263
|
-
backend?: SnapshotBackend;
|
|
264
379
|
snapshotQuality?: SnapshotQualityVerdict;
|
|
265
380
|
comparisonSafe?: boolean;
|
|
266
381
|
presentationKey?: string;
|
|
382
|
+
/** Opaque equality key for iOS acquisition and presentation lineage. */
|
|
383
|
+
comparisonKey?: string;
|
|
267
384
|
/**
|
|
268
385
|
* Android: the capture is an occluding system surface (notification shade, quick settings)
|
|
269
386
|
* rather than app content. Consumers that surface this tree to the agent must disclose the
|
|
270
|
-
* occlusion (see
|
|
387
|
+
* occlusion (see `@agent-device/contracts/android-system-surface-disclosure`).
|
|
271
388
|
*/
|
|
272
389
|
systemSurfaceOnly?: boolean;
|
|
273
|
-
|
|
390
|
+
/**
|
|
391
|
+
* iOS: the bundle id of the in-place system surface this capture describes (a web sign-in sheet
|
|
392
|
+
* presented over the app, #2438). Two captures that disagree here describe different surfaces and
|
|
393
|
+
* must never be compared as the same presentation; consumers that surface the tree disclose it.
|
|
394
|
+
*/
|
|
395
|
+
iosSystemSurfaceBundleId?: string;
|
|
396
|
+
} & SnapshotStateProvenance;
|
|
274
397
|
type SnapshotUnchanged = {
|
|
275
398
|
ageMs: number;
|
|
276
399
|
nodeCount: number;
|
|
@@ -294,8 +417,10 @@ type ScreenshotOverlayRef = {
|
|
|
294
417
|
declare function centerOfRect(rect: Rect): Point;
|
|
295
418
|
//#endregion
|
|
296
419
|
//#region packages/kernel/src/contracts.d.ts
|
|
420
|
+
declare const SESSION_RUNTIME_PLATFORMS: readonly ['ios', 'android', 'harmonyos'];
|
|
421
|
+
type SessionRuntimePlatform = (typeof SESSION_RUNTIME_PLATFORMS)[number];
|
|
297
422
|
type SessionRuntimeHints = {
|
|
298
|
-
platform?:
|
|
423
|
+
platform?: SessionRuntimePlatform;
|
|
299
424
|
metroHost?: string;
|
|
300
425
|
metroPort?: number;
|
|
301
426
|
bundleUrl?: string;
|
|
@@ -320,9 +445,13 @@ type DaemonInstallSource = {
|
|
|
320
445
|
} | {
|
|
321
446
|
artifactName: string;
|
|
322
447
|
}));
|
|
448
|
+
/** Install sources that can be materialized by a local daemon. */
|
|
449
|
+
type LocalInstallSource = Extract<DaemonInstallSource, {
|
|
450
|
+
kind: 'url' | 'path';
|
|
451
|
+
}>;
|
|
323
452
|
declare const DAEMON_LOCK_POLICIES: readonly ['reject', 'strip'];
|
|
324
453
|
type DaemonLockPolicy = (typeof DAEMON_LOCK_POLICIES)[number];
|
|
325
|
-
declare const LEASE_BACKENDS: readonly ['ios-simulator', 'ios-instance', 'android-instance'];
|
|
454
|
+
declare const LEASE_BACKENDS: readonly ['ios-simulator', 'ios-instance', 'android-instance', 'harmonyos-instance'];
|
|
326
455
|
type LeaseBackend = (typeof LEASE_BACKENDS)[number];
|
|
327
456
|
declare const DAEMON_SERVER_MODES: readonly ['socket', 'http', 'dual'];
|
|
328
457
|
type DaemonServerMode = (typeof DAEMON_SERVER_MODES)[number];
|
|
@@ -370,7 +499,7 @@ type DaemonRequest = {
|
|
|
370
499
|
runtime?: SessionRuntimeHints;
|
|
371
500
|
meta?: DaemonRequestMeta;
|
|
372
501
|
};
|
|
373
|
-
type DaemonArtifactKnownType = 'screenshot' | 'screenshot-diff' | 'screen-recording' | 'screen-recording-chunk' | 'screen-recording-telemetry' | 'trace-log';
|
|
502
|
+
type DaemonArtifactKnownType = 'screenshot' | 'screenshot-diff' | 'screen-recording' | 'screen-recording-chunk' | 'screen-recording-telemetry' | 'trace-log' | 'test-artifacts';
|
|
374
503
|
type DaemonArtifactType = DaemonArtifactKnownType | (string & {});
|
|
375
504
|
type DaemonArtifact = {
|
|
376
505
|
field: string;
|
|
@@ -404,4 +533,4 @@ type JsonRpcRequestEnvelope<TParams = unknown> = {
|
|
|
404
533
|
params?: TParams;
|
|
405
534
|
};
|
|
406
535
|
//#endregion
|
|
407
|
-
export {
|
|
536
|
+
export { SnapshotVisibility as A, DaemonError as B, SnapshotCommandOptionFields as C, SnapshotQualityVerdict as D, SnapshotProvenance as E, DeviceTarget as F, normalizeError as G, defaultHintForCode as H, Platform as I, PlatformSelector as L, AppleOS as M, DeviceInfo as N, SnapshotState as O, DeviceKind as P, PublicPlatform as R, ScreenshotOverlayRef as S, SnapshotOptions as T, isAgentDeviceError as U, NormalizedError as V, normalizeAgentDeviceError as W, SessionIsolationMode as _, DaemonRequest as a, RawSnapshotNode as b, DaemonServerMode as c, JsonRpcRequestEnvelope as d, LeaseBackend as f, ResponseLevel as g, ResponseCost as h, DaemonLockPolicy as i, centerOfRect as j, SnapshotUnchanged as k, DaemonTransportPreference as l, NetworkIncludeMode as m, DaemonArtifactType as n, DaemonResponse as o, LocalInstallSource as p, DaemonInstallSource as r, DaemonResponseData as s, DaemonArtifact as t, JsonRpcId as u, SessionRuntimeHints as v, SnapshotNode as w, Rect as x, Point as y, AppError as z };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
`)){let e=t.trim();if(!e||
|
|
1
|
+
import{r as e}from"./rolldown-runtime.js";const t=/(token|secret|password|authorization|cookie|api[_-]?key|access[_-]?key|private[_-]?key|user[_-]?code|device[_-]?code|refresh[_-]?credential)/i,n=/\b(?:bearer\s+[a-z0-9._-]+|adc_(?:agent|live|refresh|cli)_[a-z0-9._-]+)\b/gi,r=/\b([a-z0-9_-]*(?:api[_-]?key|token|secret|password|user[_-]?code|device[_-]?code|refresh[_-]?credential)[a-z0-9_-]*)(\s*[=:]\s*)("[^"]*"|'[^']*'|\S+)/gi,i=/https?:\/\/[^\s"'<>]+/gi;function a(e){return s(e,new WeakSet)}function o(e){if(!e||typeof e!=`object`)return;let t=e;if(typeof t.message==`string`&&t.message.length!==0)return a({message:t.message,...typeof t.code==`string`&&t.code.length>0?{code:t.code}:{}})}function s(e,n,r){if(e==null)return e;if(typeof e==`string`)return c(e,r);if(typeof e!=`object`)return e;if(n.has(e))return`[Circular]`;if(n.add(e),Array.isArray(e))return e.map(e=>s(e,n));let i={};for(let[r,a]of Object.entries(e)){if(t.test(r)){i[r]=`[REDACTED]`;continue}i[r]=s(a,n,r)}return i}function c(e,i){let a=e.trim();if(!a)return l(e);if(i&&t.test(i))return`[REDACTED]`;let o=u(a);return o=o.replace(n,`[REDACTED]`),o=o.replace(r,(e,t,n,r,i,a)=>f({key:t,separator:n,rawValue:r,offset:i,input:a})||d(r)?e:`${t}${n}[REDACTED]`),l(o)}function l(e){return e.length<=400?e:`${e.slice(0,386)}...<truncated>`}function u(e){return e.replace(i,e=>p(e)??e)}function d(e){return/^adc_(?:agent|live|refresh|cli)_\.\.\.$/i.test(e)}function f(e){if(e.key.toLowerCase()!==`token`||!e.separator.includes(`:`))return!1;try{return new URL(e.rawValue).pathname.replace(/\/+$/,``)===`/api-keys`&&/(?:^|\b)(?:service\/)?api\s+$/i.test(e.input.slice(0,e.offset))}catch{return!1}}function p(e){try{let t=new URL(e);return t.search&&=`?REDACTED`,(t.username||t.password)&&(t.username=`REDACTED`,t.password=`REDACTED`),t.toString()}catch{return null}}var m=e({AppError:()=>b,KNOWN_APP_ERROR_CODES:()=>h,asAppError:()=>D,createRequestCanceledError:()=>w,defaultHintForCode:()=>F,errorMessage:()=>E,isAgentDeviceError:()=>O,isRequestCanceledError:()=>T,normalizeAgentDeviceError:()=>k,normalizeError:()=>A,readDiagnosticsRecordRef:()=>N,readElementMatchCandidateRefs:()=>v,readErrorCandidateViews:()=>_,retriableForErrorCode:()=>P,throwDaemonError:()=>x,toAppErrorCode:()=>g});const h=[`INVALID_ARGS`,`DEVICE_NOT_FOUND`,`DEVICE_IN_USE`,`TOOL_MISSING`,`APP_NOT_INSTALLED`,`UNSUPPORTED_PLATFORM`,`UNSUPPORTED_OPERATION`,`NOT_IMPLEMENTED`,`COMMAND_FAILED`,`SESSION_NOT_FOUND`,`UNAUTHORIZED`,`AMBIGUOUS_MATCH`,`REPLAY_DIVERGENCE`,`REPAIR_SESSION_EXPIRED`,`REPAIR_COMMIT_FAILED`,`UNKNOWN`];function g(e,t=`COMMAND_FAILED`){return typeof e==`string`&&e.length>0?e:t}function _(e){let t=y(e?.candidates),n=[];if(t.length>0){let r=typeof e?.matches==`number`?e.matches:t.length,i=typeof e?.refsGeneration==`number`?e.refsGeneration:void 0;n.push({kind:`element-match`,candidates:t,matches:r,...i===void 0?{}:{refsGeneration:i}})}let r=ee(e?.devices);return r.length>0&&n.push({kind:`device`,devices:r}),n}function v(e){return y(e?.candidates).flatMap(e=>{let t=/^@(e\d+)(?:~s\d+)?(?:\s|$)/.exec(e);return t?.[1]?[t[1]]:[]})}function y(e){return Array.isArray(e)?e.filter(e=>typeof e==`string`):[]}function ee(e){return Array.isArray(e)?e.filter(e=>typeof e==`object`&&!!e&&typeof e.id==`string`&&typeof e.name==`string`):[]}var b=class extends Error{code;details;cause;constructor(e,t,n,r){super(t),this.code=e,this.details=n,this.cause=r}};function x(e){throw new b(g(e.code),e.message,{...e.details??{},hint:e.hint,diagnosticId:e.diagnosticId,logPath:e.logPath,logPathUnavailable:e.logPathUnavailable,diagnosticsRecord:e.diagnosticsRecord,retriable:e.retriable,supportedOn:e.supportedOn},e.cause)}const S=`request_canceled`,C=`request canceled`;function w(e,t){return new b(`COMMAND_FAILED`,C,{hint:`The request was canceled intentionally (explicit cancel or client disconnect) — no retry is needed unless the cancellation was unintended.`,...e,reason:S},t)}function T(e){return!(e instanceof b)||e.code!==`COMMAND_FAILED`?!1:e.details?.reason===S||e.message===C}function E(e){return e instanceof Error?e.message:String(e)}function D(e,t=`UNKNOWN`){return e instanceof b?e:e instanceof Error?new b(t,e.message,void 0,e):new b(t,`Unknown error`,{err:e})}function O(e){return e instanceof b}function k(e,t={}){return A(e,t)}function A(e,t={}){let n=D(e),r=n.details?a(n.details):void 0,i=M(r,`diagnosticId`)??t.diagnosticId,s=M(r,`logPath`)??t.logPath,c=M(r,`logPathUnavailable`),l=N(r?.diagnosticsRecord)??t.diagnosticsRecord,u=M(r,`hint`)??F(n.code),d=ae(r,`retriable`)??P(n.code),f=M(r,`supportedOn`),p=oe(r),m=ne(n.code,n.message,r),h=o(n.cause);return{code:n.code,message:m,...h===void 0?{}:{cause:h},hint:u,diagnosticId:i,logPath:s,...c===void 0?{}:{logPathUnavailable:c},...l===void 0?{}:{diagnosticsRecord:l},...d===void 0?{}:{retriable:d},...f===void 0?{}:{supportedOn:f},details:p}}const te=/^\S+ exited with code -?\d+$/;function ne(e,t,n){if(e!==`COMMAND_FAILED`||n?.processExitError!==!0)return t;let r=j(typeof n?.stderr==`string`?n.stderr:``);return r?te.test(t)?r:t.includes(r)?t:`${t}: ${r}`:t}const re=[/^an error was encountered processing the command/i,/^underlying error\b/i,/^simulator device failed to complete the requested operation/i],ie=/^(?:(?:adb|xcrun|simctl):\s*)?(?:error:\s*)?/i;function j(e){for(let t of e.split(`
|
|
2
|
+
`)){let e=t.trim();if(!e||re.some(t=>t.test(e)))continue;let n=e.replace(ie,``).trim();if(n)return n.length>200?`${n.slice(0,200)}...`:n}return null}function M(e,t){let n=e?.[t];return typeof n==`string`?n:void 0}function N(e){if(!e||typeof e!=`object`)return;let{session:t,requestId:n}=e;if(typeof t==`string`&&typeof n==`string`&&t.length!==0&&n.length!==0)return{session:t,requestId:n}}function ae(e,t){let n=e?.[t];return typeof n==`boolean`?n:void 0}function oe(e){if(!e)return;let t={...e};return delete t.hint,delete t.diagnosticId,delete t.logPath,delete t.logPathUnavailable,delete t.diagnosticsRecord,delete t.retriable,delete t.supportedOn,Object.keys(t).length>0?t:void 0}const se={DEVICE_IN_USE:!0};function ce(e){return h.includes(e)}function P(e){return ce(e)?se[e]:void 0}function F(e){switch(e){case`INVALID_ARGS`:return`Check command arguments and run --help for usage examples.`;case`SESSION_NOT_FOUND`:return`Run open first or pass an explicit device selector.`;case`TOOL_MISSING`:return`Install required platform tooling and ensure it is available in PATH.`;case`DEVICE_NOT_FOUND`:return`Verify the target device is booted/connected and selectors match.`;case`APP_NOT_INSTALLED`:return`Run apps to discover the exact installed package or bundle id, or install the app before open.`;case`UNSUPPORTED_OPERATION`:return`This command is not available for the selected platform/device.`;case`UNSUPPORTED_PLATFORM`:return`This platform is not supported for the requested operation; run devices to inspect available targets.`;case`AMBIGUOUS_MATCH`:return`Multiple candidates matched. Narrow the query or pass an exact identifier.`;case`DEVICE_IN_USE`:return`The device is busy with another agent-device request; retry once it frees up.`;case`REPLAY_DIVERGENCE`:return`Read details.divergence (screen/suggestions) for repair context, or rerun with --json for the full report.`;case`REPAIR_SESSION_EXPIRED`:return`The --save-script repair session was reaped before it was finalized; re-run replay <script> --save-script from the start.`;case`REPAIR_COMMIT_FAILED`:return`The repair transaction completed, but committing its healed script failed at teardown (no-clobber refusal or a filesystem error); inspect the target path/permissions, then re-run replay <script> --save-script to retry.`;case`NOT_IMPLEMENTED`:return`This command is part of the planned API but is not implemented yet.`;case`COMMAND_FAILED`:return`Retry with --debug and inspect diagnostics log for details.`;case`UNAUTHORIZED`:return`Refresh daemon metadata and retry the command.`;case`UNKNOWN`:return`Unexpected internal error. Retry with --debug and report the diagnostics log if it persists.`;default:return`Retry with --debug and inspect diagnostics log for details.`}}const I={interactiveOnly:`snapshotInteractiveOnly`,depth:`snapshotDepth`,scope:`snapshotScope`,raw:`snapshotRaw`,customActions:`snapshotCustomActions`,forceFull:`snapshotForceFull`,includeHiddenContentHints:`snapshotIncludeHiddenContentHints`,preferredBackend:`snapshotPreferredBackend`},le=[`interactiveOnly`,`depth`,`scope`,`raw`,`customActions`,`forceFull`],L=[`interactiveOnly`,`preferredBackend`,`depth`,`scope`,`raw`,`customActions`,`includeHiddenContentHints`],R=[`depth`,`interactiveOnly`,`raw`,`scope`,`customActions`];function z(e,t){return Object.fromEntries(t.map(t=>[t,e?.[I[t]]]))}function B(e,t){return Object.fromEntries(t.flatMap(t=>{let n=e?.[t];return n===void 0?[]:[[I[t],n]]}))}function V(e){if(e===void 0||e.backend===void 0)return{};switch(e.backend){case`xctest`:return{backend:e.backend,producer:e.producer};case`android`:return{backend:e.backend,producer:e.producer};case`harmonyos-arkui`:return{backend:e.backend,producer:e.producer};case`macos-helper`:return{backend:e.backend,producer:e.producer};case`linux-atspi`:return{backend:e.backend,producer:e.producer};case`web`:return{backend:e.backend,producer:e.producer}}}function H(e){return e===`xctest`||e===`android`||e===`harmonyos-arkui`||e===`macos-helper`||e===`linux-atspi`||e===`web`}function U(e){return e===void 0||e===`xctest`||e===`android`||e===`harmonyos-arkui`}function W(e){return e.map((e,t)=>({...e,ref:e.ref??`e${t+1}`}))}const ue=/^~s(\d+)$/,de=`Refs look like @e12, optionally pinned to the snapshot generation that minted them: @e12~s3 (the ref, then "~s" and the refsGeneration reported by the issuing snapshot/find response).`;function G(e){let t=e.trim(),n=t.indexOf(`~`);if(n===-1)return{base:t};let r=ue.exec(t.slice(n));return!r||n===0?null:{base:t.slice(0,n),generation:Number(r[1])}}function fe(e){let t=G(e);if(!t)return null;let n=t.base;return n.startsWith(`@`)?n.slice(1)||null:n.startsWith(`e`)?n:null}function pe(e,t){return e.find(e=>e.ref===t)??null}function me(e){return JSON.stringify({interactiveOnly:e?.interactiveOnly===!0,depth:typeof e?.depth==`number`?e.depth:null,scope:e?.scope?.trim()||null,raw:e?.raw===!0,customActions:e?.customActions===!0})}function he(e){if(e)return z(e,R)}function ge(e){return{x:Math.round(e.x+e.width/2),y:Math.round(e.y+e.height/2)}}const K=[`ios`,`android`,`harmonyos`];function _e(e){return K.some(t=>t===e)}const ve=[`summary`,`headers`,`body`,`all`],ye=[`digest`,`default`,`full`];function be(e){return e!==void 0&&e!=="default"}function q(e){return{parse(t){return e(t,`$`)}}}function J(e,t){throw Error(`${e}: ${t}`)}function Y(e,t){return(!e||typeof e!=`object`||Array.isArray(e))&&J(t,`Expected an object`),e}function X(e,t){return typeof e!=`string`&&J(t,`Expected a string`),e}function xe(e,t){return Number.isInteger(e)||J(t,`Expected an integer`),e}function Se(e,t){return Array.isArray(e)||J(t,`Expected an array`),e}function Z(e,t,n){let r=e[t];return r===void 0?void 0:X(r,`${n}.${t}`)}function Q(e,t,n){let r=e[t];if(r!==void 0)return Se(r,`${n}.${t}`).map((e,r)=>X(e,`${n}.${t}[${String(r)}]`))}function Ce(e,t,n){let r=e[t];return r===void 0?void 0:xe(r,`${n}.${t}`)}function $(e,t,n){let r=e[t];return r===void 0?void 0:Y(r,`${n}.${t}`)}function we(e,t,n,r){let i=e[t];if(i!==void 0)return(typeof i!=`string`||!n.includes(i))&&J(`${r}.${t}`,`Expected one of: ${n.join(`, `)}`),i}const Te=q((e,t)=>{let n=Y(e,t);return{platform:we(n,`platform`,K,t),metroHost:Z(n,`metroHost`,t),metroPort:Ce(n,`metroPort`,t),bundleUrl:Z(n,`bundleUrl`,t),launchUrl:Z(n,`launchUrl`,t)}});function Ee(e,t){let n=e.id;return n==null||typeof n!=`string`&&typeof n!=`number`&&J(`${t}.id`,`Expected a string, number, or null`),n}const De=q((e,t)=>{let n=Y(e,t);return{jsonrpc:Z(n,`jsonrpc`,t),id:Ee(n,t),method:Z(n,`method`,t),params:n.params}}),Oe=q((e,t)=>{let n=Y(e,t);return{token:Z(n,`token`,t),session:Z(n,`session`,t),command:Z(n,`command`,t),positionals:Q(n,`positionals`,t),input:$(n,`input`,t),flags:$(n,`flags`,t),runtime:$(n,`runtime`,t),meta:$(n,`meta`,t)}});export{T as A,o as B,b as C,E as D,F as E,_ as F,P as I,x as L,A as M,N,m as O,v as P,g as R,U as S,w as T,B as _,be as a,V as b,de as c,W as d,me as f,fe as g,H as h,Te as i,k as j,O as k,L as l,pe as m,ye as n,_e as o,ge as p,Oe as r,De as s,ve as t,le as u,z as v,D as w,G as x,he as y,a as z};
|
package/dist/src/sdk-device.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{C as e}from"./sdk-contracts.js";function t(e){return Object.freeze({family:e.platform,...e.appleOs===void 0?{}:{appleOs:e.appleOs},kind:e.kind,...e.target===void 0?{}:{target:e.target},...e.iosPhysicalDeviceBackend===void 0?{}:{iosPhysicalDeviceBackend:e.iosPhysicalDeviceBackend}})}function n(e){return Object.freeze({id:e.id,...t(e)})}function r(e){return JSON.stringify([e.id,...o(e)])}function i(e,t){return r(e)===r(t)}function a(e,t){return JSON.stringify(o(e))===JSON.stringify(o(t))}function o(e){return[e.family,e.appleOs??null,e.kind,e.target??null,e.iosPhysicalDeviceBackend??null]}const s=[`ios`,`ipados`,`tvos`,`watchos`,`visionos`,`macos`],c=[`apple`,`android`,`harmonyos`,`vega`,`linux`,`web`],l=[`ios`,`macos`,`android`,`harmonyos`,`vega`,`linux`,`web`],u=[...c,`ios`,`macos`],d=[`mobile`,`tv`,`desktop`];function f(e){return[e.deviceName,e.udid,e.serial].some(e=>typeof e==`string`&&e.trim().length>0)}function p(e){return e===`apple`||e===`ios`||e===`macos`}function m(e){return e.appleOs===`macos`||e.platform===`macos`}function h(e){return p(e.platform)&&!m(e)}function g(e){return e.platform===`android`||e.platform===`harmonyos`||p(e.platform)&&!m(e)}function _(e){return p(e.platform)?m(e)?`macos`:`ios`:e.platform}function v(e){return e===`macos`?{platform:`apple`,appleOs:`macos`}:e===`ios`?{platform:`apple`}:{platform:e}}function y(e){return p(e.platform)&&e.target===`tv`}function b(e){return e.appleOs?e.appleOs:e.platform===`macos`?`macos`:y(e)?`tvos`:`ios`}function x(e){return c.includes(e)}function S(e){return l.includes(e)}function C(e){return s.includes(e)}function w(e,t){return t?t===`apple`?p(e.platform):t===`ios`?p(e.platform)&&!m(e):t===`macos`?p(e.platform)&&m(e):e.platform===t:!0}function T(e,t){return t?E(t):e===`macos`||e===`desktop`?`macOS`:e===`tv`?`tvOS`:`iOS`}function E(e){switch(e){case`tvos`:return`tvOS`;case`macos`:return`macOS`;case`visionos`:return`visionOS`;default:return`iOS`}}function D(e){let{simulatorSetPath:t,platform:n,target:r}=e;if(t&&n!==`macos`&&r!==`desktop`)return t}function O(e){return e.map((e,t)=>({device:e,index:t})).sort((e,t)=>Y(e,t)).map(({device:e})=>e)}function k(e){return!e||e===`apple`||e===`ios`}async function A(e,t,n={}){let r=e.filter(e=>U(e,t));return j(r,t)||F(r,t.deviceName)||(Q(r)&&(r=O(r)),ee(r,t,n))}function j(e,t){if(M(t),t.udid)return N(e,t.udid);if(t.serial)return P(e,t)}function M(t){let n=t.platform;if(n){if(t.udid&&G(n))throw new e(`INVALID_ARGS`,`--udid selects Apple devices, but this request selected --platform ${n}.`,{hint:`Use --serial ${t.udid} for ${n} devices.`});if(t.serial&&p(n))throw new e(`INVALID_ARGS`,`--serial selects Android and HarmonyOS devices, but this request selected --platform ${n}.`,{hint:`Use --udid ${t.serial} for Apple devices.`})}}function N(t,n){let r=t.find(e=>e.id===n&&p(e.platform));if(!r)throw new e(`DEVICE_NOT_FOUND`,`No Apple device with UDID ${n}`);return r}function P(t,n){let r=t.find(e=>e.id===n.serial&&G(e.platform));if(!r)throw new e(`DEVICE_NOT_FOUND`,K(n));return r}function F(t,n){if(!n)return;let r=J(n),i=t.find(e=>J(e.name)===r);if(!i){let r=I(t,n);throw new e(`DEVICE_NOT_FOUND`,`No device named ${n}`,r===void 0?void 0:{hint:r})}return i}function I(e,t){let n=e.find(e=>e.id===t);if(!n)return;let r=L(n.platform);if(r)return`${t} is the id of ${JSON.stringify(n.name)}, not its name. Did you mean ${r} ${t}?`}function L(e){if(p(e))return`--udid`;if(G(e))return`--serial`}function ee(e,t,n){let r=e[0];if(r!==void 0&&e.length===1)return r;e.length===0&&q(t,n);let i=B(e);i.length>1&&R(i);let a=i[0];return a||q(t,n),a}function R(t){let n=t.slice(0,10);throw new e(`AMBIGUOUS_MATCH`,`${t.length} devices match this request equally; select one explicitly.`,{devices:n.map(e=>({id:e.id,name:e.name})),matches:t.length,hint:z(n)})}function z(e){let t=e[0];return`Select the intended device explicitly, for example ${t&&G(t.platform)?`--serial ${t.id}`:`--udid ${t?.id??`<id>`}`} or --device ${JSON.stringify(t?.name??`<name>`)}. Run agent-device devices to list them.`}function B(e){let t=Q(e)?H(e):V(e),n=t.filter(e=>e.booted);return n.length>0?n:t}function V(e){let t=e.filter(e=>e.kind!==`device`);return t.length>0?t:e}function H(e){let t=Math.min(...e.map(e=>X(e)));return e.filter(e=>X(e)===t)}function U(e,t,n={}){return w(e,t.platform)&&(!t.target||(e.target??`mobile`)===t.target)&&(!n.includeExplicitSelectors||W(e,t))}function W(e,t){return!(t.udid&&!(e.id===t.udid&&p(e.platform))||t.serial&&!(e.id===t.serial&&G(e.platform))||t.deviceName&&J(e.name)!==J(t.deviceName))}function G(e){return e===`android`||e===`harmonyos`||e===`vega`}function K(e){return e.platform===`android`?`No Android device with serial ${e.serial}`:e.platform===`vega`?`No Vega VVD with serial ${e.serial}`:e.platform===`harmonyos`?`No HarmonyOS device with serial ${e.serial}`:`No Android, HarmonyOS device, or Vega VVD with serial ${e.serial}`}function q(t,n){let r=n.simulatorSetPath;throw r&&k(t.platform)?new e(`DEVICE_NOT_FOUND`,`No devices found in the scoped simulator set`,{simulatorSetPath:r,hint:`The simulator set at "${r}" appears to be empty. Create a compatible simulator first with xcrun simctl --set "${r}" create, or remove the scoped simulator set.`,selector:t}):new e(`DEVICE_NOT_FOUND`,`No devices found`,{selector:t})}function J(e){return e.toLowerCase().replaceAll(`_`,` `).replaceAll(/\s+/g,` `).trim()}function Y(e,t){return X(e.device)-X(t.device)||Number(t.device.booted===!0)-Number(e.device.booted===!0)||e.device.name.localeCompare(t.device.name)||e.index-t.index}function X(e){return e.kind===`simulator`?Z(e,0,1,2,3):e.kind===`device`&&p(e.platform)&&!m(e)?Z(e,10,11,12,13):14}function Z(e,t,n,r,i){return{mobile:$(e.name)?n:t,tv:r,desktop:i}[e.target??`mobile`]}function Q(e){return e.length>0&&e.every(e=>p(e.platform))}function $(e){return/\bipad\b/i.test(e)}export{O as C,i as D,t as E,a as O,b as S,r as T,w as _,v as a,D as b,p as c,g as d,x as f,U as g,y as h,l as i,h as l,G as m,c as n,f as o,S as p,u as r,C as s,d as t,m as u,_ as v,n as w,A as x,T as y};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { w as SnapshotNode } from "./sdk-contracts.js";
|
|
2
2
|
//#region packages/selectors/src/internal/find.d.ts
|
|
3
3
|
declare const FIND_LOCATORS: readonly ['any', 'text', 'label', 'value', 'role', 'id'];
|
|
4
4
|
type FindLocator = (typeof FIND_LOCATORS)[number];
|
package/dist/src/sdk-finders.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{On as e}from"./sdk-batch.js";function t(t,n,r,i){return e(t,n,r,typeof i==`boolean`?{requireRect:i}:i)}export{t};
|
package/dist/src/sdk-io.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{r as e}from"./rolldown-runtime.js";import{C as t}from"./sdk-contracts.js";import n from"node:path";import{promises as r}from"node:fs";import i from"node:os";var a=e({createLocalArtifactAdapter:()=>o});function o(e={}){let a=e.cwd??process.cwd(),o=e.tempDir??i.tmpdir(),c=e.rootDir?s(e.rootDir,a):void 0;return{resolveInput:async e=>{if(e.kind===`uploadedArtifact`)throw new t(`UNSUPPORTED_OPERATION`,`Uploaded artifact inputs require a custom artifact adapter`);return{path:s(e.path,a,c)}},reserveOutput:async(e,t)=>{let i,l=t.visibility??`client-visible`,u=e?.kind===`path`?s(e.path,a,c):n.join(i=await r.mkdtemp(n.join(o,`agent-device-${t.field}-`)),`${t.field}${t.ext}`);return await r.mkdir(n.dirname(u),{recursive:!0}),{path:u,visibility:l,...i?{cleanup:async()=>{await r.rm(i,{recursive:!0,force:!0})}}:{},publish:async()=>e?.kind===`downloadableArtifact`?{kind:`localPath`,field:t.field,artifactType:t.artifactType,path:u,fileName:e.fileName??n.basename(e.clientPath??u)}:void 0}},createTempFile:async e=>{let t=await r.mkdtemp(n.join(o,`${e.prefix}-`));return{path:n.join(t,`file${e.ext}`),visibility:`internal`,cleanup:async()=>{await r.rm(t,{recursive:!0,force:!0})}}}}}function s(e,r,i){let a=n.isAbsolute(e)?e:n.resolve(r,e);if(i&&!c(a,i))throw new t(`INVALID_ARGS`,`Local path is outside the artifact adapter root`,{path:a,rootDir:i});return a}function c(e,t){let r=n.relative(t,e);return r===``||!r.startsWith(`..`)&&!n.isAbsolute(r)}export{a as n,o as t};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { F as DeviceTarget, L as PlatformSelector, _ as SessionIsolationMode, c as DaemonServerMode, f as LeaseBackend, l as DaemonTransportPreference, v as SessionRuntimeHints } from "./sdk-contracts.js";
|
|
2
2
|
//#region packages/contracts/src/companion-tunnel-scope.d.ts
|
|
3
3
|
/**
|
|
4
4
|
* The identity a companion tunnel is scoped to.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{C as e}from"./sdk-contracts.js";import{r as t}from"./sdk-device.js";const n=[`portrait`,`landscape`],r=new Set([`1`,`true`,`yes`,`on`]),i=new Set([`0`,`false`,`no`,`off`]);function a(e){return`AGENT_DEVICE_${e.replaceAll(/([A-Z])/g,`_$1`).replaceAll(/[^A-Za-z0-9_]/g,`_`).toUpperCase()}`}function o(t,n,r,i){if(t.multiple)return(Array.isArray(n)?n:[n]).map(e=>o({...t,multiple:!1},e,r,i));if(t.type===`boolean`)return s(n,r,i);if(t.type===`booleanOrString`){if(typeof n==`boolean`)return n;if(typeof n==`string`&&c(n)!==void 0)return c(n);if(typeof n==`string`&&n.trim().length>0)return n;throw new e(`INVALID_ARGS`,`Invalid value for "${i}" in ${r}. Expected boolean or non-empty string.`)}if(t.type===`string`){if(typeof n==`string`&&n.trim().length>0)return n;throw new e(`INVALID_ARGS`,`Invalid value for "${i}" in ${r}. Expected non-empty string.`)}if(t.type===`enum`){if(t.setValue!==void 0)return l(t,n,r,i);if(typeof n!=`string`||!t.enumValues?.includes(n))throw new e(`INVALID_ARGS`,`Invalid value for "${i}" in ${r}. Expected one of: ${t.enumValues?.join(`, `)}.`);return n}let a=typeof n==`number`?n:typeof n==`string`?Number(n):NaN;if(!Number.isFinite(a)||t.type===`int`&&!Number.isInteger(a))throw new e(`INVALID_ARGS`,`Invalid value for "${i}" in ${r}. Expected ${t.type===`int`?`integer`:`number`}.`);if(typeof t.min==`number`&&a<t.min)throw new e(`INVALID_ARGS`,`Invalid value for "${i}" in ${r}. Must be >= ${t.min}.`);if(typeof t.max==`number`&&a>t.max)throw new e(`INVALID_ARGS`,`Invalid value for "${i}" in ${r}. Must be <= ${t.max}.`);return a}function s(t,n,r){if(typeof t==`boolean`)return t;if(typeof t==`string`){let e=c(t);if(e!==void 0)return e}throw new e(`INVALID_ARGS`,`Invalid value for "${r}" in ${n}. Expected boolean.`)}function c(e){let t=e.trim().toLowerCase();if(r.has(t))return!0;if(i.has(t))return!1}function l(t,n,r,i){let a=t.setValue;if(n===a)return a;if(typeof n==`string`){let e=n.trim();if(e===``||e===`true`||e===`1`)return a;if(e===`false`||e===`0`)return}if(n===!0)return a;if(n!==!1)throw new e(`INVALID_ARGS`,`Invalid value for "${i}" in ${r}. Expected boolean-like value for enum flag.`)}const u=[{key:`stateDir`,type:`string`,path:!0},{key:`daemonBaseUrl`,type:`string`},{key:`daemonAuthToken`,type:`string`},{key:`daemonTransport`,type:`enum`,enumValues:[`auto`,`socket`,`http`]},{key:`daemonServerMode`,type:`enum`,enumValues:[`socket`,`http`,`dual`]},{key:`tenant`,type:`string`},{key:`sessionIsolation`,type:`enum`,enumValues:[`none`,`tenant`]},{key:`runId`,type:`string`},{key:`leaseId`,type:`string`},{key:`leaseBackend`,type:`enum`,enumValues:[`ios-simulator`,`ios-instance`,`android-instance`,`harmonyos-instance`]},{key:`platform`,type:`enum`,enumValues:t},{key:`target`,type:`enum`,enumValues:[`mobile`,`tv`,`desktop`]},{key:`device`,type:`string`},{key:`udid`,type:`string`},{key:`serial`,type:`string`},{key:`iosSimulatorDeviceSet`,type:`string`,path:!0,env:!1},{key:`androidDeviceAllowlist`,type:`string`},{key:`session`,type:`string`},{key:`providerApp`,type:`string`},{key:`providerOsVersion`,type:`string`},{key:`providerProject`,type:`string`},{key:`providerBuild`,type:`string`},{key:`providerSessionName`,type:`string`},{key:`providerDeviceOrientation`,type:`enum`,enumValues:n},{key:`providerGeoLocation`,type:`string`},{key:`providerTimezone`,type:`string`},{key:`providerLanguage`,type:`string`},{key:`providerLocale`,type:`string`},{key:`providerNetworkProfile`,type:`string`},{key:`providerCustomNetwork`,type:`string`},{key:`providerNoResignApp`,type:`boolean`},{key:`awsProjectArn`,type:`string`},{key:`awsDeviceArn`,type:`string`},{key:`awsAppArn`,type:`string`},{key:`awsRegion`,type:`string`},{key:`awsInteractionMode`,type:`enum`,enumValues:[`INTERACTIVE`,`NO_VIDEO`,`VIDEO_ONLY`]},{key:`metroProjectRoot`,type:`string`,path:!0},{key:`metroKind`,type:`enum`,enumValues:[`auto`,`react-native`,`expo`,`repack`]},{key:`metroPublicBaseUrl`,type:`string`},{key:`metroProxyBaseUrl`,type:`string`},{key:`metroBearerToken`,type:`string`},{key:`metroPreparePort`,type:`int`,min:1,max:65535},{key:`metroListenHost`,type:`string`},{key:`metroStatusHost`,type:`string`},{key:`metroStartupTimeoutMs`,type:`int`,min:1},{key:`metroProbeTimeoutMs`,type:`int`,min:1},{key:`metroRuntimeFile`,type:`string`,path:!0},{key:`metroNoReuseExisting`,type:`boolean`},{key:`metroNoInstallDeps`,type:`boolean`},{key:`launchUrl`,type:`string`}],d=[{key:`leaseProvider`,type:`string`,env:!1},{key:`deviceKey`,type:`string`,env:!1},{key:`clientId`,type:`string`,env:!1}],f=[...u,...d],p=new Map(f.map(e=>[e.key,e]));function m(e){return p.get(e)}function h(e){return m(e)?.env===!1?[]:[a(e)]}export{a,n as c,m as i,f as n,c as o,h as r,o as s,u as t};
|