agent-device 0.20.10 → 0.21.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (510) hide show
  1. package/README.md +2 -2
  2. package/android/ime-helper/dist/{agent-device-android-ime-helper-0.20.10.apk → agent-device-android-ime-helper-0.21.1.apk} +0 -0
  3. package/android/ime-helper/dist/agent-device-android-ime-helper-0.21.1.apk.sha256 +1 -0
  4. package/android/ime-helper/dist/{agent-device-android-ime-helper-0.20.10.manifest.json → agent-device-android-ime-helper-0.21.1.manifest.json} +4 -4
  5. package/android/snapshot-helper/dist/agent-device-android-snapshot-helper-0.21.1.apk +0 -0
  6. package/android/snapshot-helper/dist/agent-device-android-snapshot-helper-0.21.1.apk.sha256 +1 -0
  7. package/android/snapshot-helper/dist/{agent-device-android-snapshot-helper-0.20.10.manifest.json → agent-device-android-snapshot-helper-0.21.1.manifest.json} +6 -6
  8. package/apple/macos-helper/Sources/AgentDeviceMacOSHelper/AudioProbe.swift +35 -33
  9. package/apple/macos-helper/Sources/AgentDeviceMacOSHelper/main.swift +6 -1
  10. package/apple/snapshot-bridge/LICENSE.idb +23 -0
  11. package/apple/snapshot-bridge/README.md +106 -0
  12. package/apple/snapshot-bridge/SnapshotBridge.m +286 -0
  13. package/apple/snapshot-bridge/SnapshotBridgeCapture.h +25 -0
  14. package/apple/snapshot-bridge/SnapshotBridgeCapture.m +138 -0
  15. package/apple/snapshot-bridge/SnapshotBridgeRuntime.h +34 -0
  16. package/apple/snapshot-bridge/SnapshotBridgeRuntime.m +411 -0
  17. package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunner/AgentDeviceRunnerApp.m +58 -0
  18. package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunner.xcodeproj/project.pbxproj +19 -0
  19. package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerAXSnapshotBridge.h +12 -0
  20. package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerAXSnapshotBridge.m +20 -0
  21. package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerAlertVerification.swift +36 -0
  22. package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerSelectorMatchPolicy.swift +15 -15
  23. package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerStringNormalization.swift +8 -0
  24. package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerSynthesizedGesture.h +12 -1
  25. package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerSynthesizedGesture.m +100 -6
  26. package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerSystemSurfaceHostPolicy.swift +72 -0
  27. package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTapPointPolicy.swift +63 -14
  28. package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+AXSnapshotFallback.swift +677 -83
  29. package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Alert.swift +35 -92
  30. package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+AlertObservation.swift +124 -0
  31. package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+BlockingSystemModalResolution.swift +39 -4
  32. package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+CommandExecution.swift +1058 -213
  33. package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+CommandJournal.swift +296 -14
  34. package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Environment.swift +1 -1
  35. package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Exceptions.swift +10 -10
  36. package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Interaction.swift +309 -149
  37. package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Keyboard.swift +101 -42
  38. package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Lifecycle.swift +24 -17
  39. package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Models.swift +124 -199
  40. package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Navigation.swift +71 -4
  41. package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+PrivateAXElementTypes.swift +12 -0
  42. package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+PrivateAXPresentation.swift +211 -78
  43. package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+ScreenRecorder.swift +30 -10
  44. package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+ScrollGesture.swift +254 -24
  45. package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+SequenceExecution.swift +206 -22
  46. package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Snapshot.swift +465 -494
  47. package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+SnapshotBackendCapabilities.swift +168 -0
  48. package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+SnapshotCapturePlan.swift +802 -247
  49. package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+SnapshotPresentationInvariant.swift +19 -0
  50. package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+SnapshotTiming.swift +185 -0
  51. package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+SynthesizedCommitDeadline.swift +206 -0
  52. package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+SynthesizedGesturePolicy.swift +83 -5
  53. package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+SynthesizedTextEntry.swift +156 -34
  54. package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+SystemModal.swift +5 -4
  55. package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+TextEntry.swift +35 -318
  56. package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+TextEntryFocus.swift +206 -0
  57. package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+TextEntryReadiness.swift +158 -0
  58. package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+TextInputCandidatePolicy.swift +28 -0
  59. package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+TextInputProbe.swift +101 -0
  60. package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+TextTyping.swift +56 -23
  61. package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Transport.swift +56 -27
  62. package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+TvRemote.swift +30 -24
  63. package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests.swift +126 -80
  64. package/dist/apple/runner/AgentDeviceRunner/RecordingScripts/RecordingExportSupport.swift +111 -0
  65. package/dist/apple/runner/AgentDeviceRunner/RecordingScripts/recording-overlay.swift +47 -86
  66. package/dist/apple/runner/AgentDeviceRunner/RecordingScripts/recording-trim.swift +32 -79
  67. package/dist/apple/snapshot-presentation/Package.swift +21 -0
  68. package/dist/apple/snapshot-presentation/Sources/AgentDeviceSnapshotPresentation/SnapshotGeometry.swift +56 -0
  69. package/dist/apple/snapshot-presentation/Sources/AgentDeviceSnapshotPresentation/SnapshotModels.swift +259 -0
  70. package/dist/apple/snapshot-presentation/Sources/AgentDeviceSnapshotPresentation/SnapshotPresentation.swift +153 -0
  71. package/dist/apple/snapshot-presentation/Sources/AgentDeviceSnapshotPresentation/SnapshotPresentationFailure.swift +27 -0
  72. package/dist/apple/snapshot-presentation/Sources/AgentDeviceSnapshotPresentation/SnapshotPresentationInvariant.swift +91 -0
  73. package/dist/apple/snapshot-presentation/Sources/AgentDeviceSnapshotPresentation/SnapshotPresentationProjection.swift +161 -0
  74. package/dist/apple/snapshot-presentation/Sources/AgentDeviceSnapshotPresentation/SnapshotScopePolicy.swift +53 -0
  75. package/dist/apple/snapshot-presentation/Sources/AgentDeviceSnapshotPresentation/SnapshotVisibilityFold.swift +242 -0
  76. package/dist/apple/snapshot-presentation/Sources/AgentDeviceSnapshotPresentation/SnapshotVisibilityFoldProjection.swift +97 -0
  77. package/dist/src/adapter.js +1 -0
  78. package/dist/src/adb-executor.js +2 -0
  79. package/dist/src/adb-failure.js +1 -0
  80. package/dist/src/adb-host.js +1 -0
  81. package/dist/src/adb.js +1 -0
  82. package/dist/src/agent-browser-lifecycle.js +1 -0
  83. package/dist/src/agent-browser-process-record.js +1 -0
  84. package/dist/src/agent-browser-provider.js +1 -0
  85. package/dist/src/agent-browser-tool.js +1 -1
  86. package/dist/src/agent-device-client.js +2 -2
  87. package/dist/src/ai-sdk.d.ts +2 -2
  88. package/dist/src/ai-sdk.js +1 -1
  89. package/dist/src/alert-contract.js +1 -0
  90. package/dist/src/alert-runtime.js +1 -0
  91. package/dist/src/android-adb.d.ts +27 -19
  92. package/dist/src/android-adb.js +1 -1
  93. package/dist/src/android-input-ownership.js +1 -0
  94. package/dist/src/android-system-chrome.js +1 -0
  95. package/dist/src/android.js +1 -1
  96. package/dist/src/api.js +11 -0
  97. package/dist/src/app-catalog.js +1 -0
  98. package/dist/src/app-deployment-resolution.js +2 -0
  99. package/dist/src/app-helpers.js +1 -1
  100. package/dist/src/app-inventory-contract.js +1 -0
  101. package/dist/src/app-inventory.js +1 -0
  102. package/dist/src/app-launch.js +2 -0
  103. package/dist/src/app-lifecycle-facade.js +1 -0
  104. package/dist/src/app-lifecycle.js +3 -6
  105. package/dist/src/app-lifecycle2.js +2 -2
  106. package/dist/src/app-lifecycle3.js +1 -0
  107. package/dist/src/app-log-files.js +1 -1
  108. package/dist/src/app-log-reconnect.js +1 -1
  109. package/dist/src/app-log-runtime.js +1 -4
  110. package/dist/src/app-log-runtime2.js +4 -0
  111. package/dist/src/app-parsers.js +4 -0
  112. package/dist/src/app-resolution-cache.js +1 -0
  113. package/dist/src/app-resolution-facade.js +1 -0
  114. package/dist/src/app-resolution.js +2 -2
  115. package/dist/src/app-state.js +1 -2
  116. package/dist/src/apple-runner-platform.js +1 -0
  117. package/dist/src/application-lifecycle-interaction.js +1 -0
  118. package/dist/src/application-lifecycle-runtime.js +1 -0
  119. package/dist/src/apps-simctl.js +1 -0
  120. package/dist/src/archive.js +4 -0
  121. package/dist/src/artifact-download.js +1 -0
  122. package/dist/src/artifacts.d.ts +6 -2
  123. package/dist/src/artifacts.js +1 -1
  124. package/dist/src/async-lifecycle.js +1 -0
  125. package/dist/src/audio-probe-result.js +1 -0
  126. package/dist/src/audio-probe-runtime.js +1 -0
  127. package/dist/src/audio-probe-support.js +1 -0
  128. package/dist/src/auth-session.js +1 -1
  129. package/dist/src/auth.js +1 -1
  130. package/dist/src/backend-snapshot-options.js +1 -1
  131. package/dist/src/{url.js → base-url.js} +1 -1
  132. package/dist/src/boot-diagnostics.js +2 -2
  133. package/dist/src/byte-limit-stream.js +1 -1
  134. package/dist/src/capabilities.js +1 -0
  135. package/dist/src/capture.js +1 -0
  136. package/dist/src/catalog.js +1 -0
  137. package/dist/src/cli-command-aliases.js +1 -0
  138. package/dist/src/cli-config.js +1 -1
  139. package/dist/src/cli-help.js +74 -51
  140. package/dist/src/cli-output.js +1 -1
  141. package/dist/src/cli-runner.js +1 -1
  142. package/dist/src/cli.js +4 -6
  143. package/dist/src/click-button.js +1 -0
  144. package/dist/src/client-metro-companion.js +1 -0
  145. package/dist/src/client-metro.js +1 -1
  146. package/dist/src/client-types.d.ts +280 -242
  147. package/dist/src/clipboard.js +1 -0
  148. package/dist/src/code-signature-cache.js +1 -0
  149. package/dist/src/code-signature.js +1 -0
  150. package/dist/src/color.js +1 -0
  151. package/dist/src/command-metadata.js +1 -1
  152. package/dist/src/command-schema.js +3 -3
  153. package/dist/src/command-surface.js +1 -1
  154. package/dist/src/command-tools.js +2 -2
  155. package/dist/src/command.js +1 -0
  156. package/dist/src/compatibility-policy.js +1 -0
  157. package/dist/src/config.js +1 -1
  158. package/dist/src/config2.js +1 -0
  159. package/dist/src/connection-runtime.js +1 -1
  160. package/dist/src/connection.js +5 -5
  161. package/dist/src/contracts.d.ts +1 -1
  162. package/dist/src/contracts.js +1 -1
  163. package/dist/src/daemon-client-lifecycle.js +1 -0
  164. package/dist/src/daemon-process.js +1 -0
  165. package/dist/src/daemon-registration.js +1 -0
  166. package/dist/src/daemon-shutdown-report.js +1 -1
  167. package/dist/src/daemon.js +2 -2
  168. package/dist/src/debug-symbols-facade.js +5 -0
  169. package/dist/src/deploy-result-target.js +1 -0
  170. package/dist/src/device-claim-inspection.js +1 -1
  171. package/dist/src/device-claim-rule.js +1 -0
  172. package/dist/src/device-input-state.d.ts +190 -3
  173. package/dist/src/device-inventory-context.js +1 -0
  174. package/dist/src/device-isolation.js +1 -0
  175. package/dist/src/device-release.js +1 -0
  176. package/dist/src/device-rotation.js +1 -0
  177. package/dist/src/device-selection-resolver.js +1 -0
  178. package/dist/src/device-session.js +1 -0
  179. package/dist/src/device.js +1 -1
  180. package/dist/src/device2.js +3 -2
  181. package/dist/src/diagnostics.js +3 -0
  182. package/dist/src/diagnostics2.js +1 -0
  183. package/dist/src/dispatch-resolve.js +1 -0
  184. package/dist/src/doctor-facade.js +1 -0
  185. package/dist/src/doctor-output.js +1 -0
  186. package/dist/src/doctor.js +1 -0
  187. package/dist/src/doctor2.js +1 -0
  188. package/dist/src/doctor3.js +1 -0
  189. package/dist/src/durable-resource.js +1 -0
  190. package/dist/src/entities.js +1 -1
  191. package/dist/src/error.js +2 -0
  192. package/dist/src/exec.js +1 -0
  193. package/dist/src/file.js +1 -0
  194. package/dist/src/find.js +1 -1
  195. package/dist/src/finders.js +1 -1
  196. package/dist/src/generic-settle.js +1 -1
  197. package/dist/src/generic.js +1 -1
  198. package/dist/src/gesture-admission.js +1 -0
  199. package/dist/src/gesture-plan-types.js +1 -0
  200. package/dist/src/gesture-plan.js +1 -0
  201. package/dist/src/gesture-runtime.js +1 -0
  202. package/dist/src/harmonyos.js +1 -1
  203. package/dist/src/hdc.js +1 -1
  204. package/dist/src/helper.js +2 -2
  205. package/dist/src/host-file.js +1 -0
  206. package/dist/src/human-control-contract.js +1 -0
  207. package/dist/src/human-control.js +1 -0
  208. package/dist/src/index.d.ts +1 -1
  209. package/dist/src/index.js +1 -1
  210. package/dist/src/input-actions.js +1 -4
  211. package/dist/src/input-actions2.js +2 -1
  212. package/dist/src/install-artifact-facade.js +1 -0
  213. package/dist/src/install-source-network-transport.js +1 -0
  214. package/dist/src/install-source.d.ts +3 -10
  215. package/dist/src/install-source2.js +1 -1
  216. package/dist/src/interaction-positionals.js +1 -0
  217. package/dist/src/interaction-ref-policy.js +1 -0
  218. package/dist/src/interaction.js +1 -1
  219. package/dist/src/interaction2.js +1 -1
  220. package/dist/src/interactor-operation-catalog.js +1 -0
  221. package/dist/src/interactor-types.js +1 -0
  222. package/dist/src/interactor.js +6 -2
  223. package/dist/src/interactor2.js +1 -1
  224. package/dist/src/interactors.js +1 -1
  225. package/dist/src/internal/bin.d.ts +1 -1
  226. package/dist/src/internal/bin.js +1 -2
  227. package/dist/src/internal/companion-tunnel.d.ts +1 -1
  228. package/dist/src/internal/companion-tunnel.js +1 -1
  229. package/dist/src/internal/daemon.d.ts +1 -1
  230. package/dist/src/internal/daemon.js +2 -4
  231. package/dist/src/internal/png-worker.d.ts +4 -4
  232. package/dist/src/internal/png-worker.js +1 -1
  233. package/dist/src/internal/run-script-http-child.d.ts +4 -0
  234. package/dist/src/internal/run-script-http-child.js +1 -0
  235. package/dist/src/internal/update-check-entry.d.ts +1 -1
  236. package/dist/src/inventory.js +4 -4
  237. package/dist/src/inventory2.js +1 -1
  238. package/dist/src/inventory3.js +1 -1
  239. package/dist/src/inventory5.js +1 -1
  240. package/dist/src/inventory6.js +1 -1
  241. package/dist/src/ios-client.js +16 -0
  242. package/dist/src/ios-snapshot-acquisition.js +1 -0
  243. package/dist/src/ios-snapshot-adapter.js +1 -0
  244. package/dist/src/ios-snapshot-planning.js +1 -0
  245. package/dist/src/ios-snapshot-runtime.js +1 -0
  246. package/dist/src/ios-system-surface.js +1 -0
  247. package/dist/src/json.js +1 -0
  248. package/dist/src/keyboard-actions.js +1 -0
  249. package/dist/src/launch-console.js +1 -0
  250. package/dist/src/lease-context.js +1 -1
  251. package/dist/src/lease-scope.js +1 -0
  252. package/dist/src/lease.js +1 -1
  253. package/dist/src/limrun-runtime-dependencies.js +1 -1
  254. package/dist/src/limrun.d.ts +1610 -7
  255. package/dist/src/limrun.js +1 -1
  256. package/dist/src/linux.js +1 -1
  257. package/dist/src/local-interactor-operation-set.js +1 -0
  258. package/dist/src/location-coordinates.js +1 -1
  259. package/dist/src/logcat.js +1 -1
  260. package/dist/src/macos-facade.js +1 -0
  261. package/dist/src/managed-device-scope.js +1 -0
  262. package/dist/src/mechanics.js +19 -0
  263. package/dist/src/metro.d.ts +4 -2
  264. package/dist/src/metro.js +1 -1
  265. package/dist/src/metro2.js +1 -1
  266. package/dist/src/mobile-snapshot-semantics.js +1 -1
  267. package/dist/src/multitouch-support.js +1 -0
  268. package/dist/src/numeric.js +1 -0
  269. package/dist/src/observability.js +1 -1
  270. package/dist/src/observation.js +2 -0
  271. package/dist/src/open-target-resolution.js +1 -0
  272. package/dist/src/output-path.js +1 -1
  273. package/dist/src/owner-identity.js +3 -1
  274. package/dist/src/parameterized-recorded-fill.js +1 -0
  275. package/dist/src/parser.js +1 -1
  276. package/dist/src/perf-facade.js +2 -0
  277. package/dist/src/perf-process-identity.js +1 -0
  278. package/dist/src/perf-runtime-operation-builder.js +1 -0
  279. package/dist/src/perf-runtime-plan.js +1 -0
  280. package/dist/src/perf-runtime.js +1 -0
  281. package/dist/src/perf.js +1 -4
  282. package/dist/src/physical-device-control.js +1 -1
  283. package/dist/src/physical-device-facade.js +1 -0
  284. package/dist/src/platform-request-scope.js +1 -0
  285. package/dist/src/platform-runtime-android-adb-host.js +1 -0
  286. package/dist/src/platform-runtime-android-mechanics.js +1 -0
  287. package/dist/src/platform-runtime-app-log-android-transport.js +1 -1
  288. package/dist/src/platform-runtime-app-log-process.js +1 -1
  289. package/dist/src/platform-runtime-host.js +1 -1
  290. package/dist/src/platform-runtime-managed-owner.js +1 -0
  291. package/dist/src/platform-runtime-network-web-transport.js +1 -1
  292. package/dist/src/platform-runtime-open-target.js +1 -1
  293. package/dist/src/platform-runtime-operation-host.js +4 -4
  294. package/dist/src/platform-runtime-runtime-hints.js +2 -2
  295. package/dist/src/platform-runtime-screen-recording-android-host.js +1 -1
  296. package/dist/src/platform-runtime-screen-recording-apple-runner-host.js +1 -1
  297. package/dist/src/platform-runtime-screen-recording-apple-runner-transport.js +1 -1
  298. package/dist/src/platform-runtime-screen-recording-apple-simulator-host.js +1 -1
  299. package/dist/src/platform-runtime-screen-recording-apple-transport.js +1 -1
  300. package/dist/src/platform-runtime-screen-recording-finalizer-host.js +1 -1
  301. package/dist/src/platform-runtime-screen-recording-harmony-host.js +1 -1
  302. package/dist/src/platform-runtime-screen-recording-process-host.js +1 -0
  303. package/dist/src/platform-runtime-screen-recording-web-host.js +1 -1
  304. package/dist/src/platform-runtime-unavailable.js +1 -0
  305. package/dist/src/platform-runtime.js +1 -1
  306. package/dist/src/platform-runtime2.js +1 -1
  307. package/dist/src/plist.js +1 -1
  308. package/dist/src/png-worker-contract.js +1 -1
  309. package/dist/src/prepare-kind.js +1 -0
  310. package/dist/src/process-exit.js +1 -1
  311. package/dist/src/process.js +1 -0
  312. package/dist/src/provider-device-runtime.js +1 -0
  313. package/dist/src/provider-session-ownership.js +2 -0
  314. package/dist/src/provider-webdriver.js +1 -1
  315. package/dist/src/provider.js +1 -1
  316. package/dist/src/providers.js +1 -0
  317. package/dist/src/proxy.js +2 -2
  318. package/dist/src/react-native-overlay.js +1 -0
  319. package/dist/src/react-native.js +1 -1
  320. package/dist/src/record-runtime.js +1 -1
  321. package/dist/src/record-trace.js +1 -1
  322. package/dist/src/rect-center.js +1 -0
  323. package/dist/src/register-builtins.js +1 -0
  324. package/dist/src/registry.js +40 -28
  325. package/dist/src/remote-config2.js +1 -1
  326. package/dist/src/replay-divergence.js +2 -0
  327. package/dist/src/replay.js +2 -2
  328. package/dist/src/reporting.js +8 -7
  329. package/dist/src/request-admission.js +1 -0
  330. package/dist/src/request-cancel.js +1 -0
  331. package/dist/src/request-cancellation.js +1 -0
  332. package/dist/src/request-progress-protocol.js +1 -0
  333. package/dist/src/request-providers.js +1 -0
  334. package/dist/src/request-runtime-binding.js +1 -0
  335. package/dist/src/request.js +1 -0
  336. package/dist/src/result-serialization.js +1 -0
  337. package/dist/src/retry.js +1 -0
  338. package/dist/src/rolldown-runtime.js +1 -1
  339. package/dist/src/runner-cache-metadata.js +2 -0
  340. package/dist/src/runner-client.js +1 -1
  341. package/dist/src/runner-disposal.js +1 -1
  342. package/dist/src/runner-operations-facade.js +1 -0
  343. package/dist/src/runner-owner-facade.js +1 -0
  344. package/dist/src/runner-owner-state.js +1 -0
  345. package/dist/src/runner-presentation.js +1 -0
  346. package/dist/src/runner.js +1 -0
  347. package/dist/src/{runtime-transport.js → runtime-transport-hints.js} +1 -1
  348. package/dist/src/runtime.js +3 -3
  349. package/dist/src/runtime2.js +4 -4
  350. package/dist/src/runtime3.js +1 -1
  351. package/dist/src/runtime4.js +5 -3
  352. package/dist/src/runtime5.js +1 -1
  353. package/dist/src/runtime6.js +1 -1
  354. package/dist/src/runtime7.js +1 -1
  355. package/dist/src/runtime8.js +1 -1
  356. package/dist/src/runtime9.js +1 -1
  357. package/dist/src/scoped-provider.js +1 -1
  358. package/dist/src/screen-recording-completion.js +1 -0
  359. package/dist/src/screen-recording-live-handle.js +1 -0
  360. package/dist/src/screen-recording-options.js +1 -0
  361. package/dist/src/screen-recording-resource-recovery.js +1 -0
  362. package/dist/src/screen-recording-runtime.js +1 -0
  363. package/dist/src/screenshot-density.js +1 -1
  364. package/dist/src/screenshot-result.js +1 -6
  365. package/dist/src/screenshot-runtime.js +1 -0
  366. package/dist/src/screenshot.js +1 -1
  367. package/dist/src/screenshot2.js +1 -0
  368. package/dist/src/screenshot3.js +5 -0
  369. package/dist/src/script.js +1 -0
  370. package/dist/src/scroll-command.js +1 -0
  371. package/dist/src/scroll-gesture.js +1 -0
  372. package/dist/src/scroll-indicator.js +1 -0
  373. package/dist/src/sdk-batch-runner.d.ts +23 -6
  374. package/dist/src/sdk-batch-runner.js +2 -3
  375. package/dist/src/sdk-batch.js +2 -0
  376. package/dist/src/sdk-contracts.d.ts +170 -41
  377. package/dist/src/sdk-contracts.js +2 -2
  378. package/dist/src/sdk-device.js +1 -1
  379. package/dist/src/sdk-finders.d.ts +1 -1
  380. package/dist/src/sdk-finders.js +1 -1
  381. package/dist/src/sdk-io.js +1 -1
  382. package/dist/src/sdk-remote-config.d.ts +1 -1
  383. package/dist/src/sdk-remote-config.js +1 -1
  384. package/dist/src/sdk-selectors.d.ts +524 -140
  385. package/dist/src/sdk-selectors.js +1 -1
  386. package/dist/src/selection.js +1 -0
  387. package/dist/src/selector-runtime.js +1 -1
  388. package/dist/src/selectors.js +1 -1
  389. package/dist/src/semantic-index.js +1 -0
  390. package/dist/src/server.js +4 -4
  391. package/dist/src/session-allocation.js +1 -0
  392. package/dist/src/session-artifact-paths.js +1 -0
  393. package/dist/src/session-observation.js +1 -0
  394. package/dist/src/session-paths.js +1 -0
  395. package/dist/src/session-repair-tombstone.js +1 -0
  396. package/dist/src/session-routing.js +1 -0
  397. package/dist/src/session-runtime-admission.js +1 -0
  398. package/dist/src/session-snapshot.js +1 -0
  399. package/dist/src/session-store.js +4 -0
  400. package/dist/src/session-target-evidence.js +1 -1
  401. package/dist/src/session2.js +5 -27
  402. package/dist/src/settings.js +1 -0
  403. package/dist/src/shared.js +2 -2
  404. package/dist/src/simctl-facade.js +1 -0
  405. package/dist/src/simctl.js +1 -1
  406. package/dist/src/simulator-facade.js +1 -0
  407. package/dist/src/simulator.js +1 -1
  408. package/dist/src/snapshot-capture-annotations.js +1 -0
  409. package/dist/src/snapshot-desktop-projection.js +1 -0
  410. package/dist/src/snapshot-diagnostics.js +1 -0
  411. package/dist/src/snapshot-process.js +1 -0
  412. package/dist/src/snapshot-quality-backend-capabilities.js +1 -0
  413. package/dist/src/snapshot-quality-verdict.js +1 -0
  414. package/dist/src/snapshot-runtime-binding.js +1 -0
  415. package/dist/src/snapshot-runtime.js +1 -1
  416. package/dist/src/snapshot-scope.js +1 -1
  417. package/dist/src/snapshot-state.js +1 -0
  418. package/dist/src/snapshot.js +1 -8
  419. package/dist/src/snapshot2.js +1 -1
  420. package/dist/src/snapshot3.js +1 -1
  421. package/dist/src/snapshot4.js +1 -0
  422. package/dist/src/src.js +1 -1
  423. package/dist/src/src2.js +1 -1
  424. package/dist/src/src3.js +1 -2
  425. package/dist/src/src4.js +1 -1
  426. package/dist/src/src5.js +1 -0
  427. package/dist/src/src6.js +1 -0
  428. package/dist/src/src7.js +2 -0
  429. package/dist/src/src8.js +115 -0
  430. package/dist/src/startup-recovery-fence.js +1 -0
  431. package/dist/src/status-markers.js +1 -0
  432. package/dist/src/string-enum.js +1 -1
  433. package/dist/src/success-text.js +1 -0
  434. package/dist/src/surface-snapshot.js +1 -0
  435. package/dist/src/surface-snapshot2.js +1 -0
  436. package/dist/src/takeover.js +5 -0
  437. package/dist/src/tool-provider-facade.js +1 -0
  438. package/dist/src/tool-provider.js +4 -3
  439. package/dist/src/tool-provider2.js +1 -1
  440. package/dist/src/tool-provider3.js +1 -1
  441. package/dist/src/toolchain-probe.js +2 -0
  442. package/dist/src/touch-reference-frame.js +1 -0
  443. package/dist/src/touch-runtime.js +1 -0
  444. package/dist/src/transport.js +3 -0
  445. package/dist/src/tree.js +1 -0
  446. package/dist/src/ttl-memo.js +1 -0
  447. package/dist/src/tv-remote.js +1 -0
  448. package/dist/src/type-text-runtime.js +1 -0
  449. package/dist/src/undici.js +99 -0
  450. package/dist/src/update-check.js +1 -1
  451. package/dist/src/verified-file.js +1 -1
  452. package/dist/src/version.js +1 -1
  453. package/dist/src/video.js +2 -2
  454. package/dist/src/web.js +2 -1
  455. package/dist/src/web2.js +1 -0
  456. package/dist/src/webdriver-ios-snapshot.js +1 -0
  457. package/dist/src/webdriver-source.js +1 -0
  458. package/dist/src/window-state.js +1 -0
  459. package/linux/atspi-dump.py +54 -9
  460. package/package.json +58 -35
  461. package/server.json +9 -3
  462. package/android/ime-helper/dist/agent-device-android-ime-helper-0.20.10.apk.sha256 +0 -1
  463. package/android/snapshot-helper/dist/agent-device-android-snapshot-helper-0.20.10.apk +0 -0
  464. package/android/snapshot-helper/dist/agent-device-android-snapshot-helper-0.20.10.apk.sha256 +0 -1
  465. package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+CoordinateTextEntryTests.swift +0 -4
  466. package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+FlatSnapshotFiltering.swift +0 -168
  467. package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+LifecycleCacheTests.swift +0 -6
  468. package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+RecordingTests.swift +0 -4
  469. package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+SelectorMatchPolicyTests.swift +0 -4
  470. package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+SnapshotPresentation.swift +0 -183
  471. package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+SnapshotPresentationTests.swift +0 -0
  472. package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+SnapshotTraversalIdentityTests.swift +0 -4
  473. package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+TextEntryPolicyTests.swift +0 -4
  474. package/dist/src/appearance.js +0 -1
  475. package/dist/src/apps.js +0 -5
  476. package/dist/src/audio-probe.js +0 -1
  477. package/dist/src/cli-grammar.js +0 -1
  478. package/dist/src/command-catalog.js +0 -1
  479. package/dist/src/debug-symbols.js +0 -5
  480. package/dist/src/device-input-state.js +0 -2
  481. package/dist/src/device-ready.js +0 -1
  482. package/dist/src/dispatch.js +0 -1
  483. package/dist/src/handler-utils.js +0 -1
  484. package/dist/src/helper-package-install.js +0 -1
  485. package/dist/src/host-process.js +0 -3
  486. package/dist/src/ime-lifecycle.js +0 -2
  487. package/dist/src/ime-recovery-marker.js +0 -1
  488. package/dist/src/input-actions3.js +0 -1
  489. package/dist/src/install-artifact.js +0 -1
  490. package/dist/src/install-artifact2.js +0 -1
  491. package/dist/src/interaction-common.js +0 -1
  492. package/dist/src/interaction-runtime.js +0 -1
  493. package/dist/src/interaction-snapshot.js +0 -1
  494. package/dist/src/manifest.js +0 -1
  495. package/dist/src/method-scope.js +0 -1
  496. package/dist/src/png-resize.js +0 -1
  497. package/dist/src/process-lock.js +0 -1
  498. package/dist/src/runner-lease.js +0 -1
  499. package/dist/src/runner-sequence.js +0 -1
  500. package/dist/src/script-source-bundle.js +0 -16
  501. package/dist/src/sdk-android-adb.d.ts +0 -245
  502. package/dist/src/sdk-android-adb.js +0 -4
  503. package/dist/src/sdk.js +0 -1
  504. package/dist/src/setting-state.js +0 -1
  505. package/dist/src/shell-quote.js +0 -1
  506. package/dist/src/snapshot-session.js +0 -1
  507. package/dist/src/timing-safe-equal.js +0 -1
  508. package/dist/src/unsupported-interactor.js +0 -1
  509. package/dist/src/verdict.js +0 -1
  510. /package/dist/src/{recording-telemetry.js → telemetry.js} +0 -0
@@ -1,4 +1,6 @@
1
- // MARK: - Wire Models
1
+ import AgentDeviceSnapshotPresentation
2
+
3
+
2
4
 
3
5
  enum CommandType: String, Codable {
4
6
  case tap
@@ -37,72 +39,72 @@ enum CommandType: String, Codable {
37
39
  case shutdown
38
40
  }
39
41
 
40
- /// Runner command traits — see CONTEXT.md ("Runner command traits").
41
- ///
42
- /// Single source of truth for how the runner classifies a command across three
43
- /// independent axes, replacing the three hand-maintained switches that used to live
44
- /// in RunnerTests+Lifecycle.swift (isInteractionCommand / isReadOnlyCommand /
45
- /// isRunnerLifecycleCommand). The classification is load-bearing for ADR-0002 session
46
- /// invalidation: `readOnly` gates the retry that nulls currentApp/currentBundleId.
42
+
43
+
44
+
45
+
46
+
47
+
48
+
47
49
  struct CommandTraits {
48
- /// Whether the command needs the foreground-guard + stabilization preflight before running.
50
+
49
51
  let isInteraction: Bool
50
- /// Whether the command is eligible for the session-invalidating retry.
51
- /// `.conditional` is resolved against the request (alert is read-only only for its `get` action).
52
+
53
+
52
54
  let readOnly: ReadOnly
53
- /// Whether the command skips the app-activation preflight entirely.
55
+
54
56
  let isLifecycle: Bool
55
57
 
56
58
  enum ReadOnly {
57
59
  case always
58
60
  case never
59
- /// Alert-only today. Resolved in `isReadOnlyCommand` with alert's rule (read-only for the
60
- /// `get` action, mutating otherwise). A new `.conditional` command would inherit that rule
61
- /// until the resolver is generalized — give it explicit handling there if its semantics differ.
61
+
62
+
63
+
62
64
  case conditional
63
65
  }
64
66
  }
65
67
 
66
68
  extension CommandType {
67
- /// The classification for this command. Exhaustive by construction: a new CommandType
68
- /// cannot compile without being classified here, so commands can no longer silently drift
69
- /// out of classification the way the parallel switches allowed.
69
+
70
+
71
+
70
72
  var traits: CommandTraits {
71
73
  switch self {
72
- // Interaction commands: require the foreground-guard + stabilization preflight.
73
- // keyboardReturn is the sibling of keyboardDismiss (missing from the historical switch —
74
- // drift the table now prevents). .scroll is the fused frame-resolve + drag scroll; same
75
- // classification as .drag. .desktopScroll is the macOS frame-resolve + wheel event sibling.
76
- // .sequence is the fused multi-step gesture batch.
74
+
75
+
76
+
77
+
78
+
77
79
  case .tap, .longPress, .drag, .remotePress, .type, .swipe, .scroll, .desktopScroll,
78
80
  .back, .backInApp, .backSystem, .rotate, .appSwitcher,
79
81
  .keyboardDismiss, .keyboardReturn, .sequence, .gesture:
80
82
  return CommandTraits(isInteraction: true, readOnly: .never, isLifecycle: false)
81
83
 
82
- // Read-only reads: eligible for the session-invalidating retry.
84
+
83
85
  case .findText, .readText, .snapshot, .gestureViewport:
84
86
  return CommandTraits(isInteraction: false, readOnly: .always, isLifecycle: false)
85
87
 
86
- // Screenshot is both a read and a runner-lifecycle command (skips app-activation preflight).
88
+
87
89
  case .screenshot:
88
90
  return CommandTraits(isInteraction: false, readOnly: .always, isLifecycle: true)
89
91
 
90
- // Alert is read-only only for its `get` action (resolved by isReadOnlyCommand).
92
+
91
93
  case .alert:
92
94
  return CommandTraits(isInteraction: false, readOnly: .conditional, isLifecycle: false)
93
95
 
94
- // Runner-lifecycle commands: skip the app-activation preflight.
96
+
95
97
  case .recordStop, .uptime, .terminate, .targetReset, .shutdown:
96
98
  return CommandTraits(isInteraction: false, readOnly: .never, isLifecycle: true)
97
99
 
98
100
  case .status:
99
101
  return CommandTraits(isInteraction: false, readOnly: .always, isLifecycle: true)
100
102
 
101
- // Normal preflight, not retried.
102
- // NOTE: mouseClick stays non-interaction for now — it is macOS-only and the foreground
103
- // guard interacts with bespoke macOS activation, so classifying it needs a macOS smoke
104
- // check first (tracked as a follow-up). Also preserved: querySelector is NOT read-only;
105
- // recordStart is NOT a lifecycle command; home/alert remain non-interaction by design.
103
+
104
+
105
+
106
+
107
+
106
108
  case .mouseClick, .querySelector, .home, .recordStart, .activate:
107
109
  return CommandTraits(isInteraction: false, readOnly: .never, isLifecycle: false)
108
110
  }
@@ -132,6 +134,7 @@ struct Command: Codable {
132
134
  let direction: String?
133
135
  let amount: Double?
134
136
  let pixels: Double?
137
+ let scrollReleaseBehavior: ScrollReleaseBehavior?
135
138
  let orientation: String?
136
139
  let gesturePlan: RunnerGesturePlan?
137
140
  let outPath: String?
@@ -148,7 +151,12 @@ struct Command: Codable {
148
151
  let steps: [SequenceStep]?
149
152
  }
150
153
 
151
- /// Canonical one- or two-pointer plan produced by the portable TypeScript planner.
154
+ enum ScrollReleaseBehavior: String, Codable {
155
+ case controlled
156
+ case inertial
157
+ }
158
+
159
+
152
160
  struct RunnerGesturePlan: Codable {
153
161
  let topology: String
154
162
  let intent: String
@@ -180,22 +188,22 @@ struct RunnerGesturePoint: Codable {
180
188
  let y: Double
181
189
  }
182
190
 
183
- /// One allowlisted coordinate gesture step inside a fused `sequence` command.
184
- /// `kind` is decoded as a raw String (not an enum) so the runner can return a clear
185
- /// INVALID_ARGS for an unknown kind instead of a generic decode failure.
191
+
192
+
193
+
186
194
  struct SequenceStep: Codable {
187
195
  let kind: String
188
196
  let x: Double?
189
197
  let y: Double?
190
198
  let durationMs: Double?
191
199
  let pauseMs: Double?
192
- /// For `tap` steps on iOS non-tv: use the synthesized HID fast path instead of the
193
- /// drag-based XCUICoordinate path, matching the individual command behavior.
200
+
201
+
194
202
  let synthesized: Bool?
195
203
  }
196
204
 
197
- /// Per-step result for a `sequence` response. `ok:false` carries the failing step's
198
- /// errorCode/errorMessage; execution stops at the first failed step.
205
+
206
+
199
207
  struct SequenceStepResult: Codable {
200
208
  let ok: Bool
201
209
  let kind: String
@@ -207,20 +215,14 @@ struct SequenceStepResult: Codable {
207
215
 
208
216
  struct Response: Codable {
209
217
  let ok: Bool
210
- let data: DataPayload?
211
- let error: ErrorPayload?
212
-
213
- init(ok: Bool, data: DataPayload? = nil, error: ErrorPayload? = nil) {
214
- self.ok = ok
215
- self.data = data
216
- self.error = error
217
- }
218
+ var data: DataPayload?
219
+ var error: ErrorPayload?
218
220
  }
219
221
 
220
222
  extension Response {
221
- // The daemon pairs this gesture-clock anchor with its own receipt time to map
222
- // gesture uptimes onto wall-clock for the recording touch overlay. Error responses
223
- // carry no anchor so the daemon falls back instead of pairing a stale value.
223
+
224
+
225
+
224
226
  func stampingCurrentUptimeMs(_ value: Double) -> Response {
225
227
  guard ok else { return self }
226
228
  var payload = data ?? DataPayload()
@@ -230,161 +232,84 @@ extension Response {
230
232
  }
231
233
 
232
234
  struct DataPayload: Codable {
233
- let message: String?
234
- let imageBase64: String?
235
- let text: String?
236
- let found: Bool?
237
- let items: [String]?
238
- let nodes: [PresentedNode]?
239
- let truncated: Bool?
240
- let snapshotQuality: SnapshotQuality?
241
- let gestureStartUptimeMs: Double?
242
- let gestureEndUptimeMs: Double?
243
- let x: Double?
244
- let y: Double?
245
- let x2: Double?
246
- let y2: Double?
247
- let referenceWidth: Double?
248
- let referenceHeight: Double?
235
+ var message: String?
236
+ var imageBase64: String?
237
+ var text: String?
238
+ var found: Bool?
239
+ var items: [String]?
240
+ var nodes: [PresentedNode]?
241
+ var truncated: Bool?
242
+ var qualityPayload: SnapshotQualityPayload? = nil
243
+ var snapshotQuality: SnapshotQuality?
244
+
245
+ var systemSurface: SystemSurfaceProvenancePayload?
246
+ var gestureStartUptimeMs: Double?
247
+ var gestureEndUptimeMs: Double?
248
+ var x: Double?
249
+ var y: Double?
250
+ var x2: Double?
251
+ var y2: Double?
252
+ var referenceWidth: Double?
253
+ var referenceHeight: Double?
249
254
  var currentUptimeMs: Double?
250
- let commandId: String?
251
- let lifecycleState: String?
252
- let lifecycleCommand: String?
253
- let lifecycleResponseOk: Bool?
254
- let lifecycleResponseJson: String?
255
- let lifecycleErrorCode: String?
256
- let lifecycleErrorMessage: String?
257
- let lifecycleErrorHint: String?
258
- let visible: Bool?
259
- let wasVisible: Bool?
260
- let dismissed: Bool?
261
- let keyboardDismissMechanism: String?
262
- let orientation: String?
263
- let gestureFallback: String?
264
- let gestureFallbackMessage: String?
265
- let gestureFallbackHint: String?
266
- let maestroNonHittableCoordinateFallbackUsed: Bool?
267
- let textEntryRoute: String?
268
- let runnerFatal: Bool?
269
- let runnerFatalReason: String?
270
- let completedSteps: Int?
271
- let failedStepIndex: Int?
272
- let sequenceResults: [SequenceStepResult]?
273
-
274
- init(
275
- message: String? = nil,
276
- imageBase64: String? = nil,
277
- text: String? = nil,
278
- found: Bool? = nil,
279
- items: [String]? = nil,
280
- nodes: [PresentedNode]? = nil,
281
- truncated: Bool? = nil,
282
- snapshotQuality: SnapshotQuality? = nil,
283
- gestureStartUptimeMs: Double? = nil,
284
- gestureEndUptimeMs: Double? = nil,
285
- x: Double? = nil,
286
- y: Double? = nil,
287
- x2: Double? = nil,
288
- y2: Double? = nil,
289
- referenceWidth: Double? = nil,
290
- referenceHeight: Double? = nil,
291
- currentUptimeMs: Double? = nil,
292
- commandId: String? = nil,
293
- lifecycleState: String? = nil,
294
- lifecycleCommand: String? = nil,
295
- lifecycleResponseOk: Bool? = nil,
296
- lifecycleResponseJson: String? = nil,
297
- lifecycleErrorCode: String? = nil,
298
- lifecycleErrorMessage: String? = nil,
299
- lifecycleErrorHint: String? = nil,
300
- visible: Bool? = nil,
301
- wasVisible: Bool? = nil,
302
- dismissed: Bool? = nil,
303
- keyboardDismissMechanism: String? = nil,
304
- orientation: String? = nil,
305
- gestureFallback: String? = nil,
306
- gestureFallbackMessage: String? = nil,
307
- gestureFallbackHint: String? = nil,
308
- maestroNonHittableCoordinateFallbackUsed: Bool? = nil,
309
- textEntryRoute: String? = nil,
310
- runnerFatal: Bool? = nil,
311
- runnerFatalReason: String? = nil,
312
- completedSteps: Int? = nil,
313
- failedStepIndex: Int? = nil,
314
- sequenceResults: [SequenceStepResult]? = nil
315
- ) {
316
- self.message = message
317
- self.imageBase64 = imageBase64
318
- self.text = text
319
- self.found = found
320
- self.items = items
255
+ var commandId: String?
256
+ var lifecycleState: String?
257
+ var lifecycleCommand: String?
258
+ var lifecycleResponseOk: Bool?
259
+ var lifecycleResponseJson: String?
260
+ var lifecycleErrorCode: String?
261
+ var lifecycleErrorMessage: String?
262
+ var lifecycleErrorHint: String?
263
+ var visible: Bool?
264
+ var wasVisible: Bool?
265
+ var dismissed: Bool?
266
+ var keyboardDismissMechanism: String?
267
+ var orientation: String?
268
+ var gestureFallback: String?
269
+ var gestureFallbackMessage: String?
270
+ var gestureFallbackHint: String?
271
+ var maestroNonHittableCoordinateFallbackUsed: Bool?
272
+ var textEntryRoute: String?
273
+ var runnerFatal: Bool?
274
+ var runnerFatalReason: String?
275
+ var completedSteps: Int?
276
+ var failedStepIndex: Int?
277
+ var sequenceResults: [SequenceStepResult]?
278
+ }
279
+
280
+
281
+ struct SystemSurfaceProvenancePayload: Codable {
282
+ let bundleId: String
283
+ let kind: String
284
+ }
285
+
286
+ struct SnapshotQualityPayload: Codable {
287
+ let nodes: [PresentedNode]
288
+ let truncated: Bool
289
+ let scope: String?
290
+
291
+ init(nodes: [PresentedNode], truncated: Bool) {
321
292
  self.nodes = nodes
322
293
  self.truncated = truncated
323
- self.snapshotQuality = snapshotQuality
324
- self.gestureStartUptimeMs = gestureStartUptimeMs
325
- self.gestureEndUptimeMs = gestureEndUptimeMs
326
- self.x = x
327
- self.y = y
328
- self.x2 = x2
329
- self.y2 = y2
330
- self.referenceWidth = referenceWidth
331
- self.referenceHeight = referenceHeight
332
- self.currentUptimeMs = currentUptimeMs
333
- self.commandId = commandId
334
- self.lifecycleState = lifecycleState
335
- self.lifecycleCommand = lifecycleCommand
336
- self.lifecycleResponseOk = lifecycleResponseOk
337
- self.lifecycleResponseJson = lifecycleResponseJson
338
- self.lifecycleErrorCode = lifecycleErrorCode
339
- self.lifecycleErrorMessage = lifecycleErrorMessage
340
- self.lifecycleErrorHint = lifecycleErrorHint
341
- self.visible = visible
342
- self.wasVisible = wasVisible
343
- self.dismissed = dismissed
344
- self.keyboardDismissMechanism = keyboardDismissMechanism
345
- self.orientation = orientation
346
- self.gestureFallback = gestureFallback
347
- self.gestureFallbackMessage = gestureFallbackMessage
348
- self.gestureFallbackHint = gestureFallbackHint
349
- self.maestroNonHittableCoordinateFallbackUsed = maestroNonHittableCoordinateFallbackUsed
350
- self.textEntryRoute = textEntryRoute
351
- self.runnerFatal = runnerFatal
352
- self.runnerFatalReason = runnerFatalReason
353
- self.completedSteps = completedSteps
354
- self.failedStepIndex = failedStepIndex
355
- self.sequenceResults = sequenceResults
294
+ self.scope = nil
356
295
  }
357
- }
358
-
359
- struct ErrorPayload: Codable {
360
- let code: String?
361
- let message: String
362
- let hint: String?
363
296
 
364
- init(code: String? = nil, message: String, hint: String? = nil) {
365
- self.code = code
366
- self.message = message
367
- self.hint = hint
297
+ private enum CodingKeys: String, CodingKey {
298
+ case nodes
299
+ case truncated
300
+ case scope
368
301
  }
369
- }
370
302
 
371
- struct SnapshotRect: Codable {
372
- let x: Double
373
- let y: Double
374
- let width: Double
375
- let height: Double
303
+ func encode(to encoder: Encoder) throws {
304
+ var container = encoder.container(keyedBy: CodingKeys.self)
305
+ try container.encode(nodes, forKey: .nodes)
306
+ try container.encode(truncated, forKey: .truncated)
307
+ try container.encodeNil(forKey: .scope)
308
+ }
376
309
  }
377
310
 
378
- struct PresentationOptions {
379
- let interactiveOnly: Bool
380
- let depth: Int?
381
- let scope: String?
382
- let raw: Bool
383
- /// Internal daemon ask: capture with this backend first regardless of channel
384
- /// health ("private-ax"). Same-backend evidence probes (tap-outcome
385
- /// corroboration) must be captured the way their baseline was.
386
- var preferredBackend: String? = nil
387
- /// Read UIAccessibilityCustomActions for merged leaves. Opt-in: each element
388
- /// costs its own AX round trip (see RunnerAXSnapshotBridge).
389
- var customActions: Bool = false
311
+ struct ErrorPayload: Codable {
312
+ var code: String?
313
+ let message: String
314
+ var hint: String?
390
315
  }
@@ -81,7 +81,7 @@ extension RunnerTests {
81
81
  return navigationBackKeywords.firstIndex { text.contains($0) }
82
82
  }
83
83
 
84
- // isFinite/>0 alone don't reject CGRect.infinite — its origin (~-9e307) is finite.
84
+
85
85
  static func isUsableNavigationFrame(_ frame: CGRect) -> Bool {
86
86
  guard frame.width.isFinite, frame.height.isFinite, frame.width > 0, frame.height > 0 else {
87
87
  return false
@@ -93,7 +93,7 @@ extension RunnerTests {
93
93
  guard isUsableNavigationFrame(candidate), isUsableNavigationFrame(window) else {
94
94
  return false
95
95
  }
96
- // Accept the compact navigation/search header band without matching deep content controls.
96
+
97
97
  let maxY = window.minY + min(max(window.height * 0.22, 96), 180)
98
98
  return candidate.midY >= window.minY && candidate.midY <= maxY
99
99
  }
@@ -102,9 +102,9 @@ extension RunnerTests {
102
102
  guard isUsableNavigationFrame(frame) else {
103
103
  return nil
104
104
  }
105
- // Aim at the standard leading navigation slot, bounded for compact and tablet widths.
105
+
106
106
  let xOffset = min(max(frame.width * 0.08, 28), 44)
107
- // Sit below the status/dynamic-island region and inside common custom RN search headers.
107
+
108
108
  let yOffset = min(max(frame.height * 0.155, 56), 132)
109
109
  return CGPoint(x: frame.minX + xOffset, y: frame.minY + yOffset)
110
110
  }
@@ -169,4 +169,71 @@ extension RunnerTests {
169
169
  return element.exists ? element : nil
170
170
  }
171
171
 
172
+
173
+
174
+
175
+
176
+
177
+
178
+
179
+
180
+
181
+
182
+
183
+
184
+
185
+
186
+
187
+
188
+
189
+
190
+
191
+
192
+
193
+
194
+
195
+
196
+
197
+
198
+
199
+
200
+
201
+
202
+
203
+
204
+
205
+
206
+
207
+
208
+
209
+
210
+
211
+
212
+
213
+
214
+
215
+
216
+
217
+
218
+
219
+
220
+
221
+
222
+
223
+
224
+
225
+
226
+
227
+
228
+
229
+
230
+
231
+
232
+
233
+
234
+
235
+
236
+
237
+
238
+
172
239
  }
@@ -0,0 +1,12 @@
1
+ import XCTest
2
+
3
+ extension RunnerTests {
4
+ func privateAXElementType(rawElementType: Int) -> XCUIElement.ElementType? {
5
+ guard let raw = UInt(exactly: rawElementType),
6
+ let type = XCUIElement.ElementType(rawValue: raw)
7
+ else {
8
+ return nil
9
+ }
10
+ return type
11
+ }
12
+ }