agent-device 0.19.3 → 0.20.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (179) hide show
  1. package/README.md +62 -70
  2. package/android/ime-helper/dist/agent-device-android-ime-helper-0.20.1.apk +0 -0
  3. package/android/ime-helper/dist/agent-device-android-ime-helper-0.20.1.apk.sha256 +1 -0
  4. package/android/ime-helper/dist/agent-device-android-ime-helper-0.20.1.manifest.json +10 -0
  5. package/android/snapshot-helper/dist/agent-device-android-snapshot-helper-0.20.1.apk +0 -0
  6. package/android/snapshot-helper/dist/agent-device-android-snapshot-helper-0.20.1.apk.sha256 +1 -0
  7. package/{android-snapshot-helper/dist/agent-device-android-snapshot-helper-0.19.3.manifest.json → android/snapshot-helper/dist/agent-device-android-snapshot-helper-0.20.1.manifest.json} +6 -6
  8. package/dist/{apple-runner → apple/runner}/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerAXSnapshotBridge.h +2 -0
  9. package/dist/{apple-runner → apple/runner}/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerAXSnapshotBridge.m +5 -0
  10. package/dist/{apple-runner → apple/runner}/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerSynthesizedGesture.h +5 -10
  11. package/dist/{apple-runner → apple/runner}/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerSynthesizedGesture.m +74 -174
  12. package/dist/{apple-runner → apple/runner}/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Alert.swift +113 -19
  13. package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+BlockingSystemModalResolution.swift +82 -0
  14. package/dist/{apple-runner → apple/runner}/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+CommandExecution.swift +325 -123
  15. package/dist/{apple-runner → apple/runner}/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+CommandJournal.swift +2 -2
  16. package/dist/{apple-runner → apple/runner}/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Interaction.swift +149 -105
  17. package/dist/{apple-runner → apple/runner}/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Lifecycle.swift +56 -2
  18. package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+LifecycleCacheTests.swift +73 -0
  19. package/dist/{apple-runner → apple/runner}/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Models.swift +51 -26
  20. package/dist/{apple-runner → apple/runner}/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+ScrollGesture.swift +2 -2
  21. package/dist/{apple-runner → apple/runner}/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+SequenceExecution.swift +2 -107
  22. package/dist/{apple-runner → apple/runner}/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Snapshot.swift +130 -13
  23. package/dist/{apple-runner → apple/runner}/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+SnapshotCapturePlan.swift +51 -8
  24. package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+SnapshotTraversalIdentityTests.swift +24 -0
  25. package/dist/{apple-runner → apple/runner}/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+SynthesizedGesturePolicy.swift +1 -1
  26. package/dist/{apple-runner → apple/runner}/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+SystemModal.swift +43 -35
  27. package/dist/{apple-runner → apple/runner}/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+TextEntry.swift +1 -1
  28. package/dist/{apple-runner → apple/runner}/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests.swift +16 -1
  29. package/dist/src/agent-browser-tool.js +1 -1
  30. package/dist/src/agent-device-client.js +3 -0
  31. package/dist/src/android-adb.d.ts +1 -1
  32. package/dist/src/android-adb.js +1 -1
  33. package/dist/src/android-input-method-overlays.js +1 -0
  34. package/dist/src/android-input-ownership.js +1 -6
  35. package/dist/src/android-system-chrome.js +1 -0
  36. package/dist/src/android.js +1 -1
  37. package/dist/src/app-lifecycle.js +5 -5
  38. package/dist/src/app-log-request-scope.js +1 -0
  39. package/dist/src/app-resolution.js +1 -0
  40. package/dist/src/apple-multitouch-support.js +1 -0
  41. package/dist/src/apps.js +5 -5
  42. package/dist/src/boot-diagnostics.js +2 -0
  43. package/dist/src/cli-config.js +1 -0
  44. package/dist/src/cli-help.js +131 -40
  45. package/dist/src/cli-runner.js +1 -1
  46. package/dist/src/cli.js +15 -11
  47. package/dist/src/command-metadata.js +1 -1
  48. package/dist/src/command-schema.js +3 -3
  49. package/dist/src/compatibility-policy.js +1 -0
  50. package/dist/src/context.js +1 -0
  51. package/dist/src/contracts.d.ts +2 -2
  52. package/dist/src/debug-symbols.js +1 -1
  53. package/dist/src/device-input-state.js +1 -1
  54. package/dist/src/devices2.js +1 -1
  55. package/dist/src/devices4.js +1 -0
  56. package/dist/src/find.js +1 -1
  57. package/dist/src/finders.js +1 -1
  58. package/dist/src/generic.js +1 -1
  59. package/dist/src/helper.js +1 -1
  60. package/dist/src/index.d.ts +533 -279
  61. package/dist/src/index.js +1 -1
  62. package/dist/src/input-actions.js +4 -3
  63. package/dist/src/install-artifact.js +1 -0
  64. package/dist/src/install-source.d.ts +5 -1
  65. package/dist/src/install-source.js +1 -1
  66. package/dist/src/install-source2.js +1 -1
  67. package/dist/src/interaction-snapshot.js +1 -1
  68. package/dist/src/interaction.d.ts +230 -0
  69. package/dist/src/interaction.js +1 -1
  70. package/dist/src/interactor.js +2 -2
  71. package/dist/src/interactor2.js +1 -0
  72. package/dist/src/internal/bin.js +1 -1
  73. package/dist/src/internal/daemon.js +42 -20
  74. package/dist/src/internal/png-worker.d.ts +22 -0
  75. package/dist/src/internal/png-worker.js +1 -1
  76. package/dist/src/launch-console.js +1 -0
  77. package/dist/src/lease-context.js +1 -0
  78. package/dist/src/lease.js +1 -1
  79. package/dist/src/linux.js +1 -1
  80. package/dist/src/logcat.js +5 -0
  81. package/dist/src/method-scope.js +1 -0
  82. package/dist/src/metro-types.d.ts +52 -0
  83. package/dist/src/metro.d.ts +3 -3
  84. package/dist/src/notifications.js +1 -1
  85. package/dist/src/png-worker-contract.js +1 -1
  86. package/dist/src/process-lock.js +1 -0
  87. package/dist/src/react-native.js +1 -1
  88. package/dist/src/record-trace.js +1 -1
  89. package/dist/src/recording-export-quality.js +15 -0
  90. package/dist/src/register-builtins.js +1 -0
  91. package/dist/src/registry.js +24 -24
  92. package/dist/src/remote-config.d.ts +1 -1
  93. package/dist/src/reporting.js +8 -7
  94. package/dist/src/runner-client.js +1 -1
  95. package/dist/src/runner-disposal.js +2 -0
  96. package/dist/src/runner-lease.js +1 -0
  97. package/dist/src/runner-provider.js +1 -1
  98. package/dist/src/runner-sequence.js +1 -1
  99. package/dist/src/runtime.js +3 -3
  100. package/dist/src/runtime2.js +1 -0
  101. package/dist/src/sdk-android-adb.d.ts +97 -33
  102. package/dist/src/sdk-android-adb.js +4 -4
  103. package/dist/src/sdk-batch-runner.d.ts +2 -1
  104. package/dist/src/sdk-batch-runner.js +3 -2
  105. package/dist/src/sdk-contracts.d.ts +70 -149
  106. package/dist/src/sdk-contracts.js +1 -1
  107. package/dist/src/sdk-device.js +1 -1
  108. package/dist/src/sdk-finders.d.ts +5 -4
  109. package/dist/src/sdk-finders.js +1 -1
  110. package/dist/src/sdk-io.d.ts +1 -1
  111. package/dist/src/sdk-remote-config.d.ts +19 -96
  112. package/dist/src/sdk-remote-config.js +1 -1
  113. package/dist/src/sdk-selectors.js +1 -1
  114. package/dist/src/selector-runtime.js +1 -1
  115. package/dist/src/selector-vocabulary.js +1 -0
  116. package/dist/src/selectors.d.ts +12 -3
  117. package/dist/src/selectors.js +1 -1
  118. package/dist/src/server.js +3 -3
  119. package/dist/src/session-target-evidence.js +1 -0
  120. package/dist/src/session.js +8 -10
  121. package/dist/src/simctl.js +1 -1
  122. package/dist/src/simulator.js +1 -1
  123. package/dist/src/snapshot-diagnostics.js +5 -2
  124. package/dist/src/snapshot-quality.js +1 -1
  125. package/dist/src/snapshot.js +1 -1
  126. package/dist/src/snapshot2.js +1 -2
  127. package/dist/src/tool-provider3.js +1 -0
  128. package/dist/src/unsupported-interactor.js +1 -0
  129. package/dist/src/url.js +1 -1
  130. package/dist/src/web.js +1 -1
  131. package/package.json +34 -27
  132. package/server.json +2 -2
  133. package/skills/agent-device/SKILL.md +5 -3
  134. package/android-multitouch-helper/dist/agent-device-android-multitouch-helper-0.19.3.apk +0 -0
  135. package/android-multitouch-helper/dist/agent-device-android-multitouch-helper-0.19.3.apk.sha256 +0 -1
  136. package/android-multitouch-helper/dist/agent-device-android-multitouch-helper-0.19.3.manifest.json +0 -10
  137. package/android-snapshot-helper/dist/agent-device-android-snapshot-helper-0.19.3.apk +0 -0
  138. package/android-snapshot-helper/dist/agent-device-android-snapshot-helper-0.19.3.apk.sha256 +0 -1
  139. package/dist/src/apple-runner-options.js +0 -1
  140. package/dist/src/cli-output.js +0 -1
  141. package/dist/src/client.js +0 -3
  142. package/dist/src/handler-utils.js +0 -1
  143. package/dist/src/output-path.js +0 -1
  144. package/dist/src/points.js +0 -4
  145. package/dist/src/provider.js +0 -1
  146. package/dist/src/providers.js +0 -1
  147. package/dist/src/record-trace-recording.js +0 -23
  148. package/dist/src/recording-provider.js +0 -1
  149. package/dist/src/sdk-batch.js +0 -2
  150. package/dist/src/selectors2.js +0 -1
  151. package/dist/src/ttl-memo.js +0 -1
  152. package/dist/src/tv-remote.js +0 -14
  153. package/dist/src/xml.js +0 -2
  154. /package/{macos-helper → apple/macos-helper}/Package.swift +0 -0
  155. /package/{macos-helper → apple/macos-helper}/Sources/AgentDeviceMacOSHelper/AudioProbe.swift +0 -0
  156. /package/{macos-helper → apple/macos-helper}/Sources/AgentDeviceMacOSHelper/SnapshotTraversal.swift +0 -0
  157. /package/{macos-helper → apple/macos-helper}/Sources/AgentDeviceMacOSHelper/main.swift +0 -0
  158. /package/dist/{apple-runner → apple/runner}/AgentDeviceRunner/AgentDeviceRunner/AgentDeviceRunnerApp.m +0 -0
  159. /package/dist/{apple-runner → apple/runner}/AgentDeviceRunner/AgentDeviceRunner.xcodeproj/project.pbxproj +0 -0
  160. /package/dist/{apple-runner → apple/runner}/AgentDeviceRunner/AgentDeviceRunner.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -0
  161. /package/dist/{apple-runner → apple/runner}/AgentDeviceRunner/AgentDeviceRunner.xcodeproj/xcshareddata/xcschemes/AgentDeviceRunner.xcscheme +0 -0
  162. /package/dist/{apple-runner → apple/runner}/AgentDeviceRunner/AgentDeviceRunnerUITests/AgentDeviceRunnerUITests-Bridging-Header.h +0 -0
  163. /package/dist/{apple-runner → apple/runner}/AgentDeviceRunner/AgentDeviceRunnerUITests/AgentDeviceRunnerUITests.entitlements +0 -0
  164. /package/dist/{apple-runner → apple/runner}/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerObjCExceptionCatcher.h +0 -0
  165. /package/dist/{apple-runner → apple/runner}/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerObjCExceptionCatcher.m +0 -0
  166. /package/dist/{apple-runner → apple/runner}/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTapPointPolicy.swift +0 -0
  167. /package/dist/{apple-runner → apple/runner}/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+AXSnapshotFallback.swift +0 -0
  168. /package/dist/{apple-runner → apple/runner}/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Environment.swift +0 -0
  169. /package/dist/{apple-runner → apple/runner}/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Exceptions.swift +0 -0
  170. /package/dist/{apple-runner → apple/runner}/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+FlatSnapshotFiltering.swift +0 -0
  171. /package/dist/{apple-runner → apple/runner}/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Navigation.swift +0 -0
  172. /package/dist/{apple-runner → apple/runner}/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+ScreenRecorder.swift +0 -0
  173. /package/dist/{apple-runner → apple/runner}/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Transport.swift +0 -0
  174. /package/dist/{apple-runner → apple/runner}/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+TvRemote.swift +0 -0
  175. /package/dist/{apple-runner → apple/runner}/AgentDeviceRunner/AgentDeviceRunnerUITests.xctestplan +0 -0
  176. /package/dist/{apple-runner → apple/runner}/AgentDeviceRunner/RecordingScripts/recording-overlay.swift +0 -0
  177. /package/dist/{apple-runner → apple/runner}/AgentDeviceRunner/RecordingScripts/recording-resize.swift +0 -0
  178. /package/dist/{apple-runner → apple/runner}/AgentDeviceRunner/RecordingScripts/recording-trim.swift +0 -0
  179. /package/{src/platforms/linux → linux}/atspi-dump.py +0 -0
@@ -1,22 +1,19 @@
1
- import { A as AppError, B as PlatformSelector, C as SnapshotQualityVerdict, D as centerOfRect, E as SnapshotVisibility, I as AppleOS, L as DeviceKind, N as isAgentDeviceError, O as DebugSymbolsOptions, P as normalizeAgentDeviceError, R as DeviceTarget, S as SnapshotNode, T as SnapshotUnchanged, V as PublicPlatform, _ as ResponseLevel, a as DaemonRequest, b as Point, g as NetworkIncludeMode, i as DaemonLockPolicy, j as NormalizedError, k as DebugSymbolsResult, o as DaemonResponse, p as LeaseBackend, r as DaemonInstallSource, s as DaemonResponseData, t as DaemonArtifactType, v as SessionIsolationMode, x as ScreenshotOverlayRef, y as SessionRuntimeHints } from "./sdk-contracts.js";
1
+ import { C as normalizeAgentDeviceError, D as ScreenshotOverlayRef, F as DeviceKind, I as DeviceTarget, M as SnapshotVisibility, N as centerOfRect, O as SnapshotNode, P as AppleOS, R as PlatformSelector, S as isAgentDeviceError, _ as SessionIsolationMode, a as DaemonLockPolicy, b as NormalizedError, c as DaemonResponseData, g as ResponseLevel, i as DaemonInstallSource, j as SnapshotUnchanged, k as SnapshotQualityVerdict, m as NetworkIncludeMode, n as DaemonArtifactType, o as DaemonRequest, p as LeaseBackend, r as DaemonError, s as DaemonResponse, t as DaemonArtifact, v as SessionRuntimeHints, y as AppError, z as PublicPlatform } from "./sdk-contracts.js";
2
+ import { a as GesturePointerCount, c as SwipePreset, d as AndroidSnapshotHelperInstallReason, f as AndroidSnapshotHelperTransport, l as TransformGestureParams, o as ScrollDirection, s as SwipePattern, u as AndroidSnapshotCaptureMode } from "./sdk-android-adb.js";
2
3
  import { t as AppsFilter } from "./sdk-app-inventory.js";
3
4
  import { t as BatchRunResult } from "./sdk-batch-runner.js";
4
5
  import { r as FindLocator } from "./sdk-finders.js";
6
+ import { a as LongPressCommandResponseData, i as FindCommandResponseData, o as PressCommandResponseData, r as FillCommandResponseData, s as ClickButton, t as ClickCommandResponseData } from "./interaction.js";
5
7
  import { p as createLocalArtifactAdapter } from "./sdk-io.js";
6
- import { a as PrepareMetroRuntimeResult, c as MetroBridgeScope, i as MetroPrepareKind, o as ReloadMetroResult, r as RemoteConnectionProfileFields, t as CloudProviderProfileFields } from "./sdk-remote-config.js";
7
- //#region src/platforms/android/snapshot-helper-types.d.ts
8
- type AndroidSnapshotHelperTransport = 'instrumentation' | 'persistent-session';
9
- type AndroidSnapshotCaptureMode = 'interactive-windows' | 'active-window';
10
- type AndroidSnapshotHelperInstallReason = 'missing' | 'outdated' | 'forced' | 'current' | 'skipped';
11
- //#endregion
8
+ import { i as MetroPrepareKind, n as RemoteConnectionProfileFields, r as CloudProviderProfileFields } from "./sdk-remote-config.js";
9
+ import { n as MetroBridgeResult, r as MetroRuntimeHints } from "./metro-types.js";
12
10
  //#region src/platforms/android/snapshot-types.d.ts
13
11
  type AndroidSnapshotBackendMetadata = {
14
- backend: 'android-helper' | 'uiautomator-dump';
12
+ backend: 'android-helper';
15
13
  helperVersion?: string;
16
14
  helperApiVersion?: string;
17
15
  helperTransport?: AndroidSnapshotHelperTransport;
18
16
  helperSessionReused?: boolean;
19
- fallbackReason?: string;
20
17
  installReason?: AndroidSnapshotHelperInstallReason;
21
18
  waitForIdleTimeoutMs?: number;
22
19
  waitForIdleQuietMs?: number;
@@ -25,13 +22,14 @@ type AndroidSnapshotBackendMetadata = {
25
22
  maxNodes?: number;
26
23
  rootPresent?: boolean;
27
24
  captureMode?: AndroidSnapshotCaptureMode;
25
+ systemSurfaceOnly?: boolean;
28
26
  windowCount?: number;
29
27
  nodeCount?: number;
30
28
  helperTruncated?: boolean;
31
29
  elapsedMs?: number;
32
30
  };
33
31
  //#endregion
34
- //#region src/snapshot-capture-annotations.d.ts
32
+ //#region src/contracts/snapshot-capture-annotations.d.ts
35
33
  type SnapshotCaptureAnalysis = {
36
34
  rawNodeCount: number;
37
35
  maxDepth: number;
@@ -53,7 +51,7 @@ type PublicSnapshotCaptureAnnotations = Pick<SnapshotCaptureAnnotations, 'androi
53
51
  snapshotQuality?: SnapshotQualityVerdict;
54
52
  };
55
53
  //#endregion
56
- //#region src/snapshot-diagnostics.d.ts
54
+ //#region src/contracts/snapshot-diagnostics.d.ts
57
55
  type SnapshotTimingStats = {
58
56
  count: number;
59
57
  p50Ms: number;
@@ -68,90 +66,128 @@ type SnapshotDiagnosticsSummary = {
68
66
  warning?: string;
69
67
  };
70
68
  //#endregion
71
- //#region src/core/back-mode.d.ts
69
+ //#region src/contracts/back-mode.d.ts
72
70
  declare const BACK_MODES: readonly ['in-app', 'system'];
73
71
  type BackMode = (typeof BACK_MODES)[number];
74
72
  //#endregion
75
- //#region src/core/click-button.d.ts
76
- declare const CLICK_BUTTONS: readonly ['primary', 'secondary', 'middle'];
77
- type ClickButton = (typeof CLICK_BUTTONS)[number];
78
- //#endregion
79
- //#region src/core/recording-export-quality.d.ts
80
- declare const RECORDING_EXPORT_QUALITIES: readonly ['medium', 'high'];
81
- type RecordingExportQuality = (typeof RECORDING_EXPORT_QUALITIES)[number];
82
- //#endregion
83
- //#region src/core/recording-scope.d.ts
84
- declare const RECORDING_SCOPE_VALUES: readonly ['app', 'device', 'system'];
85
- type RecordingScope = (typeof RECORDING_SCOPE_VALUES)[number];
86
- //#endregion
87
- //#region src/core/device-rotation.d.ts
73
+ //#region src/contracts/device-rotation.d.ts
88
74
  declare const DEVICE_ROTATIONS: readonly ['portrait', 'portrait-upside-down', 'landscape-left', 'landscape-right'];
89
75
  type DeviceRotation = (typeof DEVICE_ROTATIONS)[number];
90
76
  //#endregion
91
- //#region src/core/tv-remote.d.ts
77
+ //#region src/contracts/tv-remote.d.ts
92
78
  declare const TV_REMOTE_BUTTON_DEFINITIONS: {
93
79
  readonly up: {
94
80
  readonly aliases: readonly [];
95
81
  readonly androidKeyevent: 'KEYCODE_DPAD_UP';
96
82
  readonly appleRemoteButton: 'up';
83
+ readonly vegaKey: 'KEY_UP';
97
84
  };
98
85
  readonly down: {
99
86
  readonly aliases: readonly [];
100
87
  readonly androidKeyevent: 'KEYCODE_DPAD_DOWN';
101
88
  readonly appleRemoteButton: 'down';
89
+ readonly vegaKey: 'KEY_DOWN';
102
90
  };
103
91
  readonly left: {
104
92
  readonly aliases: readonly [];
105
93
  readonly androidKeyevent: 'KEYCODE_DPAD_LEFT';
106
94
  readonly appleRemoteButton: 'left';
95
+ readonly vegaKey: 'KEY_LEFT';
107
96
  };
108
97
  readonly right: {
109
98
  readonly aliases: readonly [];
110
99
  readonly androidKeyevent: 'KEYCODE_DPAD_RIGHT';
111
100
  readonly appleRemoteButton: 'right';
101
+ readonly vegaKey: 'KEY_RIGHT';
112
102
  };
113
103
  readonly select: {
114
104
  readonly aliases: readonly ["ok", "center", "enter"];
115
105
  readonly androidKeyevent: 'KEYCODE_DPAD_CENTER';
116
106
  readonly appleRemoteButton: 'select';
107
+ readonly vegaKey: 'KEY_ENTER';
117
108
  };
118
109
  readonly menu: {
119
110
  readonly aliases: readonly [];
120
111
  readonly androidKeyevent: 'KEYCODE_MENU';
121
112
  readonly appleRemoteButton: 'menu';
113
+ readonly vegaKey: 'KEY_MENU';
122
114
  };
123
115
  readonly home: {
124
116
  readonly aliases: readonly [];
125
117
  readonly androidKeyevent: 'KEYCODE_HOME';
126
118
  readonly appleRemoteButton: 'home';
119
+ readonly vegaKey: 'KEY_HOMEPAGE';
127
120
  };
128
121
  readonly back: {
129
122
  readonly aliases: readonly [];
130
123
  readonly androidKeyevent: 'KEYCODE_BACK';
131
124
  readonly appleRemoteButton: 'menu';
125
+ readonly vegaKey: 'KEY_BACK';
132
126
  };
133
127
  };
134
128
  declare const TV_REMOTE_BUTTONS: (keyof typeof TV_REMOTE_BUTTON_DEFINITIONS)[];
135
129
  type TvRemoteButton = (typeof TV_REMOTE_BUTTONS)[number];
136
130
  //#endregion
137
- //#region src/core/scroll-gesture.d.ts
138
- declare const SCROLL_DIRECTIONS: readonly ['up', 'down', 'left', 'right'];
139
- type ScrollDirection = (typeof SCROLL_DIRECTIONS)[number];
140
- declare const SWIPE_PRESETS: readonly ['left', 'right', 'left-edge', 'right-edge'];
141
- type SwipePreset = (typeof SWIPE_PRESETS)[number];
142
- declare const SWIPE_PATTERNS: readonly ['one-way', 'ping-pong'];
143
- type SwipePattern = (typeof SWIPE_PATTERNS)[number];
144
- type TransformGestureParams = {
145
- x: number;
146
- y: number;
147
- dx: number;
148
- dy: number;
149
- scale: number;
150
- degrees: number;
131
+ //#region src/contracts/navigation.d.ts
132
+ /**
133
+ * Closed results of the navigation/global action commands. Each mirrors the
134
+ * dispatch handler's literal return EXACTLY (src/core/dispatch.ts
135
+ * `DISPATCH_HANDLERS`): a fixed `action` discriminant plus the always-present
136
+ * `successText` message (the handlers always pass a non-empty message, so it is
137
+ * required here). The handlers spread nothing else, so the shapes are closed —
138
+ * consistent with the `viewport` contract, the generic-dispatch Android
139
+ * dialog-recovery `warning` annotation is intentionally not part of the contract.
140
+ */
141
+ /** `home` — `{ action: 'home', message: 'Home' }`. */
142
+ type HomeCommandResult = {
143
+ action: 'home';
144
+ message: string;
145
+ };
146
+ /** `back` — `{ action: 'back', mode, message: 'Back' }`; `mode` defaults to `'in-app'`. */
147
+ type BackCommandResult = {
148
+ action: 'back';
149
+ mode: BackMode;
150
+ message: string;
151
+ };
152
+ /** `orientation` — `{ action: 'orientation', orientation, message: 'Rotated to <orientation>' }`. */
153
+ type OrientationCommandResult = {
154
+ action: 'orientation';
155
+ orientation: DeviceRotation;
156
+ message: string;
157
+ };
158
+ /**
159
+ * @deprecated The `rotate` command was renamed to `orientation`. This is the
160
+ * legacy response contract (`action: 'rotate'`) that shipped in v0.18/v0.19,
161
+ * retained for existing SDK consumers until the next major version. New code
162
+ * should use {@link OrientationCommandResult}.
163
+ */
164
+ type RotateCommandResult = {
165
+ action: 'rotate';
166
+ orientation: DeviceRotation;
167
+ message: string;
168
+ };
169
+ /** `app-switcher` — `{ action: 'app-switcher', message: 'Opened app switcher' }`. */
170
+ type AppSwitcherCommandResult = {
171
+ action: 'app-switcher';
172
+ message: string;
173
+ };
174
+ /** `tv-remote` — `{ action: 'tv-remote', button, durationMs?, message }`. */
175
+ type TvRemoteCommandResult = {
176
+ action: 'tv-remote';
177
+ button: TvRemoteButton;
151
178
  durationMs?: number;
179
+ message: string;
152
180
  };
153
181
  //#endregion
154
- //#region src/alert-contract.d.ts
182
+ //#region src/contracts/recording-export-quality.d.ts
183
+ declare const RECORDING_EXPORT_QUALITIES: readonly ['medium', 'high'];
184
+ type RecordingExportQuality = (typeof RECORDING_EXPORT_QUALITIES)[number];
185
+ //#endregion
186
+ //#region src/contracts/recording-scope.d.ts
187
+ declare const RECORDING_SCOPE_VALUES: readonly ['app', 'device', 'system'];
188
+ type RecordingScope = (typeof RECORDING_SCOPE_VALUES)[number];
189
+ //#endregion
190
+ //#region src/contracts/alert-contract.d.ts
155
191
  declare const ALERT_ACTIONS: readonly ['get', 'accept', 'dismiss', 'wait'];
156
192
  type AlertAction = (typeof ALERT_ACTIONS)[number];
157
193
  //#endregion
@@ -162,7 +198,27 @@ type JsonObject = {
162
198
  [key: string]: JsonValue;
163
199
  };
164
200
  //#endregion
165
- //#region src/core/session-surface.d.ts
201
+ //#region src/commands/command-contract.d.ts
202
+ type JsonSchema = {
203
+ type?: string | readonly string[];
204
+ description?: string;
205
+ properties?: Record<string, JsonSchema>;
206
+ required?: readonly string[];
207
+ additionalProperties?: boolean | JsonSchema;
208
+ items?: JsonSchema;
209
+ prefixItems?: readonly JsonSchema[];
210
+ oneOf?: readonly JsonSchema[];
211
+ enum?: readonly unknown[];
212
+ const?: unknown;
213
+ minimum?: number;
214
+ maximum?: number;
215
+ };
216
+ type ExecutableCommandProjection<ClientMethod extends string = string> = {
217
+ clientMethod: ClientMethod;
218
+ outputSchema: JsonSchema;
219
+ };
220
+ //#endregion
221
+ //#region src/contracts/session-surface.d.ts
166
222
  declare const SESSION_SURFACES: readonly ['app', 'frontmost-app', 'desktop', 'menubar'];
167
223
  type SessionSurface = (typeof SESSION_SURFACES)[number];
168
224
  //#endregion
@@ -177,166 +233,82 @@ type ScreenshotResultData = {
177
233
  overlayRefs?: ScreenshotOverlayRef[];
178
234
  };
179
235
  //#endregion
180
- //#region src/contracts/interaction.d.ts
181
- type ResolvedTarget = {
182
- kind: 'selector';
183
- selector: string;
184
- } | {
185
- kind: 'ref';
186
- ref: string;
187
- };
188
- type ResolvedInteractionTarget = {
189
- kind: 'point';
190
- point: Point;
191
- preActionNodes?: SnapshotNode[];
192
- } | {
193
- kind: 'ref';
194
- point?: Point;
195
- target: Extract<ResolvedTarget, {
196
- kind: 'ref';
197
- }>;
198
- node?: SnapshotNode;
199
- selectorChain?: string[];
200
- refLabel?: string;
201
- targetHittable?: boolean;
202
- hint?: string;
203
- preActionNodes?: SnapshotNode[];
204
- } | {
205
- kind: 'selector';
206
- point: Point;
207
- target: Extract<ResolvedTarget, {
208
- kind: 'selector';
209
- }>;
210
- node: SnapshotNode;
211
- selectorChain: string[];
212
- refLabel?: string;
213
- targetHittable?: boolean;
214
- hint?: string;
215
- preActionNodes?: SnapshotNode[];
216
- };
217
- /**
218
- * Opt-in (`--verify`) cheap post-condition evidence for mutating interaction
219
- * commands (#1047). `digest`/`nodeCount`/`interactiveNodeCount` describe a single
220
- * interactive-only capture taken right after the action; `changedFromBefore`
221
- * compares that digest against the pre-action capture the resolution path already
222
- * held, so no extra device round trip is spent beyond the one verify capture.
223
- * `changedFromBefore: false` is evidence, not failure — the command still
224
- * succeeded.
225
- */
226
- type InteractionEvidence = {
227
- foregroundApp?: string;
228
- nodeCount: number;
229
- interactiveNodeCount: number;
230
- digest: string;
231
- changedFromBefore: boolean;
232
- };
233
- type SettleDiffLine = {
234
- kind: 'added' | 'removed';
235
- text: string;
236
- /**
237
- * Plain ref body (`e12`) for ADDED lines: minted from the settled tree that
238
- * became the stored session snapshot, so it is immediately actionable and
239
- * lets the MCP layer pin it at `refsGeneration`. Removed lines never carry
240
- * one — their refs name nodes of the replaced tree.
241
- */
242
- ref?: string;
243
- };
244
- /**
245
- * One still-present, actionable element on the settled tree, surfaced by the
246
- * unchanged-interactive tail (see `SettleObservation.tail`).
247
- */
248
- type SettleTailEntry = {
249
- ref: string;
250
- role: string;
251
- label?: string;
252
- };
253
- type SettleObservation = {
254
- settled: boolean;
255
- waitedMs: number;
256
- captures: number;
257
- quietMs: number;
258
- timeoutMs: number;
259
- /**
260
- * The session's snapshot generation after the settled tree became the stored
261
- * snapshot (#1076 versioned refs). Attached by the daemon response layer
262
- * when `diff` is present: added lines carry refs minted from that tree, so
263
- * the response is ref-issuing — the MCP layer merges per-ref pins from it
264
- * exactly like snapshot/find responses.
265
- */
266
- refsGeneration?: number;
267
- /**
268
- * Digest response view only: capped added-line refs preserved without the
269
- * verbose diff line text, so MCP can still pin refs when `diff.lines` is
270
- * intentionally omitted.
271
- */
272
- refs?: Array<{
273
- ref: string;
274
- }>;
275
- /** Present only for `settled: true` observations that stored the settled tree. */
276
- diff?: {
277
- summary: {
278
- additions: number;
279
- removals: number;
280
- unchanged: number;
281
- };
282
- lines: SettleDiffLine[];
283
- /** Present (true) when lines were capped to the response bound. */
284
- truncated?: boolean;
285
- };
286
- /**
287
- * Unchanged interactive refs tail: benchmarks (July 2026) showed 27% of
288
- * `--settle` actions were followed by a fallback `snapshot -i` because a
289
- * change-only diff omits refs for elements that did not change — after a
290
- * modal dismiss the diff shows only removals, and the next button to press
291
- * (already on screen, untouched) is absent from the response. `tail` lists
292
- * the settled tree's remaining uncovered interactive elements (excluding
293
- * structural application/window chrome and the keyboard window's chrome)
294
- * so the response stays actionable without that extra round trip. Attached
295
- * ONLY when `diff` carries zero added-line refs naming a NEW target (the
296
- * modal-dismiss/toast-only/fill signature) — a diff whose added refs hand
297
- * the next target already pays its way, so the tail would be pure byte
298
- * cost. Keyboard-chrome refs and self-echo refs (added lines whose node
299
- * contains the action point: the acted-on element re-describing itself,
300
- * e.g. a filled field re-labeled with its new value) do not count as new
301
- * targets. Refs already present on `diff`'s added lines are excluded.
302
- * Capped; `tailTruncated` marks when candidates exceeded the cap.
303
- */
304
- tail?: SettleTailEntry[];
305
- tailTruncated?: true;
306
- hint?: string;
307
- };
308
- type PressCommandResult = ResolvedInteractionTarget & {
309
- backendResult?: Record<string, unknown>;
310
- message?: string;
311
- warning?: string;
312
- evidence?: InteractionEvidence;
313
- settle?: SettleObservation;
314
- };
315
- type FillCommandResult = ResolvedInteractionTarget & {
316
- text: string;
317
- warning?: string;
318
- backendResult?: Record<string, unknown>;
319
- message?: string;
320
- evidence?: InteractionEvidence;
321
- settle?: SettleObservation;
322
- };
323
- type LongPressCommandResult = ResolvedInteractionTarget & {
324
- durationMs?: number;
325
- backendResult?: Record<string, unknown>;
326
- message?: string;
327
- warning?: string;
328
- settle?: SettleObservation;
329
- };
330
- //#endregion
331
236
  //#region src/commands/interaction/runtime/gestures.d.ts
332
237
  declare const SCROLL_INPUT_DIRECTIONS: readonly ['up', 'down', 'left', 'right', 'top', 'bottom'];
333
238
  type ScrollInputDirection = (typeof SCROLL_INPUT_DIRECTIONS)[number];
334
239
  //#endregion
240
+ //#region src/commands/system/navigation-projection.d.ts
241
+ declare const navigationCommandProjectionType: unique symbol;
242
+ type NavigationCommandProjection<Options, Result, Required extends boolean, ClientMethod extends string> = ExecutableCommandProjection<ClientMethod> & {
243
+ readonly [navigationCommandProjectionType]?: {
244
+ options: Options;
245
+ result: Result;
246
+ required: Required;
247
+ };
248
+ };
249
+ declare const NAVIGATION_COMMAND_PROJECTIONS: {
250
+ readonly back: NavigationCommandProjection<{
251
+ mode?: BackMode;
252
+ }, BackCommandResult, false, "back">;
253
+ readonly home: NavigationCommandProjection<{}, HomeCommandResult, false, "home">;
254
+ readonly orientation: NavigationCommandProjection<{
255
+ orientation: DeviceRotation;
256
+ }, OrientationCommandResult, true, "orientation">;
257
+ readonly 'app-switcher': NavigationCommandProjection<{}, AppSwitcherCommandResult, false, "appSwitcher">;
258
+ readonly 'tv-remote': NavigationCommandProjection<{
259
+ button: TvRemoteButton;
260
+ durationMs?: number;
261
+ }, TvRemoteCommandResult, true, "tvRemote">;
262
+ };
263
+ type NavigationCommandName = keyof typeof NAVIGATION_COMMAND_PROJECTIONS;
264
+ type NavigationCommandOptions<Name extends NavigationCommandName> = (typeof NAVIGATION_COMMAND_PROJECTIONS)[Name] extends NavigationCommandProjection<infer Options, unknown, boolean, string> ? Options : never;
265
+ type ProjectedNavigationCommandMethod<BaseOptions, Projection> = Projection extends NavigationCommandProjection<infer Options, infer Result, infer Required, string> ? Required extends true ? (options: BaseOptions & Options) => Promise<Result> : (options?: BaseOptions & Options) => Promise<Result> : never;
266
+ type ProjectedNavigationCommandClient<BaseOptions> = { [Name in NavigationCommandName as (typeof NAVIGATION_COMMAND_PROJECTIONS)[Name]['clientMethod']]: ProjectedNavigationCommandMethod<BaseOptions, (typeof NAVIGATION_COMMAND_PROJECTIONS)[Name]>; };
267
+ //#endregion
335
268
  //#region src/contracts/logs.d.ts
336
269
  declare const LOG_ACTION_VALUES: readonly ['path', 'start', 'stop', 'doctor', 'mark', 'clear'];
337
270
  type LogAction = (typeof LOG_ACTION_VALUES)[number];
338
271
  //#endregion
339
- //#region src/target-shutdown-contract.d.ts
272
+ //#region src/client/client-companion-tunnel-contract.d.ts
273
+ type CompanionTunnelScope = {
274
+ tenantId: string;
275
+ runId: string;
276
+ leaseId: string;
277
+ };
278
+ type MetroBridgeScope = CompanionTunnelScope;
279
+ //#endregion
280
+ //#region src/metro/client-metro.d.ts
281
+ type ResolvedMetroKind = Exclude<MetroPrepareKind, 'auto'>;
282
+ type PrepareMetroRuntimeResult = {
283
+ projectRoot: string;
284
+ kind: ResolvedMetroKind;
285
+ dependenciesInstalled: boolean;
286
+ packageManager: string | null;
287
+ started: boolean;
288
+ reused: boolean;
289
+ pid: number;
290
+ logPath: string;
291
+ statusUrl: string;
292
+ runtimeFilePath: string | null;
293
+ iosRuntime: MetroRuntimeHints;
294
+ androidRuntime: MetroRuntimeHints;
295
+ bridge: MetroBridgeResult | null;
296
+ };
297
+ /**
298
+ * `transport` says which channel delivered the reload: `http` for the classic GET /reload route,
299
+ * `message-socket` for the /message websocket broadcast used when the server has no HTTP reload
300
+ * route (Expo). `status`/`body` always describe the HTTP probe; on the websocket path `reloadUrl`
301
+ * is the ws(s) message-socket URL.
302
+ */
303
+ type ReloadMetroResult = {
304
+ reloaded: true;
305
+ reloadUrl: string;
306
+ status: number;
307
+ body: string;
308
+ transport: 'http' | 'message-socket';
309
+ };
310
+ //#endregion
311
+ //#region src/contracts/target-shutdown-contract.d.ts
340
312
  type TargetShutdownResult = {
341
313
  success: boolean;
342
314
  exitCode: number;
@@ -355,6 +327,55 @@ type PerfAction = (typeof PERF_ACTION_VALUES)[number];
355
327
  type PerfSubject = (typeof PERF_SUBJECT_VALUES)[number];
356
328
  type PerfKind = (typeof PERF_KIND_VALUES)[number];
357
329
  //#endregion
330
+ //#region src/contracts/debug-symbols.d.ts
331
+ type DebugSymbolsOptions = {
332
+ action?: 'symbols';
333
+ artifact: string;
334
+ dsym?: string;
335
+ searchPath?: string;
336
+ out?: string;
337
+ cwd?: string;
338
+ };
339
+ type DebugSymbolsImage = {
340
+ name: string;
341
+ uuid: string;
342
+ arch?: string;
343
+ dsymPath: string;
344
+ binaryPath: string;
345
+ };
346
+ type DebugSymbolsCrashFrame = {
347
+ index: number;
348
+ image: string;
349
+ address: string;
350
+ symbol?: string;
351
+ };
352
+ type DebugSymbolsCrashSummary = {
353
+ format: 'ips' | 'text';
354
+ appName?: string;
355
+ bundleId?: string;
356
+ version?: string;
357
+ incident?: string;
358
+ timestamp?: string;
359
+ exceptionType?: string;
360
+ exceptionCodes?: string;
361
+ terminationReason?: string;
362
+ crashedThread?: number;
363
+ topFrames: DebugSymbolsCrashFrame[];
364
+ findings: string[];
365
+ };
366
+ type DebugSymbolsResult = {
367
+ kind: 'debugSymbols';
368
+ platform: 'apple';
369
+ artifactPath: string;
370
+ outPath: string;
371
+ crash: DebugSymbolsCrashSummary;
372
+ matchedImages: DebugSymbolsImage[];
373
+ symbolicatedFrames: number;
374
+ skippedImages: number;
375
+ warnings?: string[];
376
+ message: string;
377
+ };
378
+ //#endregion
358
379
  //#region src/contracts/device.d.ts
359
380
  /**
360
381
  * Closed result of the `boot` command. Mirrors the daemon handler's only
@@ -417,46 +438,6 @@ type ViewportCommandResult = {
417
438
  message: string;
418
439
  };
419
440
  //#endregion
420
- //#region src/contracts/navigation.d.ts
421
- /**
422
- * Closed results of the navigation/global action commands. Each mirrors the
423
- * dispatch handler's literal return EXACTLY (src/core/dispatch.ts
424
- * `DISPATCH_HANDLERS`): a fixed `action` discriminant plus the always-present
425
- * `successText` message (the handlers always pass a non-empty message, so it is
426
- * required here). The handlers spread nothing else, so the shapes are closed —
427
- * consistent with the `viewport` contract, the generic-dispatch Android
428
- * dialog-recovery `warning` annotation is intentionally not part of the contract.
429
- */
430
- /** `home` — `{ action: 'home', message: 'Home' }`. */
431
- type HomeCommandResult = {
432
- action: 'home';
433
- message: string;
434
- };
435
- /** `back` — `{ action: 'back', mode, message: 'Back' }`; `mode` defaults to `'in-app'`. */
436
- type BackCommandResult = {
437
- action: 'back';
438
- mode: BackMode;
439
- message: string;
440
- };
441
- /** `rotate` — `{ action: 'rotate', orientation, message: 'Rotated to <orientation>' }`. */
442
- type RotateCommandResult = {
443
- action: 'rotate';
444
- orientation: DeviceRotation;
445
- message: string;
446
- };
447
- /** `app-switcher` — `{ action: 'app-switcher', message: 'Opened app switcher' }`. */
448
- type AppSwitcherCommandResult = {
449
- action: 'app-switcher';
450
- message: string;
451
- };
452
- /** `tv-remote` — `{ action: 'tv-remote', button, durationMs?, message }`. */
453
- type TvRemoteCommandResult = {
454
- action: 'tv-remote';
455
- button: TvRemoteButton;
456
- durationMs?: number;
457
- message: string;
458
- };
459
- //#endregion
460
441
  //#region src/contracts/clipboard.d.ts
461
442
  /**
462
443
  * Closed result of the `clipboard` command. Mirrors the dispatch handler's
@@ -613,6 +594,180 @@ type TriggerAppEventCommandResult = {
613
594
  message: string;
614
595
  };
615
596
  //#endregion
597
+ //#region src/contracts/doctor.d.ts
598
+ type DoctorStatus = 'pass' | 'warn' | 'fail' | 'info';
599
+ type DoctorKind = 'auto' | 'react-native' | 'expo' | 'repack';
600
+ type DoctorCheck = {
601
+ id: string;
602
+ status: DoctorStatus;
603
+ summary: string;
604
+ hint?: string;
605
+ command?: string;
606
+ evidence?: Record<string, unknown>;
607
+ };
608
+ type DoctorCommandResult = {
609
+ status: DoctorStatus;
610
+ summary: string;
611
+ kind: DoctorKind;
612
+ platform?: PlatformSelector;
613
+ target?: DeviceTarget;
614
+ targetApp?: string;
615
+ metro?: {
616
+ host: string;
617
+ port: number;
618
+ };
619
+ checks: DoctorCheck[];
620
+ };
621
+ //#endregion
622
+ //#region src/snapshot/snapshot-diff.d.ts
623
+ type SnapshotDiffLine = {
624
+ kind: 'added' | 'removed' | 'unchanged';
625
+ text: string;
626
+ /**
627
+ * Plain ref body (`e12`) of the CURRENT-tree node behind an added line.
628
+ * Only populated with `withRefs` (interaction `--settle`, #1101) so the
629
+ * `diff` command's wire shape stays byte-identical. Removed/unchanged lines
630
+ * never carry it: a removed line's ref names a node of the replaced tree.
631
+ */
632
+ ref?: string;
633
+ };
634
+ type SnapshotDiffSummary = {
635
+ additions: number;
636
+ removals: number;
637
+ unchanged: number;
638
+ };
639
+ //#endregion
640
+ //#region src/contracts/diff.d.ts
641
+ type DiffSnapshotCommandResult = {
642
+ mode: 'snapshot';
643
+ baselineInitialized: boolean;
644
+ summary: SnapshotDiffSummary;
645
+ lines: SnapshotDiffLine[];
646
+ warnings?: string[];
647
+ };
648
+ //#endregion
649
+ //#region src/contracts/recording.d.ts
650
+ type RecordingAppIdentity = {
651
+ bundleId: string;
652
+ name?: string;
653
+ };
654
+ type RecordingStartCommandResult = {
655
+ recording: 'started';
656
+ outPath: string;
657
+ sessionStateDir: string;
658
+ recordingBackend?: string;
659
+ recordingScope?: RecordingScope;
660
+ recordOnlySession?: boolean;
661
+ activeSessionApp?: RecordingAppIdentity;
662
+ showTouches: boolean;
663
+ };
664
+ type RecordingStopCommandResult = {
665
+ recording: 'stopped';
666
+ outPath: string;
667
+ telemetryPath?: string;
668
+ artifacts: DaemonArtifact[];
669
+ recordingBackend?: string;
670
+ recordingScope?: RecordingScope;
671
+ recordOnlySession?: boolean;
672
+ activeSessionApp?: RecordingAppIdentity;
673
+ durationMs: number;
674
+ showTouches: boolean;
675
+ warning?: string;
676
+ overlayWarning?: string;
677
+ chunks?: Array<{
678
+ index: number;
679
+ path: string;
680
+ }>;
681
+ };
682
+ type RecordingCommandResult = RecordingStartCommandResult | RecordingStopCommandResult;
683
+ type TraceCommandResult = {
684
+ trace: 'started';
685
+ outPath: string;
686
+ } | {
687
+ trace: 'stopped';
688
+ outPath: string;
689
+ };
690
+ //#endregion
691
+ //#region src/contracts/replay.d.ts
692
+ type ReplayCommandResult = {
693
+ replayed: number;
694
+ healed: number;
695
+ session: string;
696
+ /**
697
+ * True iff `session` still exists in the daemon's session store when the
698
+ * response is built — i.e. the replayed script had no terminal `close`
699
+ * (ADR 0016's consumption contract). The client uses this, not script
700
+ * parsing, to decide whether an owned one-shot daemon must stay alive so
701
+ * the caller can keep addressing this session.
702
+ */
703
+ sessionActive: boolean;
704
+ artifactPaths: string[];
705
+ warnings?: string[];
706
+ snapshotDiagnostics?: SnapshotDiagnosticsSummary;
707
+ message: string;
708
+ };
709
+ type ReplaySuiteTestSkipReason = 'skipped-by-filter';
710
+ type ReplaySuiteAttemptFailure = {
711
+ attempt: number;
712
+ message: string;
713
+ durationMs?: number;
714
+ };
715
+ type ReplaySuiteTestPassed = {
716
+ file: string;
717
+ title?: string;
718
+ session: string;
719
+ status: 'passed';
720
+ durationMs: number;
721
+ finalAttemptDurationMs?: number;
722
+ attempts: number;
723
+ artifactsDir?: string;
724
+ replayed: number;
725
+ healed: number;
726
+ warnings?: string[];
727
+ attemptFailures?: ReplaySuiteAttemptFailure[];
728
+ shardIndex?: number;
729
+ shardCount?: number;
730
+ deviceId?: string;
731
+ deviceName?: string;
732
+ snapshotDiagnostics?: SnapshotDiagnosticsSummary;
733
+ };
734
+ type ReplaySuiteTestFailed = {
735
+ file: string;
736
+ title?: string;
737
+ session: string;
738
+ status: 'failed';
739
+ durationMs: number;
740
+ attempts: number;
741
+ artifactsDir?: string;
742
+ error: DaemonError;
743
+ shardIndex?: number;
744
+ shardCount?: number;
745
+ deviceId?: string;
746
+ deviceName?: string;
747
+ snapshotDiagnostics?: SnapshotDiagnosticsSummary;
748
+ };
749
+ type ReplaySuiteTestSkipped = {
750
+ file: string;
751
+ title?: string;
752
+ status: 'skipped';
753
+ durationMs: 0;
754
+ reason: ReplaySuiteTestSkipReason;
755
+ message: string;
756
+ };
757
+ type ReplaySuiteTestResult = ReplaySuiteTestPassed | ReplaySuiteTestFailed | ReplaySuiteTestSkipped;
758
+ type ReplaySuiteResult = {
759
+ total: number;
760
+ executed: number;
761
+ passed: number;
762
+ failed: number;
763
+ skipped: number;
764
+ notRun: number;
765
+ durationMs: number;
766
+ failures: ReplaySuiteTestFailed[];
767
+ tests: ReplaySuiteTestResult[];
768
+ snapshotDiagnostics?: SnapshotDiagnosticsSummary;
769
+ };
770
+ //#endregion
616
771
  //#region src/core/command-descriptor/command-result.d.ts
617
772
  /**
618
773
  * The additive typed-result spine (ADR-0008, Phase 1 step 6).
@@ -625,8 +780,8 @@ type TriggerAppEventCommandResult = {
625
780
  * invented shape.
626
781
  *
627
782
  * Batches 1-2 wired `boot` / `shutdown` / `viewport` and the navigation/action
628
- * commands `home` / `back` / `rotate` / `app-switcher` alongside the seed
629
- * interaction trio. Batch 3 adds `clipboard` (a closed `read`/`write` union) and
783
+ * commands `home` / `back` / `orientation` / `app-switcher` alongside the seed
784
+ * interaction quartet. Batch 3 adds `clipboard` (a closed `read`/`write` union) and
630
785
  * `appstate` (a closed `platform` union — Apple session state with the iOS-only
631
786
  * device locators, or Android package/activity). Batch 4 adds `keyboard` (a
632
787
  * closed flat shape). Batch 5 adds the compact daemon projections for `wait`,
@@ -634,15 +789,17 @@ type TriggerAppEventCommandResult = {
634
789
  * re-read of the handler's literal return; see the per-type docstrings.
635
790
  */
636
791
  interface CommandResultMap {
637
- press: PressCommandResult;
638
- fill: FillCommandResult;
639
- longpress: LongPressCommandResult;
792
+ press: PressCommandResponseData;
793
+ click: ClickCommandResponseData;
794
+ fill: FillCommandResponseData;
795
+ longpress: LongPressCommandResponseData;
796
+ find: FindCommandResponseData;
640
797
  boot: BootCommandResult;
641
798
  shutdown: ShutdownCommandResult;
642
799
  viewport: ViewportCommandResult;
643
800
  home: HomeCommandResult;
644
801
  back: BackCommandResult;
645
- rotate: RotateCommandResult;
802
+ orientation: OrientationCommandResult;
646
803
  'app-switcher': AppSwitcherCommandResult;
647
804
  clipboard: ClipboardCommandResult;
648
805
  appstate: AppStateCommandResult;
@@ -652,6 +809,12 @@ interface CommandResultMap {
652
809
  prepare: PrepareCommandResult;
653
810
  push: PushCommandResult;
654
811
  'trigger-app-event': TriggerAppEventCommandResult;
812
+ doctor: DoctorCommandResult;
813
+ diff: DiffSnapshotCommandResult;
814
+ replay: ReplayCommandResult;
815
+ test: ReplaySuiteResult;
816
+ record: RecordingCommandResult;
817
+ trace: TraceCommandResult;
655
818
  }
656
819
  /**
657
820
  * The typed result for a command named `N`. Seeded commands resolve to their
@@ -662,7 +825,7 @@ interface CommandResultMap {
662
825
  */
663
826
  type CommandResult<N extends string> = N extends keyof CommandResultMap ? CommandResultMap[N] : Record<string, unknown>;
664
827
  //#endregion
665
- //#region src/cloud-artifacts.d.ts
828
+ //#region src/contracts/cloud-artifacts.d.ts
666
829
  declare const CLOUD_ARTIFACT_KINDS: readonly ['video', 'appium-log', 'device-log', 'automation-log', 'provider-session', 'raw'];
667
830
  type CloudArtifactKind = (typeof CLOUD_ARTIFACT_KINDS)[number];
668
831
  type CloudArtifactAvailability = 'ready' | 'pending' | 'unavailable' | 'expired';
@@ -766,6 +929,9 @@ type AgentDeviceDevice = {
766
929
  android?: {
767
930
  serial: string;
768
931
  };
932
+ vega?: {
933
+ serial: string;
934
+ };
769
935
  };
770
936
  type AgentDeviceCapabilitiesResult = {
771
937
  device: AgentDeviceDevice;
@@ -789,6 +955,9 @@ type AgentDeviceSessionDevice = {
789
955
  android?: {
790
956
  serial: string;
791
957
  };
958
+ vega?: {
959
+ serial: string;
960
+ };
792
961
  };
793
962
  type AgentDeviceSession = {
794
963
  name: string;
@@ -809,6 +978,23 @@ type SessionCloseResult = {
809
978
  session: string;
810
979
  shutdown?: TargetShutdownResult;
811
980
  provider?: CloudProviderSessionResult;
981
+ /**
982
+ * #1258: absolute path of the committed session/healed script when this close
983
+ * published one (`close --save-script`, or a repair-armed session's finalize)
984
+ * — so a client that requested publication learns where the file landed.
985
+ */
986
+ savedScript?: string;
987
+ identifiers: AgentDeviceIdentifiers;
988
+ };
989
+ type SessionSaveScriptOptions = AgentDeviceRequestOverrides & {
990
+ path?: string;
991
+ /** Atomically replace an existing target instead of refusing publication. */
992
+ force?: boolean;
993
+ };
994
+ type SessionSaveScriptResult = {
995
+ session: string;
996
+ savedScript: string;
997
+ actionCount: number;
812
998
  identifiers: AgentDeviceIdentifiers;
813
999
  };
814
1000
  type CloudArtifactsOptions = AgentDeviceRequestOverrides & {
@@ -841,12 +1027,16 @@ type AppOpenOptions = AgentDeviceRequestOverrides & AgentDeviceSelectionOptions
841
1027
  launchArgs?: string[];
842
1028
  relaunch?: boolean;
843
1029
  saveScript?: boolean | string;
1030
+ /** #1258: overwrite an existing --save-script target instead of refusing. Alias: --overwrite. */
1031
+ force?: boolean;
844
1032
  deviceHub?: boolean;
1033
+ testIme?: boolean;
845
1034
  noRecord?: boolean;
846
1035
  runtime?: SessionRuntimeHints;
847
1036
  };
848
1037
  type AppOpenResult = {
849
1038
  session: string;
1039
+ warnings?: string[];
850
1040
  sessionStateDir?: string;
851
1041
  runnerLogPath?: string;
852
1042
  requestLogPath?: string;
@@ -862,11 +1052,20 @@ type AppOpenResult = {
862
1052
  type AppCloseOptions = AgentDeviceRequestOverrides & {
863
1053
  app?: string;
864
1054
  shutdown?: boolean;
1055
+ saveScript?: boolean | string;
1056
+ /** #1258: overwrite an existing --save-script target instead of refusing. Alias: --overwrite. */
1057
+ force?: boolean;
865
1058
  };
866
1059
  type AppCloseResult = {
867
1060
  session: string;
868
1061
  closedApp?: string;
869
1062
  shutdown?: TargetShutdownResult;
1063
+ /**
1064
+ * #1258: absolute path of the committed session/healed script when this close
1065
+ * published one (`close --save-script`, or a repair-armed session's finalize)
1066
+ * — so a client that requested publication learns where the file landed.
1067
+ */
1068
+ savedScript?: string;
870
1069
  identifiers: AgentDeviceIdentifiers;
871
1070
  };
872
1071
  type AppInstallFromSourceOptions = AgentDeviceRequestOverrides & AgentDeviceSelectionOptions & {
@@ -966,6 +1165,13 @@ type CaptureSnapshotOptions = AgentDeviceRequestOverrides & AgentDeviceSelection
966
1165
  raw?: boolean;
967
1166
  forceFull?: boolean;
968
1167
  timeoutMs?: number;
1168
+ /**
1169
+ * #1271 stage 2 (ADR 0012 amendment): `snapshot` is observation-only and
1170
+ * excluded from a repair-armed heal by default; `record` forces it
1171
+ * through. Mutually exclusive with `noRecord`.
1172
+ */
1173
+ noRecord?: boolean;
1174
+ record?: boolean;
969
1175
  };
970
1176
  type CaptureSnapshotResult = {
971
1177
  nodes: SnapshotNode[];
@@ -976,6 +1182,21 @@ type CaptureSnapshotResult = {
976
1182
  unchanged?: SnapshotUnchanged;
977
1183
  snapshotDiagnostics?: SnapshotDiagnosticsSummary;
978
1184
  identifiers: AgentDeviceIdentifiers;
1185
+ /**
1186
+ * ADR 0014: the response-level ref-frame epoch the plain node refs were minted
1187
+ * from. A ref-issuing snapshot carries it ONCE (nodes stay plain `@e12` for the
1188
+ * token budget); pair a ref with it (`@e12~s<refsGeneration>`) before a mutation.
1189
+ */
1190
+ refsGeneration?: number;
1191
+ /**
1192
+ * Digest response view only: a capped list of `{ ref, label? }` pairs taken
1193
+ * from the full `nodes` tree so the MCP layer can still pin refs when the
1194
+ * default-level `nodes` payload is intentionally omitted.
1195
+ */
1196
+ refs?: Array<{
1197
+ ref: string;
1198
+ label?: string;
1199
+ }>;
979
1200
  } & PublicSnapshotCaptureAnnotations;
980
1201
  type CaptureScreenshotOptions = AgentDeviceRequestOverrides & {
981
1202
  path?: string;
@@ -1039,14 +1260,9 @@ type AlertCommandOptions = DeviceCommandBaseOptions & {
1039
1260
  timeoutMs?: number;
1040
1261
  };
1041
1262
  type AppStateCommandOptions = DeviceCommandBaseOptions;
1042
- type BackCommandOptions = DeviceCommandBaseOptions & {
1043
- mode?: BackMode;
1044
- };
1045
- type HomeCommandOptions = DeviceCommandBaseOptions;
1046
- type RotateCommandOptions = DeviceCommandBaseOptions & {
1047
- orientation: DeviceRotation;
1048
- };
1049
- type AppSwitcherCommandOptions = DeviceCommandBaseOptions;
1263
+ type OrientationCommandOptions = DeviceCommandBaseOptions & NavigationCommandOptions<'orientation'>;
1264
+ /** @deprecated Renamed to `OrientationCommandOptions`. Retained until the next major. */
1265
+ type RotateCommandOptions = OrientationCommandOptions;
1050
1266
  type KeyboardCommandOptions = DeviceCommandBaseOptions & {
1051
1267
  action?: 'status' | 'dismiss' | 'enter' | 'return';
1052
1268
  };
@@ -1056,10 +1272,6 @@ type ClipboardCommandOptions = (DeviceCommandBaseOptions & {
1056
1272
  action: 'write';
1057
1273
  text: string;
1058
1274
  });
1059
- type TvRemoteCommandOptions = DeviceCommandBaseOptions & {
1060
- button: TvRemoteButton;
1061
- durationMs?: number;
1062
- };
1063
1275
  type ReactNativeCommandOptions = DeviceCommandBaseOptions & {
1064
1276
  action: 'dismiss-overlay';
1065
1277
  };
@@ -1075,19 +1287,14 @@ type ViewportCommandOptions = DeviceCommandBaseOptions & {
1075
1287
  width: number;
1076
1288
  height: number;
1077
1289
  };
1078
- type AgentDeviceCommandClient = {
1290
+ type NonNavigationCommandClient = {
1079
1291
  wait: (options: WaitCommandOptions) => Promise<CommandResult<'wait'>>;
1080
1292
  alert: (options?: AlertCommandOptions) => Promise<CommandRequestResult>;
1081
1293
  appState: (options?: AppStateCommandOptions) => Promise<CommandResult<'appstate'>>;
1082
- back: (options?: BackCommandOptions) => Promise<CommandResult<'back'>>;
1083
- home: (options?: HomeCommandOptions) => Promise<CommandResult<'home'>>;
1084
- rotate: (options: RotateCommandOptions) => Promise<CommandResult<'rotate'>>;
1085
- appSwitcher: (options?: AppSwitcherCommandOptions) => Promise<CommandResult<'app-switcher'>>;
1086
1294
  keyboard: (options?: KeyboardCommandOptions) => Promise<CommandResult<'keyboard'>>;
1087
1295
  clipboard: (options: ClipboardCommandOptions) => Promise<CommandResult<'clipboard'>>;
1088
- tvRemote: (options: TvRemoteCommandOptions) => Promise<CommandResult<'tv-remote'>>;
1089
1296
  reactNative: (options: ReactNativeCommandOptions) => Promise<CommandRequestResult>;
1090
- doctor: (options?: DoctorCommandOptions) => Promise<CommandRequestResult>;
1297
+ doctor: (options?: DoctorCommandOptions) => Promise<CommandResult<'doctor'>>;
1091
1298
  /**
1092
1299
  * JSON prepare results include timing.additiveParts for additive wall-clock phases.
1093
1300
  * Top-level buildMs/connectMs/healthCheckMs are diagnostics and may overlap.
@@ -1095,6 +1302,15 @@ type AgentDeviceCommandClient = {
1095
1302
  prepare: (options: PrepareCommandOptions) => Promise<CommandResult<'prepare'>>;
1096
1303
  viewport: (options: ViewportCommandOptions) => Promise<CommandResult<'viewport'>>;
1097
1304
  };
1305
+ type AgentDeviceCommandClient = ProjectedNavigationCommandClient<DeviceCommandBaseOptions> & NonNavigationCommandClient & DeprecatedCommandClient;
1306
+ /** Renamed command methods retained for existing consumers until the next major. */
1307
+ type DeprecatedCommandClient = {
1308
+ /**
1309
+ * @deprecated Renamed to `orientation`. Delegates to it and returns the legacy
1310
+ * `action: 'rotate'` response contract. Retained until the next major version.
1311
+ */
1312
+ rotate: (options: RotateCommandOptions) => Promise<RotateCommandResult>;
1313
+ };
1098
1314
  type SelectorSnapshotCommandOptions = Pick<CaptureSnapshotOptions, 'depth' | 'scope' | 'raw'>;
1099
1315
  type FindSnapshotCommandOptions = Pick<CaptureSnapshotOptions, 'depth' | 'raw'>;
1100
1316
  type PointTarget = {
@@ -1180,7 +1396,6 @@ type SwipeOptions = DeviceCommandBaseOptions & {
1180
1396
  x: number;
1181
1397
  y: number;
1182
1398
  };
1183
- durationMs?: number;
1184
1399
  count?: number;
1185
1400
  pauseMs?: number;
1186
1401
  pattern?: SwipePattern;
@@ -1190,6 +1405,7 @@ type PanOptions = DeviceCommandBaseOptions & {
1190
1405
  y: number;
1191
1406
  dx: number;
1192
1407
  dy: number;
1408
+ pointerCount?: GesturePointerCount;
1193
1409
  durationMs?: number;
1194
1410
  };
1195
1411
  type FlingOptions = DeviceCommandBaseOptions & {
@@ -1197,11 +1413,9 @@ type FlingOptions = DeviceCommandBaseOptions & {
1197
1413
  x: number;
1198
1414
  y: number;
1199
1415
  distance?: number;
1200
- durationMs?: number;
1201
1416
  };
1202
1417
  type SwipeGestureOptions = DeviceCommandBaseOptions & {
1203
1418
  preset: SwipePreset;
1204
- durationMs?: number;
1205
1419
  };
1206
1420
  type FocusOptions = DeviceCommandBaseOptions & {
1207
1421
  x: number;
@@ -1214,6 +1428,8 @@ type TypeTextOptions = DeviceCommandBaseOptions & {
1214
1428
  type FillOptions = DeviceCommandBaseOptions & SelectorSnapshotCommandOptions & InteractionTarget & SettleCommandOptions & {
1215
1429
  text: string;
1216
1430
  delayMs?: number;
1431
+ /** Publish this fill value as `${VAR}` when script recording is armed. */
1432
+ recordAs?: string;
1217
1433
  verify?: boolean;
1218
1434
  };
1219
1435
  type ScrollOptions = DeviceCommandBaseOptions & {
@@ -1231,24 +1447,33 @@ type RotateGestureOptions = DeviceCommandBaseOptions & {
1231
1447
  degrees: number;
1232
1448
  x?: number;
1233
1449
  y?: number;
1234
- velocity?: number;
1235
1450
  };
1236
1451
  type TransformGestureOptions = DeviceCommandBaseOptions & TransformGestureParams;
1237
- type GetOptions = DeviceCommandBaseOptions & SelectorSnapshotCommandOptions & ElementTarget & {
1452
+ /**
1453
+ * #1271 stage 2 (ADR 0012 amendment): `get`/`is`/`find` are observation-only
1454
+ * and excluded from a repair-armed heal by default. `record` forces this
1455
+ * action through (the corrective-read case); `noRecord` continues to opt the
1456
+ * action out entirely. Mutually exclusive.
1457
+ */
1458
+ type RecordControlOptions = {
1459
+ noRecord?: boolean;
1460
+ record?: boolean;
1461
+ };
1462
+ type GetOptions = DeviceCommandBaseOptions & SelectorSnapshotCommandOptions & ElementTarget & RecordControlOptions & {
1238
1463
  format: 'text' | 'attrs';
1239
1464
  };
1240
- type IsTextPredicateOptions = DeviceCommandBaseOptions & SelectorSnapshotCommandOptions & {
1465
+ type IsTextPredicateOptions = DeviceCommandBaseOptions & SelectorSnapshotCommandOptions & RecordControlOptions & {
1241
1466
  predicate: 'text';
1242
1467
  selector: string;
1243
1468
  value: string;
1244
1469
  };
1245
- type IsStatePredicateOptions = DeviceCommandBaseOptions & SelectorSnapshotCommandOptions & {
1470
+ type IsStatePredicateOptions = DeviceCommandBaseOptions & SelectorSnapshotCommandOptions & RecordControlOptions & {
1246
1471
  predicate: 'visible' | 'hidden' | 'exists' | 'editable' | 'selected' | 'focused';
1247
1472
  selector: string;
1248
1473
  value?: never;
1249
1474
  };
1250
1475
  type IsOptions = IsTextPredicateOptions | IsStatePredicateOptions;
1251
- type FindBaseOptions = DeviceCommandBaseOptions & FindSnapshotCommandOptions & {
1476
+ type FindBaseOptions = DeviceCommandBaseOptions & FindSnapshotCommandOptions & RecordControlOptions & {
1252
1477
  locator?: FindLocator;
1253
1478
  query: string;
1254
1479
  first?: boolean;
@@ -1265,15 +1490,40 @@ type FindOptions = (FindBaseOptions & {
1265
1490
  });
1266
1491
  type ReplayRunOptions = AgentDeviceRequestOverrides & AgentDeviceSelectionOptions & {
1267
1492
  path: string;
1493
+ runtime?: SessionRuntimeHints;
1494
+ /**
1495
+ * @deprecated ADR 0012 migration step 6: `--update` no longer rewrites
1496
+ * the script. Accepted for backward compatibility; every divergence
1497
+ * already carries ranked selector suggestions regardless of this flag.
1498
+ */
1268
1499
  update?: boolean;
1269
1500
  /** @deprecated Use backend: 'maestro'. */
1270
1501
  maestro?: boolean;
1271
1502
  backend?: string;
1272
1503
  env?: string[];
1273
1504
  timeoutMs?: number;
1505
+ /**
1506
+ * ADR 0012 decision 4 / migration step 5: resume at this 1-based plan
1507
+ * step, skipping `1..resumeFrom-1` without executing them. Requires
1508
+ * `resumePlanDigest` from the divergence report that reported this
1509
+ * step as the failure. `replay` only — `test` has no resume fields.
1510
+ */
1511
+ resumeFrom?: number;
1512
+ /** The `resume.planDigest` from the divergence report `resumeFrom` came from. */
1513
+ resumePlanDigest?: string;
1514
+ /**
1515
+ * ADR 0012 decision 6, R1/R6: arms agent-supervised re-record repair
1516
+ * from this replay attempt onward. Optional string value is the healed
1517
+ * `.ad`'s output path; absent one, it defaults to the `<path>` sibling
1518
+ * `<stem>.healed.ad` when the repair ends with `close --save-script`.
1519
+ */
1520
+ saveScript?: boolean | string;
1521
+ /** #1258: overwrite an existing --save-script target instead of refusing. Alias: --overwrite. */
1522
+ force?: boolean;
1274
1523
  };
1275
1524
  type ReplayTestOptions = AgentDeviceRequestOverrides & AgentDeviceSelectionOptions & {
1276
1525
  paths: string[];
1526
+ runtime?: SessionRuntimeHints;
1277
1527
  update?: boolean;
1278
1528
  /** @deprecated Use backend: 'maestro'. */
1279
1529
  maestro?: boolean;
@@ -1387,7 +1637,11 @@ type AgentDeviceClient = {
1387
1637
  stateDir: (options?: AgentDeviceRequestOverrides & Pick<AgentDeviceClientConfig, 'stateDir'>) => Promise<string>;
1388
1638
  close: (options?: AgentDeviceRequestOverrides & {
1389
1639
  shutdown?: boolean;
1640
+ saveScript?: boolean | string;
1641
+ /** #1258: overwrite an existing --save-script target instead of refusing. Alias: --overwrite. */
1642
+ force?: boolean;
1390
1643
  }) => Promise<SessionCloseResult>;
1644
+ saveScript: (options?: SessionSaveScriptOptions) => Promise<SessionSaveScriptResult>;
1391
1645
  artifacts: (options?: CloudArtifactsOptions) => Promise<AgentArtifactsResult>;
1392
1646
  };
1393
1647
  apps: {
@@ -1418,30 +1672,30 @@ type AgentDeviceClient = {
1418
1672
  capture: {
1419
1673
  snapshot: (options?: CaptureSnapshotOptions) => Promise<CaptureSnapshotResult>;
1420
1674
  screenshot: (options?: CaptureScreenshotOptions) => Promise<CaptureScreenshotResult>;
1421
- diff: (options: CaptureDiffOptions) => Promise<CommandRequestResult>;
1675
+ diff: (options: CaptureDiffOptions) => Promise<CommandResult<'diff'>>;
1422
1676
  };
1423
1677
  interactions: {
1424
- click: (options: ClickOptions) => Promise<CommandRequestResult>;
1425
- press: (options: PressOptions) => Promise<CommandRequestResult>;
1426
- longPress: (options: LongPressOptions) => Promise<CommandRequestResult>;
1678
+ click: (options: ClickOptions) => Promise<CommandResult<'click'>>;
1679
+ press: (options: PressOptions) => Promise<CommandResult<'press'>>;
1680
+ longPress: (options: LongPressOptions) => Promise<CommandResult<'longpress'>>;
1427
1681
  swipe: (options: SwipeOptions) => Promise<CommandRequestResult>;
1428
1682
  pan: (options: PanOptions) => Promise<CommandRequestResult>;
1429
1683
  fling: (options: FlingOptions) => Promise<CommandRequestResult>;
1430
1684
  swipeGesture: (options: SwipeGestureOptions) => Promise<CommandRequestResult>;
1431
1685
  focus: (options: FocusOptions) => Promise<CommandRequestResult>;
1432
1686
  type: (options: TypeTextOptions) => Promise<CommandRequestResult>;
1433
- fill: (options: FillOptions) => Promise<CommandRequestResult>;
1687
+ fill: (options: FillOptions) => Promise<CommandResult<'fill'>>;
1434
1688
  scroll: (options: ScrollOptions) => Promise<CommandRequestResult>;
1435
1689
  pinch: (options: PinchOptions) => Promise<CommandRequestResult>;
1436
1690
  rotateGesture: (options: RotateGestureOptions) => Promise<CommandRequestResult>;
1437
1691
  transformGesture: (options: TransformGestureOptions) => Promise<CommandRequestResult>;
1438
1692
  get: (options: GetOptions) => Promise<CommandRequestResult>;
1439
1693
  is: (options: IsOptions) => Promise<CommandRequestResult>;
1440
- find: (options: FindOptions) => Promise<CommandRequestResult>;
1694
+ find: (options: FindOptions) => Promise<CommandResult<'find'>>;
1441
1695
  };
1442
1696
  replay: {
1443
- run: (options: ReplayRunOptions) => Promise<CommandRequestResult>;
1444
- test: (options: ReplayTestOptions) => Promise<CommandRequestResult>;
1697
+ run: (options: ReplayRunOptions) => Promise<CommandResult<'replay'>>;
1698
+ test: (options: ReplayTestOptions) => Promise<CommandResult<'test'>>;
1445
1699
  };
1446
1700
  batch: {
1447
1701
  run: (options: BatchRunOptions) => Promise<BatchRunResult>;
@@ -1457,15 +1711,15 @@ type AgentDeviceClient = {
1457
1711
  symbols: (options: DebugSymbolsOptions) => Promise<DebugSymbolsResult>;
1458
1712
  };
1459
1713
  recording: {
1460
- record: (options: RecordOptions) => Promise<CommandRequestResult>;
1461
- trace: (options: TraceOptions) => Promise<CommandRequestResult>;
1714
+ record: (options: RecordOptions) => Promise<CommandResult<'record'>>;
1715
+ trace: (options: TraceOptions) => Promise<CommandResult<'trace'>>;
1462
1716
  };
1463
1717
  settings: {
1464
1718
  update: (options: SettingsUpdateOptions) => Promise<CommandRequestResult>;
1465
1719
  };
1466
1720
  };
1467
1721
  //#endregion
1468
- //#region src/client/client.d.ts
1722
+ //#region src/agent-device-client.d.ts
1469
1723
  declare function createAgentDeviceClient(config?: AgentDeviceClientConfig, deps?: {
1470
1724
  transport?: AgentDeviceDaemonTransport;
1471
1725
  }): AgentDeviceClient;