agent-device 0.21.7 → 0.21.9
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/android/ime-helper/dist/{agent-device-android-ime-helper-0.21.7.apk → agent-device-android-ime-helper-0.21.9.apk} +0 -0
- package/android/ime-helper/dist/agent-device-android-ime-helper-0.21.9.apk.sha256 +1 -0
- package/android/ime-helper/dist/{agent-device-android-ime-helper-0.21.7.manifest.json → agent-device-android-ime-helper-0.21.9.manifest.json} +4 -4
- package/android/snapshot-helper/dist/{agent-device-android-snapshot-helper-0.21.7.apk → agent-device-android-snapshot-helper-0.21.9.apk} +0 -0
- package/android/snapshot-helper/dist/agent-device-android-snapshot-helper-0.21.9.apk.sha256 +1 -0
- package/android/snapshot-helper/dist/{agent-device-android-snapshot-helper-0.21.7.manifest.json → agent-device-android-snapshot-helper-0.21.9.manifest.json} +6 -6
- package/apple/macos-helper/Package.swift +16 -1
- package/apple/macos-helper/Sources/AgentDeviceMacOSDeviceHub/DeviceHubPose.swift +47 -0
- package/apple/macos-helper/Sources/AgentDeviceMacOSDeviceHub/DeviceHubWindowInventory.swift +65 -0
- package/apple/macos-helper/Sources/AgentDeviceMacOSHelper/DeviceHubPose.swift +225 -0
- package/apple/macos-helper/Sources/AgentDeviceMacOSHelper/DeviceHubSidebar.swift +57 -0
- package/apple/macos-helper/Sources/AgentDeviceMacOSHelper/DeviceHubWindowDiscovery.swift +108 -0
- package/apple/macos-helper/Sources/AgentDeviceMacOSHelper/main.swift +66 -13
- package/apple/macos-helper/Sources/AgentDeviceMacOSInput/MouseClickDelivery.swift +116 -0
- package/apple/macos-helper/Sources/AgentDeviceMacOSInput/MouseClickSchedule.swift +61 -0
- package/apple/macos-helper/Tests/AgentDeviceMacOSDeviceHubTests/DeviceHubPoseTests.swift +30 -0
- package/apple/macos-helper/Tests/AgentDeviceMacOSDeviceHubTests/DeviceHubWindowInventoryTests.swift +65 -0
- package/apple/macos-helper/Tests/AgentDeviceMacOSInputTests/MouseClickScheduleTests.swift +58 -0
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/AgentDeviceRunnerUITests-Bridging-Header.h +1 -0
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerAppScreenCapture.swift +175 -0
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerSynthesizedGesture.h +10 -2
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerSynthesizedGesture.m +42 -15
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Alert.swift +8 -0
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+CommandExecution.swift +45 -22
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Interaction.swift +39 -734
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Keyboard.swift +20 -4
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Lifecycle.swift +63 -1
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Models.swift +13 -0
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Navigation.swift +25 -10
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Snapshot.swift +5 -562
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+SnapshotAcquisition.swift +566 -0
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+SynthesizedGesturePolicy.swift +5 -1
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+SynthesizedInteraction.swift +594 -0
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerXCTestEventBridge.h +35 -1
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerXCTestEventBridge.m +160 -0
- package/dist/apple/runner/AgentDeviceRunner/RecordingScripts/RecordingExportSupport.swift +3 -0
- package/dist/apple/runner/AgentDeviceRunner/RecordingScripts/recording-frames.swift +203 -0
- package/dist/apple/snapshot-presentation/Sources/AgentDeviceSnapshotPresentation/SnapshotCoordinateSpace.swift +5 -0
- package/dist/src/absence-observation-errors.js +1 -1
- package/dist/src/adapter.js +1 -1
- package/dist/src/agent-browser-lifecycle.js +1 -1
- package/dist/src/agent-browser-process-record.js +1 -1
- package/dist/src/agent-device-client.js +2 -2
- package/dist/src/alert-runtime.js +1 -1
- package/dist/src/android-adb.js +1 -1
- package/dist/src/android-input-ownership.js +1 -1
- package/dist/src/android.js +1 -1
- package/dist/src/app-launch.js +1 -1
- package/dist/src/app-log-runtime2.js +3 -3
- package/dist/src/app-resolution.js +2 -2
- package/dist/src/apple-runner-platform.js +1 -1
- package/dist/src/application-lifecycle-interaction.js +1 -1
- package/dist/src/artifact-paths.js +1 -0
- package/dist/src/back-mode.js +1 -1
- package/dist/src/cli-config.js +1 -1
- package/dist/src/cli-help.js +15 -11
- package/dist/src/cli.js +4 -4
- package/dist/src/client-types.d.ts +51 -1
- package/dist/src/command-tools.js +3 -3
- package/dist/src/config.js +1 -1
- package/dist/src/connection-runtime.js +1 -1
- package/dist/src/device-claim-inspection.js +1 -1
- package/dist/src/device-claim-rule.js +2 -2
- package/dist/src/device-input-state.d.ts +1 -1
- package/dist/src/device-rotation.js +1 -1
- package/dist/src/device-selection-resolver.js +1 -1
- package/dist/src/device-session.js +1 -1
- package/dist/src/device.js +1 -1
- package/dist/src/device2.js +1 -1
- package/dist/src/devicectl.js +1 -1
- package/dist/src/dispatch-resolve.js +1 -1
- package/dist/src/display-inventory.js +1 -1
- package/dist/src/doctor-facade.js +1 -1
- package/dist/src/durable-resource.js +1 -1
- package/dist/src/exec.js +1 -1
- package/dist/src/find.js +1 -1
- package/dist/src/finders.js +1 -1
- package/dist/src/fold-runtime.js +1 -0
- package/dist/src/gesture-admission.js +1 -1
- package/dist/src/gesture-runtime.js +1 -1
- package/dist/src/harmonyos.js +1 -1
- package/dist/src/helper.js +2 -2
- package/dist/src/host.js +1 -0
- package/dist/src/interaction-positionals.js +1 -1
- package/dist/src/interaction-ref-policy.js +1 -1
- package/dist/src/interaction.js +1 -1
- package/dist/src/interaction2.js +1 -1
- package/dist/src/interactor-operation-binding.js +1 -0
- package/dist/src/interactor-operation-catalog.js +1 -1
- package/dist/src/interactor.js +4 -5
- package/dist/src/interactor2.js +1 -1
- package/dist/src/interactors.js +1 -1
- package/dist/src/internal/bin.js +1 -1
- package/dist/src/internal/daemon.js +2 -2
- package/dist/src/internal/png-worker.d.ts +5 -0
- package/dist/src/internal/png-worker.js +1 -1
- package/dist/src/inventory2.js +1 -1
- package/dist/src/ios-snapshot-acquisition.js +1 -1
- package/dist/src/ios-snapshot-runtime.js +1 -1
- package/dist/src/lease.js +1 -1
- package/dist/src/linux.js +1 -1
- package/dist/src/local-interactor-operation-set.js +1 -1
- package/dist/src/location-coordinates.js +1 -1
- package/dist/src/macos-facade.js +1 -1
- package/dist/src/managed-device-scope.js +1 -1
- package/dist/src/mechanics.js +17 -16
- package/dist/src/mobile-snapshot-semantics.js +1 -1
- package/dist/src/mp4-duration.js +1 -0
- package/dist/src/multitouch-support.js +1 -1
- package/dist/src/owner-identity.js +1 -1
- package/dist/src/parameterized-recorded-fill.js +1 -1
- package/dist/src/perf-facade.js +2 -2
- package/dist/src/perf-runtime-plan.js +1 -1
- package/dist/src/physical-device-control.js +1 -1
- package/dist/src/platform-request-scope.js +1 -1
- package/dist/src/platform-runtime-managed-owner.js +1 -1
- package/dist/src/platform-runtime-open-target.js +1 -1
- package/dist/src/platform-runtime-operation-host.js +2 -2
- package/dist/src/platform-runtime-runtime-hints.js +1 -1
- package/dist/src/platform-runtime-screen-recording-finalizer-host.js +1 -1
- package/dist/src/platform-runtime-unavailable.js +1 -1
- package/dist/src/platform-runtime.js +1 -1
- package/dist/src/platform-runtime2.js +1 -1
- package/dist/src/png-crop-bytes.js +1 -1
- package/dist/src/png-encode.js +1 -0
- package/dist/src/png-size.js +1 -0
- package/dist/src/png-worker-client.js +1 -1
- package/dist/src/provider-webdriver.js +1 -1
- package/dist/src/quality-warnings.js +1 -1
- package/dist/src/react-native.js +1 -1
- package/dist/src/record-runtime.js +1 -1
- package/dist/src/recording-export-quality.js +1 -1
- package/dist/src/recording-scope.js +1 -0
- package/dist/src/recording.js +3 -0
- package/dist/src/registry.js +35 -35
- package/dist/src/replay.js +1 -1
- package/dist/src/request-admission.js +1 -1
- package/dist/src/request-runtime-binding.js +1 -1
- package/dist/src/result-serialization.js +1 -1
- package/dist/src/runner-cache-metadata.js +2 -2
- package/dist/src/runner-client.js +1 -1
- package/dist/src/runner-contract.js +3 -0
- package/dist/src/runner-dev-tools-security.js +1 -0
- package/dist/src/runner-device-readiness.js +1 -0
- package/dist/src/runner-disposal.js +1 -1
- package/dist/src/runner-operations-facade.js +1 -1
- package/dist/src/runner-presentation.js +1 -1
- package/dist/src/runner.js +1 -1
- package/dist/src/runtime.js +2 -2
- package/dist/src/runtime10.js +2 -1
- package/dist/src/runtime2.js +4 -4
- package/dist/src/runtime4.js +5 -5
- 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/screen-recording-admission-ledger.js +1 -1
- package/dist/src/screen-recording-resource-recovery.js +1 -1
- package/dist/src/screen-recording-transport.js +1 -1
- package/dist/src/screenshot-density.js +1 -1
- package/dist/src/screenshot-image.js +1 -0
- package/dist/src/screenshot-overlay-draw.js +1 -0
- package/dist/src/screenshot-runtime.js +1 -1
- package/dist/src/script.js +1 -1
- package/dist/src/scroll-gesture.js +1 -1
- package/dist/src/sdk-batch.js +2 -2
- package/dist/src/sdk-contracts.d.ts +7 -5
- package/dist/src/sdk-contracts.js +2 -2
- package/dist/src/sdk-device.js +1 -1
- package/dist/src/sdk-finders.js +1 -1
- package/dist/src/sdk-selectors.d.ts +58 -6
- package/dist/src/sdk-selectors.js +1 -1
- package/dist/src/selection.js +0 -0
- package/dist/src/selector-runtime.js +1 -1
- package/dist/src/selectors.js +1 -1
- package/dist/src/semantic-index.js +1 -1
- package/dist/src/session-routing.js +1 -1
- package/dist/src/session-snapshot.js +1 -1
- package/dist/src/session-store.js +3 -3
- package/dist/src/session2.js +3 -3
- package/dist/src/simctl.js +1 -1
- package/dist/src/simulator-boot.js +1 -1
- package/dist/src/simulator-facade.js +1 -1
- package/dist/src/simulator.js +1 -1
- package/dist/src/snapshot-runtime-binding.js +1 -1
- package/dist/src/snapshot-runtime.js +1 -1
- package/dist/src/snapshot-state.js +1 -1
- package/dist/src/snapshot4.js +1 -1
- package/dist/src/src.js +1 -1
- package/dist/src/src7.js +1 -1
- package/dist/src/src8.js +1 -1
- package/dist/src/stop-sequence.js +1 -1
- package/dist/src/text-entry-focus.js +1 -1
- package/dist/src/touch-runtime.js +1 -1
- package/dist/src/tree.js +1 -1
- package/dist/src/type-text-runtime.js +1 -1
- package/dist/src/video.js +2 -2
- package/dist/src/web2.js +1 -1
- package/package.json +3 -1
- package/server.json +2 -2
- package/android/ime-helper/dist/agent-device-android-ime-helper-0.21.7.apk.sha256 +0 -1
- package/android/snapshot-helper/dist/agent-device-android-snapshot-helper-0.21.7.apk.sha256 +0 -1
- package/dist/src/png-transcode.js +0 -1
package/dist/src/back-mode.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./sdk-contracts.js";import{a as t}from"./capture.js";import{r as n}from"./sdk-device.js";import{c as r}from"./sdk-remote-config.js";import{t as i}from"./session.js";import{c as a}from"./observability.js";const o=[`app`,`device`,`system`];function s(e){return o.some(t=>t===e)}function c(e){return e===`device`||e===`system`}const l=[{key:`count`,names:[`--count`],type:`int`,min:1,max:200,usageLabel:`--count <n>`,usageDescription:`Repeat count for press/swipe series`,projectConfig:!0,recorded:!0},{key:`pointerCount`,names:[`--pointer-count`],type:`int`,min:1,max:2,usageLabel:`--pointer-count <1|2>`,usageDescription:`Gesture pan: number of touch pointers (default 1)`,projectConfig:!0,recorded:!0},{key:`fps`,names:[`--fps`],type:`int`,min:1,max:120,usageLabel:`--fps <n>`,usageDescription:`Record: target frames per second (iOS physical device runner)`,projectConfig:!0,recorded:!0},{key:`quality`,names:[`--quality`],type:`string`,usageLabel:`--quality <medium|high>`,usageDescription:`Record: output quality preset; Android maps this to screenrecord bitrate, Apple targets use it for export/encoding, Limrun sessions map medium to recorder quality 5 and high to 8. Legacy numeric values 5-7 map to medium; 8-10 map to high`,projectConfig:!0,recorded:!0},{key:`hideTouches`,names:[`--hide-touches`],type:`boolean`,usageLabel:`--hide-touches`,usageDescription:`Record: skip touch-overlay post-processing for faster raw benchmark videos`,projectConfig:!0,recorded:!0},{key:`recordingScope`,names:[`--scope`],type:`enum`,enumValues:o,usageLabel:`--scope <app|device|system>`,usageDescription:`Record: app requires an active app session; device/system records the whole screen`,projectConfig:!0,recorded:!1},{key:`intervalMs`,names:[`--interval-ms`],type:`int`,min:0,max:1e4,usageLabel:`--interval-ms <ms>`,usageDescription:`Delay between press iterations`,projectConfig:!0,recorded:!0},{key:`delayMs`,names:[`--delay-ms`],type:`int`,min:0,max:1e4,usageLabel:`--delay-ms <ms>`,usageDescription:`Delay between typed characters`,projectConfig:!0,recorded:!0},{key:`recordAs`,names:[`--record-as`],type:`string`,usageLabel:`--record-as <VAR>`,usageDescription:"Fill: send the live text but publish ${VAR} in an armed .ad recording",projectConfig:!0,recorded:!1},{key:`durationMs`,names:[`--duration-ms`],type:`int`,min:0,max:1e4,usageLabel:`--duration-ms <ms>`,usageDescription:`Scroll: pace the gesture over this duration when supported`,projectConfig:!0,recorded:!1},{key:`holdMs`,names:[`--hold-ms`],type:`int`,min:0,max:1e4,usageLabel:`--hold-ms <ms>`,usageDescription:`Press hold duration for each iteration`,projectConfig:!0,recorded:!0},{key:`jitterPx`,names:[`--jitter-px`],type:`int`,min:0,max:100,usageLabel:`--jitter-px <n>`,usageDescription:`Deterministic coordinate jitter radius for press`,projectConfig:!0,recorded:!0},{key:`pixels`,names:[`--pixels`],type:`int`,min:1,max:1e5,usageLabel:`--pixels <n>`,usageDescription:`Scroll: explicit gesture distance in pixels`,projectConfig:!0,recorded:!1},{key:`until`,names:[`--until`],type:`string`,usageLabel:`--until <selector>`,usageDescription:`Scroll: repeat passes until the selector is visible on screen`,projectConfig:!0,recorded:!1},{key:`doubleTap`,names:[`--double-tap`],type:`boolean`,usageLabel:`--double-tap`,usageDescription:`Use double-tap gesture per press iteration`,projectConfig:!0,recorded:!0},{key:`verify`,names:[`--verify`],type:`boolean`,usageLabel:`--verify`,usageDescription:`Capture cheap post-action evidence (AX digest, node counts, changedFromBefore) instead of a follow-up snapshot`,projectConfig:!0,recorded:!1},{key:`settle`,names:[`--settle`],type:`boolean`,usageLabel:`--settle`,usageDescription:`After the action, wait for the UI to go quiet and return the settled diff vs the pre-action tree in the same response (best-effort; never fails the action)`,projectConfig:!0,recorded:!1},{key:`settleQuietMs`,names:[`--settle-quiet`],type:`int`,min:0,usageLabel:`--settle-quiet <ms>`,usageDescription:`Settle: quiet window the UI must hold to count as settled (default 500ms)`,projectConfig:!0,recorded:!1},{key:`clickButton`,names:[`--button`],type:`enum`,enumValues:[`primary`,`secondary`,`middle`],usageLabel:`--button primary|secondary|middle`,usageDescription:`Click: choose mouse button (middle reserved for future macOS support)`,projectConfig:!0,recorded:!0},{key:`backMode`,names:[`--in-app`],type:`enum`,enumValues:[`in-app`,`system`],setValue:`in-app`,usageLabel:`--in-app`,usageDescription:`Back: use app-provided back UI when available`,projectConfig:!0,recorded:!1},{key:`backMode`,names:[`--system`],type:`enum`,enumValues:[`in-app`,`system`],setValue:`system`,usageLabel:`--system`,usageDescription:`Back: use system back input or gesture when available`,projectConfig:!0,recorded:!1},{key:`pauseMs`,names:[`--pause-ms`],type:`int`,min:0,max:1e4,usageLabel:`--pause-ms <ms>`,usageDescription:`Delay between swipe iterations`,projectConfig:!0,recorded:!0},{key:`pattern`,names:[`--pattern`],type:`enum`,enumValues:[`one-way`,`ping-pong`],usageLabel:`--pattern one-way|ping-pong`,usageDescription:`Swipe repeat pattern`,projectConfig:!0,recorded:!0},{key:`verbose`,names:[`--debug`,`--verbose`,`-v`],type:`boolean`,usageLabel:`--debug, --verbose, -v`,usageDescription:`Enable debug diagnostics; test --verbose prints per-test step timings without debug logs`,projectConfig:!0,recorded:!0},{key:`cost`,names:[`--cost`],type:`boolean`,usageLabel:`--cost`,usageDescription:`Include per-command wall-clock latency (cost.wallClockMs) in the response`,projectConfig:!0,recorded:!1},{key:`responseLevel`,names:[`--level`],type:`enum`,enumValues:e,usageLabel:`--level digest|default|full`,usageDescription:`Response detail level: digest (token-cheap), default (today), or full. Default keeps the wire shape unchanged.`,projectConfig:!0,recorded:!1},{key:`json`,names:[`--json`],type:`boolean`,usageLabel:`--json`,usageDescription:`JSON output`,projectConfig:!0,recorded:!1},{key:`help`,names:[`--help`,`-h`],type:`boolean`,usageLabel:`--help, -h`,usageDescription:`Print help and exit`,projectConfig:!1,recorded:!1},{key:`version`,names:[`--version`,`-V`],type:`boolean`,usageLabel:`--version, -V`,usageDescription:`Print version and exit`,projectConfig:!1,recorded:!1},{key:`snapshotDiff`,names:[`--diff`],type:`boolean`,usageLabel:`--diff`,usageDescription:`Snapshot: show structural diff against the previous session baseline`,projectConfig:!0,recorded:!1},{key:`saveScript`,names:[`--save-script`],type:`booleanOrString`,usageLabel:`--save-script [path]`,usageDescription:`Arm evidence capture on open, publish the armed recording on close; close --save-script alone (without an armed open) is rejected — start with open --save-script, or use session save-script mid-session. Optional custom output path.`,projectConfig:!1,recorded:!0},{key:`networkInclude`,names:[`--include`],type:`enum`,enumValues:[`summary`,`headers`,`body`,`all`],usageLabel:`--include summary|headers|body|all`,usageDescription:`Network: include headers, bodies, or both in output`,projectConfig:!0,recorded:!1},{key:`shutdown`,names:[`--shutdown`],type:`boolean`,usageLabel:`--shutdown`,usageDescription:`close: shutdown associated simulator/emulator after ending session`,projectConfig:!0,recorded:!1},{key:`relaunch`,names:[`--relaunch`],type:`boolean`,usageLabel:`--relaunch`,usageDescription:`open: terminate app process before launching it`,projectConfig:!0,recorded:!0},{key:`foreground`,names:[`--foreground`],type:`boolean`,usageLabel:`--foreground`,usageDescription:`open: keep normal app/device selection and return an initial snapshot; without an app, resolve the sole running app on the sole booted iOS simulator`,inputDescription:`Include an initial interactive snapshot in a fresh open response. With no app argument, discover the sole running app on the sole booted iOS simulator; ambiguous environments fail closed.`,projectConfig:!1,recorded:!1},{key:`restart`,names:[`--restart`],type:`boolean`,usageLabel:`--restart`,usageDescription:`logs clear: stop active stream, clear logs, then start streaming again`,projectConfig:!0,recorded:!1},{key:`retainPaths`,names:[`--retain-paths`],type:`boolean`,usageLabel:`--retain-paths`,usageDescription:`install-from-source: keep materialized artifact paths after install`,projectConfig:!0,recorded:!1},{key:`retentionMs`,names:[`--retention-ms`],type:`int`,min:1,usageLabel:`--retention-ms <ms>`,usageDescription:`install-from-source: retention TTL for materialized artifact paths`,projectConfig:!0,recorded:!1},{key:`noRecord`,names:[`--no-record`],type:`boolean`,usageLabel:`--no-record`,usageDescription:`Do not record this action`,projectConfig:!0,recorded:!0},{key:`record`,names:[`--record`],type:`boolean`,usageLabel:`--record`,usageHidden:!0,usageDescription:`Force-record this action even though its command is observation-only and would otherwise be excluded from a repair-armed heal by default (mutually exclusive with --no-record)`,projectConfig:!0,recorded:!0}],u=[{key:`config`,names:[`--config`],type:`string`,usageLabel:`--config <path>`,usageDescription:`Load CLI defaults from a specific config file (required for connection/provider defaults outside user config)`,projectConfig:!1,recorded:!1},{key:`remoteConfig`,names:[`--remote-config`],type:`string`,usageLabel:`--remote-config <path>`,usageDescription:`Load remote host + Metro workflow settings from a specific profile file`,projectConfig:!1,recorded:!1},{key:`stateDir`,names:[`--state-dir`],type:`string`,usageLabel:`--state-dir <path>`,usageDescription:`Daemon state directory (defaults to ~/.agent-device for packages, or a worktree-scoped dev dir from source)`,projectConfig:!1,recorded:!1},{key:`daemonBaseUrl`,names:[`--daemon-base-url`],type:`string`,usageLabel:`--daemon-base-url <url>`,usageDescription:`Explicit remote HTTP daemon base URL (skip local daemon discovery/startup)`,projectConfig:!1,recorded:!1},{key:`daemonAuthToken`,names:[`--daemon-auth-token`],type:`string`,usageLabel:`--daemon-auth-token <token>`,usageDescription:`Remote HTTP daemon or proxy auth token (sent as request token and bearer header)`,projectConfig:!1,recorded:!1},{key:`daemonTransport`,names:[`--daemon-transport`],type:`enum`,enumValues:[`auto`,`socket`,`http`],usageLabel:`--daemon-transport auto|socket|http`,usageDescription:`Daemon client transport preference`,projectConfig:!1,recorded:!1},{key:`daemonServerMode`,names:[`--daemon-server-mode`],type:`enum`,enumValues:[`socket`,`http`,`dual`],usageLabel:`--daemon-server-mode socket|http|dual`,usageDescription:`Daemon server mode used when spawning daemon`,projectConfig:!1,recorded:!1},{key:`proxyHost`,names:[`--host`],type:`string`,usageLabel:`--host <host>`,usageDescription:`Proxy: host interface to bind (default: 127.0.0.1)`,projectConfig:!1,recorded:!1},{key:`proxyPort`,names:[`--port`],type:`int`,min:1,max:65535,usageLabel:`--port <port>`,usageDescription:`Proxy: TCP port to bind (default: 0, choose a free port)`,projectConfig:!1,recorded:!1},{key:`tenant`,names:[`--tenant`],type:`string`,usageLabel:`--tenant <id>`,usageDescription:`Tenant scope identifier for isolated daemon sessions`,projectConfig:!1,recorded:!1},{key:`sessionIsolation`,names:[`--session-isolation`],type:`enum`,enumValues:[`none`,`tenant`],usageLabel:`--session-isolation none|tenant`,usageDescription:`Session isolation strategy (tenant prefixes session namespace)`,projectConfig:!1,recorded:!1},{key:`runId`,names:[`--run-id`],type:`string`,usageLabel:`--run-id <id>`,usageDescription:`Run identifier used for tenant lease admission checks`,projectConfig:!1,recorded:!1},{key:`leaseId`,names:[`--lease-id`],type:`string`,usageLabel:`--lease-id <id>`,usageDescription:`Lease identifier bound to tenant/run admission scope`,projectConfig:!1,recorded:!1},{key:`leaseBackend`,names:[`--lease-backend`],type:`enum`,enumValues:[`ios-simulator`,`ios-instance`,`android-instance`,`harmonyos-instance`],usageLabel:`--lease-backend ios-simulator|ios-instance|android-instance|harmonyos-instance`,usageDescription:`Lease backend for remote tenant connection admission`,projectConfig:!1,recorded:!1},{key:`provider`,names:[`--provider`],type:`string`,usageLabel:`--provider <name>`,usageDescription:`Cloud provider name for provider-scoped commands`,projectConfig:!1,recorded:!1},{key:`providerSessionId`,names:[`--provider-session`],type:`string`,usageLabel:`--provider-session <id>`,usageDescription:`Cloud provider session id or ARN`,projectConfig:!1,recorded:!1},{key:`providerApp`,names:[`--provider-app`],type:`string`,usageLabel:`--provider-app <ref-or-path>`,usageDescription:`Cloud provider app reference or local app path used when creating hosted WebDriver sessions`,projectConfig:!1,recorded:!1},{key:`providerOsVersion`,names:[`--provider-os-version`,`--os-version`],type:`string`,usageLabel:`--provider-os-version <version>`,usageDescription:`Hosted cloud provider OS version, for example 17 or 14.0`,projectConfig:!1,recorded:!1},{key:`providerProject`,names:[`--provider-project`],type:`string`,usageLabel:`--provider-project <name>`,usageDescription:`Hosted cloud provider project label`,projectConfig:!1,recorded:!1},{key:`providerBuild`,names:[`--provider-build`],type:`string`,usageLabel:`--provider-build <name>`,usageDescription:`Hosted cloud provider build label`,projectConfig:!1,recorded:!1},{key:`providerSessionName`,names:[`--provider-session-name`],type:`string`,usageLabel:`--provider-session-name <name>`,usageDescription:`Hosted cloud provider session label`,projectConfig:!1,recorded:!1},{key:`providerDeviceOrientation`,names:[`--provider-device-orientation`,`--device-orientation`],type:`enum`,enumValues:r,usageLabel:`--provider-device-orientation portrait|landscape`,usageDescription:`Screen orientation a hosted cloud provider session starts in. Set this rather than rotating after launch: a session that boots landscape renders login webviews landscape`,projectConfig:!1,recorded:!1},{key:`providerGeoLocation`,names:[`--provider-geo-location`,`--geo-location`],type:`string`,usageLabel:`--provider-geo-location <country>`,usageDescription:`Hosted cloud provider IP geolocation country code, for example US`,projectConfig:!1,recorded:!1},{key:`providerTimezone`,names:[`--provider-timezone`,`--timezone`],type:`string`,usageLabel:`--provider-timezone <zone>`,usageDescription:`Hosted cloud provider device time zone, for example New_York`,projectConfig:!1,recorded:!1},{key:`providerAppiumVersion`,names:[`--provider-appium-version`,`--appium-version`],type:`string`,usageLabel:`--provider-appium-version <version>`,usageDescription:`Hosted cloud provider Appium server version, for example 3.2.0. Without it BrowserStack falls back to its default (Appium 1.x)`,projectConfig:!1,recorded:!1},{key:`providerLanguage`,names:[`--provider-language`,`--language`],type:`string`,usageLabel:`--provider-language <language>`,usageDescription:`Hosted cloud provider app language, for example Fr`,projectConfig:!1,recorded:!1},{key:`providerLocale`,names:[`--provider-locale`,`--locale`],type:`string`,usageLabel:`--provider-locale <locale>`,usageDescription:`Hosted cloud provider device locale, for example Fr`,projectConfig:!1,recorded:!1},{key:`providerNetworkProfile`,names:[`--provider-network-profile`,`--network-profile`],type:`string`,usageLabel:`--provider-network-profile <profile>`,usageDescription:`Hosted cloud provider named network condition profile, for example 4g-lte-advanced-good. Mutually exclusive with --provider-custom-network`,projectConfig:!1,recorded:!1},{key:`providerCustomNetwork`,names:[`--provider-custom-network`,`--custom-network`],type:`string`,usageLabel:`--provider-custom-network <shape>`,usageDescription:`Hosted cloud provider custom network shape. Mutually exclusive with --provider-network-profile`,projectConfig:!1,recorded:!1},{key:`providerNoResignApp`,names:[`--provider-no-resign-app`],type:`boolean`,usageLabel:`--provider-no-resign-app`,usageDescription:`iOS only: keep an Enterprise-signed app as uploaded instead of letting the provider re-sign it, which strips entitlements such as push notifications`,projectConfig:!1,recorded:!1},{key:`awsProjectArn`,names:[`--aws-project-arn`],type:`string`,usageLabel:`--aws-project-arn <arn>`,usageDescription:`AWS Device Farm project ARN for hosted WebDriver sessions`,projectConfig:!1,recorded:!1},{key:`awsDeviceArn`,names:[`--aws-device-arn`],type:`string`,usageLabel:`--aws-device-arn <arn>`,usageDescription:`AWS Device Farm device ARN for hosted WebDriver sessions`,projectConfig:!1,recorded:!1},{key:`awsAppArn`,names:[`--aws-app-arn`],type:`string`,usageLabel:`--aws-app-arn <arn>`,usageDescription:`AWS Device Farm app ARN attached to hosted remote access sessions`,projectConfig:!1,recorded:!1},{key:`awsRegion`,names:[`--aws-region`],type:`string`,usageLabel:`--aws-region <region>`,usageDescription:`AWS region for Device Farm API calls`,projectConfig:!1,recorded:!1},{key:`awsInteractionMode`,names:[`--aws-interaction-mode`],type:`enum`,enumValues:[`INTERACTIVE`,`NO_VIDEO`,`VIDEO_ONLY`],usageLabel:`--aws-interaction-mode INTERACTIVE|NO_VIDEO|VIDEO_ONLY`,usageDescription:`AWS Device Farm remote access interaction mode`,projectConfig:!1,recorded:!1},{key:`force`,names:[`--force`,`--overwrite`],type:`boolean`,usageLabel:`--force, --overwrite`,usageDescription:`Force replacement of existing state (connect: replace an active connection; --save-script: overwrite an existing target instead of refusing)`,projectConfig:!0,recorded:!0},{key:`clean`,names:[`--clean`],type:`boolean`,usageLabel:`--clean`,usageDescription:`Daemon stop: remove retained runner processes and leases after stopping`,projectConfig:!0,recorded:!1},{key:`noLogin`,names:[`--no-login`],type:`boolean`,usageLabel:`--no-login`,usageDescription:`Connect: fail instead of starting implicit cloud login`,projectConfig:!0,recorded:!1},{key:`sessionLock`,names:[`--session-lock`],type:`enum`,enumValues:[`reject`,`strip`],usageLabel:`--session-lock reject|strip`,usageDescription:`Lock bound-session device routing for this CLI invocation and nested batch steps; strip drops conflicting platform/scope selectors only, and a selector naming a different device always fails`,projectConfig:!0,recorded:!1}],d=[{key:`platform`,names:[`--platform`],type:`enum`,enumValues:n,usageLabel:`--platform ${n.join(`|`)}`,usageDescription:"Platform to target (`apple` aliases the Apple automation backend)",projectConfig:!0,recorded:!0},{key:`target`,names:[`--target`],type:`enum`,enumValues:[`mobile`,`tv`,`desktop`],usageLabel:`--target mobile|tv|desktop`,usageDescription:`Device target class to match`,projectConfig:!0,recorded:!1},{key:`device`,names:[`--device`],type:`string`,usageLabel:`--device <name>`,usageDescription:`Device name to target (a UDID belongs in --udid, a serial in --serial)`,projectConfig:!0,recorded:!0},{key:`udid`,names:[`--udid`],type:`string`,usageLabel:`--udid <udid>`,usageDescription:`Apple device or simulator UDID; the only selector that pins one device when several share a --device name`,projectConfig:!0,recorded:!0},{key:`serial`,names:[`--serial`],type:`string`,usageLabel:`--serial <serial>`,usageDescription:`Android, HarmonyOS, or Vega VVD serial`,projectConfig:!0,recorded:!0},{key:`stale`,names:[`--stale`],type:`boolean`,usageLabel:`--stale`,usageDescription:`Device status: show only claims with a provably stale owner`,projectConfig:!0,recorded:!1},{key:`surface`,names:[`--surface`],type:`enum`,enumValues:i,usageLabel:`--surface app|frontmost-app|desktop|menubar`,usageDescription:`macOS session surface for open (defaults to app)`,projectConfig:!0,recorded:!1},{key:`headless`,names:[`--headless`],type:`boolean`,usageLabel:`--headless`,usageDescription:`Boot: launch Android emulator without a GUI window`,projectConfig:!0,recorded:!1},{key:`targetApp`,names:[`--app`,`--target-app`],type:`string`,usageLabel:`--app <id-or-name>`,usageDescription:`Doctor: verify an installed target app without opening a session`,projectConfig:!1,recorded:!1},{key:`metroHost`,names:[`--metro-host`],type:`string`,usageLabel:`--metro-host <host>`,usageDescription:`Session-scoped Metro/debug host hint`,projectConfig:!1,recorded:!0},{key:`metroPort`,names:[`--metro-port`],type:`int`,min:1,max:65535,usageLabel:`--metro-port <port>`,usageDescription:`Session-scoped Metro/debug port hint; on an emulator/simulator the host defaults to the loopback alias, physical devices still need --metro-host`,projectConfig:!1,recorded:!0},{key:`metroProjectRoot`,names:[`--project-root`],type:`string`,usageLabel:`--project-root <path>`,usageDescription:`metro prepare: React Native project root (default: cwd)`,projectConfig:!1,recorded:!1},{key:`kind`,names:[`--kind`],type:`enum`,enumValues:[`auto`,`react-native`,`expo`,`repack`,...a],usageLabel:`--kind <kind>`,usageDescription:`Kind selector for commands that support it, such as metro prepare or perf artifact collectors`,projectConfig:!0,recorded:!1},{key:`perfTemplate`,names:[`--template`],type:`string`,usageLabel:`--template <name>`,usageDescription:`Perf xctrace template name, for example Time Profiler`,projectConfig:!0,recorded:!1},{key:`metroKind`,names:[`--metro-kind`],type:`enum`,enumValues:[`auto`,`react-native`,`expo`,`repack`],usageLabel:`--metro-kind auto|react-native|expo|repack`,usageDescription:`metro prepare: detect or force the React Native dev-server launcher kind`,projectConfig:!1,recorded:!1},{key:`metroPublicBaseUrl`,names:[`--public-base-url`],type:`string`,usageLabel:`--public-base-url <url>`,usageDescription:`metro prepare: public base URL used for direct dev-server bundle hints`,projectConfig:!1,recorded:!1},{key:`metroProxyBaseUrl`,names:[`--proxy-base-url`],type:`string`,usageLabel:`--proxy-base-url <url>`,usageDescription:`metro prepare: optional bridge origin for remote dev-server access`,projectConfig:!1,recorded:!1},{key:`metroBearerToken`,names:[`--bearer-token`],type:`string`,usageLabel:`--bearer-token <token>`,usageDescription:`metro prepare: host bridge bearer token (or AGENT_DEVICE_METRO_BEARER_TOKEN; falls back to AGENT_DEVICE_DAEMON_AUTH_TOKEN)`,projectConfig:!1,recorded:!1},{key:`metroPreparePort`,names:[`--port`],type:`int`,min:1,max:65535,usageLabel:`--port <port>`,usageDescription:`metro prepare: local dev-server port (default: 8081)`,projectConfig:!1,recorded:!1},{key:`metroListenHost`,names:[`--listen-host`],type:`string`,usageLabel:`--listen-host <host>`,usageDescription:`metro prepare: host dev server listens on (default: 0.0.0.0)`,projectConfig:!1,recorded:!1},{key:`metroStatusHost`,names:[`--status-host`],type:`string`,usageLabel:`--status-host <host>`,usageDescription:`metro prepare: host used for local dev-server /status polling (default: 127.0.0.1)`,projectConfig:!1,recorded:!1},{key:`metroStartupTimeoutMs`,names:[`--startup-timeout-ms`],type:`int`,min:1,usageLabel:`--startup-timeout-ms <ms>`,usageDescription:`metro prepare: timeout while waiting for the dev server to become ready`,projectConfig:!1,recorded:!1},{key:`metroProbeTimeoutMs`,names:[`--probe-timeout-ms`],type:`int`,min:1,usageLabel:`--probe-timeout-ms <ms>`,usageDescription:`metro prepare: timeout for /status and proxy bridge calls`,projectConfig:!1,recorded:!1},{key:`metroRuntimeFile`,names:[`--runtime-file`],type:`string`,usageLabel:`--runtime-file <path>`,usageDescription:`metro prepare: optional file path to persist the JSON result`,projectConfig:!1,recorded:!1},{key:`metroNoReuseExisting`,names:[`--no-reuse-existing`],type:`boolean`,usageLabel:`--no-reuse-existing`,usageDescription:`metro prepare: always start a fresh Metro process`,projectConfig:!1,recorded:!1},{key:`metroNoInstallDeps`,names:[`--no-install-deps`],type:`boolean`,usageLabel:`--no-install-deps`,usageDescription:`metro prepare: skip package-manager install when node_modules is missing`,projectConfig:!1,recorded:!1},{key:`bundleUrl`,names:[`--bundle-url`],type:`string`,usageLabel:`--bundle-url <url>`,usageDescription:`Session-scoped bundle URL hint`,projectConfig:!1,recorded:!0},{key:`launchUrl`,names:[`--launch-url`],type:`string`,usageLabel:`--launch-url <url>`,usageDescription:`Session-scoped deep link / launch URL hint`,projectConfig:!0,recorded:!0},{key:`iosSimulatorDeviceSet`,names:[`--ios-simulator-device-set`],type:`string`,usageLabel:`--ios-simulator-device-set <path>`,usageDescription:`Scope iOS simulator discovery/commands to this simulator device set`,projectConfig:!1,recorded:!1},{key:`iosXctestrunFile`,names:[`--ios-xctestrun-file`],type:`string`,usageLabel:`--ios-xctestrun-file <path>`,usageDescription:`Use an externally built iOS XCTest runner .xctestrun artifact`,projectConfig:!1,recorded:!1},{key:`iosXctestDerivedDataPath`,names:[`--ios-xctest-derived-data-path`],type:`string`,usageLabel:`--ios-xctest-derived-data-path <path>`,usageDescription:`Derived data path for external iOS XCTest runner execution`,projectConfig:!1,recorded:!1},{key:`iosXctestEnvDir`,names:[`--ios-xctest-env-dir`],type:`string`,usageLabel:`--ios-xctest-env-dir <path>`,usageDescription:`Writable directory for per-session iOS XCTest runner env overlays`,projectConfig:!1,recorded:!1},{key:`deviceHub`,names:[`--device-hub`],type:`boolean`,usageLabel:`--device-hub`,usageDescription:`open: use Xcode Device Hub when surfacing Apple simulators`,projectConfig:!0,recorded:!1},{key:`testIme`,names:[`--test-ime`],type:`boolean`,usageLabel:`--test-ime`,usageDescription:`open: activate the headless Android test IME for deterministic Unicode text entry (default on for emulators; opt-in on real devices)`,projectConfig:!0,recorded:!1},{key:`testIme`,names:[`--no-test-ime`],type:`boolean`,setValue:!1,usageLabel:`--no-test-ime`,usageDescription:`open: keep the real Android keyboard even on emulators (opt out of the headless test IME)`,projectConfig:!0,recorded:!1},{key:`androidDeviceAllowlist`,names:[`--android-device-allowlist`],type:`string`,usageLabel:`--android-device-allowlist <serials>`,usageDescription:`Comma/space separated Android serial allowlist for discovery/selection`,projectConfig:!1,recorded:!1},{key:`remote`,names:[`--remote`],type:`boolean`,usageLabel:`--remote`,usageDescription:`Doctor: check remote connection setup instead of local device inventory`,projectConfig:!0,recorded:!1},{key:`activity`,names:[`--activity`],type:`string`,usageLabel:`--activity <component>`,usageDescription:`Android app launch activity (package/Activity); not for URL opens`,projectConfig:!0,recorded:!1},{key:`launchConsole`,names:[`--launch-console`],type:`string`,usageLabel:`--launch-console <path>`,usageDescription:`open: capture the initial iOS simulator launch console window to a file`,projectConfig:!1,recorded:!1},{key:`launchArgs`,names:[`--launch-args`],type:`string`,multiple:!0,usageLabel:`--launch-args <arg>`,usageDescription:`open: repeatable launch argument forwarded verbatim to the platform launch command (iOS app process args; Android adb shell am start args). Linux and macOS reject the flag.`,projectConfig:!0,recorded:!1},{key:`header`,names:[`--header`],type:`string`,multiple:!0,usageLabel:`--header <name:value>`,usageDescription:`install-from-source: repeatable HTTP header for URL downloads`,projectConfig:!1,recorded:!1},{key:`githubActionsArtifact`,names:[`--github-actions-artifact`],type:`string`,usageLabel:`--github-actions-artifact <owner/repo:artifact>`,usageDescription:`install-from-source: GitHub Actions artifact resolved by a remote daemon`,projectConfig:!1,recorded:!1},{key:`installSource`,names:[],type:`string`,projectConfig:!1,recorded:!1},{key:`session`,names:[`--session`],type:`string`,usageLabel:`--session <name>`,usageDescription:`Named session (implicit default is scoped to this workspace + platform)`,projectConfig:!0,recorded:!1}],f=[{key:`replayUpdate`,names:[`--update`,`-u`],type:`boolean`,usageLabel:`--update, -u`,usageDescription:`Replay: retired as a rewrite (ADR 0012) — never edits the .ad file; every divergence already carries ranked selector suggestions, --update or not`,projectConfig:!0,recorded:!1},{key:`replayFrom`,names:[`--from`],type:`int`,min:1,usageLabel:`--from <n>`,usageDescription:`Replay: resume at 1-based plan step n, skipping 1..n-1 without executing them (requires --plan-digest; see a divergence report's resume field). replay only, not test`,projectConfig:!0,recorded:!1},{key:`replayPlanDigest`,names:[`--plan-digest`],type:`string`,usageLabel:`--plan-digest <sha256>`,usageDescription:`Replay: the plan digest a --from resume must match (from a prior divergence report); mismatch, edits, or include/platform-expansion changes fail INVALID_ARGS before any action`,projectConfig:!0,recorded:!1},{key:`replayKeepSession`,names:[`--keep-session`],type:`boolean`,usageLabel:`--keep-session`,usageDescription:`Replay: leave the session active by suppressing exactly an authored terminal close in a native .ad script; replay only, not test or Maestro YAML`,projectConfig:!0,recorded:!1},{key:`replayMaestro`,names:[`--maestro`],type:`boolean`,usageLabel:`--maestro`,usageDescription:`Replay: treat input as a supported Maestro YAML subset; unsupported syntax fails loudly. See agent-device help maestro for commands and boundaries`,projectConfig:!0,recorded:!1},{key:`replayEnv`,names:[`-e`,`--env`],type:`string`,multiple:!0,usageLabel:`-e KEY=VALUE, --env KEY=VALUE`,usageDescription:"Replay/Test: inject or override a ${KEY} variable for the script (repeatable)",projectConfig:!1,recorded:!1},{key:`failFast`,names:[`--fail-fast`],type:`boolean`,usageLabel:`--fail-fast`,usageDescription:`Test: stop the suite after the first failing script; with sharding, each shard stops independently`,projectConfig:!0,recorded:!1},{key:`timeoutMs`,names:[`--timeout`],type:`int`,min:1,usageLabel:`--timeout <ms>`,usageDescription:`Open/Prepare: startup budget covering the Simulator boot (and runner preparation for prepare). Replay/Snapshot/Test: maximum wall-clock time for the command or attempt. With --settle: the settle-wait deadline (default 10s)`,projectConfig:!0,recorded:!1},{key:`waitMs`,names:[`--wait`],type:`int`,min:100,max:12e4,usageLabel:`--wait <ms>`,usageDescription:`Open: wait up to n ms for a device another session is holding before failing with DEVICE_IN_USE`,inputDescription:`Block this open for up to n milliseconds (100-120000) while another session holds the device, then fail with DEVICE_IN_USE naming that session. Only session contention is waited for: a device claim held by another workspace is refused at once with its recovery command. A device that never frees, or is taken again while this open waits, costs the full budget, which extends this command's timeout envelope rather than eating into it.`,projectConfig:!1,recorded:!1},{key:`retries`,names:[`--retries`],type:`int`,min:0,max:3,usageLabel:`--retries <n>`,usageDescription:`Test: retry each failed script up to n additional times`,projectConfig:!0,recorded:!1},{key:`recordVideo`,names:[`--record-video`],type:`boolean`,usageLabel:`--record-video`,usageDescription:`Test: record each replay attempt to recording.mp4 in its attempt artifacts`,projectConfig:!0,recorded:!1},{key:`artifactsDir`,names:[`--artifacts-dir`],type:`string`,usageLabel:`--artifacts-dir <path>`,usageDescription:`Test: root directory for suite artifacts`,projectConfig:!1,recorded:!1},{key:`reporter`,names:[`--reporter`],type:`string`,multiple:!0,usageLabel:`--reporter <name-or-path>`,usageDescription:`Test: add a replay suite reporter; use default, junit:<path>, or a custom reporter path (repeatable)`,projectConfig:!1,recorded:!1},{key:`reportJunit`,names:[`--report-junit`],type:`string`,usageLabel:`--report-junit <path>`,usageDescription:`Test: compatibility alias for --reporter junit:<path>`,projectConfig:!1,recorded:!1},{key:`shardAll`,names:[`--shard-all`],type:`int`,min:1,usageLabel:`--shard-all <n>`,usageDescription:`Test: run the full suite on each of n devices; combine with --device id1,id2 for explicit connected devices; AD_SHARD_INDEX is zero-based`,projectConfig:!0,recorded:!1},{key:`shardSplit`,names:[`--shard-split`],type:`int`,min:1,usageLabel:`--shard-split <n>`,usageDescription:`Test: split runnable suite entries across n devices; AD_SHARD_INDEX is zero-based`,projectConfig:!0,recorded:!1},{key:`steps`,names:[`--steps`],type:`string`,usageLabel:`--steps <json>`,usageDescription:`Batch: JSON array of {"command","input"} steps`,projectConfig:!1,recorded:!1},{key:`stepsFile`,names:[`--steps-file`],type:`string`,usageLabel:`--steps-file <path>`,usageDescription:`Batch: read steps JSON from file`,projectConfig:!1,recorded:!1},{key:`batchOnError`,names:[`--on-error`],type:`enum`,enumValues:[`stop`],usageLabel:`--on-error stop`,usageDescription:`Batch: stop when a step fails`,projectConfig:!0,recorded:!1},{key:`batchMaxSteps`,names:[`--max-steps`],type:`int`,min:1,max:1e3,usageLabel:`--max-steps <n>`,usageDescription:`Batch: maximum number of allowed steps`,projectConfig:!0,recorded:!1},{key:`appsFilter`,names:[`--all`],type:`enum`,enumValues:[`user-installed`,`all`],setValue:`all`,usageLabel:`--all`,usageDescription:`Apps: include system/OEM apps`,projectConfig:!0,recorded:!1},{key:`snapshotInteractiveOnly`,names:[`-i`],type:`boolean`,usageLabel:`-i`,usageDescription:`Snapshot: interactive elements only`,projectConfig:!0,recorded:!0},{key:`snapshotDepth`,names:[`--depth`,`-d`],type:`int`,min:0,usageLabel:`--depth, -d <depth>`,usageDescription:`Snapshot: limit snapshot depth`,projectConfig:!0,recorded:!0},{key:`snapshotScope`,names:[`--scope`,`-s`],type:`string`,usageLabel:`--scope, -s <scope>`,usageDescription:`Snapshot: scope snapshot to label/identifier`,projectConfig:!0,recorded:!0},{key:`snapshotRaw`,names:[`--raw`],type:`boolean`,usageLabel:`--raw`,usageDescription:`Snapshot: raw node output`,projectConfig:!0,recorded:!0},{key:`snapshotCustomActions`,names:[`--actions`],type:`boolean`,usageLabel:`--actions`,usageDescription:`Snapshot: name the affordances merged inside an element (iOS sim); not directly invokable — reach them via the detail screen, labeled children, or coordinates`,inputDescription:`Name the affordances an element merged away (iOS UIAccessibilityCustomAction, React Native accessibilityActions) — a card whose reply/options controls are not separate elements still lists them here. The names are for PLANNING, not invocation: there is no API to trigger them, so reach the affordance through the element detail screen, through the same control exposed as a labeled element elsewhere, or by coordinates from its rect. iOS simulator only; costs one accessibility round trip per merged element.`,projectConfig:!0,recorded:!0},{key:`snapshotForceFull`,names:[`--force-full`],type:`boolean`,usageLabel:`--force-full`,usageDescription:`Snapshot: re-emit the full tree even when unchanged`,projectConfig:!0,recorded:!1},{key:`findFirst`,names:[`--first`],type:`boolean`,usageLabel:`--first`,usageDescription:`Find: pick the first match when ambiguous`,projectConfig:!0,recorded:!1},{key:`findLast`,names:[`--last`],type:`boolean`,usageLabel:`--last`,usageDescription:`Find: pick the last match when ambiguous`,projectConfig:!0,recorded:!1},{key:`out`,names:[`--out`],type:`string`,usageLabel:`--out <path>`,usageDescription:`Output path`,projectConfig:!1,recorded:!0},{key:`artifact`,names:[`--artifact`],type:`string`,usageLabel:`--artifact <path>`,usageDescription:`Debug symbols: Apple crash artifact path (.ips, .crash, or .log)`,projectConfig:!1,recorded:!1},{key:`dsym`,names:[`--dsym`],type:`string`,usageLabel:`--dsym <path>`,usageDescription:`Debug symbols: matching .dSYM bundle path`,projectConfig:!1,recorded:!1},{key:`searchPath`,names:[`--search-path`],type:`string`,usageLabel:`--search-path <dir>`,usageDescription:`Debug symbols: directory to scan for matching .dSYM bundles`,projectConfig:!1,recorded:!1},{key:`overlayRefs`,names:[`--overlay-refs`],type:`boolean`,usageLabel:`--overlay-refs`,usageDescription:`Screenshot: draw current snapshot refs and target rectangles onto the saved PNG; diff screenshot: also write a separate current-screen overlay guide`,projectConfig:!0,recorded:!1},...t,{key:`baseline`,names:[`--baseline`,`-b`],type:`string`,usageLabel:`--baseline, -b <path>`,usageDescription:`Diff screenshot: path to baseline image file`,projectConfig:!0,recorded:!1},{key:`threshold`,names:[`--threshold`],type:`string`,usageLabel:`--threshold <0-1>`,usageDescription:`Diff screenshot: color distance threshold (default 0.1)`,projectConfig:!0,recorded:!1}],p=[...u,...d,...l,...f],m=new Map;for(let e of p)for(let t of e.names)m.set(t,e);function h(e){return m.get(e)}function g(){return p}function _(e){return p.filter(t=>t.key===e)}function v(){return new Set(p.filter(e=>e.projectConfig).map(e=>e.key))}function y(){return new Set(p.filter(e=>e.recorded).map(e=>e.key))}const b=[`in-app`,`system`];export{v as a,s as c,_ as i,c as l,h as n,y as o,g as r,o as s,b as t};
|
|
1
|
+
import{r as e}from"./sdk-contracts.js";import{a as t}from"./capture.js";import{r as n}from"./sdk-device.js";import{t as r}from"./recording-scope.js";import{c as i}from"./sdk-remote-config.js";import{t as a}from"./session.js";import{c as o}from"./observability.js";const s=[{key:`count`,names:[`--count`],type:`int`,min:1,max:200,usageLabel:`--count <n>`,usageDescription:`Repeat count for press/swipe series`,projectConfig:!0,recorded:!0},{key:`pointerCount`,names:[`--pointer-count`],type:`int`,min:1,max:2,usageLabel:`--pointer-count <1|2>`,usageDescription:`Gesture pan: number of touch pointers (default 1)`,projectConfig:!0,recorded:!0},{key:`fps`,names:[`--fps`],type:`int`,min:1,max:120,usageLabel:`--fps <n>`,usageDescription:`Record: target frames per second (iOS physical device runner)`,projectConfig:!0,recorded:!0},{key:`quality`,names:[`--quality`],type:`string`,usageLabel:`--quality <medium|high>`,usageDescription:`Record: output quality preset; Android maps this to screenrecord bitrate, Apple targets use it for export/encoding, Limrun sessions map medium to recorder quality 5 and high to 8. Legacy numeric values 5-7 map to medium; 8-10 map to high`,projectConfig:!0,recorded:!0},{key:`hideTouches`,names:[`--hide-touches`],type:`boolean`,usageLabel:`--hide-touches`,usageDescription:`Record: skip touch-overlay post-processing for faster raw benchmark videos`,projectConfig:!0,recorded:!0},{key:`recordingScope`,names:[`--scope`],type:`enum`,enumValues:r,usageLabel:`--scope <app|device|system>`,usageDescription:`Record: app requires an active app session; device/system records the whole screen`,projectConfig:!0,recorded:!1},{key:`intervalMs`,names:[`--interval-ms`],type:`int`,min:0,max:1e4,usageLabel:`--interval-ms <ms>`,usageDescription:`Delay between press iterations`,projectConfig:!0,recorded:!0},{key:`delayMs`,names:[`--delay-ms`],type:`int`,min:0,max:1e4,usageLabel:`--delay-ms <ms>`,usageDescription:`Delay between typed characters`,projectConfig:!0,recorded:!0},{key:`recordAs`,names:[`--record-as`],type:`string`,usageLabel:`--record-as <VAR>`,usageDescription:"Fill: send the live text but publish ${VAR} in an armed .ad recording",projectConfig:!0,recorded:!1},{key:`durationMs`,names:[`--duration-ms`],type:`int`,min:0,max:1e4,usageLabel:`--duration-ms <ms>`,usageDescription:`Scroll: pace the gesture over this duration when supported`,projectConfig:!0,recorded:!1},{key:`holdMs`,names:[`--hold-ms`],type:`int`,min:0,max:1e4,usageLabel:`--hold-ms <ms>`,usageDescription:`Press hold duration for each iteration`,projectConfig:!0,recorded:!0},{key:`jitterPx`,names:[`--jitter-px`],type:`int`,min:0,max:100,usageLabel:`--jitter-px <n>`,usageDescription:`Deterministic coordinate jitter radius for press`,projectConfig:!0,recorded:!0},{key:`pixels`,names:[`--pixels`],type:`int`,min:1,max:1e5,usageLabel:`--pixels <n>`,usageDescription:`Scroll: explicit gesture distance in pixels`,projectConfig:!0,recorded:!1},{key:`until`,names:[`--until`],type:`string`,usageLabel:`--until <selector>`,usageDescription:`Scroll: repeat passes until the selector is visible on screen`,projectConfig:!0,recorded:!1},{key:`doubleTap`,names:[`--double-tap`],type:`boolean`,usageLabel:`--double-tap`,usageDescription:`Use double-tap gesture per press iteration`,projectConfig:!0,recorded:!0},{key:`verify`,names:[`--verify`],type:`boolean`,usageLabel:`--verify`,usageDescription:`Capture cheap post-action evidence (AX digest, node counts, changedFromBefore) instead of a follow-up snapshot`,projectConfig:!0,recorded:!1},{key:`settle`,names:[`--settle`],type:`boolean`,usageLabel:`--settle`,usageDescription:`After the action, wait for the UI to go quiet and return the settled diff vs the pre-action tree in the same response (best-effort; never fails the action)`,projectConfig:!0,recorded:!1},{key:`settleQuietMs`,names:[`--settle-quiet`],type:`int`,min:0,usageLabel:`--settle-quiet <ms>`,usageDescription:`Settle: quiet window the UI must hold to count as settled (default 500ms)`,projectConfig:!0,recorded:!1},{key:`clickButton`,names:[`--button`],type:`enum`,enumValues:[`primary`,`secondary`,`middle`],usageLabel:`--button primary|secondary|middle`,usageDescription:`Click: choose mouse button (middle reserved for future macOS support)`,projectConfig:!0,recorded:!0},{key:`backMode`,names:[`--in-app`],type:`enum`,enumValues:[`in-app`,`system`],setValue:`in-app`,usageLabel:`--in-app`,usageDescription:`Back: use app-provided back UI when available`,projectConfig:!0,recorded:!1},{key:`backMode`,names:[`--system`],type:`enum`,enumValues:[`in-app`,`system`],setValue:`system`,usageLabel:`--system`,usageDescription:`Back: use system back input or gesture when available`,projectConfig:!0,recorded:!1},{key:`pauseMs`,names:[`--pause-ms`],type:`int`,min:0,max:1e4,usageLabel:`--pause-ms <ms>`,usageDescription:`Delay between swipe iterations`,projectConfig:!0,recorded:!0},{key:`pattern`,names:[`--pattern`],type:`enum`,enumValues:[`one-way`,`ping-pong`],usageLabel:`--pattern one-way|ping-pong`,usageDescription:`Swipe repeat pattern`,projectConfig:!0,recorded:!0},{key:`verbose`,names:[`--debug`,`--verbose`,`-v`],type:`boolean`,usageLabel:`--debug, --verbose, -v`,usageDescription:`Enable debug diagnostics; test --verbose prints per-test step timings without debug logs`,projectConfig:!0,recorded:!0},{key:`cost`,names:[`--cost`],type:`boolean`,usageLabel:`--cost`,usageDescription:`Include per-command wall-clock latency (cost.wallClockMs) in the response`,projectConfig:!0,recorded:!1},{key:`responseLevel`,names:[`--level`],type:`enum`,enumValues:e,usageLabel:`--level digest|default|full`,usageDescription:`Response detail level: digest (token-cheap), default (today), or full. Default keeps the wire shape unchanged.`,projectConfig:!0,recorded:!1},{key:`json`,names:[`--json`],type:`boolean`,usageLabel:`--json`,usageDescription:`JSON output`,projectConfig:!0,recorded:!1},{key:`help`,names:[`--help`,`-h`],type:`boolean`,usageLabel:`--help, -h`,usageDescription:`Print help and exit`,projectConfig:!1,recorded:!1},{key:`version`,names:[`--version`,`-V`],type:`boolean`,usageLabel:`--version, -V`,usageDescription:`Print version and exit`,projectConfig:!1,recorded:!1},{key:`snapshotDiff`,names:[`--diff`],type:`boolean`,usageLabel:`--diff`,usageDescription:`Snapshot: show structural diff against the previous session baseline`,projectConfig:!0,recorded:!1},{key:`saveScript`,names:[`--save-script`],type:`booleanOrString`,usageLabel:`--save-script [path]`,usageDescription:`Arm evidence capture on open, publish the armed recording on close; close --save-script alone (without an armed open) is rejected — start with open --save-script, or use session save-script mid-session. Optional custom output path.`,projectConfig:!1,recorded:!0},{key:`networkInclude`,names:[`--include`],type:`enum`,enumValues:[`summary`,`headers`,`body`,`all`],usageLabel:`--include summary|headers|body|all`,usageDescription:`Network: include headers, bodies, or both in output`,projectConfig:!0,recorded:!1},{key:`shutdown`,names:[`--shutdown`],type:`boolean`,usageLabel:`--shutdown`,usageDescription:`close: shutdown associated simulator/emulator after ending session`,projectConfig:!0,recorded:!1},{key:`relaunch`,names:[`--relaunch`],type:`boolean`,usageLabel:`--relaunch`,usageDescription:`open: terminate app process before launching it`,projectConfig:!0,recorded:!0},{key:`foreground`,names:[`--foreground`],type:`boolean`,usageLabel:`--foreground`,usageDescription:`open: keep normal app/device selection and return an initial snapshot; without an app, resolve the sole running app on the sole booted iOS simulator`,inputDescription:`Include an initial interactive snapshot in a fresh open response. With no app argument, discover the sole running app on the sole booted iOS simulator; ambiguous environments fail closed.`,projectConfig:!1,recorded:!1},{key:`restart`,names:[`--restart`],type:`boolean`,usageLabel:`--restart`,usageDescription:`logs clear: stop active stream, clear logs, then start streaming again`,projectConfig:!0,recorded:!1},{key:`retainPaths`,names:[`--retain-paths`],type:`boolean`,usageLabel:`--retain-paths`,usageDescription:`install-from-source: keep materialized artifact paths after install`,projectConfig:!0,recorded:!1},{key:`retentionMs`,names:[`--retention-ms`],type:`int`,min:1,usageLabel:`--retention-ms <ms>`,usageDescription:`install-from-source: retention TTL for materialized artifact paths`,projectConfig:!0,recorded:!1},{key:`noRecord`,names:[`--no-record`],type:`boolean`,usageLabel:`--no-record`,usageDescription:`Do not record this action`,projectConfig:!0,recorded:!0},{key:`record`,names:[`--record`],type:`boolean`,usageLabel:`--record`,usageHidden:!0,usageDescription:`Force-record this action even though its command is observation-only and would otherwise be excluded from a repair-armed heal by default (mutually exclusive with --no-record)`,projectConfig:!0,recorded:!0}],c=[{key:`config`,names:[`--config`],type:`string`,usageLabel:`--config <path>`,usageDescription:`Load CLI defaults from a specific config file (required for connection/provider defaults outside user config)`,projectConfig:!1,recorded:!1},{key:`remoteConfig`,names:[`--remote-config`],type:`string`,usageLabel:`--remote-config <path>`,usageDescription:`Load remote host + Metro workflow settings from a specific profile file`,projectConfig:!1,recorded:!1},{key:`stateDir`,names:[`--state-dir`],type:`string`,usageLabel:`--state-dir <path>`,usageDescription:`Daemon state directory (defaults to ~/.agent-device for packages, or a worktree-scoped dev dir from source)`,projectConfig:!1,recorded:!1},{key:`daemonBaseUrl`,names:[`--daemon-base-url`],type:`string`,usageLabel:`--daemon-base-url <url>`,usageDescription:`Explicit remote HTTP daemon base URL (skip local daemon discovery/startup)`,projectConfig:!1,recorded:!1},{key:`daemonAuthToken`,names:[`--daemon-auth-token`],type:`string`,usageLabel:`--daemon-auth-token <token>`,usageDescription:`Remote HTTP daemon or proxy auth token (sent as request token and bearer header)`,projectConfig:!1,recorded:!1},{key:`daemonTransport`,names:[`--daemon-transport`],type:`enum`,enumValues:[`auto`,`socket`,`http`],usageLabel:`--daemon-transport auto|socket|http`,usageDescription:`Daemon client transport preference`,projectConfig:!1,recorded:!1},{key:`daemonServerMode`,names:[`--daemon-server-mode`],type:`enum`,enumValues:[`socket`,`http`,`dual`],usageLabel:`--daemon-server-mode socket|http|dual`,usageDescription:`Daemon server mode used when spawning daemon`,projectConfig:!1,recorded:!1},{key:`proxyHost`,names:[`--host`],type:`string`,usageLabel:`--host <host>`,usageDescription:`Proxy: host interface to bind (default: 127.0.0.1)`,projectConfig:!1,recorded:!1},{key:`proxyPort`,names:[`--port`],type:`int`,min:1,max:65535,usageLabel:`--port <port>`,usageDescription:`Proxy: TCP port to bind (default: 0, choose a free port)`,projectConfig:!1,recorded:!1},{key:`tenant`,names:[`--tenant`],type:`string`,usageLabel:`--tenant <id>`,usageDescription:`Tenant scope identifier for isolated daemon sessions`,projectConfig:!1,recorded:!1},{key:`sessionIsolation`,names:[`--session-isolation`],type:`enum`,enumValues:[`none`,`tenant`],usageLabel:`--session-isolation none|tenant`,usageDescription:`Session isolation strategy (tenant prefixes session namespace)`,projectConfig:!1,recorded:!1},{key:`runId`,names:[`--run-id`],type:`string`,usageLabel:`--run-id <id>`,usageDescription:`Run identifier used for tenant lease admission checks`,projectConfig:!1,recorded:!1},{key:`leaseId`,names:[`--lease-id`],type:`string`,usageLabel:`--lease-id <id>`,usageDescription:`Lease identifier bound to tenant/run admission scope`,projectConfig:!1,recorded:!1},{key:`leaseBackend`,names:[`--lease-backend`],type:`enum`,enumValues:[`ios-simulator`,`ios-instance`,`android-instance`,`harmonyos-instance`],usageLabel:`--lease-backend ios-simulator|ios-instance|android-instance|harmonyos-instance`,usageDescription:`Lease backend for remote tenant connection admission`,projectConfig:!1,recorded:!1},{key:`provider`,names:[`--provider`],type:`string`,usageLabel:`--provider <name>`,usageDescription:`Cloud provider name for provider-scoped commands`,projectConfig:!1,recorded:!1},{key:`providerSessionId`,names:[`--provider-session`],type:`string`,usageLabel:`--provider-session <id>`,usageDescription:`Cloud provider session id or ARN`,projectConfig:!1,recorded:!1},{key:`providerApp`,names:[`--provider-app`],type:`string`,usageLabel:`--provider-app <ref-or-path>`,usageDescription:`Cloud provider app reference or local app path used when creating hosted WebDriver sessions`,projectConfig:!1,recorded:!1},{key:`providerOsVersion`,names:[`--provider-os-version`,`--os-version`],type:`string`,usageLabel:`--provider-os-version <version>`,usageDescription:`Hosted cloud provider OS version, for example 17 or 14.0`,projectConfig:!1,recorded:!1},{key:`providerProject`,names:[`--provider-project`],type:`string`,usageLabel:`--provider-project <name>`,usageDescription:`Hosted cloud provider project label`,projectConfig:!1,recorded:!1},{key:`providerBuild`,names:[`--provider-build`],type:`string`,usageLabel:`--provider-build <name>`,usageDescription:`Hosted cloud provider build label`,projectConfig:!1,recorded:!1},{key:`providerSessionName`,names:[`--provider-session-name`],type:`string`,usageLabel:`--provider-session-name <name>`,usageDescription:`Hosted cloud provider session label`,projectConfig:!1,recorded:!1},{key:`providerDeviceOrientation`,names:[`--provider-device-orientation`,`--device-orientation`],type:`enum`,enumValues:i,usageLabel:`--provider-device-orientation portrait|landscape`,usageDescription:`Screen orientation a hosted cloud provider session starts in. Set this rather than rotating after launch: a session that boots landscape renders login webviews landscape`,projectConfig:!1,recorded:!1},{key:`providerGeoLocation`,names:[`--provider-geo-location`,`--geo-location`],type:`string`,usageLabel:`--provider-geo-location <country>`,usageDescription:`Hosted cloud provider IP geolocation country code, for example US`,projectConfig:!1,recorded:!1},{key:`providerTimezone`,names:[`--provider-timezone`,`--timezone`],type:`string`,usageLabel:`--provider-timezone <zone>`,usageDescription:`Hosted cloud provider device time zone, for example New_York`,projectConfig:!1,recorded:!1},{key:`providerAppiumVersion`,names:[`--provider-appium-version`,`--appium-version`],type:`string`,usageLabel:`--provider-appium-version <version>`,usageDescription:`Hosted cloud provider Appium server version, for example 3.2.0. Without it BrowserStack falls back to its default (Appium 1.x)`,projectConfig:!1,recorded:!1},{key:`providerLanguage`,names:[`--provider-language`,`--language`],type:`string`,usageLabel:`--provider-language <language>`,usageDescription:`Hosted cloud provider app language, for example Fr`,projectConfig:!1,recorded:!1},{key:`providerLocale`,names:[`--provider-locale`,`--locale`],type:`string`,usageLabel:`--provider-locale <locale>`,usageDescription:`Hosted cloud provider device locale, for example Fr`,projectConfig:!1,recorded:!1},{key:`providerNetworkProfile`,names:[`--provider-network-profile`,`--network-profile`],type:`string`,usageLabel:`--provider-network-profile <profile>`,usageDescription:`Hosted cloud provider named network condition profile, for example 4g-lte-advanced-good. Mutually exclusive with --provider-custom-network`,projectConfig:!1,recorded:!1},{key:`providerCustomNetwork`,names:[`--provider-custom-network`,`--custom-network`],type:`string`,usageLabel:`--provider-custom-network <shape>`,usageDescription:`Hosted cloud provider custom network shape. Mutually exclusive with --provider-network-profile`,projectConfig:!1,recorded:!1},{key:`providerNoResignApp`,names:[`--provider-no-resign-app`],type:`boolean`,usageLabel:`--provider-no-resign-app`,usageDescription:`iOS only: keep an Enterprise-signed app as uploaded instead of letting the provider re-sign it, which strips entitlements such as push notifications`,projectConfig:!1,recorded:!1},{key:`awsProjectArn`,names:[`--aws-project-arn`],type:`string`,usageLabel:`--aws-project-arn <arn>`,usageDescription:`AWS Device Farm project ARN for hosted WebDriver sessions`,projectConfig:!1,recorded:!1},{key:`awsDeviceArn`,names:[`--aws-device-arn`],type:`string`,usageLabel:`--aws-device-arn <arn>`,usageDescription:`AWS Device Farm device ARN for hosted WebDriver sessions`,projectConfig:!1,recorded:!1},{key:`awsAppArn`,names:[`--aws-app-arn`],type:`string`,usageLabel:`--aws-app-arn <arn>`,usageDescription:`AWS Device Farm app ARN attached to hosted remote access sessions`,projectConfig:!1,recorded:!1},{key:`awsRegion`,names:[`--aws-region`],type:`string`,usageLabel:`--aws-region <region>`,usageDescription:`AWS region for Device Farm API calls`,projectConfig:!1,recorded:!1},{key:`awsInteractionMode`,names:[`--aws-interaction-mode`],type:`enum`,enumValues:[`INTERACTIVE`,`NO_VIDEO`,`VIDEO_ONLY`],usageLabel:`--aws-interaction-mode INTERACTIVE|NO_VIDEO|VIDEO_ONLY`,usageDescription:`AWS Device Farm remote access interaction mode`,projectConfig:!1,recorded:!1},{key:`force`,names:[`--force`,`--overwrite`],type:`boolean`,usageLabel:`--force, --overwrite`,usageDescription:`Force replacement of existing state (connect: replace an active connection; --save-script: overwrite an existing target instead of refusing)`,projectConfig:!0,recorded:!0},{key:`clean`,names:[`--clean`],type:`boolean`,usageLabel:`--clean`,usageDescription:`Daemon stop: remove retained runner processes and leases after stopping`,projectConfig:!0,recorded:!1},{key:`noLogin`,names:[`--no-login`],type:`boolean`,usageLabel:`--no-login`,usageDescription:`Connect: fail instead of starting implicit cloud login`,projectConfig:!0,recorded:!1},{key:`sessionLock`,names:[`--session-lock`],type:`enum`,enumValues:[`reject`,`strip`],usageLabel:`--session-lock reject|strip`,usageDescription:`Lock bound-session device routing for this CLI invocation and nested batch steps; strip drops conflicting platform/scope selectors only, and a selector naming a different device always fails`,projectConfig:!0,recorded:!1}],l=[{key:`platform`,names:[`--platform`],type:`enum`,enumValues:n,usageLabel:`--platform ${n.join(`|`)}`,usageDescription:"Platform to target (`apple` aliases the Apple automation backend)",projectConfig:!0,recorded:!0},{key:`target`,names:[`--target`],type:`enum`,enumValues:[`mobile`,`tv`,`desktop`],usageLabel:`--target mobile|tv|desktop`,usageDescription:`Device target class to match`,projectConfig:!0,recorded:!1},{key:`device`,names:[`--device`],type:`string`,usageLabel:`--device <name>`,usageDescription:`Device name to target (a UDID belongs in --udid, a serial in --serial)`,projectConfig:!0,recorded:!0},{key:`udid`,names:[`--udid`],type:`string`,usageLabel:`--udid <udid>`,usageDescription:`Apple device or simulator UDID; the only selector that pins one device when several share a --device name`,projectConfig:!0,recorded:!0},{key:`serial`,names:[`--serial`],type:`string`,usageLabel:`--serial <serial>`,usageDescription:`Android, HarmonyOS, or Vega VVD serial`,projectConfig:!0,recorded:!0},{key:`stale`,names:[`--stale`],type:`boolean`,usageLabel:`--stale`,usageDescription:`Device status: show only claims with a provably stale owner`,projectConfig:!0,recorded:!1},{key:`surface`,names:[`--surface`],type:`enum`,enumValues:a,usageLabel:`--surface app|frontmost-app|desktop|menubar`,usageDescription:`macOS session surface for open (defaults to app)`,projectConfig:!0,recorded:!1},{key:`headless`,names:[`--headless`],type:`boolean`,usageLabel:`--headless`,usageDescription:`Boot: launch Android emulator without a GUI window`,projectConfig:!0,recorded:!1},{key:`targetApp`,names:[`--app`,`--target-app`],type:`string`,usageLabel:`--app <id-or-name>`,usageDescription:`Doctor: verify an installed target app without opening a session`,projectConfig:!1,recorded:!1},{key:`metroHost`,names:[`--metro-host`],type:`string`,usageLabel:`--metro-host <host>`,usageDescription:`Session-scoped Metro/debug host hint`,projectConfig:!1,recorded:!0},{key:`metroPort`,names:[`--metro-port`],type:`int`,min:1,max:65535,usageLabel:`--metro-port <port>`,usageDescription:`Session-scoped Metro/debug port hint; on an emulator/simulator the host defaults to the loopback alias, physical devices still need --metro-host`,projectConfig:!1,recorded:!0},{key:`metroProjectRoot`,names:[`--project-root`],type:`string`,usageLabel:`--project-root <path>`,usageDescription:`metro prepare: React Native project root (default: cwd)`,projectConfig:!1,recorded:!1},{key:`kind`,names:[`--kind`],type:`enum`,enumValues:[`auto`,`react-native`,`expo`,`repack`,...o],usageLabel:`--kind <kind>`,usageDescription:`Kind selector for commands that support it, such as metro prepare or perf artifact collectors`,projectConfig:!0,recorded:!1},{key:`perfTemplate`,names:[`--template`],type:`string`,usageLabel:`--template <name>`,usageDescription:`Perf xctrace template name, for example Time Profiler`,projectConfig:!0,recorded:!1},{key:`metroKind`,names:[`--metro-kind`],type:`enum`,enumValues:[`auto`,`react-native`,`expo`,`repack`],usageLabel:`--metro-kind auto|react-native|expo|repack`,usageDescription:`metro prepare: detect or force the React Native dev-server launcher kind`,projectConfig:!1,recorded:!1},{key:`metroPublicBaseUrl`,names:[`--public-base-url`],type:`string`,usageLabel:`--public-base-url <url>`,usageDescription:`metro prepare: public base URL used for direct dev-server bundle hints`,projectConfig:!1,recorded:!1},{key:`metroProxyBaseUrl`,names:[`--proxy-base-url`],type:`string`,usageLabel:`--proxy-base-url <url>`,usageDescription:`metro prepare: optional bridge origin for remote dev-server access`,projectConfig:!1,recorded:!1},{key:`metroBearerToken`,names:[`--bearer-token`],type:`string`,usageLabel:`--bearer-token <token>`,usageDescription:`metro prepare: host bridge bearer token (or AGENT_DEVICE_METRO_BEARER_TOKEN; falls back to AGENT_DEVICE_DAEMON_AUTH_TOKEN)`,projectConfig:!1,recorded:!1},{key:`metroPreparePort`,names:[`--port`],type:`int`,min:1,max:65535,usageLabel:`--port <port>`,usageDescription:`metro prepare: local dev-server port (default: 8081)`,projectConfig:!1,recorded:!1},{key:`metroListenHost`,names:[`--listen-host`],type:`string`,usageLabel:`--listen-host <host>`,usageDescription:`metro prepare: host dev server listens on (default: 0.0.0.0)`,projectConfig:!1,recorded:!1},{key:`metroStatusHost`,names:[`--status-host`],type:`string`,usageLabel:`--status-host <host>`,usageDescription:`metro prepare: host used for local dev-server /status polling (default: 127.0.0.1)`,projectConfig:!1,recorded:!1},{key:`metroStartupTimeoutMs`,names:[`--startup-timeout-ms`],type:`int`,min:1,usageLabel:`--startup-timeout-ms <ms>`,usageDescription:`metro prepare: timeout while waiting for the dev server to become ready`,projectConfig:!1,recorded:!1},{key:`metroProbeTimeoutMs`,names:[`--probe-timeout-ms`],type:`int`,min:1,usageLabel:`--probe-timeout-ms <ms>`,usageDescription:`metro prepare: timeout for /status and proxy bridge calls`,projectConfig:!1,recorded:!1},{key:`metroRuntimeFile`,names:[`--runtime-file`],type:`string`,usageLabel:`--runtime-file <path>`,usageDescription:`metro prepare: optional file path to persist the JSON result`,projectConfig:!1,recorded:!1},{key:`metroNoReuseExisting`,names:[`--no-reuse-existing`],type:`boolean`,usageLabel:`--no-reuse-existing`,usageDescription:`metro prepare: always start a fresh Metro process`,projectConfig:!1,recorded:!1},{key:`metroNoInstallDeps`,names:[`--no-install-deps`],type:`boolean`,usageLabel:`--no-install-deps`,usageDescription:`metro prepare: skip package-manager install when node_modules is missing`,projectConfig:!1,recorded:!1},{key:`bundleUrl`,names:[`--bundle-url`],type:`string`,usageLabel:`--bundle-url <url>`,usageDescription:`Session-scoped bundle URL hint`,projectConfig:!1,recorded:!0},{key:`launchUrl`,names:[`--launch-url`],type:`string`,usageLabel:`--launch-url <url>`,usageDescription:`Session-scoped deep link / launch URL hint`,projectConfig:!0,recorded:!0},{key:`iosSimulatorDeviceSet`,names:[`--ios-simulator-device-set`],type:`string`,usageLabel:`--ios-simulator-device-set <path>`,usageDescription:`Scope iOS simulator discovery/commands to this simulator device set`,projectConfig:!1,recorded:!1},{key:`iosXctestrunFile`,names:[`--ios-xctestrun-file`],type:`string`,usageLabel:`--ios-xctestrun-file <path>`,usageDescription:`Use an externally built iOS XCTest runner .xctestrun artifact`,projectConfig:!1,recorded:!1},{key:`iosXctestDerivedDataPath`,names:[`--ios-xctest-derived-data-path`],type:`string`,usageLabel:`--ios-xctest-derived-data-path <path>`,usageDescription:`Derived data path for external iOS XCTest runner execution`,projectConfig:!1,recorded:!1},{key:`iosXctestEnvDir`,names:[`--ios-xctest-env-dir`],type:`string`,usageLabel:`--ios-xctest-env-dir <path>`,usageDescription:`Writable directory for per-session iOS XCTest runner env overlays`,projectConfig:!1,recorded:!1},{key:`deviceHub`,names:[`--device-hub`],type:`boolean`,usageLabel:`--device-hub`,usageDescription:`open: use Xcode Device Hub when surfacing Apple simulators`,projectConfig:!0,recorded:!1},{key:`testIme`,names:[`--test-ime`],type:`boolean`,usageLabel:`--test-ime`,usageDescription:`open: activate the headless Android test IME for deterministic Unicode text entry (default on for emulators; opt-in on real devices)`,projectConfig:!0,recorded:!1},{key:`testIme`,names:[`--no-test-ime`],type:`boolean`,setValue:!1,usageLabel:`--no-test-ime`,usageDescription:`open: keep the real Android keyboard even on emulators (opt out of the headless test IME)`,projectConfig:!0,recorded:!1},{key:`androidDeviceAllowlist`,names:[`--android-device-allowlist`],type:`string`,usageLabel:`--android-device-allowlist <serials>`,usageDescription:`Comma/space separated Android serial allowlist for discovery/selection`,projectConfig:!1,recorded:!1},{key:`remote`,names:[`--remote`],type:`boolean`,usageLabel:`--remote`,usageDescription:`Doctor: check remote connection setup instead of local device inventory`,projectConfig:!0,recorded:!1},{key:`activity`,names:[`--activity`],type:`string`,usageLabel:`--activity <component>`,usageDescription:`Android app launch activity (package/Activity); not for URL opens`,projectConfig:!0,recorded:!1},{key:`launchConsole`,names:[`--launch-console`],type:`string`,usageLabel:`--launch-console <path>`,usageDescription:`open: capture the initial iOS simulator launch console window to a file`,projectConfig:!1,recorded:!1},{key:`launchArgs`,names:[`--launch-args`],type:`string`,multiple:!0,usageLabel:`--launch-args <arg>`,usageDescription:`open: repeatable launch argument forwarded verbatim to the platform launch command (iOS app process args; Android adb shell am start args). Linux and macOS reject the flag.`,projectConfig:!0,recorded:!1},{key:`header`,names:[`--header`],type:`string`,multiple:!0,usageLabel:`--header <name:value>`,usageDescription:`install-from-source: repeatable HTTP header for URL downloads`,projectConfig:!1,recorded:!1},{key:`githubActionsArtifact`,names:[`--github-actions-artifact`],type:`string`,usageLabel:`--github-actions-artifact <owner/repo:artifact>`,usageDescription:`install-from-source: GitHub Actions artifact resolved by a remote daemon`,projectConfig:!1,recorded:!1},{key:`installSource`,names:[],type:`string`,projectConfig:!1,recorded:!1},{key:`session`,names:[`--session`],type:`string`,usageLabel:`--session <name>`,usageDescription:`Named session (implicit default is scoped to this workspace + platform)`,projectConfig:!0,recorded:!1}],u=[{key:`replayUpdate`,names:[`--update`,`-u`],type:`boolean`,usageLabel:`--update, -u`,usageDescription:`Replay: retired as a rewrite (ADR 0012) — never edits the .ad file; every divergence already carries ranked selector suggestions, --update or not`,projectConfig:!0,recorded:!1},{key:`replayFrom`,names:[`--from`],type:`int`,min:1,usageLabel:`--from <n>`,usageDescription:`Replay: resume at 1-based plan step n, skipping 1..n-1 without executing them (requires --plan-digest; see a divergence report's resume field). replay only, not test`,projectConfig:!0,recorded:!1},{key:`replayPlanDigest`,names:[`--plan-digest`],type:`string`,usageLabel:`--plan-digest <sha256>`,usageDescription:`Replay: the plan digest a --from resume must match (from a prior divergence report); mismatch, edits, or include/platform-expansion changes fail INVALID_ARGS before any action`,projectConfig:!0,recorded:!1},{key:`replayKeepSession`,names:[`--keep-session`],type:`boolean`,usageLabel:`--keep-session`,usageDescription:`Replay: leave the session active by suppressing exactly an authored terminal close in a native .ad script; replay only, not test or Maestro YAML`,projectConfig:!0,recorded:!1},{key:`replayMaestro`,names:[`--maestro`],type:`boolean`,usageLabel:`--maestro`,usageDescription:`Replay: treat input as a supported Maestro YAML subset; unsupported syntax fails loudly. See agent-device help maestro for commands and boundaries`,projectConfig:!0,recorded:!1},{key:`replayEnv`,names:[`-e`,`--env`],type:`string`,multiple:!0,usageLabel:`-e KEY=VALUE, --env KEY=VALUE`,usageDescription:"Replay/Test: inject or override a ${KEY} variable for the script (repeatable)",projectConfig:!1,recorded:!1},{key:`failFast`,names:[`--fail-fast`],type:`boolean`,usageLabel:`--fail-fast`,usageDescription:`Test: stop the suite after the first failing script; with sharding, each shard stops independently`,projectConfig:!0,recorded:!1},{key:`timeoutMs`,names:[`--timeout`],type:`int`,min:1,usageLabel:`--timeout <ms>`,usageDescription:`Open/Prepare: startup budget covering the Simulator boot (and runner preparation for prepare). Replay/Snapshot/Test: maximum wall-clock time for the command or attempt. With --settle: the settle-wait deadline (default 10s)`,projectConfig:!0,recorded:!1},{key:`waitMs`,names:[`--wait`],type:`int`,min:100,max:12e4,usageLabel:`--wait <ms>`,usageDescription:`Open: wait up to n ms for a device another session is holding before failing with DEVICE_IN_USE`,inputDescription:`Block this open for up to n milliseconds (100-120000) while another session holds the device, then fail with DEVICE_IN_USE naming that session. Only session contention is waited for: a device claim held by another workspace is refused at once with its recovery command. A device that never frees, or is taken again while this open waits, costs the full budget, which extends this command's timeout envelope rather than eating into it.`,projectConfig:!1,recorded:!1},{key:`retries`,names:[`--retries`],type:`int`,min:0,max:3,usageLabel:`--retries <n>`,usageDescription:`Test: retry each failed script up to n additional times`,projectConfig:!0,recorded:!1},{key:`recordVideo`,names:[`--record-video`],type:`boolean`,usageLabel:`--record-video`,usageDescription:`Test: record each replay attempt to recording.mp4 in its attempt artifacts`,projectConfig:!0,recorded:!1},{key:`artifactsDir`,names:[`--artifacts-dir`],type:`string`,usageLabel:`--artifacts-dir <path>`,usageDescription:`Test: root directory for suite artifacts`,projectConfig:!1,recorded:!1},{key:`reporter`,names:[`--reporter`],type:`string`,multiple:!0,usageLabel:`--reporter <name-or-path>`,usageDescription:`Test: add a replay suite reporter; use default, junit:<path>, or a custom reporter path (repeatable)`,projectConfig:!1,recorded:!1},{key:`reportJunit`,names:[`--report-junit`],type:`string`,usageLabel:`--report-junit <path>`,usageDescription:`Test: compatibility alias for --reporter junit:<path>`,projectConfig:!1,recorded:!1},{key:`shardAll`,names:[`--shard-all`],type:`int`,min:1,usageLabel:`--shard-all <n>`,usageDescription:`Test: run the full suite on each of n devices; combine with --device id1,id2 for explicit connected devices; AD_SHARD_INDEX is zero-based`,projectConfig:!0,recorded:!1},{key:`shardSplit`,names:[`--shard-split`],type:`int`,min:1,usageLabel:`--shard-split <n>`,usageDescription:`Test: split runnable suite entries across n devices; AD_SHARD_INDEX is zero-based`,projectConfig:!0,recorded:!1},{key:`steps`,names:[`--steps`],type:`string`,usageLabel:`--steps <json>`,usageDescription:`Batch: JSON array of {"command","input"} steps`,projectConfig:!1,recorded:!1},{key:`stepsFile`,names:[`--steps-file`],type:`string`,usageLabel:`--steps-file <path>`,usageDescription:`Batch: read steps JSON from file`,projectConfig:!1,recorded:!1},{key:`batchOnError`,names:[`--on-error`],type:`enum`,enumValues:[`stop`],usageLabel:`--on-error stop`,usageDescription:`Batch: stop when a step fails`,projectConfig:!0,recorded:!1},{key:`batchMaxSteps`,names:[`--max-steps`],type:`int`,min:1,max:1e3,usageLabel:`--max-steps <n>`,usageDescription:`Batch: maximum number of allowed steps`,projectConfig:!0,recorded:!1},{key:`appsFilter`,names:[`--all`],type:`enum`,enumValues:[`user-installed`,`all`],setValue:`all`,usageLabel:`--all`,usageDescription:`Apps: include system/OEM apps`,projectConfig:!0,recorded:!1},{key:`snapshotInteractiveOnly`,names:[`-i`],type:`boolean`,usageLabel:`-i`,usageDescription:`Snapshot: interactive elements only`,projectConfig:!0,recorded:!0},{key:`snapshotDepth`,names:[`--depth`,`-d`],type:`int`,min:0,usageLabel:`--depth, -d <depth>`,usageDescription:`Snapshot: limit snapshot depth`,projectConfig:!0,recorded:!0},{key:`snapshotScope`,names:[`--scope`,`-s`],type:`string`,usageLabel:`--scope, -s <scope>`,usageDescription:`Snapshot: scope snapshot to label/identifier`,projectConfig:!0,recorded:!0},{key:`snapshotRaw`,names:[`--raw`],type:`boolean`,usageLabel:`--raw`,usageDescription:`Snapshot: raw node output`,projectConfig:!0,recorded:!0},{key:`snapshotCustomActions`,names:[`--actions`],type:`boolean`,usageLabel:`--actions`,usageDescription:`Snapshot: name the affordances merged inside an element (iOS sim); not directly invokable — reach them via the detail screen, labeled children, or coordinates`,inputDescription:`Name the affordances an element merged away (iOS UIAccessibilityCustomAction, React Native accessibilityActions) — a card whose reply/options controls are not separate elements still lists them here. The names are for PLANNING, not invocation: there is no API to trigger them, so reach the affordance through the element detail screen, through the same control exposed as a labeled element elsewhere, or by coordinates from its rect. iOS simulator only; costs one accessibility round trip per merged element.`,projectConfig:!0,recorded:!0},{key:`snapshotForceFull`,names:[`--force-full`],type:`boolean`,usageLabel:`--force-full`,usageDescription:`Snapshot: re-emit the full tree even when unchanged`,projectConfig:!0,recorded:!1},{key:`findFirst`,names:[`--first`],type:`boolean`,usageLabel:`--first`,usageDescription:`Find: pick the first match when ambiguous`,projectConfig:!0,recorded:!1},{key:`findLast`,names:[`--last`],type:`boolean`,usageLabel:`--last`,usageDescription:`Find: pick the last match when ambiguous`,projectConfig:!0,recorded:!1},{key:`out`,names:[`--out`],type:`string`,usageLabel:`--out <path>`,usageDescription:`Output path`,projectConfig:!1,recorded:!0},{key:`artifact`,names:[`--artifact`],type:`string`,usageLabel:`--artifact <path>`,usageDescription:`Debug symbols: Apple crash artifact path (.ips, .crash, or .log)`,projectConfig:!1,recorded:!1},{key:`dsym`,names:[`--dsym`],type:`string`,usageLabel:`--dsym <path>`,usageDescription:`Debug symbols: matching .dSYM bundle path`,projectConfig:!1,recorded:!1},{key:`searchPath`,names:[`--search-path`],type:`string`,usageLabel:`--search-path <dir>`,usageDescription:`Debug symbols: directory to scan for matching .dSYM bundles`,projectConfig:!1,recorded:!1},{key:`overlayRefs`,names:[`--overlay-refs`],type:`boolean`,usageLabel:`--overlay-refs`,usageDescription:`Screenshot: draw current snapshot refs and target rectangles onto the saved PNG; diff screenshot: also write a separate current-screen overlay guide`,projectConfig:!0,recorded:!1},...t,{key:`baseline`,names:[`--baseline`,`-b`],type:`string`,usageLabel:`--baseline, -b <path>`,usageDescription:`Diff screenshot: path to baseline image file`,projectConfig:!0,recorded:!1},{key:`threshold`,names:[`--threshold`],type:`string`,usageLabel:`--threshold <0-1>`,usageDescription:`Diff screenshot: color distance threshold (default 0.1)`,projectConfig:!0,recorded:!1}],d=[...c,...l,...s,...u],f=new Map;for(let e of d)for(let t of e.names)f.set(t,e);function p(e){return f.get(e)}function m(){return d}function h(e){return d.filter(t=>t.key===e)}function g(){return new Set(d.filter(e=>e.projectConfig).map(e=>e.key))}function _(){return new Set(d.filter(e=>e.recorded).map(e=>e.key))}const v=[`in-app`,`system`];export{g as a,h as i,p as n,_ as o,m as r,v as t};
|
package/dist/src/cli-config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{D as e}from"./sdk-contracts.js";import{t}from"./capture.js";import{
|
|
1
|
+
import{D as e}from"./sdk-contracts.js";import{t}from"./capture.js";import{i as n}from"./catalog.js";import{a as r,r as i}from"./back-mode.js";import{a,s as o}from"./sdk-remote-config.js";import{f as s,s as c}from"./registry.js";import{n as l,t as u}from"./path-resolution.js";import"./file.js";import{n as d}from"./command-schema.js";import f from"node:path";import p from"node:fs";const m=new Set([`config`,`remoteConfig`,`help`,`version`,`batchSteps`,`githubActionsArtifact`]),h=new Set([`appsFilter`,`iosSimulatorDeviceSet`]),g=S(),_=new Map(g.map(e=>[e.key,e]));function v(e){return _.get(e)}function y(e){return g.filter(t=>t.configurable&&t.supportsCommand(e))}function b(e,t){return v(e)?.supportsCommand(t)??!1}function x(e,t,n,r){return o(T(e),t,n,r)}function S(){let e=new Map;for(let t of i()){let n=e.get(t.key);n?n.push(t):e.set(t.key,[t])}let t=new Map;for(let e of s)t.set(e,new Set([`*`]));for(let e of n()){let n=d(e);for(let r of[...n.allowedFlags??[],...n.supportedFlags??[]]){let n=t.get(r);n&&n.has(`*`)||(n?n.add(e):t.set(r,new Set([e])))}}return[...e.entries()].map(([e,n])=>({key:e,flagDefinitions:n,configurable:!m.has(e),env:{names:h.has(e)?[]:[a(e)]},supportsCommand(n){let r=t.get(e);return r?r.has(`*`)?!0:n?r.has(n):!1:!1}})).sort((e,t)=>C(e.key,t.key))}function C(e,t){let n=e.toLowerCase(),r=t.toLowerCase();return n===r?e<t?-1:+(e>t):n<r?-1:1}function w(e){let t=e.flagDefinitions[0];if(!t)throw Error(`Missing flag definition for option ${e.key}`);return t}function T(e){let t=e.flagDefinitions.find(e=>e.setValue===void 0);if(t)return t;let n=w(e);if(n.type===`enum`){let t=n.enumValues??e.flagDefinitions.map(e=>e.setValue).filter(e=>e!==void 0);return{...n,setValue:void 0,enumValues:t}}return n}function E(e,t){for(let[n,r]of Object.entries(t))r!==void 0&&(e[n]=r);return e}function D(e){let t=e.env??process.env;return E(E({},M(k(e.cwd,e.cliFlags.config,t))),I(t,e.command))}const O=r();function k(e,t,n){let r=t??n.AGENT_DEVICE_CONFIG;return r?[{path:j(r,e,n),required:!0,source:`explicit`}]:[{path:A(n),required:!1,source:`user`},{path:f.resolve(e,`agent-device.json`),required:!1,source:`project`}]}function A(e){return f.join(u(`~`,{env:e}),`.agent-device`,`config.json`)}function j(e,t,n){return l(e,{cwd:t,env:n})}function M(e){let t={};for(let n of e)E(t,N(n));return t}function N(t){let{path:n,required:r}=t;if(!p.existsSync(n)){if(r)throw new e(`INVALID_ARGS`,`Config file not found: ${n}`);return{}}let i;try{i=p.readFileSync(n,`utf8`)}catch(t){throw new e(`INVALID_ARGS`,`Failed to read config file: ${n}`,{cause:t instanceof Error?t.message:String(t)})}let a;try{a=JSON.parse(i)}catch(t){throw new e(`INVALID_ARGS`,`Invalid JSON in config file: ${n}`,{cause:t instanceof Error?t.message:String(t)})}if(!a||typeof a!=`object`||Array.isArray(a))throw new e(`INVALID_ARGS`,`Config file must contain a JSON object: ${n}`);return P(a,{source:t.source,label:`${t.source===`project`?`project `:``}config file ${n}`})}function P(n,r){let i={};for(let[a,o]of Object.entries(n)){let n=a,s=v(n);if(!s)throw a===t.flagKey?new e(`INVALID_ARGS`,`Config key "${a}" in ${r.label} was removed; use "screenshotScale" (0.01-1) to downscale screenshots. Recordings capture at native resolution.`):new e(`INVALID_ARGS`,`Unknown config key "${a}" in ${r.label}.`);if(!s.configurable)throw new e(`INVALID_ARGS`,`Config key "${a}" is not allowed in ${r.label}. This key is not supported in config files.`);if(r.source===`project`&&!O.has(n))throw new e(`INVALID_ARGS`,`Config key "${a}" is not allowed in ${r.label}. Move it to ~/.agent-device/config.json, pass it with --config or AGENT_DEVICE_CONFIG, or provide it through CLI flags/environment variables.`);if(n===`installSource`){i.installSource=c(o,r.label);continue}i[n]=x(s,o,r.label,a)}return i}const F=new Set([`screenshot`,`record`]);function I(n,r){let i=n[t.envVar];if(r!==null&&F.has(r)&&typeof i==`string`&&i.trim().length>0)throw new e(`INVALID_ARGS`,`${t.envVar} was removed. ${t.migration[r===`record`?`record`:`screenshot`]}`);let a={};for(let e of y(r)){if(e.key===`installSource`)continue;let t=e.env.names.map(e=>({name:e,value:n[e]})).find(e=>typeof e.value==`string`&&e.value.trim().length>0);t&&(a[e.key]=x(e,t.value,`environment variable ${t.name}`,t.name))}return a}export{E as n,b as r,D as t};
|
package/dist/src/cli-help.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime.js";import{
|
|
2
|
-
`)}function m(e){let t=e.endsWith(`?`),n=t?e.slice(0,-1):e;return t?`[${n}]`:`<${n}>`}function h(e){return
|
|
1
|
+
import{r as e}from"./rolldown-runtime.js";import{_r as t}from"./sdk-batch.js";import{i as n}from"./catalog.js";import{r}from"./back-mode.js";import{d as i,f as a,v as o}from"./registry.js";import{r as s}from"./version.js";import{n as c,r as l}from"./command-schema.js";import{n as u}from"./cli-command-aliases.js";const d=[`Flows: launchApp (with clearState, permissions, and Apple-only launch arguments; permissions apply after state clearing but before launch, and a launchApp without permissions touches nothing — there is no silent all: allow default); setPermissions (mid-flow permission grants, denials, and resets; all resolves in the backend — one simctl call on iOS, the declared permissions on Android — with specific entries overriding after it); runFlow file/inline with platform, visibility, and limited boolean conditions; onFlowStart/onFlowComplete; repeat.times and retry.`,`Interactions: tapOn, doubleTapOn, longPressOn, inputText on the focused element, eraseText, openLink, hideKeyboard, basic pressKey, and back; selector targets poll until available and support recursive index, childOf, above, below, leftOf, rightOf, containsChild, containsDescendants, points, and optional; outer command labels are metadata, not target selectors.`,'Assertions and navigation: assertVisible, assertNotVisible, assertTrue (literal values and ${VAR} lookups only; "", "false", "0", "null", and "undefined" are falsy, everything else is truthy), extendedWaitUntil, scroll, scrollUntilVisible, absolute/percentage/target swipe, takeScreenshot, waitForAnimationToEnd, clearState, and stopApp.',`Scripts: ordered runScript file/env scripts with http.post, json, and output variables; evalScript inline expressions run flow-scoped JavaScript and write output.* leaves for later steps.`],f=[`Permissions: every entry is one settings permission call, applied in order with all first; the step stops at the first entry the selected platform refuses, earlier entries stay applied, and the error names what landed. Android’s only allow level is while-in-use, so location: inuse and location: never mean allow and deny there, while location: always and photos: limited are Apple-only and fail. On iOS, which service a runtime changes is simctl privacy’s own verdict: current runtimes refuse a targeted notifications change and leave notifications untouched under all.`,`Runtime: iOS and Android only; launchApp.clearState and standalone clearState support Android and iOS simulators, launch arguments are Apple-only, and other standalone device utility/state commands are unsupported.`,"Expressions: evalScript is the only command whose payload is evaluated as JavaScript (flow env and prior output leaves are string-typed); with that exception, fields stay literal or ${VAR} lookup-only — assertTrue supports literals and bare lookups, repeat.while is unsupported, and other expression-shaped payloads fail loud.",`Environment: flow env is the default, AD_VAR_* overrides it, and CLI -e KEY=VALUE wins over both.`,`Failure diagnostics: resolved targets and runFlow paths are rendered, while inputText payloads remain hidden; do not place secrets in diagnostic identifiers.`,`Trust: runScript and evalScript execute flow scripts in-process via node:vm, which is not a security sandbox; runScript may make http.post network requests and its output keys cannot contain a dot. evalScript is refused outright for a flow accepted over the daemon’s remote HTTP surface, since that context can escape to the host.`,`Errors and tracking: unsupported commands and fields fail with source context when available; open a focused issue only when implementation work is planned.`];function p(){return[`Supported subset:`,...d.map(e=>` - ${e}`),``,`Boundaries:`,...f.map(e=>` - ${e}`)].join(`
|
|
2
|
+
`)}function m(e){let t=e.endsWith(`?`),n=t?e.slice(0,-1):e;return t?`[${n}]`:`<${n}>`}function h(e){return r().filter(t=>t.key===e)}function g(e){if(!e.usageHidden)return e.usageLabel??e.names[0]}function _(e){return(e??[]).flatMap(e=>h(e).map(g).filter(e=>e!==void 0).map(e=>`[${e}]`))}function v(e,t){return[t.usageOverride??[e,...(t.positionalArgs??[]).map(m)].join(` `),..._(t.usageFlags??t.allowedFlags)].join(` `)}function y(){return`agent-device <command> [args] [--json]
|
|
3
3
|
|
|
4
4
|
Automates iOS, Android, macOS, TV, and web apps for AI agents.
|
|
5
|
-
All ${
|
|
5
|
+
All ${n().length} commands: agent-device help commands
|
|
6
6
|
|
|
7
7
|
Start:
|
|
8
8
|
When starting a task with a known app, first run:
|
|
@@ -49,7 +49,7 @@ Guides (agent-device help <topic>):
|
|
|
49
49
|
manual-qa / dogfood / validate / debugging / scripting / gestures
|
|
50
50
|
react-native / react-devtools / cdp / tv / web / macos / remote
|
|
51
51
|
physical-device / ios-system-ui / maestro
|
|
52
|
-
foldable iPhone Duo panels,
|
|
52
|
+
foldable iPhone Duo panels, the fold command, and why refs die on a pose change
|
|
53
53
|
`}var b=e({buildCommandUsageText:()=>L,buildUsageText:()=>A,helpTopicIds:()=>z,resolveHelpTargetUsageText:()=>R});const x=[`Default config files: ~/.agent-device/config.json, ./agent-device.json (project-safe defaults only).`,`Use --config <path> or AGENT_DEVICE_CONFIG for explicit connection/provider defaults; project config cannot select endpoints or credentials.`],S=[{label:`AGENT_DEVICE_SESSION`,description:`Explicit session name`},{label:`AGENT_DEVICE_PLATFORM`,description:`Default platform binding`},{label:`AGENT_DEVICE_SCREENSHOT_SCALE`,description:`Default screenshot scale factor`},{label:`AGENT_DEVICE_SESSION_LOCK`,description:`Bound-session conflict mode`},{label:`AGENT_DEVICE_DAEMON_BASE_URL`,description:`Connect to remote daemon`},{label:`AGENT_DEVICE_DAEMON_AUTH_TOKEN`,description:`Remote daemon service/API token`},{label:`AGENT_DEVICE_CLOUD_BASE_URL`,description:`Bridge/control-plane API origin for cloud auth and /api-keys`}],C=[`agent-device open Settings --platform ios`,`agent-device open https://example.com --platform web`,`agent-device snapshot -i`,`agent-device fill @e3 "test@example.com"`,`agent-device replay ./session.ad`,`agent-device wait absent 'label="Loading..."' 3000`,`agent-device test ./suite --platform android`],w=`Wait failure contract:
|
|
54
54
|
Read error.details.reason in --json, not the message text.
|
|
55
55
|
wait_target_absent: a readable capture ran and found no match.
|
|
@@ -213,6 +213,7 @@ Batch:
|
|
|
213
213
|
|
|
214
214
|
Recording:
|
|
215
215
|
record start/stop. Default scope is app (needs an active open session); use --scope device/system for whole-screen capture spanning multiple apps/home/settings. --quality medium|high on Android and Apple targets. stop burns touch overlays into the video by default; --hide-touches skips that for the fastest raw recording, and is recommended for gesture-heavy iOS simulator proof videos since overlay timing depends on a stable runner session. Android adb screenrecord has a 180s limit, so long Android recordings return as multiple MP4 chunks while the daemon stays alive; after a daemon restart, record stop recovers only manifest-owned chunks. record stop is safe to repeat: if its request window ended while the daemon was still exporting, running it again in that session returns the completed recording instead of starting a second one.
|
|
216
|
+
record contact-sheet <video.mp4> [--out <sheet.png>] reads an exported MP4 back and writes one PNG holding the frames where the screen visibly changed, each labeled with its elapsed time. It is how you read a recording you cannot play, and it needs no session or device; the frames come out of that file, so the sheet cannot describe a screen the video does not contain. The sample grid is bounded and spread over the whole clip, so it reports coverage, not a review: a flash that opens and closes between two sample times is not in it. Needs a macOS host and an MP4 (a WebM recording is refused).
|
|
216
217
|
Tracing: trace start ./trace.log, trace stop ./trace.log (path is positional, not --path).`},gestures:{summary:`Full multi-touch gesture shapes and platform quirks`,body:`agent-device help gestures
|
|
217
218
|
|
|
218
219
|
Full command shapes and platform quirks for touch/pointer gestures beyond scroll/swipe. Read this when a task needs multi-touch, a repeated gesture series, or exact per-platform verification.
|
|
@@ -636,6 +637,7 @@ iOS physical-device prerequisites:
|
|
|
636
637
|
If Xcode cannot choose a profile, set AGENT_DEVICE_IOS_PROVISIONING_PROFILE to the profile name/specifier, not a file path.
|
|
637
638
|
AGENT_DEVICE_IOS_SIGNING_IDENTITY is optional; omit it unless xcodebuild asks for a specific identity.
|
|
638
639
|
The profile/team must allow AGENT_DEVICE_IOS_BUNDLE_ID and <id>.uitests.
|
|
640
|
+
A runner startup failure names its class in error details.reason rather than only in prose: signing_no_development_team, signing_provisioning_profile_missing, bundle_identifier_already_registered, signing_unspecified, devtools_security_developer_mode_disabled (the Mac's DevToolsSecurity setting, which says nothing about the device's Developer Mode toggle), device_developer_mode_disabled (read from an iPhone's own report before the runner builds, and the only device state that stops a run up front), device_developer_disk_image_unavailable (also read from the device, and published on a startup failure that named no cause of its own, since iOS 17+ mounts the developer disk image on demand during build and launch rather than gating the build), or build_failed_unclassified when nothing proved a cause. The two device reasons are never inferred from tool output or from each other. Branch on details.reason and follow hint; the message is for humans.
|
|
639
641
|
First-run XCTest setup/build can take longer than normal commands; keep the device connected and use --debug to inspect signing/build diagnostics if setup times out.
|
|
640
642
|
|
|
641
643
|
Android physical-device prerequisites:
|
|
@@ -680,13 +682,15 @@ A foldable Apple device (iPhone Duo) carries two integrated panels, which Apple
|
|
|
680
682
|
|
|
681
683
|
Screens are handled for you:
|
|
682
684
|
Each iOS simulator capture resolves the CoreDevice display table, captures the lit panel explicitly, and normalizes density with that panel's own point scale. Do not add a screen flag to the normal loop; there is none, because the lit panel is always the only capturable one: the dark panel yields an all-black PNG.
|
|
683
|
-
The two panels are different sizes
|
|
685
|
+
The two panels are different sizes (iPhone Duo: 466x678 points closed on the outer panel, 669x951 open on the inner). A pose change therefore invalidates every ref and coordinate. Re-snapshot after any pose change and never carry coordinates or refs across one.
|
|
684
686
|
Check which panel is lit before trusting a geometry claim: agent-device screenshot reports its point size, and 466x678 versus 669x951 says which panel you captured.
|
|
685
687
|
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
688
|
+
Changing the pose:
|
|
689
|
+
agent-device fold closed | half-open | open
|
|
690
|
+
fold presses the pose control in the Xcode Device Hub window for this simulator (Closed, Book, Open) and then reads the hinge angle back from CoreDevice until it agrees: closed is 0 degrees, open is 180, and half-open is any angle between them (Device Hub's Book preset, 130 degrees on iOS 27.1). An angle in that interval only proves the category, so half-open is reported once two consecutive readings both fall inside it and agree within 0.5 degrees. The response reports the verified pose, the hinge angle, and the panel the device now lights with its native panel point size, marked coordinateSpace "native-panel". That point size is the panel's own geometry, not the next snapshot's viewport, so it cannot place a tap: the active app window can differ (a 669x951 inner panel hosts a 951x669 window). A hinge whose last reading is some other pose fails with COMMAND_FAILED and reason fold-pose-unverified, naming the angle CoreDevice still reports; a hinge seen half-open but never at rest fails with reason fold-pose-unsettled, naming the observed and previous angles. A single-panel simulator fails with UNSUPPORTED_OPERATION.
|
|
691
|
+
Expect a fold to take 10-16 seconds: each hinge read is a five-second devicectl stream, and half-open waits for the hinge to stop moving. Re-snapshot after every fold; refs and coordinates from before it are stale, and the command's message says so.
|
|
692
|
+
Requirements: an iOS simulator session on a foldable device, Xcode 27.1 or newer with Device Hub, and Accessibility permission for the host (agent-device settings permission grant accessibility --platform macos). The command launches Device Hub if needed, reopens its window when it shows none, and selects the simulator through its sidebar by UDID, so no operator step is needed. No official host API sets the pose; the app under test still reads it as UIHinge.status.
|
|
693
|
+
If a task asserts behavior for more than one pose, fold to each pose and re-snapshot, and report which poses the run covered.`},remote:{summary:`Direct proxy, cloud profiles, and remote config`,body:`agent-device help remote
|
|
690
694
|
|
|
691
695
|
Remote connection providers use the same lifecycle:
|
|
692
696
|
connect -> install/open -> commands -> close -> disconnect
|
|
@@ -976,7 +980,7 @@ Report:
|
|
|
976
980
|
|
|
977
981
|
Full command catalog. Use agent-device help <command> for exact flags and behavior.
|
|
978
982
|
|
|
979
|
-
${I(
|
|
983
|
+
${I(n().map(e=>{let t=c(e);return{name:e,schema:t,usage:D(e,t)}}))}
|
|
980
984
|
|
|
981
985
|
${N(`Device Selection (shared by device commands; help <command> lists each command's flags):`,j(i))}
|
|
982
986
|
|
|
@@ -987,7 +991,7 @@ ${F(`Configuration:`,x)}
|
|
|
987
991
|
${P(`Environment:`,S)}
|
|
988
992
|
|
|
989
993
|
${F(`Examples:`,C)}
|
|
990
|
-
`}function A(){return O()}function j(e){return
|
|
994
|
+
`}function A(){return O()}function j(e){return r().filter(t=>e.has(t.key)&&t.usageLabel!==void 0&&t.usageDescription!==void 0)}function M(e,t){return t?e.map(e=>{let n=t[e.key];return n===void 0?e:{...e,usageDescription:n}}):e}function N(e,t){return P(e,t.map(e=>({label:e.usageLabel??``,description:e.usageDescription??``})))}function P(e,t){if(t.length===0)return`${e}\n (none)`;let n=Math.max(...t.map(e=>Math.min(e.label.length,26)))+2,r=[e];for(let e of t){let t=e.label.length<=26?e.label.padEnd(n):`${e.label} `;r.push(` ${t}${e.description}`)}return r.join(`
|
|
991
995
|
`)}function F(e,t){return t.length===0?`${e}\n (none)`:[e,...t.map(e=>` ${e}`)].join(`
|
|
992
996
|
`)}function I(e){return P(`Commands:`,e.map(e=>({label:e.usage,description:e.schema.text.summary})))}function L(e){let t=B(e);if(t)return t;let n=l(e);if(!n)return null;let r=v(e,n),i=M(j(new Set(n.allowedFlags??[])),n.flagDescriptionOverrides),a=[];i.length>0&&a.push(N(`Command flags:`,i));let s=a.length>0?`\n\n${a.join(`
|
|
993
997
|
|
package/dist/src/cli.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{D as e,H as t,L as n,O as r}from"./sdk-contracts.js";import{t as i}from"./capture.js";import{d as a,l as o,o as s,u as c}from"./sdk-batch-runner.js";import{n as l,r as u}from"./agent-device-client.js";import{s as d,t as f,u as p}from"./sdk-batch.js";import{n as m,r as h}from"./back-mode.js";import{i as g,r as _,t as v}from"./catalog.js";import{x as ee}from"./registry.js";import{a as y,i as b,l as te,n as ne,o as re,r as x}from"./diagnostics.js";import{f as ie}from"./exec.js";import{n as ae}from"./command-metadata.js";import"./diagnostics2.js";import"./command.js";import{r as oe}from"./version.js";import{t as se}from"./daemon-resolution.js";import{t as ce}from"./session-artifact-paths.js";import{r as le,t as ue}from"./command-schema.js";import{n as S,r as C,t as de}from"./cli-config.js";import{t as fe}from"./update-check.js";import{n as pe,r as me,t as he}from"./cli-command-aliases.js";import{exitAfterFlush as w}from"./process-exit.js";import{D as ge,E as _e,O as ve,d as ye,k as be,m as xe,n as Se,w as Ce}from"./connection-runtime.js";import{i as we}from"./auth-session.js";import T from"node:fs";import{pathToFileURL as Te}from"node:url";const E=`open <app> --relaunch`,Ee={start:{command:`open`,example:E},restart:{command:`open`,example:E},touch:{command:`press`,example:`press`},input:{command:`fill`,example:`fill`},settext:{command:`fill`,example:`fill`},entertext:{command:`fill`,example:`fill`},screencap:{command:`screenshot`,example:`screenshot`},capture:{command:`screenshot`,example:`screenshot`},dismiss:{command:`keyboard`,example:`keyboard dismiss`},"get-text":{command:`get`,example:`get text`},gettext:{command:`get`,example:`get text`},get_text:{command:`get`,example:`get text`},"open-url":{command:`open`,example:`open <url>`},"close-session":{command:`close`,example:`close`}};function D(e){if(e.length<=2)return[];let t=g(),n=t.filter(t=>t.startsWith(e));return n.length>0?n.sort(O).slice(0,3):k(e,t)}function O(e,t){return e.length-t.length||e.localeCompare(t)}function k(e,t){let n=t.map(t=>({name:t,distance:Oe(e,t)})).filter(t=>t.distance<=De(e));if(n.length===0)return[];let r=Math.min(...n.map(e=>e.distance));return n.filter(e=>e.distance===r).sort((e,t)=>e.name.localeCompare(t.name)).slice(0,3).map(e=>e.name)}function De(e){return e.length<4?1:e.length<=6?2:3}function Oe(e,t){return e===t?0:e.startsWith(t)||t.startsWith(e)?Math.abs(e.length-t.length):ke(e,t)}function ke(e,t){let n=e.length+1,r=t.length+1,i=Array.from({length:n},()=>Array(r).fill(0));for(let e=0;e<n;e+=1)i[e][0]=e;for(let e=0;e<r;e+=1)i[0][e]=e;for(let a=1;a<n;a+=1)for(let n=1;n<r;n+=1){let r=e[a-1]===t[n-1]?0:1;i[a][n]=Math.min(i[a-1][n]+1,i[a][n-1]+1,i[a-1][n-1]+r)}return i[n-1][r-1]}function A(e){let t=e.toLowerCase(),n=Ee[t]?.example;if(n)return n;let r=D(t);if(r.length!==0)return r.length===1?r[0]:`one of: ${r.join(`, `)}`}const Ae=new Set([`--bundle-id`,`--bundleid`,`--bundle`,`--package`,`--package-name`,`--packagename`,`--app-id`,`--appid`,`--pkg`]),je=new Set([`--session-locked`,`--session-lock-conflicts`]),Me={"--output":`--out`,"--path":`--out`};function Ne(e,t){let n=e.toLowerCase(),r=Me[n];if(r&&Pe(r,t))return r;let i=Fe(n,t);if(i.length!==0)return i.length===1?i[0]:`one of: ${i.join(`, `)}`}function Pe(e,t){let n=h().find(t=>t.names.includes(e));return n?C(n.key,t):!1}function Fe(e,t){let n=j(e);if(n.length<=2)return[];let r=Ie(t),i=r.filter(e=>j(e).startsWith(n));return i.length>0?i.sort(O).slice(0,3):k(n,r.map(e=>j(e))).map(e=>`--${e}`)}function Ie(e){let t=new Set;for(let n of h()){if(!C(n.key,e))continue;let r=n.names[0];r&&t.add(r)}return[...t]}function j(e){return e.replace(/^--?/,``)}function Le(e,t){let n=e.toLowerCase();if(Ae.has(n))return`Unknown flag: ${e}. The app or bundle id is a positional argument, e.g. ${E}.`;if(je.has(n))return`Unknown flag: ${e}. Use --session-lock reject|strip instead.`;if(n===i.cliToken)return`Unknown flag: ${e}. ${i.migration.screenshot}. ${i.migration.record}.`;let r=Ne(e,t);return r?`Unknown flag: ${e}. Did you mean ${r}?`:`Unknown flag: ${e}`}function M(t){let n={json:!1,help:!1,version:!1},r=null,i=null,a=[],o=[],s=[],c=!0;for(let o=0;o<t.length;o+=1){let l=t[o];if(c&&l===`--`){c=!1;continue}if(!c){r?a.push(l):(i=l,r=L(l));continue}if(Ve(r)){a.push(l);continue}let u=l.startsWith(`--`),d=l.startsWith(`-`)&&l.length>1;if(!u&&!d){r?a.push(l):(i=l,r=L(l));continue}let[f,p]=u?N(l):[l,void 0];if(ze(r,f))continue;let m=He(f,r);if(Be(r,m)){a.push(l);continue}if(!m){if(qe(r,a,l)){r?a.push(l):r=l;continue}throw new e(`INVALID_ARGS`,Le(f,r))}let h=Ge(m,f,p,t[o+1]);h.consumeNext&&(o+=1);let g=n[m.key];if(m.multiple){let e=Array.isArray(g)?[...g,h.value]:g===void 0?[h.value]:[g,h.value];n[m.key]=e}else n[m.key]=h.value;s.push({key:m.key,token:f})}return Re(i,n),{command:r,positionals:a,flags:n,warnings:o,providedFlags:s}}function Re(e,t){if(e)for(let n of he(e)?.impliedFlags??[])t[n]=!0}function ze(e,t){return t===`-c`&&(e===`snapshot`||e===`diff`)}function Be(e,t){return e===`react-devtools`?!t||!C(t.key,e):!1}function Ve(e){return e===`cdp`}function He(e,t){let n=h().filter(t=>t.names.includes(e));if(n.length<=1)return n[0]??m(e);if(t){let e=n.find(e=>C(e.key,t));if(e)return e}return m(e)}function Ue(t,n){let r=n?.strictFlags??!0,i=[...t.warnings],a=S({json:!1,help:!1,version:!1},n?.defaultFlags??{});if(S(a,t.flags),t.command&&!_(t.command)&&!a.help){let n=A(t.command),r=n?`Unknown command: ${t.command}. Did you mean ${n}?`:`Unknown command: ${t.command}`;throw new e(`INVALID_ARGS`,r)}let o=t.providedFlags.filter(e=>!C(e.key,t.command));if(o.length>0){let n=o.map(e=>e.token),s=Xe(t.command,n);if(r)throw new e(`INVALID_ARGS`,s);i.push(s);for(let e of o)delete a[e.key]}for(let e of Object.keys(a))a[e]!==void 0&&(C(e,t.command)||delete a[e]);We(t),p(t.command,a);let s=Ye({command:t.command,positionals:t.positionals,flags:a,warnings:i});if(ue(s.command,s.positionals),s.command===`batch`&&+!!a.steps+ +!!a.stepsFile!=1)throw new e(`INVALID_ARGS`,`batch requires exactly one step source: --steps or --steps-file.`);return s}function We(t){if(t.command!==`back`)return;let n=t.providedFlags.filter(e=>e.key===`backMode`);if(!(new Set(n.map(e=>e.token)).size<=1))throw new e(`INVALID_ARGS`,`back accepts only one explicit mode flag: use either --in-app or --system.`)}function N(e){let t=e.indexOf(`=`);return t===-1?[e,void 0]:[e.slice(0,t),e.slice(t+1)]}function Ge(t,n,r,i){if(t.setValue!==void 0){if(r!==void 0)throw new e(`INVALID_ARGS`,`Flag ${n} does not take a value.`);return{value:t.setValue,consumeNext:!1}}if(t.type===`boolean`){if(r!==void 0)throw new e(`INVALID_ARGS`,`Flag ${n} does not take a value.`);return{value:!0,consumeNext:!1}}if(t.type===`booleanOrString`){if(r!==void 0){if(r.trim().length===0)throw new e(`INVALID_ARGS`,`Flag ${n} requires a non-empty value when provided.`);return{value:r,consumeNext:!1}}return i===void 0||F(i)?{value:!0,consumeNext:!1}:Ke(i)?{value:i,consumeNext:!0}:{value:!0,consumeNext:!1}}let a=r??i;if(a===void 0||r===void 0&&F(a))throw new e(`INVALID_ARGS`,`Flag ${n} requires a value.`);if(t.type===`string`)return{value:a,consumeNext:r===void 0};if(t.type===`enum`){if(!t.enumValues?.includes(a))throw new e(`INVALID_ARGS`,`Invalid ${P(n)}: ${a}`);return{value:a,consumeNext:r===void 0}}let o=Number(a);if(!Number.isFinite(o)||typeof t.min==`number`&&o<t.min||typeof t.max==`number`&&o>t.max)throw new e(`INVALID_ARGS`,`Invalid ${P(n)}: ${a}`);return{value:t.type===`int`?Math.floor(o):o,consumeNext:r===void 0}}function P(e){return e.replace(/^-+/,``)}function F(e){if(!e.startsWith(`-`)||e===`-`)return!1;let[t]=e.startsWith(`--`)?N(e):[e,void 0];return m(t)!==void 0}function Ke(e){let t=e.trim();return!t||/^[a-zA-Z][a-zA-Z0-9+.-]*:\/\//.test(t)?!1:!!(t.startsWith(`./`)||t.startsWith(`../`)||t.startsWith(`~/`)||t.startsWith(`/`)||t.includes(`/`)||t.includes(`\\`))}function qe(e,t,n){if(!Je(n)||!e)return!1;let r=le(e);if(!r||r.allowsExtraPositionals)return!0;let i=r.positionalArgs??[];return i.length===0?!1:t.length<i.length||i.some(e=>e.includes(`?`))}function Je(e){return/^-\d+(\.\d+)?$/.test(e)}function Ye(e){if(e.flags.help)return e;if(e.command===`snapshot`&&e.flags.snapshotDiff){let{snapshotDiff:t,...n}=e.flags;return{command:`diff`,positionals:[`snapshot`,...e.positionals],flags:n,warnings:e.warnings}}return e}function Xe(e,t){return e?t.length===1?`Flag ${t[0]} is not supported for command ${e}.`:`Flags ${t.join(`, `)} are not supported for command ${e}.`:t.length===1?`Flag ${t[0]} requires a command that supports it.`:`Flags ${t.join(`, `)} require a command that supports them.`}async function I(){let{buildUsageText:e}=await import(`./cli-help.js`).then(e=>e.n);return e()}async function Ze(e){let{buildCommandUsageText:t}=await import(`./cli-help.js`).then(e=>e.n);return t(L(e))}function L(t){let n=me(t);if(n)throw new e(`INVALID_ARGS`,n);return pe(t)}function Qe(){return{renderedToStderr:!1}}function $e(e){return t=>{t.type===`command`&&(e.renderedToStderr=!0,process.stderr.write(`${t.message}\n`))}}function et(e){return ae(e)}const tt={connect:async()=>(await import(`./connection.js`)).connectCommand,disconnect:async()=>(await import(`./connection.js`)).disconnectCommand,connection:async()=>(await import(`./connection.js`)).connectionCommand,auth:async()=>(await import(`./auth.js`)).authCommand,daemon:async()=>(await import(`./daemon.js`)).daemonCommand,device:async()=>(await import(`./device2.js`)).deviceCommand,proxy:async()=>(await import(`./proxy.js`)).proxyCommand,takeover:async()=>(await import(`./takeover.js`)).takeoverCommand,replay:async()=>(await import(`./replay.js`)).replayCommand,screenshot:async()=>(await import(`./screenshot3.js`)).screenshotCommand,diff:async()=>(await import(`./screenshot3.js`)).diffCommand};async function R(e){let t={...e.flags},n=tt[e.command];return n&&await(await n())({...e,flags:t})?!0:et(e.command)?await nt({...e,command:e.command,flags:t}):!1}async function nt(e){let{runGenericClientBackedCommand:t}=await import(`./generic.js`);return await t(e)}function rt(e){return[`exec`,`--yes`,`--package`,`agent-react-devtools@0.5.0`,`--`,`agent-react-devtools`,...e]}function it(e){return e===`ios-instance`}function at(e){return e[0]===`wait`&&e.includes(`--connected`)}function ot(e,t,n){n===0||!at(e)||!it(t?.leaseBackend)||process.stderr.write([`Hint: Remote iOS React DevTools connects during JavaScript startup.`,"If the app was already open before `agent-device react-devtools start`, relaunch it with `agent-device open <bundle-id> --platform ios --relaunch`, then retry `agent-device react-devtools wait --connected`.",``].join(`
|
|
2
|
-
`))}function z(e,t,n){return n||(e.push(t),``)}function
|
|
3
|
-
`)}function q(e){let t=e.effectiveFlags,n=e.connectionMetadata;return{session:t.session,requestId:e.requestId,stateDir:t.stateDir,daemonBaseUrl:t.daemonBaseUrl,daemonAuthToken:t.daemonAuthToken,daemonTransport:t.daemonTransport,daemonServerMode:t.daemonServerMode,tenant:t.tenant,sessionIsolation:t.sessionIsolation,runId:t.runId,leaseId:t.leaseId,leaseBackend:t.leaseBackend,leaseProvider:n?.leaseProvider,clientId:n?.clientId,deviceKey:n?.deviceKey,providerApp:t.providerApp,providerOsVersion:t.providerOsVersion,providerProject:t.providerProject,providerBuild:t.providerBuild,providerSessionName:t.providerSessionName,providerDeviceOrientation:t.providerDeviceOrientation,providerGeoLocation:t.providerGeoLocation,providerTimezone:t.providerTimezone,providerAppiumVersion:t.providerAppiumVersion,providerLanguage:t.providerLanguage,providerLocale:t.providerLocale,providerNetworkProfile:t.providerNetworkProfile,providerCustomNetwork:t.providerCustomNetwork,providerNoResignApp:t.providerNoResignApp,awsProjectArn:t.awsProjectArn,awsDeviceArn:t.awsDeviceArn,awsAppArn:t.awsAppArn,awsRegion:t.awsRegion,awsInteractionMode:t.awsInteractionMode,runtime:e.resolvedRuntime,lockPolicy:e.binding.lockPolicy,lockPlatform:e.binding.defaultPlatform,cwd:process.cwd(),debug:e.debugOutputEnabled,cost:t.cost,responseLevel:t.responseLevel}}function
|
|
1
|
+
import{D as e,H as t,L as n,O as r}from"./sdk-contracts.js";import{t as i}from"./capture.js";import{d as a,l as o,o as s,u as c}from"./sdk-batch-runner.js";import{n as l,r as u}from"./agent-device-client.js";import{s as d,t as f,u as p}from"./sdk-batch.js";import{i as m,r as h,t as g}from"./catalog.js";import{n as _,r as v}from"./back-mode.js";import{x as ee}from"./registry.js";import{a as y,i as b,l as te,n as ne,o as re,r as x}from"./diagnostics.js";import{f as ie}from"./exec.js";import{n as ae}from"./command-metadata.js";import"./diagnostics2.js";import"./command.js";import{r as oe}from"./version.js";import{t as se}from"./daemon-resolution.js";import{t as ce}from"./session-artifact-paths.js";import{r as S,t as le}from"./command-schema.js";import{n as C,r as w,t as ue}from"./cli-config.js";import{t as de}from"./update-check.js";import{n as fe,r as pe,t as me}from"./cli-command-aliases.js";import{exitAfterFlush as T}from"./process-exit.js";import{D as he,E as ge,O as _e,d as ve,k as ye,m as be,n as xe,w as Se}from"./connection-runtime.js";import{i as Ce}from"./auth-session.js";import E from"node:fs";import{pathToFileURL as we}from"node:url";const D=`open <app> --relaunch`,Te={start:{command:`open`,example:D},restart:{command:`open`,example:D},touch:{command:`press`,example:`press`},input:{command:`fill`,example:`fill`},settext:{command:`fill`,example:`fill`},entertext:{command:`fill`,example:`fill`},screencap:{command:`screenshot`,example:`screenshot`},capture:{command:`screenshot`,example:`screenshot`},dismiss:{command:`keyboard`,example:`keyboard dismiss`},"get-text":{command:`get`,example:`get text`},gettext:{command:`get`,example:`get text`},get_text:{command:`get`,example:`get text`},"open-url":{command:`open`,example:`open <url>`},"close-session":{command:`close`,example:`close`}};function Ee(e){if(e.length<=2)return[];let t=m(),n=t.filter(t=>t.startsWith(e));return n.length>0?n.sort(O).slice(0,3):k(e,t)}function O(e,t){return e.length-t.length||e.localeCompare(t)}function k(e,t){let n=t.map(t=>({name:t,distance:Oe(e,t)})).filter(t=>t.distance<=De(e));if(n.length===0)return[];let r=Math.min(...n.map(e=>e.distance));return n.filter(e=>e.distance===r).sort((e,t)=>e.name.localeCompare(t.name)).slice(0,3).map(e=>e.name)}function De(e){return e.length<4?1:e.length<=6?2:3}function Oe(e,t){return e===t?0:e.startsWith(t)||t.startsWith(e)?Math.abs(e.length-t.length):ke(e,t)}function ke(e,t){let n=e.length+1,r=t.length+1,i=Array.from({length:n},()=>Array(r).fill(0));for(let e=0;e<n;e+=1)i[e][0]=e;for(let e=0;e<r;e+=1)i[0][e]=e;for(let a=1;a<n;a+=1)for(let n=1;n<r;n+=1){let r=e[a-1]===t[n-1]?0:1;i[a][n]=Math.min(i[a-1][n]+1,i[a][n-1]+1,i[a-1][n-1]+r)}return i[n-1][r-1]}function A(e){let t=e.toLowerCase(),n=Te[t]?.example;if(n)return n;let r=Ee(t);if(r.length!==0)return r.length===1?r[0]:`one of: ${r.join(`, `)}`}const Ae=new Set([`--bundle-id`,`--bundleid`,`--bundle`,`--package`,`--package-name`,`--packagename`,`--app-id`,`--appid`,`--pkg`]),je=new Set([`--session-locked`,`--session-lock-conflicts`]),Me={"--output":`--out`,"--path":`--out`};function Ne(e,t){let n=e.toLowerCase(),r=Me[n];if(r&&Pe(r,t))return r;let i=Fe(n,t);if(i.length!==0)return i.length===1?i[0]:`one of: ${i.join(`, `)}`}function Pe(e,t){let n=v().find(t=>t.names.includes(e));return n?w(n.key,t):!1}function Fe(e,t){let n=j(e);if(n.length<=2)return[];let r=Ie(t),i=r.filter(e=>j(e).startsWith(n));return i.length>0?i.sort(O).slice(0,3):k(n,r.map(e=>j(e))).map(e=>`--${e}`)}function Ie(e){let t=new Set;for(let n of v()){if(!w(n.key,e))continue;let r=n.names[0];r&&t.add(r)}return[...t]}function j(e){return e.replace(/^--?/,``)}function Le(e,t){let n=e.toLowerCase();if(Ae.has(n))return`Unknown flag: ${e}. The app or bundle id is a positional argument, e.g. ${D}.`;if(je.has(n))return`Unknown flag: ${e}. Use --session-lock reject|strip instead.`;if(n===i.cliToken)return`Unknown flag: ${e}. ${i.migration.screenshot}. ${i.migration.record}.`;let r=Ne(e,t);return r?`Unknown flag: ${e}. Did you mean ${r}?`:`Unknown flag: ${e}`}function M(t){let n={json:!1,help:!1,version:!1},r=null,i=null,a=[],o=[],s=[],c=!0;for(let o=0;o<t.length;o+=1){let l=t[o];if(c&&l===`--`){c=!1;continue}if(!c){r?a.push(l):(i=l,r=L(l));continue}if(Ve(r)){a.push(l);continue}let u=l.startsWith(`--`),d=l.startsWith(`-`)&&l.length>1;if(!u&&!d){r?a.push(l):(i=l,r=L(l));continue}let[f,p]=u?N(l):[l,void 0];if(ze(r,f))continue;let m=He(f,r);if(Be(r,m)){a.push(l);continue}if(!m){if(qe(r,a,l)){r?a.push(l):r=l;continue}throw new e(`INVALID_ARGS`,Le(f,r))}let h=Ge(m,f,p,t[o+1]);h.consumeNext&&(o+=1);let g=n[m.key];if(m.multiple){let e=Array.isArray(g)?[...g,h.value]:g===void 0?[h.value]:[g,h.value];n[m.key]=e}else n[m.key]=h.value;s.push({key:m.key,token:f})}return Re(i,n),{command:r,positionals:a,flags:n,warnings:o,providedFlags:s}}function Re(e,t){if(e)for(let n of me(e)?.impliedFlags??[])t[n]=!0}function ze(e,t){return t===`-c`&&(e===`snapshot`||e===`diff`)}function Be(e,t){return e===`react-devtools`?!t||!w(t.key,e):!1}function Ve(e){return e===`cdp`}function He(e,t){let n=v().filter(t=>t.names.includes(e));if(n.length<=1)return n[0]??_(e);if(t){let e=n.find(e=>w(e.key,t));if(e)return e}return _(e)}function Ue(t,n){let r=n?.strictFlags??!0,i=[...t.warnings],a=C({json:!1,help:!1,version:!1},n?.defaultFlags??{});if(C(a,t.flags),t.command&&!h(t.command)&&!a.help){let n=A(t.command),r=n?`Unknown command: ${t.command}. Did you mean ${n}?`:`Unknown command: ${t.command}`;throw new e(`INVALID_ARGS`,r)}let o=t.providedFlags.filter(e=>!w(e.key,t.command));if(o.length>0){let n=o.map(e=>e.token),s=Qe(t.command,n);if(r)throw new e(`INVALID_ARGS`,s);i.push(s);for(let e of o)delete a[e.key]}let s=Xe(t);if(s.length>0){let n=Ze(t.command,t.positionals[0],s);if(r)throw new e(`INVALID_ARGS`,n);i.push(n);for(let e of s)delete a[e.key]}for(let e of Object.keys(a))a[e]!==void 0&&(w(e,t.command)||delete a[e]);We(t),p(t.command,a);let c=Ye({command:t.command,positionals:t.positionals,flags:a,warnings:i});if(le(c.command,c.positionals),c.command===`batch`&&+!!a.steps+ +!!a.stepsFile!=1)throw new e(`INVALID_ARGS`,`batch requires exactly one step source: --steps or --steps-file.`);return c}function We(t){if(t.command!==`back`)return;let n=t.providedFlags.filter(e=>e.key===`backMode`);if(!(new Set(n.map(e=>e.token)).size<=1))throw new e(`INVALID_ARGS`,`back accepts only one explicit mode flag: use either --in-app or --system.`)}function N(e){let t=e.indexOf(`=`);return t===-1?[e,void 0]:[e.slice(0,t),e.slice(t+1)]}function Ge(t,n,r,i){if(t.setValue!==void 0){if(r!==void 0)throw new e(`INVALID_ARGS`,`Flag ${n} does not take a value.`);return{value:t.setValue,consumeNext:!1}}if(t.type===`boolean`){if(r!==void 0)throw new e(`INVALID_ARGS`,`Flag ${n} does not take a value.`);return{value:!0,consumeNext:!1}}if(t.type===`booleanOrString`){if(r!==void 0){if(r.trim().length===0)throw new e(`INVALID_ARGS`,`Flag ${n} requires a non-empty value when provided.`);return{value:r,consumeNext:!1}}return i===void 0||F(i)?{value:!0,consumeNext:!1}:Ke(i)?{value:i,consumeNext:!0}:{value:!0,consumeNext:!1}}let a=r??i;if(a===void 0||r===void 0&&F(a))throw new e(`INVALID_ARGS`,`Flag ${n} requires a value.`);if(t.type===`string`)return{value:a,consumeNext:r===void 0};if(t.type===`enum`){if(!t.enumValues?.includes(a))throw new e(`INVALID_ARGS`,`Invalid ${P(n)}: ${a}`);return{value:a,consumeNext:r===void 0}}let o=Number(a);if(!Number.isFinite(o)||typeof t.min==`number`&&o<t.min||typeof t.max==`number`&&o>t.max)throw new e(`INVALID_ARGS`,`Invalid ${P(n)}: ${a}`);return{value:t.type===`int`?Math.floor(o):o,consumeNext:r===void 0}}function P(e){return e.replace(/^-+/,``)}function F(e){if(!e.startsWith(`-`)||e===`-`)return!1;let[t]=e.startsWith(`--`)?N(e):[e,void 0];return _(t)!==void 0}function Ke(e){let t=e.trim();return!t||/^[a-zA-Z][a-zA-Z0-9+.-]*:\/\//.test(t)?!1:!!(t.startsWith(`./`)||t.startsWith(`../`)||t.startsWith(`~/`)||t.startsWith(`/`)||t.includes(`/`)||t.includes(`\\`))}function qe(e,t,n){if(!Je(n)||!e)return!1;let r=S(e);if(!r||r.allowsExtraPositionals)return!0;let i=r.positionalArgs??[];return i.length===0?!1:t.length<i.length||i.some(e=>e.includes(`?`))}function Je(e){return/^-\d+(\.\d+)?$/.test(e)}function Ye(e){if(e.flags.help)return e;if(e.command===`snapshot`&&e.flags.snapshotDiff){let{snapshotDiff:t,...n}=e.flags;return{command:`diff`,positionals:[`snapshot`,...e.positionals],flags:n,warnings:e.warnings}}return e}function Xe(e){let t=S(e.command)?.flagsByAction,n=e.positionals[0];if(t===void 0||n===void 0||!Object.hasOwn(t,n))return[];let r=t[n];if(r===void 0)return[];let i=new Set(Object.values(t).flat());return e.providedFlags.filter(e=>i.has(e.key)&&!r.includes(e.key))}function Ze(e,t,n){return`${e} ${t} does not read ${n.map(e=>e.token).join(`, `)}. Run \`${e} ${t} --help\` for the options it reads.`}function Qe(e,t){return e?t.length===1?`Flag ${t[0]} is not supported for command ${e}.`:`Flags ${t.join(`, `)} are not supported for command ${e}.`:t.length===1?`Flag ${t[0]} requires a command that supports it.`:`Flags ${t.join(`, `)} require a command that supports them.`}async function I(){let{buildUsageText:e}=await import(`./cli-help.js`).then(e=>e.n);return e()}async function $e(e){let{buildCommandUsageText:t}=await import(`./cli-help.js`).then(e=>e.n);return t(L(e))}function L(t){let n=pe(t);if(n)throw new e(`INVALID_ARGS`,n);return fe(t)}function et(){return{renderedToStderr:!1}}function tt(e){return t=>{t.type===`command`&&(e.renderedToStderr=!0,process.stderr.write(`${t.message}\n`))}}function nt(e){return ae(e)}const rt={connect:async()=>(await import(`./connection.js`)).connectCommand,disconnect:async()=>(await import(`./connection.js`)).disconnectCommand,connection:async()=>(await import(`./connection.js`)).connectionCommand,auth:async()=>(await import(`./auth.js`)).authCommand,daemon:async()=>(await import(`./daemon.js`)).daemonCommand,device:async()=>(await import(`./device2.js`)).deviceCommand,proxy:async()=>(await import(`./proxy.js`)).proxyCommand,takeover:async()=>(await import(`./takeover.js`)).takeoverCommand,replay:async()=>(await import(`./replay.js`)).replayCommand,screenshot:async()=>(await import(`./screenshot3.js`)).screenshotCommand,diff:async()=>(await import(`./screenshot3.js`)).diffCommand,record:async()=>(await import(`./recording.js`)).recordingCommand};async function R(e){let t={...e.flags},n=rt[e.command];return n&&await(await n())({...e,flags:t})?!0:nt(e.command)?await it({...e,command:e.command,flags:t}):!1}async function it(e){let{runGenericClientBackedCommand:t}=await import(`./generic.js`);return await t(e)}function at(e){return[`exec`,`--yes`,`--package`,`agent-react-devtools@0.5.0`,`--`,`agent-react-devtools`,...e]}function ot(e){return e===`ios-instance`}function st(e){return e[0]===`wait`&&e.includes(`--connected`)}function ct(e,t,n){n===0||!st(e)||!ot(t?.leaseBackend)||process.stderr.write([`Hint: Remote iOS React DevTools connects during JavaScript startup.`,"If the app was already open before `agent-device react-devtools start`, relaunch it with `agent-device open <bundle-id> --platform ios --relaunch`, then retry `agent-device react-devtools wait --connected`.",``].join(`
|
|
2
|
+
`))}function z(e,t,n){return n||(e.push(t),``)}function lt(t){if(!t?.metroProxyBaseUrl||!he(t.leaseBackend))return null;let n=[],r={serverBaseUrl:z(n,`metroProxyBaseUrl`,t.metroProxyBaseUrl),bearerToken:z(n,`metroBearerToken`,t.metroBearerToken),tenantId:z(n,`tenant`,t.tenant),runId:z(n,`runId`,t.runId),leaseId:z(n,`leaseId`,t.leaseId)};if(n.length>0)throw new e(`INVALID_ARGS`,`react-devtools remote bridge requires ${n.join(`, `)}.`,{missing:n});return r}async function ut(e,t,n){let{flags:r}=t,i=lt(r);if(!i)return n();let a=t.stateDir??process.cwd(),o=t.session??r?.session??`default`,s=r?.remoteConfig??`${i.tenantId}:${i.runId}:${i.leaseId}`;if(e[0]===`stop`)try{return await n()}finally{await ye({projectRoot:t.cwd??process.cwd(),stateDir:a,profileKey:s,consumerKey:o})}return await _e({projectRoot:t.cwd??process.cwd(),stateDir:a,serverBaseUrl:i.serverBaseUrl,bearerToken:i.bearerToken,bridgeScope:{tenantId:i.tenantId,runId:i.runId,leaseId:i.leaseId},session:o,profileKey:s,consumerKey:o,env:t.env??process.env}),await n()}function dt(e,t){if(e[0]!==`start`)return!1;let{flags:n}=t;return n?ve(n.leaseProvider).supportsDirectPortReverse&&n.leaseBackend===`android-instance`&&n.metroProxyBaseUrl===void 0&&t.configureDirectPortReverse!==void 0:!1}async function ft(e,t={}){let n=t.cwd??process.cwd(),r=t.env??process.env,i=await ut(e,t,async()=>(dt(e,t)&&await t.configureDirectPortReverse?.(),(await ie(`npm`,at(e),{cwd:n,env:r,allowFailure:!0,onStdoutChunk:e=>{process.stdout.write(e)},onStderrChunk:e=>{process.stderr.write(e)}})).exitCode));return ct(e,t.flags,i),i}const B=`${s} Run agent-device help batch for the commands batch accepts and for runnable step examples.`,pt=`${f} Run agent-device help batch for the commands batch accepts and for runnable step examples.`;function mt(t){let n;try{n=JSON.parse(t)}catch{throw new e(`INVALID_ARGS`,`Batch steps must be valid JSON.`)}if(!Array.isArray(n)||n.length===0)throw new e(`INVALID_ARGS`,`Batch steps must be a non-empty JSON array.`);return n.map((e,t)=>ht(e,t+1))}function ht(t,n){let r=a(t,n,B),i=[`positionals`,`flags`].filter(e=>e in r);if(i.length>0){let t=i.map(e=>`"${e}"`).join(`, `);throw new e(`INVALID_ARGS`,`Batch step ${n} uses removed field(s): ${t}. Use {"command":"...","input":{...}}. Example: {"command":"open","input":{"app":"settings","platform":"ios"}}.`,{hint:B})}ee(r,[`command`,`input`,`runtime`],`Batch step ${n}`,B);let s=o(r.runtime,n);return{command:d(r.command,n,pt),input:c(r,n,B),...s===void 0?{}:{runtime:s}}}function V(e,t={}){let n=H(t),r={...e};return n.defaultPlatform&&r.platform===void 0&&(r.platform=n.defaultPlatform),r}function H(e){let t=e.env??process.env,n=e.inheritedPlatform??e.configuredPlatform??_t(t.AGENT_DEVICE_PLATFORM),r=yt(e.configuredSession??t.AGENT_DEVICE_SESSION);return{defaultPlatform:n,lockPolicy:gt(e.policyOverrides,t,r)}}function gt(e,t,n){let r=e?.sessionLock??vt(t.AGENT_DEVICE_SESSION_LOCK);if(r)return r;if(n)return`reject`}function _t(t){if(t===void 0)return;let n=t.trim().toLowerCase();if(n){if(n===`ios`||n===`android`||n===`apple`)return n;throw new e(`INVALID_ARGS`,`Invalid AGENT_DEVICE_PLATFORM: ${t}. Use ios, android, or apple.`)}}function vt(t){if(t===void 0)return;let n=t.trim().toLowerCase();if(n){if(n===`reject`||n===`strip`)return n;throw new e(`INVALID_ARGS`,`Invalid session lock mode: ${t}. Use reject or strip.`)}}function yt(e){return typeof e==`string`&&e.trim().length>0}function bt(e,t){let n=M(e),r=t?.env??process.env,i=t?.cwd??process.cwd(),a=xt(n.command)?be({remoteConfig:n.flags.remoteConfig,cwd:i,env:r}):{},o=C(ue({command:n.command,cwd:i,cliFlags:n.flags,env:r}),a);return{...Ue(n,{strictFlags:t?.strictFlags,defaultFlags:o}),providedFlags:n.providedFlags}}function xt(e){return e!==null}g.runtime;async function St(e){let{command:t,request:n,transport:r,transportOptions:i}=e;return await r({...n,command:t},i)}const U=(e,t={})=>import(`./error.js`).then(e=>e.t).then(({printHumanError:n})=>n(e,t)),W=e=>import(`./json.js`).then(({printJson:t})=>t(e)),Ct={sendToDaemon:u},wt=new Set([`launchUrl`,`kind`,`metroBearerToken`,`metroKind`,`metroListenHost`,`metroNoInstallDeps`,`metroNoReuseExisting`,`metroPreparePort`,`metroProbeTimeoutMs`,`metroProjectRoot`,`metroProxyBaseUrl`,`metroPublicBaseUrl`,`metroRuntimeFile`,`metroStartupTimeoutMs`,`metroStatusHost`]),Tt=new Set([`connect`,`connection`,`close`,`daemon`,`device`,`disconnect`,`metro`,`proxy`,`session`,`takeover`]);async function G(e,t=Ct){let n=ne(),r=oe(),i=Ft(e),a=e.includes(`--json`),o=qt(e)??process.env.AGENT_DEVICE_SESSION??`default`;await te({session:o,requestId:n,command:e[0],debug:i},async()=>{let{parsed:o,command:s,positionals:c}=await Et(e,{version:r,jsonRequested:a,debugEnabled:i}),u=Z(s,o.providedFlags),d=await Dt(o,{command:s,positionals:c,requestId:n,debugOutputEnabled:u});K(d.effectiveFlags);let f=null;try{if(s===`react-devtools`){await T(await Ot(d,t));return}if(s===`web`){let{runWebCommand:e}=await import(`./web.js`);await T(await e(c,{flags:d.effectiveFlags,stateDir:d.daemonPaths.baseDir}));return}if(de({command:s,currentVersion:r,stateDir:d.daemonPaths.baseDir,flags:d.effectiveFlags}),await kt(d,t),K(d.effectiveFlags),s===`cdp`){await T(await ge(c,{flags:d.effectiveFlags,runtime:d.resolvedRuntime,cwd:process.cwd(),env:process.env}));return}f=At(d);let e=await jt(d),n=et();await Mt(d,l(q(d),{transport:Kt({command:s,flags:d.effectiveFlags,replayTestReporterRuntime:e,commandProgress:n,transport:t.sendToDaemon})}),e,n)}catch(e){await Nt(e,d,f)}finally{f&&f()}})}function K(e){e.daemonAuthToken&&re(e.daemonAuthToken)}async function Et(t,r){let i;try{i=bt(t,{cwd:process.cwd(),env:process.env})}catch(e){x({level:`error`,phase:`cli_parse_failed`,data:{error:e instanceof Error?e.message:String(e)}});let t=n(e,{diagnosticId:y().diagnosticId,logPath:b({force:!0})?.path});return r.jsonRequested?await W({success:!1,error:t}):await U(t,{showDetails:r.debugEnabled}),T(1)}for(let e of i.warnings)process.stderr.write(`Warning: ${e}\n`);if(i.flags.version)return process.stdout.write(`${r.version}\n`),T(0);let a=i.command===`help`,o=i.flags.help;if(a||o){if(a&&i.positionals.length>1)return await U(new e(`INVALID_ARGS`,`help accepts at most one command.`)),T(1);let t=a?i.positionals[0]:i.command;if(!t)return process.stdout.write(`${await I()}\n`),T(0);let n=await $e(t);return n?(process.stdout.write(n),T(0)):(await U(new e(`INVALID_ARGS`,It(t))),process.stdout.write(`${await I()}\n`),T(1))}return i.command?{parsed:i,command:i.command,positionals:i.positionals}:(process.stdout.write(`${await I()}\n`),T(1))}async function Dt(e,t){let i=new Set(e.providedFlags.map(e=>e.key));try{let n=H({policyOverrides:e.flags,configuredPlatform:e.flags.platform,configuredSession:e.flags.session}),r=n.lockPolicy?{...e.flags}:V(e.flags,{policyOverrides:e.flags,configuredPlatform:e.flags.platform,configuredSession:e.flags.session}),a=se(r.stateDir),o=r.session??`default`,s=zt({command:t.command,explicitFlagKeys:i,stateDir:a.baseDir,session:o,remoteConfig:r.remoteConfig,hasResolvedSession:r.session!==void 0}),c=s?Wt(r,s.flags,i):r;return{...t,binding:n,flags:r,daemonPaths:a,sessionName:o,connectionDefaults:s,explicitFlagKeys:i,effectiveFlags:c,resolvedRuntime:s?.runtime,connectionMetadata:s?.connection,parsedBatchSteps:void 0}}catch(i){let a=r(i),o=n(a,{diagnosticId:y().diagnosticId,logPath:b({force:!0})?.path});return e.flags.json?await W({success:!1,error:o}):await U(o,{showDetails:t.debugOutputEnabled}),T(1)}}async function Ot(e,n){let{daemonAuthToken:r,...i}=e.effectiveFlags;return await ft(e.positionals,{flags:{...i,leaseProvider:e.connectionDefaults?.connection?.leaseProvider},stateDir:e.daemonPaths.baseDir,session:e.effectiveFlags.session??e.sessionName,cwd:process.cwd(),env:process.env,configureDirectPortReverse:async()=>{let a=await St({route:`react-devtools`,command:g.runtime,request:{positionals:[`port-reverse`],flags:{...i,leaseProvider:e.connectionDefaults?.connection?.leaseProvider,devicePort:8097,hostPort:8097,portReverseName:`react-devtools`},session:e.effectiveFlags.session??e.sessionName},transport:n.sendToDaemon,transportOptions:{authToken:r}});a.ok||t(a.error)}})}async function kt(t,n){if(t.command===`batch`){if(t.positionals.length>0)throw new e(`INVALID_ARGS`,`batch does not accept positional arguments.`);t.parsedBatchSteps=Lt(t.flags)}if(Vt(t.command)&&(t.effectiveFlags=(await Ce({command:t.command,flags:t.effectiveFlags,stateDir:t.daemonPaths.baseDir,env:process.env})).flags),t.effectiveFlags.remoteConfig&&Bt(t.command)){let e=l(q(t),{transport:Q(n.sendToDaemon)}),r=await xe({command:t.command,flags:t.effectiveFlags,client:e,runtime:t.resolvedRuntime,positionals:t.positionals,batchSteps:t.parsedBatchSteps,forceRuntimePrepare:Gt(t.explicitFlagKeys)});t.effectiveFlags=r.flags,t.resolvedRuntime=r.runtime,t.connectionMetadata=r.connection}Ht({command:t.command,flags:t.effectiveFlags,runtime:t.resolvedRuntime,explicitFlagKeys:t.explicitFlagKeys,hadConnectionDefaults:!!t.connectionDefaults})&&process.stderr.write(`Warning: open is using explicit remote daemon or tenant flags without saved Metro runtime hints. React Native apps may launch without bundle/runtime hints; prefer connect --remote-config <path> first or pass --remote-config <path> on this command.
|
|
3
|
+
`)}function q(e){let t=e.effectiveFlags,n=e.connectionMetadata;return{session:t.session,requestId:e.requestId,stateDir:t.stateDir,daemonBaseUrl:t.daemonBaseUrl,daemonAuthToken:t.daemonAuthToken,daemonTransport:t.daemonTransport,daemonServerMode:t.daemonServerMode,tenant:t.tenant,sessionIsolation:t.sessionIsolation,runId:t.runId,leaseId:t.leaseId,leaseBackend:t.leaseBackend,leaseProvider:n?.leaseProvider,clientId:n?.clientId,deviceKey:n?.deviceKey,providerApp:t.providerApp,providerOsVersion:t.providerOsVersion,providerProject:t.providerProject,providerBuild:t.providerBuild,providerSessionName:t.providerSessionName,providerDeviceOrientation:t.providerDeviceOrientation,providerGeoLocation:t.providerGeoLocation,providerTimezone:t.providerTimezone,providerAppiumVersion:t.providerAppiumVersion,providerLanguage:t.providerLanguage,providerLocale:t.providerLocale,providerNetworkProfile:t.providerNetworkProfile,providerCustomNetwork:t.providerCustomNetwork,providerNoResignApp:t.providerNoResignApp,awsProjectArn:t.awsProjectArn,awsDeviceArn:t.awsDeviceArn,awsAppArn:t.awsAppArn,awsRegion:t.awsRegion,awsInteractionMode:t.awsInteractionMode,runtime:e.resolvedRuntime,lockPolicy:e.binding.lockPolicy,lockPlatform:e.binding.defaultPlatform,cwd:process.cwd(),debug:e.debugOutputEnabled,cost:t.cost,responseLevel:t.responseLevel}}function At(e){let t=e.effectiveFlags.daemonBaseUrl;return e.debugOutputEnabled&&!e.effectiveFlags.json&&!t?Jt(e.daemonPaths.logPath):null}async function jt(e){if(e.command!==`test`)return;let{createReplayTestReporterRuntime:t}=await import(`./reporting.js`);return t({debug:e.debugOutputEnabled,verbose:e.effectiveFlags.verbose,json:e.effectiveFlags.json,reporter:e.effectiveFlags.reporter,reportJunit:e.effectiveFlags.reportJunit})}async function Mt(t,n,r,i){let{command:a,positionals:o,effectiveFlags:s}=t;if(a===`batch`){if(!t.parsedBatchSteps)throw new e(`INVALID_ARGS`,`batch requires --steps or --steps-file.`);let c=t.parsedBatchSteps.map((e,n)=>({...e,input:t.binding.lockPolicy&&t.flags.platform===void 0?{...e.input}:V(e.input,{policyOverrides:s,configuredPlatform:s.platform,configuredSession:s.session,inheritedPlatform:s.platform})}));if(await R({command:a,positionals:o,flags:{...s,batchSteps:c},client:n,debug:t.debugOutputEnabled,replayTestReporterRuntime:r,commandProgress:i}))return}else if(a===`runtime`)throw new e(`INVALID_ARGS`,`runtime command was removed. Use connect --remote-config <path> for remote runs, or metro prepare --remote-config <path> for inspection.`);else if(await R({command:a,positionals:o,flags:s,client:n,debug:t.debugOutputEnabled,replayTestReporterRuntime:r,commandProgress:i}))return;throw new e(`INVALID_ARGS`,X(a))}async function Nt(e,t,i){let a=r(e),o=n(a,{diagnosticId:y().diagnosticId,logPath:b({force:!0})?.path});if(t.command===`close`&&Rt(a)){t.effectiveFlags.json&&await W({success:!0,data:{closed:`session`,source:`no-daemon`}});return}t.effectiveFlags.json?await W({success:!1,error:o}):(await U(o,{showDetails:t.debugOutputEnabled}),t.debugOutputEnabled&&Pt(t,o)),i&&i(),await T(1)}const J=64e3;function Pt(e,t){if(!e.effectiveFlags.daemonBaseUrl){Y(`daemon log`,e.daemonPaths.logPath);return}let n=t.diagnosticsRecord;n&&Y(`remote diagnostics`,ce(e.daemonPaths.baseDir,n))}function Y(e,t){try{if(E.existsSync(t)){let n=E.readFileSync(t,`utf8`).split(`
|
|
4
4
|
`),r=n.slice(Math.max(0,n.length-200)).join(`
|
|
5
|
-
`);r.length>J&&(r=r.slice(r.length-J)),r.trim().length>0&&process.stderr.write(`\n[${e}]\n${r}\n`)}}catch{}}function
|
|
5
|
+
`);r.length>J&&(r=r.slice(r.length-J)),r.trim().length>0&&process.stderr.write(`\n[${e}]\n${r}\n`)}}catch{}}function Ft(e){try{let t=M(e);return Z(t.command??``,t.providedFlags)}catch{return e.includes(`--debug`)||e.includes(`-v`)||e.includes(`--verbose`)}}function It(e){let t=A(e);return t?`Unknown command: ${e}. Did you mean ${t}?`:`Unknown command: ${e}`}function X(e){return h(e)?(x({level:`error`,phase:`cli_known_command_unhandled`,data:{command:e}}),`Command is registered but no CLI handler accepted it: ${e}`):`Unknown command: ${e}`}function Z(e,t){return t.some(t=>t.key===`verbose`&&(t.token===`--debug`||t.token===`-v`||e!==`test`))}function Lt(t){let n=``;if(t.steps)n=t.steps;else if(t.stepsFile)try{n=E.readFileSync(t.stepsFile,`utf8`)}catch(n){let r=n instanceof Error?n.message:String(n);throw new e(`INVALID_ARGS`,`Failed to read --steps-file ${t.stepsFile}: ${r}`)}return mt(n)}function Rt(e){return e.code===`COMMAND_FAILED`?e.details?.kind===`daemon_startup_failed`?!0:e.message.toLowerCase().includes(`failed to start daemon`)?typeof e.details?.infoPath==`string`||typeof e.details?.lockPath==`string`:!1:!1}function zt(e){return e.command===`connect`||e.command===`connection`||e.command===`daemon`||e.command===`proxy`?null:Se({stateDir:e.stateDir,session:e.session,remoteConfig:e.remoteConfig,cwd:process.cwd(),env:process.env,allowActiveFallback:!e.explicitFlagKeys.has(`session`)&&(!e.remoteConfig||e.command===`disconnect`||!e.hasResolvedSession),validateRemoteConfigHash:e.command!==`disconnect`})}function Bt(e){return!Tt.has(e)}function Vt(e){return e!==`auth`&&e!==`connection`&&e!==`daemon`&&e!==`device`&&e!==`proxy`}function Ht(e){return e.command!==`open`||e.runtime||e.flags.bundleUrl||e.flags.metroHost||e.flags.metroPort||e.flags.remoteConfig||e.hadConnectionDefaults?!1:Ut(e.explicitFlagKeys)}function Ut(e){return e.has(`daemonBaseUrl`)||e.has(`daemonTransport`)||e.has(`tenant`)||e.has(`sessionIsolation`)||e.has(`runId`)||e.has(`leaseId`)||e.has(`leaseBackend`)}function Wt(e,t,n){let r={...e};for(let[e,i]of Object.entries(t))i!==void 0&&(n.has(e)||(r[e]=i));return r}function Gt(e){for(let t of wt)if(e.has(t))return!0;return!1}function Kt(e){let{command:t,flags:n,replayTestReporterRuntime:r,transport:i}=e;if(n.json)return Q(i);let a=t===`test`&&r?r.onProgress:tt(e.commandProgress);return async(e,n)=>{let r={...n,onProgress:a};return await $(i,{...e,meta:{...e.meta,requestProgress:t===`test`?`replay-test`:`command`}},r)}}function Q(e){return async(t,n)=>await $(e,t,n)}async function $(e,t,n){return await e(t,n)}function qt(e){for(let t=0;t<e.length;t+=1){let n=e[t];if(n.startsWith(`--session=`)){let e=n.slice(10).trim();return e.length>0?e:null}if(n===`--session`){let n=e[t+1]?.trim();return n&&!n.startsWith(`-`)?n:null}}return null}we(process.argv[1]??``).href===import.meta.url&&G(process.argv.slice(2)).catch(async e=>{let t=r(e);await U(n(t),{showDetails:!0}),await T(1)});function Jt(e){try{let t=E.existsSync(e)?E.statSync(e).size:0,n=!1,r=setInterval(()=>{if(!n&&E.existsSync(e))try{let n=E.statSync(e);if(n.size<t&&(t=0),n.size<=t)return;let r=E.openSync(e,`r`);try{let e=Buffer.alloc(n.size-t);E.readSync(r,e,0,e.length,t),t=n.size,e.length>0&&process.stdout.write(e.toString(`utf8`))}finally{E.closeSync(r)}}catch{}},200);return()=>{n=!0,clearInterval(r)}}catch{return null}}export{G as runCli};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { E as IosTargetActivation, H as DaemonError, I as SnapshotQualityVerdict, M as SnapshotKeyboardBandFact, N as SnapshotNode, R as SnapshotUnchanged, S as DeviceTarget, T as PublicPlatform, U as NormalizedError, _ as SessionIsolationMode, a as DaemonRequest, f as LeaseBackend, g as ResponseLevel, i as DaemonLockPolicy, j as SnapshotCommandOptionFields, m as NetworkIncludeMode, o as DaemonResponse, r as DaemonInstallSource, s as DaemonResponseData, t as DaemonArtifact, v as SessionRuntimeHints, w as PlatformSelector, x as DeviceKind, y as AppleOS, z as SnapshotVisibility } from "./sdk-contracts.js";
|
|
2
2
|
import { t as AppsFilter } from "./app-inventory.js";
|
|
3
|
-
import { B as
|
|
3
|
+
import { A as GesturePointerCount, B as ClickButton, C as FoldPose, D as PermissionMode, E as PermissionAction, F as ScrollDirection, G as SessionSurface, H as FindLocator, I as ScrollInputDirection, L as SwipePattern, O as TextSizeCategory, R as SwipePreset, S as DeviceRotation, T as MOBILE_PERMISSION_TARGETS, U as ScreenshotResultData, V as AndroidSnapshotBackendMetadata, W as SnapshotDiagnosticsSummary, _ as HoverCommandResponseData, b as SettleObservation, g as FindCommandResponseData, h as FillCommandResponseData, k as BackMode, m as ClickCommandResponseData, p as ScrollCommandResult, v as LongPressCommandResponseData, w as MACOS_PERMISSION_TARGETS, x as TvRemoteButton, y as PressCommandResponseData, z as TransformGestureParams } 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
5
|
import { t as BatchRunResult } from "./sdk-batch-runner.js";
|
|
6
6
|
import { r as CloudProviderSessionResult, t as AgentArtifactsResult } from "./cloud-artifacts.js";
|
|
@@ -927,6 +927,15 @@ type SettingsUpdateOptions = (DeviceCommandBaseOptions & {
|
|
|
927
927
|
}) | (DeviceCommandBaseOptions & {
|
|
928
928
|
setting: 'appearance';
|
|
929
929
|
state: 'light' | 'dark' | 'toggle';
|
|
930
|
+
}) |
|
|
931
|
+
/**
|
|
932
|
+
* One member, two legs: with a `state` it applies that rung, and without one it asks the target
|
|
933
|
+
* what it currently holds. The ladder is shared across platforms; an owner that serves neither
|
|
934
|
+
* leg refuses on its own runtime fact rather than answering an empty value.
|
|
935
|
+
*/
|
|
936
|
+
(DeviceCommandBaseOptions & {
|
|
937
|
+
setting: 'text-size';
|
|
938
|
+
state?: TextSizeCategory;
|
|
930
939
|
}) | (DeviceCommandBaseOptions & {
|
|
931
940
|
setting: 'faceid' | 'touchid';
|
|
932
941
|
state: 'match' | 'nonmatch' | 'enroll' | 'unenroll';
|
|
@@ -1014,6 +1023,9 @@ type HomeCommandOptions = DeviceCommandBaseOptions;
|
|
|
1014
1023
|
type OrientationCommandOptions = DeviceCommandBaseOptions & {
|
|
1015
1024
|
orientation: DeviceRotation;
|
|
1016
1025
|
};
|
|
1026
|
+
type FoldCommandOptions = DeviceCommandBaseOptions & {
|
|
1027
|
+
pose: FoldPose;
|
|
1028
|
+
};
|
|
1017
1029
|
type AppSwitcherCommandOptions = DeviceCommandBaseOptions;
|
|
1018
1030
|
type ActionButtonCommandOptions = DeviceCommandBaseOptions;
|
|
1019
1031
|
type TvRemoteCommandOptions = DeviceCommandBaseOptions & {
|
|
@@ -1287,6 +1299,26 @@ type ViewportCommandResult = {
|
|
|
1287
1299
|
message: string;
|
|
1288
1300
|
};
|
|
1289
1301
|
//#endregion
|
|
1302
|
+
//#region packages/contracts/src/fold-runtime.d.ts
|
|
1303
|
+
/** Single source of truth for the discriminator the Apple owner sets and the MCP schema advertises. */
|
|
1304
|
+
declare const FOLD_SCREEN_COORDINATE_SPACE: 'native-panel';
|
|
1305
|
+
/**
|
|
1306
|
+
* The panel the device lights after the pose settled, in that panel's own native points: its pixel
|
|
1307
|
+
* size divided by its point scale, never rotated. `coordinateSpace` is always
|
|
1308
|
+
* {@link FOLD_SCREEN_COORDINATE_SPACE}, and these numbers are NOT snapshot coordinates — the active
|
|
1309
|
+
* app window can differ from the panel (iPhone Duo: a 669x951 inner panel hosts a 951x669 app
|
|
1310
|
+
* window), so they cannot place a tap. A caller that needs the app viewport must take a fresh
|
|
1311
|
+
* snapshot.
|
|
1312
|
+
*/
|
|
1313
|
+
type FoldScreenReport = Readonly<{
|
|
1314
|
+
/** The CoreDevice display name of the panel the device now lights. */
|
|
1315
|
+
display: string;
|
|
1316
|
+
/** Marks these dimensions as the panel's native points, never a snapshot's app viewport. */
|
|
1317
|
+
coordinateSpace: typeof FOLD_SCREEN_COORDINATE_SPACE;
|
|
1318
|
+
widthPt: number;
|
|
1319
|
+
heightPt: number;
|
|
1320
|
+
}>;
|
|
1321
|
+
//#endregion
|
|
1290
1322
|
//#region packages/contracts/src/navigation.d.ts
|
|
1291
1323
|
/**
|
|
1292
1324
|
* Closed results of the navigation/global action commands. Each mirrors its
|
|
@@ -1328,6 +1360,22 @@ type OrientationCommandResult = {
|
|
|
1328
1360
|
confirmed?: boolean;
|
|
1329
1361
|
warning?: string;
|
|
1330
1362
|
};
|
|
1363
|
+
/**
|
|
1364
|
+
* `fold` — `{ action: 'fold', pose, hingeAngleDegrees, screen?, message }`.
|
|
1365
|
+
*
|
|
1366
|
+
* Unlike `orientation`, there is no unconfirmed variant: the Apple owner reads the hinge angle
|
|
1367
|
+
* back from CoreDevice after pressing the Device Hub pose control, and reports a pose only when
|
|
1368
|
+
* that reading agrees with the request. `screen` names the panel the device lights afterwards and
|
|
1369
|
+
* that panel's native point size (ADR 0025); it is the panel's geometry, not the app viewport, so a
|
|
1370
|
+
* caller must take a fresh snapshot before placing a tap.
|
|
1371
|
+
*/
|
|
1372
|
+
type FoldCommandResult = {
|
|
1373
|
+
action: 'fold';
|
|
1374
|
+
pose: FoldPose;
|
|
1375
|
+
hingeAngleDegrees: number;
|
|
1376
|
+
screen?: FoldScreenReport;
|
|
1377
|
+
message: string;
|
|
1378
|
+
};
|
|
1331
1379
|
/** `app-switcher` — `{ action: 'app-switcher', message: 'Opened app switcher' }`. */
|
|
1332
1380
|
type AppSwitcherCommandResult = {
|
|
1333
1381
|
action: 'app-switcher';
|
|
@@ -1561,6 +1609,7 @@ interface CommandResultMap {
|
|
|
1561
1609
|
doctor: DoctorCommandResult;
|
|
1562
1610
|
fill: FillCommandResponseData;
|
|
1563
1611
|
find: FindCommandResponseData;
|
|
1612
|
+
fold: FoldCommandResult;
|
|
1564
1613
|
home: HomeCommandResult;
|
|
1565
1614
|
hover: HoverCommandResponseData;
|
|
1566
1615
|
keyboard: KeyboardCommandResult;
|
|
@@ -1594,6 +1643,7 @@ type AgentDeviceCommandClient = {
|
|
|
1594
1643
|
back: (options?: BackCommandOptions) => Promise<CommandResult<'back'>>;
|
|
1595
1644
|
home: (options?: HomeCommandOptions) => Promise<CommandResult<'home'>>;
|
|
1596
1645
|
orientation: (options: OrientationCommandOptions) => Promise<CommandResult<'orientation'>>;
|
|
1646
|
+
fold: (options: FoldCommandOptions) => Promise<CommandResult<'fold'>>;
|
|
1597
1647
|
appSwitcher: (options?: AppSwitcherCommandOptions) => Promise<CommandResult<'app-switcher'>>;
|
|
1598
1648
|
actionButton: (options?: ActionButtonCommandOptions) => Promise<CommandResult<'action-button'>>;
|
|
1599
1649
|
tvRemote: (options: TvRemoteCommandOptions) => Promise<CommandResult<'tv-remote'>>;
|