agent-device 0.19.0 → 0.19.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 (84) hide show
  1. package/README.md +5 -1
  2. package/android-multitouch-helper/dist/{agent-device-android-multitouch-helper-0.19.0.apk → agent-device-android-multitouch-helper-0.19.1.apk} +0 -0
  3. package/android-multitouch-helper/dist/agent-device-android-multitouch-helper-0.19.1.apk.sha256 +1 -0
  4. package/android-multitouch-helper/dist/{agent-device-android-multitouch-helper-0.19.0.manifest.json → agent-device-android-multitouch-helper-0.19.1.manifest.json} +4 -4
  5. package/android-snapshot-helper/dist/{agent-device-android-snapshot-helper-0.19.0.apk → agent-device-android-snapshot-helper-0.19.1.apk} +0 -0
  6. package/android-snapshot-helper/dist/agent-device-android-snapshot-helper-0.19.1.apk.sha256 +1 -0
  7. package/android-snapshot-helper/dist/{agent-device-android-snapshot-helper-0.19.0.manifest.json → agent-device-android-snapshot-helper-0.19.1.manifest.json} +6 -6
  8. package/dist/apple-runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+AXSnapshotFallback.swift +24 -7
  9. package/dist/apple-runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+CommandExecution.swift +506 -119
  10. package/dist/apple-runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Interaction.swift +153 -48
  11. package/dist/apple-runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Navigation.swift +172 -0
  12. package/dist/apple-runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+SequenceExecution.swift +76 -5
  13. package/dist/apple-runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Snapshot.swift +60 -52
  14. package/dist/apple-runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+SnapshotCapturePlan.swift +159 -56
  15. package/dist/apple-runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+SynthesizedGesturePolicy.swift +142 -0
  16. package/dist/apple-runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests.swift +16 -14
  17. package/dist/src/android-adb.d.ts +1 -2
  18. package/dist/src/android-adb.js +1 -1
  19. package/dist/src/android-input-ownership.js +6 -0
  20. package/dist/src/android.js +1 -1
  21. package/dist/src/app-lifecycle.js +3 -3
  22. package/dist/src/apple-runner-options.js +1 -1
  23. package/dist/src/apps.js +5 -5
  24. package/dist/src/cli-help.js +131 -34
  25. package/dist/src/cli-runner.js +1 -1
  26. package/dist/src/cli.js +11 -11
  27. package/dist/src/client.js +2 -2
  28. package/dist/src/command-metadata.js +1 -1
  29. package/dist/src/command-schema.js +3 -3
  30. package/dist/src/device-input-state.js +2 -2
  31. package/dist/src/devices2.js +1 -1
  32. package/dist/src/find.js +1 -1
  33. package/dist/src/generic.js +1 -1
  34. package/dist/src/index.d.ts +199 -20
  35. package/dist/src/input-actions.js +3 -3
  36. package/dist/src/interaction-snapshot.js +1 -1
  37. package/dist/src/interaction.js +1 -1
  38. package/dist/src/interactor.js +2 -2
  39. package/dist/src/internal/bin.js +1 -1
  40. package/dist/src/internal/daemon.js +17 -15
  41. package/dist/src/lease.js +1 -1
  42. package/dist/src/linux.js +1 -1
  43. package/dist/src/metro.d.ts +0 -1
  44. package/dist/src/notifications.js +1 -1
  45. package/dist/src/points.js +1 -1
  46. package/dist/src/project-runtime.js +1 -1
  47. package/dist/src/providers.js +1 -1
  48. package/dist/src/react-native.js +1 -1
  49. package/dist/src/record-trace-recording.js +2 -2
  50. package/dist/src/record-trace.js +1 -1
  51. package/dist/src/registry.js +24 -23
  52. package/dist/src/reporting.js +3 -3
  53. package/dist/src/runner-client.js +1 -1
  54. package/dist/src/runtime.js +2 -2
  55. package/dist/src/sdk-android-adb.d.ts +2 -2
  56. package/dist/src/sdk-batch-runner.d.ts +0 -1
  57. package/dist/src/sdk-batch.js +2 -2
  58. package/dist/src/sdk-finders.d.ts +1 -2
  59. package/dist/src/sdk-finders.js +1 -1
  60. package/dist/src/sdk-io.d.ts +0 -1
  61. package/dist/src/sdk-remote-config.d.ts +1 -2
  62. package/dist/src/sdk-remote-config.js +1 -1
  63. package/dist/src/sdk-selectors.js +1 -1
  64. package/dist/src/selector-runtime.js +1 -1
  65. package/dist/src/selectors.d.ts +0 -1
  66. package/dist/src/selectors.js +1 -1
  67. package/dist/src/selectors2.js +1 -1
  68. package/dist/src/server.js +3 -3
  69. package/dist/src/session.js +10 -10
  70. package/dist/src/simctl.js +1 -1
  71. package/dist/src/simulator.js +1 -1
  72. package/dist/src/snapshot-diagnostics.js +2 -2
  73. package/dist/src/snapshot-helper.js +4 -4
  74. package/dist/src/snapshot-quality.js +1 -1
  75. package/dist/src/snapshot2.js +2 -2
  76. package/dist/src/tv-remote.js +14 -0
  77. package/dist/src/web.js +1 -1
  78. package/package.json +5 -4
  79. package/server.json +2 -2
  80. package/skills/agent-device/SKILL.md +8 -7
  81. package/android-multitouch-helper/dist/agent-device-android-multitouch-helper-0.19.0.apk.sha256 +0 -1
  82. package/android-snapshot-helper/dist/agent-device-android-snapshot-helper-0.19.0.apk.sha256 +0 -1
  83. package/dist/src/device-rotation.js +0 -14
  84. package/dist/src/logcat.js +0 -6
package/README.md CHANGED
@@ -52,11 +52,15 @@ Install the CLI:
52
52
 
53
53
  ```bash
54
54
  npm install -g agent-device@latest
55
+ agent-device doctor
55
56
  agent-device --version
56
57
  agent-device help workflow
57
58
  ```
58
59
 
59
- The installed CLI help is the source of truth for agents. Start with `agent-device help workflow`, then follow the topic-specific help when a task needs dogfooding, debugging, replay, or React Native profiling.
60
+ Run `agent-device doctor` yourself after installation to check local setup before
61
+ handing the CLI to an agent. The installed CLI help is the source of truth for
62
+ agents. Start with `agent-device help workflow`, then follow the topic-specific
63
+ help when a task needs dogfooding, debugging, replay, or React Native profiling.
60
64
 
61
65
  Prerequisites depend on the target platform: Node.js 22+, Xcode for iOS/tvOS/macOS targets, Android SDK + ADB for Android, and macOS Accessibility permission for desktop automation. Web automation requires Node 24+. See [Installation](https://oss.callstack.com/agent-device/docs/installation) for platform setup.
62
66
 
@@ -0,0 +1 @@
1
+ 047938649fa5a1be4959384c3a6b64443cf4135567fb8f72cfb1107375b0eec7 agent-device-android-multitouch-helper-0.19.1.apk
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "android-multitouch-helper",
3
- "version": "0.19.0",
4
- "assetName": "agent-device-android-multitouch-helper-0.19.0.apk",
5
- "sha256": "fbcaeff3de2f16c64ffe2fef8a4736b4392a08f11e3c957d826b40009195cf2e",
3
+ "version": "0.19.1",
4
+ "assetName": "agent-device-android-multitouch-helper-0.19.1.apk",
5
+ "sha256": "047938649fa5a1be4959384c3a6b64443cf4135567fb8f72cfb1107375b0eec7",
6
6
  "packageName": "com.callstack.agentdevice.multitouchhelper",
7
- "versionCode": 19000,
7
+ "versionCode": 19001,
8
8
  "instrumentationRunner": "com.callstack.agentdevice.multitouchhelper/.MultiTouchInstrumentation",
9
9
  "statusProtocol": "android-multitouch-helper-v1"
10
10
  }
@@ -0,0 +1 @@
1
+ e6e5119b4b2ef7d67b8e50acc745f0ffec78951be2094a9198cb491c5e078b22 agent-device-android-snapshot-helper-0.19.1.apk
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "android-snapshot-helper",
3
- "version": "0.19.0",
4
- "releaseTag": "v0.19.0",
5
- "assetName": "agent-device-android-snapshot-helper-0.19.0.apk",
3
+ "version": "0.19.1",
4
+ "releaseTag": "v0.19.1",
5
+ "assetName": "agent-device-android-snapshot-helper-0.19.1.apk",
6
6
  "apkUrl": null,
7
- "sha256": "56bb052ba4868491bdace904dc41f905cdde3a589e4f4f314d2a7d57c6f8d76c",
8
- "checksumName": "agent-device-android-snapshot-helper-0.19.0.apk.sha256",
7
+ "sha256": "e6e5119b4b2ef7d67b8e50acc745f0ffec78951be2094a9198cb491c5e078b22",
8
+ "checksumName": "agent-device-android-snapshot-helper-0.19.1.apk.sha256",
9
9
  "packageName": "com.callstack.agentdevice.snapshothelper",
10
- "versionCode": 19000,
10
+ "versionCode": 19001,
11
11
  "instrumentationRunner": "com.callstack.agentdevice.snapshothelper/.SnapshotInstrumentation",
12
12
  "minSdk": 23,
13
13
  "targetSdk": 36,
@@ -57,14 +57,8 @@ extension RunnerTests {
57
57
  return nil
58
58
  }
59
59
 
60
- // If the app frame is unavailable, the private root's own frame is the reliable screen
61
- // rect here. Avoid public window queries: stale transient windows can record XCTest
62
- // failures after the runner already returned a successful command response.
63
- var viewport = safeSnapshotViewport(app: app)
64
60
  let rootFrame = privateAXRect(root["frame"])
65
- if viewport.isInfinite || viewport.isNull || viewport.isEmpty, !rootFrame.isEmpty {
66
- viewport = rootFrame
67
- }
61
+ let viewport = privateAXSnapshotViewport(app: app, rootFrame: rootFrame)
68
62
  var nodes: [SnapshotNode] = []
69
63
  appendPrivateAXNode(
70
64
  root,
@@ -95,6 +89,29 @@ extension RunnerTests {
95
89
  #endif
96
90
  }
97
91
 
92
+ private func privateAXSnapshotViewport(app: XCUIApplication, rootFrame: CGRect) -> CGRect {
93
+ let fallback = rootFrame.isEmpty ? CGRect.infinite : rootFrame
94
+ guard !hasAbandonedTreeCapture() else {
95
+ return fallback
96
+ }
97
+ do {
98
+ let viewport = try runMainThreadWork(
99
+ command: nil,
100
+ timeout: 1,
101
+ timeoutError: snapshotMainThreadTimeoutError("reading private AX viewport")
102
+ ) {
103
+ self.safeSnapshotViewport(app: app)
104
+ }
105
+ if viewport.isInfinite || viewport.isNull || viewport.isEmpty {
106
+ return fallback
107
+ }
108
+ return viewport
109
+ } catch {
110
+ NSLog("AGENT_DEVICE_RUNNER_PRIVATE_AX_VIEWPORT_FALLBACK=%@", String(describing: error))
111
+ return fallback
112
+ }
113
+ }
114
+
98
115
  private func appendPrivateAXNode(
99
116
  _ rawNode: [String: Any],
100
117
  to nodes: inout [SnapshotNode],