agent-device 0.10.2 → 0.10.3

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 (195) hide show
  1. package/dist/src/376.js +3 -0
  2. package/dist/src/bin.js +74 -73
  3. package/dist/src/daemon.js +37 -37
  4. package/dist/src/index.d.ts +559 -5
  5. package/dist/src/index.js +3 -1
  6. package/package.json +2 -1
  7. package/skills/agent-device/SKILL.md +35 -12
  8. package/skills/agent-device/references/bootstrap-install.md +55 -15
  9. package/skills/agent-device/references/exploration.md +49 -7
  10. package/skills/agent-device/references/macos-desktop.md +1 -2
  11. package/skills/agent-device/references/remote-tenancy.md +15 -2
  12. package/skills/agent-device/references/verification.md +2 -3
  13. package/dist/src/224.js +0 -2
  14. package/dist/src/331.js +0 -3
  15. package/dist/src/425.js +0 -1
  16. package/dist/src/bin.d.ts +0 -1
  17. package/dist/src/cli-client-commands.d.ts +0 -8
  18. package/dist/src/cli.d.ts +0 -6
  19. package/dist/src/client-metro.d.ts +0 -64
  20. package/dist/src/client-normalizers.d.ts +0 -20
  21. package/dist/src/client-shared.d.ts +0 -20
  22. package/dist/src/client-types.d.ts +0 -269
  23. package/dist/src/client.d.ts +0 -5
  24. package/dist/src/core/app-events.d.ts +0 -8
  25. package/dist/src/core/batch.d.ts +0 -17
  26. package/dist/src/core/capabilities.d.ts +0 -3
  27. package/dist/src/core/click-button.d.ts +0 -20
  28. package/dist/src/core/dispatch-payload.d.ts +0 -1
  29. package/dist/src/core/dispatch-resolve.d.ts +0 -29
  30. package/dist/src/core/dispatch-series.d.ts +0 -7
  31. package/dist/src/core/dispatch.d.ts +0 -37
  32. package/dist/src/core/open-target.d.ts +0 -4
  33. package/dist/src/core/session-surface.d.ts +0 -3
  34. package/dist/src/core/settings-contract.d.ts +0 -9
  35. package/dist/src/daemon/action-utils.d.ts +0 -3
  36. package/dist/src/daemon/android-system-dialog.d.ts +0 -11
  37. package/dist/src/daemon/app-log-android.d.ts +0 -4
  38. package/dist/src/daemon/app-log-ios.d.ts +0 -7
  39. package/dist/src/daemon/app-log-process.d.ts +0 -15
  40. package/dist/src/daemon/app-log-stream.d.ts +0 -19
  41. package/dist/src/daemon/app-log.d.ts +0 -28
  42. package/dist/src/daemon/artifact-archive.d.ts +0 -12
  43. package/dist/src/daemon/artifact-download.d.ts +0 -12
  44. package/dist/src/daemon/artifact-materialization.d.ts +0 -17
  45. package/dist/src/daemon/artifact-registry.d.ts +0 -12
  46. package/dist/src/daemon/config.d.ts +0 -16
  47. package/dist/src/daemon/context.d.ts +0 -25
  48. package/dist/src/daemon/device-ready.d.ts +0 -6
  49. package/dist/src/daemon/handlers/find.d.ts +0 -40
  50. package/dist/src/daemon/handlers/install-source.d.ts +0 -44
  51. package/dist/src/daemon/handlers/interaction-common.d.ts +0 -41
  52. package/dist/src/daemon/handlers/interaction-flags.d.ts +0 -4
  53. package/dist/src/daemon/handlers/interaction-get.d.ts +0 -3
  54. package/dist/src/daemon/handlers/interaction-is.d.ts +0 -3
  55. package/dist/src/daemon/handlers/interaction-read.d.ts +0 -14
  56. package/dist/src/daemon/handlers/interaction-scroll.d.ts +0 -3
  57. package/dist/src/daemon/handlers/interaction-selector.d.ts +0 -27
  58. package/dist/src/daemon/handlers/interaction-snapshot.d.ts +0 -8
  59. package/dist/src/daemon/handlers/interaction-targeting.d.ts +0 -28
  60. package/dist/src/daemon/handlers/interaction-touch.d.ts +0 -45
  61. package/dist/src/daemon/handlers/interaction.d.ts +0 -9
  62. package/dist/src/daemon/handlers/lease.d.ts +0 -8
  63. package/dist/src/daemon/handlers/parse-utils.d.ts +0 -3
  64. package/dist/src/daemon/handlers/record-trace-android.d.ts +0 -18
  65. package/dist/src/daemon/handlers/record-trace-ios.d.ts +0 -52
  66. package/dist/src/daemon/handlers/record-trace-recording.d.ts +0 -32
  67. package/dist/src/daemon/handlers/record-trace.d.ts +0 -10
  68. package/dist/src/daemon/handlers/session-batch.d.ts +0 -2
  69. package/dist/src/daemon/handlers/session-close.d.ts +0 -31
  70. package/dist/src/daemon/handlers/session-deploy.d.ts +0 -37
  71. package/dist/src/daemon/handlers/session-device-utils.d.ts +0 -26
  72. package/dist/src/daemon/handlers/session-open-target.d.ts +0 -3
  73. package/dist/src/daemon/handlers/session-open.d.ts +0 -22
  74. package/dist/src/daemon/handlers/session-perf.d.ts +0 -2
  75. package/dist/src/daemon/handlers/session-replay-heal.d.ts +0 -8
  76. package/dist/src/daemon/handlers/session-replay-script.d.ts +0 -3
  77. package/dist/src/daemon/handlers/session-runtime-command.d.ts +0 -9
  78. package/dist/src/daemon/handlers/session-runtime.d.ts +0 -36
  79. package/dist/src/daemon/handlers/session-startup-metrics.d.ts +0 -11
  80. package/dist/src/daemon/handlers/session.d.ts +0 -50
  81. package/dist/src/daemon/handlers/snapshot-alert.d.ts +0 -13
  82. package/dist/src/daemon/handlers/snapshot-capture.d.ts +0 -34
  83. package/dist/src/daemon/handlers/snapshot-session.d.ts +0 -15
  84. package/dist/src/daemon/handlers/snapshot-settings.d.ts +0 -24
  85. package/dist/src/daemon/handlers/snapshot-wait.d.ts +0 -37
  86. package/dist/src/daemon/handlers/snapshot.d.ts +0 -16
  87. package/dist/src/daemon/http-server.d.ts +0 -26
  88. package/dist/src/daemon/install-source-resolution.d.ts +0 -5
  89. package/dist/src/daemon/is-predicates.d.ts +0 -15
  90. package/dist/src/daemon/lease-context.d.ts +0 -9
  91. package/dist/src/daemon/lease-registry.d.ts +0 -63
  92. package/dist/src/daemon/materialized-path-registry.d.ts +0 -15
  93. package/dist/src/daemon/network-log.d.ts +0 -32
  94. package/dist/src/daemon/record-trace-errors.d.ts +0 -6
  95. package/dist/src/daemon/recording-gestures.d.ts +0 -3
  96. package/dist/src/daemon/recording-telemetry.d.ts +0 -20
  97. package/dist/src/daemon/recording-timing.d.ts +0 -24
  98. package/dist/src/daemon/request-cancel.d.ts +0 -9
  99. package/dist/src/daemon/request-lock-policy.d.ts +0 -2
  100. package/dist/src/daemon/request-router.d.ts +0 -23
  101. package/dist/src/daemon/runtime-hints.d.ts +0 -19
  102. package/dist/src/daemon/script-utils.d.ts +0 -28
  103. package/dist/src/daemon/scroll-planner.d.ts +0 -12
  104. package/dist/src/daemon/selectors-build.d.ts +0 -5
  105. package/dist/src/daemon/selectors-match.d.ts +0 -6
  106. package/dist/src/daemon/selectors-parse.d.ts +0 -29
  107. package/dist/src/daemon/selectors-resolve.d.ts +0 -33
  108. package/dist/src/daemon/selectors.d.ts +0 -5
  109. package/dist/src/daemon/server-lifecycle.d.ts +0 -23
  110. package/dist/src/daemon/session-open-script.d.ts +0 -7
  111. package/dist/src/daemon/session-routing.d.ts +0 -3
  112. package/dist/src/daemon/session-selector.d.ts +0 -10
  113. package/dist/src/daemon/session-store.d.ts +0 -33
  114. package/dist/src/daemon/snapshot-diff.d.ts +0 -20
  115. package/dist/src/daemon/snapshot-processing.d.ts +0 -10
  116. package/dist/src/daemon/touch-reference-frame.d.ts +0 -7
  117. package/dist/src/daemon/transport.d.ts +0 -6
  118. package/dist/src/daemon/types.d.ts +0 -173
  119. package/dist/src/daemon/upload-registry.d.ts +0 -7
  120. package/dist/src/daemon/upload.d.ts +0 -5
  121. package/dist/src/daemon-client.d.ts +0 -40
  122. package/dist/src/daemon.d.ts +0 -1
  123. package/dist/src/platforms/android/adb.d.ts +0 -5
  124. package/dist/src/platforms/android/app-lifecycle.d.ts +0 -31
  125. package/dist/src/platforms/android/device-input-state.d.ts +0 -19
  126. package/dist/src/platforms/android/devices.d.ts +0 -26
  127. package/dist/src/platforms/android/index.d.ts +0 -8
  128. package/dist/src/platforms/android/input-actions.d.ts +0 -17
  129. package/dist/src/platforms/android/install-artifact.d.ts +0 -11
  130. package/dist/src/platforms/android/manifest.d.ts +0 -1
  131. package/dist/src/platforms/android/notifications.d.ts +0 -11
  132. package/dist/src/platforms/android/open-target.d.ts +0 -4
  133. package/dist/src/platforms/android/screenshot.d.ts +0 -16
  134. package/dist/src/platforms/android/sdk.d.ts +0 -2
  135. package/dist/src/platforms/android/settings.d.ts +0 -3
  136. package/dist/src/platforms/android/snapshot.d.ts +0 -7
  137. package/dist/src/platforms/android/ui-hierarchy.d.ts +0 -21
  138. package/dist/src/platforms/appearance.d.ts +0 -2
  139. package/dist/src/platforms/boot-diagnostics.d.ts +0 -14
  140. package/dist/src/platforms/install-source.d.ts +0 -29
  141. package/dist/src/platforms/ios/app-filter.d.ts +0 -2
  142. package/dist/src/platforms/ios/apps.d.ts +0 -34
  143. package/dist/src/platforms/ios/config.d.ts +0 -10
  144. package/dist/src/platforms/ios/devicectl.d.ts +0 -13
  145. package/dist/src/platforms/ios/devices.d.ts +0 -40
  146. package/dist/src/platforms/ios/ensure-simulator.d.ts +0 -18
  147. package/dist/src/platforms/ios/index.d.ts +0 -3
  148. package/dist/src/platforms/ios/install-artifact.d.ts +0 -18
  149. package/dist/src/platforms/ios/launch-diagnostics.d.ts +0 -11
  150. package/dist/src/platforms/ios/macos-apps.d.ts +0 -12
  151. package/dist/src/platforms/ios/macos-helper.d.ts +0 -69
  152. package/dist/src/platforms/ios/plist.d.ts +0 -1
  153. package/dist/src/platforms/ios/runner-client.d.ts +0 -38
  154. package/dist/src/platforms/ios/runner-errors.d.ts +0 -20
  155. package/dist/src/platforms/ios/runner-macos-products.d.ts +0 -3
  156. package/dist/src/platforms/ios/runner-session.d.ts +0 -30
  157. package/dist/src/platforms/ios/runner-transport.d.ts +0 -10
  158. package/dist/src/platforms/ios/runner-xctestrun-products.d.ts +0 -2
  159. package/dist/src/platforms/ios/runner-xctestrun.d.ts +0 -38
  160. package/dist/src/platforms/ios/screenshot-status-bar.d.ts +0 -2
  161. package/dist/src/platforms/ios/screenshot.d.ts +0 -14
  162. package/dist/src/platforms/ios/simctl.d.ts +0 -7
  163. package/dist/src/platforms/ios/simulator.d.ts +0 -11
  164. package/dist/src/platforms/permission-utils.d.ts +0 -9
  165. package/dist/src/recording/overlay.d.ts +0 -10
  166. package/dist/src/upload-client.d.ts +0 -7
  167. package/dist/src/utils/args.d.ts +0 -27
  168. package/dist/src/utils/cli-config.d.ts +0 -10
  169. package/dist/src/utils/cli-option-schema.d.ts +0 -19
  170. package/dist/src/utils/cli-options.d.ts +0 -13
  171. package/dist/src/utils/command-schema.d.ts +0 -123
  172. package/dist/src/utils/device-isolation.d.ts +0 -3
  173. package/dist/src/utils/device.d.ts +0 -35
  174. package/dist/src/utils/diagnostics.d.ts +0 -30
  175. package/dist/src/utils/errors.d.ts +0 -26
  176. package/dist/src/utils/exec.d.ts +0 -32
  177. package/dist/src/utils/finders.d.ts +0 -12
  178. package/dist/src/utils/interactors.d.ts +0 -38
  179. package/dist/src/utils/json-input.d.ts +0 -1
  180. package/dist/src/utils/keyed-lock.d.ts +0 -1
  181. package/dist/src/utils/output.d.ts +0 -27
  182. package/dist/src/utils/path-resolution.d.ts +0 -8
  183. package/dist/src/utils/payload-input.d.ts +0 -12
  184. package/dist/src/utils/process-identity.d.ts +0 -11
  185. package/dist/src/utils/remote-config.d.ts +0 -15
  186. package/dist/src/utils/remote-open.d.ts +0 -9
  187. package/dist/src/utils/retry.d.ts +0 -54
  188. package/dist/src/utils/screenshot-diff.d.ts +0 -23
  189. package/dist/src/utils/session-binding.d.ts +0 -18
  190. package/dist/src/utils/snapshot-lines.d.ts +0 -15
  191. package/dist/src/utils/snapshot.d.ts +0 -49
  192. package/dist/src/utils/text-surface.d.ts +0 -19
  193. package/dist/src/utils/timeouts.d.ts +0 -3
  194. package/dist/src/utils/version.d.ts +0 -2
  195. package/dist/src/utils/video.d.ts +0 -9
@@ -1,20 +0,0 @@
1
- import type { AgentDeviceDevice, AgentDeviceIdentifiers, AgentDeviceSession, AgentDeviceSessionDevice, AppCloseResult, AppDeployResult, AppInstallFromSourceResult, AppOpenResult, CaptureSnapshotResult, EnsureSimulatorResult, SessionCloseResult } from './client-types.ts';
2
- import type { Platform } from './utils/device.ts';
3
- export declare function buildAppIdentifiers(params: {
4
- session?: string;
5
- bundleId?: string;
6
- packageName?: string;
7
- appId?: string;
8
- }): AgentDeviceIdentifiers;
9
- export declare function buildDeviceIdentifiers(platform: Platform, id: string, name: string): AgentDeviceIdentifiers;
10
- export declare function serializeSessionDevice(device: AgentDeviceSessionDevice, options?: {
11
- includeAndroidSerial?: boolean;
12
- }): Record<string, unknown>;
13
- export declare function serializeSessionListEntry(session: AgentDeviceSession): Record<string, unknown>;
14
- export declare function serializeDevice(device: AgentDeviceDevice): Record<string, unknown>;
15
- export declare function serializeEnsureSimulatorResult(result: EnsureSimulatorResult): Record<string, unknown>;
16
- export declare function serializeDeployResult(result: AppDeployResult): Record<string, unknown>;
17
- export declare function serializeInstallFromSourceResult(result: AppInstallFromSourceResult): Record<string, unknown>;
18
- export declare function serializeOpenResult(result: AppOpenResult): Record<string, unknown>;
19
- export declare function serializeCloseResult(result: SessionCloseResult | AppCloseResult): Record<string, unknown>;
20
- export declare function serializeSnapshotResult(result: CaptureSnapshotResult): Record<string, unknown>;
@@ -1,269 +0,0 @@
1
- import type { DaemonInstallSource, DaemonLockPolicy, DaemonRequest, DaemonResponse, SessionRuntimeHints } from './daemon/types.ts';
2
- import type { DeviceKind, DeviceTarget, Platform, PlatformSelector } from './utils/device.ts';
3
- import type { SnapshotNode } from './utils/snapshot.ts';
4
- import type { MetroPrepareKind, PrepareMetroRuntimeResult } from './client-metro.ts';
5
- type DaemonTransportMode = 'auto' | 'socket' | 'http';
6
- type DaemonServerMode = 'socket' | 'http' | 'dual';
7
- type SessionIsolationMode = 'none' | 'tenant';
8
- export type AgentDeviceDaemonTransport = (req: Omit<DaemonRequest, 'token'>) => Promise<DaemonResponse>;
9
- export type AgentDeviceClientConfig = {
10
- session?: string;
11
- lockPolicy?: DaemonLockPolicy;
12
- lockPlatform?: PlatformSelector;
13
- requestId?: string;
14
- stateDir?: string;
15
- daemonBaseUrl?: string;
16
- daemonAuthToken?: string;
17
- daemonTransport?: DaemonTransportMode;
18
- daemonServerMode?: DaemonServerMode;
19
- tenant?: string;
20
- sessionIsolation?: SessionIsolationMode;
21
- runId?: string;
22
- leaseId?: string;
23
- cwd?: string;
24
- debug?: boolean;
25
- };
26
- export type AgentDeviceRequestOverrides = Pick<AgentDeviceClientConfig, 'session' | 'lockPolicy' | 'lockPlatform' | 'requestId' | 'tenant' | 'sessionIsolation' | 'runId' | 'leaseId' | 'cwd' | 'debug'>;
27
- export type AgentDeviceIdentifiers = {
28
- session?: string;
29
- deviceId?: string;
30
- deviceName?: string;
31
- udid?: string;
32
- serial?: string;
33
- appId?: string;
34
- appBundleId?: string;
35
- package?: string;
36
- };
37
- export type AgentDeviceSelectionOptions = {
38
- platform?: PlatformSelector;
39
- target?: DeviceTarget;
40
- device?: string;
41
- udid?: string;
42
- serial?: string;
43
- iosSimulatorDeviceSet?: string;
44
- androidDeviceAllowlist?: string;
45
- };
46
- export type AgentDeviceDevice = {
47
- platform: Platform;
48
- target: DeviceTarget;
49
- kind: DeviceKind;
50
- id: string;
51
- name: string;
52
- booted?: boolean;
53
- identifiers: AgentDeviceIdentifiers;
54
- ios?: {
55
- udid: string;
56
- };
57
- android?: {
58
- serial: string;
59
- };
60
- };
61
- export type AgentDeviceSessionDevice = {
62
- platform: Platform;
63
- target: DeviceTarget;
64
- id: string;
65
- name: string;
66
- identifiers: AgentDeviceIdentifiers;
67
- ios?: {
68
- udid: string;
69
- simulatorSetPath?: string | null;
70
- };
71
- android?: {
72
- serial: string;
73
- };
74
- };
75
- export type AgentDeviceSession = {
76
- name: string;
77
- createdAt: number;
78
- device: AgentDeviceSessionDevice;
79
- identifiers: AgentDeviceIdentifiers;
80
- };
81
- export type StartupPerfSample = {
82
- durationMs: number;
83
- measuredAt: string;
84
- method: string;
85
- appTarget?: string;
86
- appBundleId?: string;
87
- };
88
- export type SessionCloseResult = {
89
- session: string;
90
- shutdown?: Record<string, unknown>;
91
- identifiers: AgentDeviceIdentifiers;
92
- };
93
- export type EnsureSimulatorOptions = AgentDeviceRequestOverrides & {
94
- device: string;
95
- runtime?: string;
96
- boot?: boolean;
97
- reuseExisting?: boolean;
98
- iosSimulatorDeviceSet?: string;
99
- };
100
- export type EnsureSimulatorResult = {
101
- udid: string;
102
- device: string;
103
- runtime: string;
104
- created: boolean;
105
- booted: boolean;
106
- iosSimulatorDeviceSet?: string | null;
107
- identifiers: AgentDeviceIdentifiers;
108
- };
109
- export type AppDeployOptions = AgentDeviceRequestOverrides & AgentDeviceSelectionOptions & {
110
- app: string;
111
- appPath: string;
112
- };
113
- export type AppDeployResult = {
114
- app: string;
115
- appPath: string;
116
- platform: Platform;
117
- appId?: string;
118
- bundleId?: string;
119
- package?: string;
120
- identifiers: AgentDeviceIdentifiers;
121
- };
122
- export type AppOpenOptions = AgentDeviceRequestOverrides & AgentDeviceSelectionOptions & {
123
- app: string;
124
- url?: string;
125
- activity?: string;
126
- relaunch?: boolean;
127
- saveScript?: boolean | string;
128
- noRecord?: boolean;
129
- runtime?: SessionRuntimeHints;
130
- };
131
- export type AppOpenResult = {
132
- session: string;
133
- appName?: string;
134
- appBundleId?: string;
135
- appId?: string;
136
- startup?: StartupPerfSample;
137
- runtime?: SessionRuntimeHints;
138
- device?: AgentDeviceSessionDevice;
139
- identifiers: AgentDeviceIdentifiers;
140
- };
141
- export type AppCloseOptions = AgentDeviceRequestOverrides & {
142
- app?: string;
143
- shutdown?: boolean;
144
- };
145
- export type AppCloseResult = {
146
- session: string;
147
- closedApp?: string;
148
- shutdown?: Record<string, unknown>;
149
- identifiers: AgentDeviceIdentifiers;
150
- };
151
- export type AppInstallFromSourceOptions = AgentDeviceRequestOverrides & AgentDeviceSelectionOptions & {
152
- source: DaemonInstallSource;
153
- retainPaths?: boolean;
154
- retentionMs?: number;
155
- };
156
- export type AppInstallFromSourceResult = {
157
- appName?: string;
158
- appId?: string;
159
- bundleId?: string;
160
- packageName?: string;
161
- launchTarget: string;
162
- installablePath?: string;
163
- archivePath?: string;
164
- materializationId?: string;
165
- materializationExpiresAt?: string;
166
- identifiers: AgentDeviceIdentifiers;
167
- };
168
- export type MaterializationReleaseOptions = AgentDeviceRequestOverrides & {
169
- materializationId: string;
170
- };
171
- export type MaterializationReleaseResult = {
172
- released: boolean;
173
- materializationId: string;
174
- identifiers: AgentDeviceIdentifiers;
175
- };
176
- export type MetroPrepareOptions = {
177
- projectRoot?: string;
178
- kind?: MetroPrepareKind;
179
- publicBaseUrl: string;
180
- proxyBaseUrl?: string;
181
- bearerToken?: string;
182
- port?: number;
183
- listenHost?: string;
184
- statusHost?: string;
185
- startupTimeoutMs?: number;
186
- probeTimeoutMs?: number;
187
- reuseExisting?: boolean;
188
- installDependenciesIfNeeded?: boolean;
189
- runtimeFilePath?: string;
190
- logPath?: string;
191
- };
192
- export type MetroPrepareResult = PrepareMetroRuntimeResult;
193
- export type CaptureSnapshotOptions = AgentDeviceRequestOverrides & AgentDeviceSelectionOptions & {
194
- interactiveOnly?: boolean;
195
- compact?: boolean;
196
- depth?: number;
197
- scope?: string;
198
- raw?: boolean;
199
- };
200
- export type CaptureSnapshotResult = {
201
- nodes: SnapshotNode[];
202
- truncated: boolean;
203
- appName?: string;
204
- appBundleId?: string;
205
- identifiers: AgentDeviceIdentifiers;
206
- };
207
- export type CaptureScreenshotOptions = AgentDeviceRequestOverrides & {
208
- path?: string;
209
- };
210
- export type CaptureScreenshotResult = {
211
- path: string;
212
- identifiers: AgentDeviceIdentifiers;
213
- };
214
- export type InternalRequestOptions = AgentDeviceClientConfig & AgentDeviceSelectionOptions & {
215
- simulatorRuntimeId?: string;
216
- runtime?: SessionRuntimeHints;
217
- boot?: boolean;
218
- reuseExisting?: boolean;
219
- activity?: string;
220
- relaunch?: boolean;
221
- shutdown?: boolean;
222
- saveScript?: boolean | string;
223
- noRecord?: boolean;
224
- metroHost?: string;
225
- metroPort?: number;
226
- bundleUrl?: string;
227
- launchUrl?: string;
228
- interactiveOnly?: boolean;
229
- compact?: boolean;
230
- depth?: number;
231
- scope?: string;
232
- raw?: boolean;
233
- installSource?: DaemonInstallSource;
234
- retainMaterializedPaths?: boolean;
235
- materializedPathRetentionMs?: number;
236
- materializationId?: string;
237
- };
238
- export type AgentDeviceClient = {
239
- devices: {
240
- list: (options?: AgentDeviceRequestOverrides & AgentDeviceSelectionOptions) => Promise<AgentDeviceDevice[]>;
241
- };
242
- sessions: {
243
- list: (options?: AgentDeviceRequestOverrides) => Promise<AgentDeviceSession[]>;
244
- close: (options?: AgentDeviceRequestOverrides & {
245
- shutdown?: boolean;
246
- }) => Promise<SessionCloseResult>;
247
- };
248
- simulators: {
249
- ensure: (options: EnsureSimulatorOptions) => Promise<EnsureSimulatorResult>;
250
- };
251
- apps: {
252
- install: (options: AppDeployOptions) => Promise<AppDeployResult>;
253
- reinstall: (options: AppDeployOptions) => Promise<AppDeployResult>;
254
- installFromSource: (options: AppInstallFromSourceOptions) => Promise<AppInstallFromSourceResult>;
255
- open: (options: AppOpenOptions) => Promise<AppOpenResult>;
256
- close: (options?: AppCloseOptions) => Promise<AppCloseResult>;
257
- };
258
- materializations: {
259
- release: (options: MaterializationReleaseOptions) => Promise<MaterializationReleaseResult>;
260
- };
261
- metro: {
262
- prepare: (options: MetroPrepareOptions) => Promise<MetroPrepareResult>;
263
- };
264
- capture: {
265
- snapshot: (options?: CaptureSnapshotOptions) => Promise<CaptureSnapshotResult>;
266
- screenshot: (options?: CaptureScreenshotOptions) => Promise<CaptureScreenshotResult>;
267
- };
268
- };
269
- export {};
@@ -1,5 +0,0 @@
1
- import type { AgentDeviceClient, AgentDeviceClientConfig, AgentDeviceDaemonTransport } from './client-types.ts';
2
- export declare function createAgentDeviceClient(config?: AgentDeviceClientConfig, deps?: {
3
- transport?: AgentDeviceDaemonTransport;
4
- }): AgentDeviceClient;
5
- export type { AgentDeviceClient, AgentDeviceClientConfig, AgentDeviceDaemonTransport, AgentDeviceDevice, AgentDeviceIdentifiers, AgentDeviceRequestOverrides, AgentDeviceSelectionOptions, AgentDeviceSession, AgentDeviceSessionDevice, AppCloseOptions, AppCloseResult, AppDeployOptions, AppDeployResult, AppInstallFromSourceOptions, AppInstallFromSourceResult, AppOpenOptions, AppOpenResult, CaptureScreenshotOptions, CaptureScreenshotResult, CaptureSnapshotOptions, CaptureSnapshotResult, EnsureSimulatorOptions, EnsureSimulatorResult, MaterializationReleaseOptions, MaterializationReleaseResult, MetroPrepareOptions, MetroPrepareResult, SessionCloseResult, StartupPerfSample, } from './client-types.ts';
@@ -1,8 +0,0 @@
1
- import type { DeviceInfo } from '../utils/device.ts';
2
- type AppEventPayload = Record<string, unknown> | undefined;
3
- export declare function parseTriggerAppEventArgs(positionals: string[]): {
4
- eventName: string;
5
- payload: AppEventPayload;
6
- };
7
- export declare function resolveAppEventUrl(platform: DeviceInfo['platform'], eventName: string, payload?: AppEventPayload): string;
8
- export {};
@@ -1,17 +0,0 @@
1
- import type { BatchStep, CommandFlags } from './dispatch.ts';
2
- export declare const DEFAULT_BATCH_MAX_STEPS = 100;
3
- export type NormalizedBatchStep = {
4
- command: string;
5
- positionals: string[];
6
- flags: Partial<CommandFlags>;
7
- runtime?: unknown;
8
- };
9
- export type BatchStepResult = {
10
- step: number;
11
- command: string;
12
- ok: true;
13
- data: Record<string, unknown>;
14
- durationMs: number;
15
- };
16
- export declare function parseBatchStepsJson(raw: string): BatchStep[];
17
- export declare function validateAndNormalizeBatchSteps(steps: CommandFlags['batchSteps'], maxSteps: number): NormalizedBatchStep[];
@@ -1,3 +0,0 @@
1
- import { type DeviceInfo } from '../utils/device.ts';
2
- export declare function isCommandSupportedOnDevice(command: string, device: DeviceInfo): boolean;
3
- export declare function listCapabilityCommands(): string[];
@@ -1,20 +0,0 @@
1
- import { AppError } from '../utils/errors.ts';
2
- export type ClickButton = 'primary' | 'secondary' | 'middle';
3
- type ClickButtonFlags = {
4
- clickButton?: ClickButton;
5
- };
6
- export declare function resolveClickButton(flags: ClickButtonFlags | undefined): ClickButton;
7
- export declare function getClickButtonValidationError(options: {
8
- commandLabel: string;
9
- platform: string;
10
- button: ClickButton;
11
- count?: number;
12
- intervalMs?: number;
13
- holdMs?: number;
14
- jitterPx?: number;
15
- doubleTap?: boolean;
16
- }): AppError | null;
17
- export declare function buttonTag(button: ClickButton): {} | {
18
- button: ClickButton;
19
- };
20
- export {};
@@ -1 +0,0 @@
1
- export declare function readNotificationPayload(payloadArg: string): Promise<Record<string, unknown>>;
@@ -1,29 +0,0 @@
1
- import { resolveDevice, type DeviceInfo, type PlatformSelector } from '../utils/device.ts';
2
- import { findBootableIosSimulator } from '../platforms/ios/devices.ts';
3
- import type { CliFlags } from '../utils/command-schema.ts';
4
- import type { DeviceTarget } from '../utils/device.ts';
5
- type ResolveDeviceFlags = Pick<CliFlags, 'platform' | 'target' | 'device' | 'udid' | 'serial' | 'iosSimulatorDeviceSet' | 'androidDeviceAllowlist'>;
6
- type AppleDeviceSelector = {
7
- platform?: Exclude<PlatformSelector, 'android'>;
8
- target?: DeviceTarget;
9
- deviceName?: string;
10
- udid?: string;
11
- serial?: string;
12
- };
13
- type ResolveAppleDeviceDeps = {
14
- resolveDevice: typeof resolveDevice;
15
- findBootableSimulator: typeof findBootableIosSimulator;
16
- };
17
- /**
18
- * Resolves the best iOS device given pre-fetched candidates. When no explicit
19
- * device selector was used, physical devices are rejected in favour of a
20
- * bootable simulator discovered via `findBootableSimulator`.
21
- *
22
- * Exported for testing; production callers should use `resolveTargetDevice`.
23
- */
24
- export declare function resolveAppleDevice(devices: DeviceInfo[], selector: AppleDeviceSelector, context: {
25
- simulatorSetPath?: string;
26
- }, deps: ResolveAppleDeviceDeps): Promise<DeviceInfo>;
27
- export declare const resolveIosDevice: typeof resolveAppleDevice;
28
- export declare function resolveTargetDevice(flags: ResolveDeviceFlags): Promise<DeviceInfo>;
29
- export {};
@@ -1,7 +0,0 @@
1
- import type { DeviceInfo } from '../utils/device.ts';
2
- export declare function requireIntInRange(value: number, name: string, min: number, max: number): number;
3
- export declare function clampIosSwipeDuration(durationMs: number): number;
4
- export declare function shouldUseIosTapSeries(device: DeviceInfo, count: number, holdMs: number, jitterPx: number): boolean;
5
- export declare function shouldUseIosDragSeries(device: DeviceInfo, count: number): boolean;
6
- export declare function computeDeterministicJitter(index: number, jitterPx: number): [number, number];
7
- export declare function runRepeatedSeries(count: number, pauseMs: number, operation: (index: number) => Promise<void>): Promise<void>;
@@ -1,37 +0,0 @@
1
- import type { DeviceInfo } from '../utils/device.ts';
2
- import type { SessionSurface } from './session-surface.ts';
3
- import type { CliFlags } from '../utils/command-schema.ts';
4
- import { shouldUseIosTapSeries, shouldUseIosDragSeries } from './dispatch-series.ts';
5
- export { resolveTargetDevice } from './dispatch-resolve.ts';
6
- export { shouldUseIosTapSeries, shouldUseIosDragSeries };
7
- export type BatchStep = {
8
- command: string;
9
- positionals?: string[];
10
- flags?: Partial<CommandFlags>;
11
- runtime?: unknown;
12
- };
13
- export type CommandFlags = Omit<CliFlags, 'json' | 'help' | 'version' | 'batchSteps'> & {
14
- batchSteps?: BatchStep[];
15
- };
16
- export declare function dispatchCommand(device: DeviceInfo, command: string, positionals: string[], outPath?: string, context?: {
17
- requestId?: string;
18
- appBundleId?: string;
19
- activity?: string;
20
- verbose?: boolean;
21
- logPath?: string;
22
- traceLogPath?: string;
23
- snapshotInteractiveOnly?: boolean;
24
- snapshotCompact?: boolean;
25
- snapshotDepth?: number;
26
- snapshotScope?: string;
27
- snapshotRaw?: boolean;
28
- count?: number;
29
- intervalMs?: number;
30
- holdMs?: number;
31
- jitterPx?: number;
32
- doubleTap?: boolean;
33
- clickButton?: 'primary' | 'secondary' | 'middle';
34
- pauseMs?: number;
35
- pattern?: 'one-way' | 'ping-pong';
36
- surface?: SessionSurface;
37
- }): Promise<Record<string, unknown> | void>;
@@ -1,4 +0,0 @@
1
- export declare function isDeepLinkTarget(input: string): boolean;
2
- export declare function isWebUrl(input: string): boolean;
3
- export declare const IOS_SAFARI_BUNDLE_ID = "com.apple.mobilesafari";
4
- export declare function resolveIosDeviceDeepLinkBundleId(appBundleId: string | undefined, url: string): string | undefined;
@@ -1,3 +0,0 @@
1
- export type SessionSurface = 'app' | 'frontmost-app' | 'desktop' | 'menubar';
2
- export declare const SESSION_SURFACES: readonly SessionSurface[];
3
- export declare function parseSessionSurface(value: string | undefined): SessionSurface;
@@ -1,9 +0,0 @@
1
- export declare const SETTINGS_WIFI_USAGE = "<wifi|airplane|location> <on|off>";
2
- export declare const SETTINGS_APPEARANCE_USAGE = "appearance <light|dark|toggle>";
3
- export declare const SETTINGS_FACEID_USAGE = "faceid <match|nonmatch|enroll|unenroll>";
4
- export declare const SETTINGS_TOUCHID_USAGE = "touchid <match|nonmatch|enroll|unenroll>";
5
- export declare const SETTINGS_FINGERPRINT_USAGE = "fingerprint <match|nonmatch>";
6
- export declare const SETTINGS_PERMISSION_USAGE = "permission <grant|deny|reset> <camera|microphone|photos|contacts|contacts-limited|notifications|calendar|location|location-always|media-library|motion|reminders|siri> [full|limited]";
7
- export declare const SETTINGS_MACOS_PERMISSION_USAGE = "permission <grant|reset> <accessibility|screen-recording|input-monitoring>";
8
- export declare const SETTINGS_USAGE_OVERRIDE: string;
9
- export declare const SETTINGS_INVALID_ARGS_MESSAGE = "settings requires <wifi|airplane|location> <on|off>, appearance <light|dark|toggle>, faceid <match|nonmatch|enroll|unenroll>, touchid <match|nonmatch|enroll|unenroll>, fingerprint <match|nonmatch>, permission <grant|deny|reset> <camera|microphone|photos|contacts|contacts-limited|notifications|calendar|location|location-always|media-library|motion|reminders|siri> [full|limited], or permission <grant|reset> <accessibility|screen-recording|input-monitoring>";
@@ -1,3 +0,0 @@
1
- import type { SessionAction } from './types.ts';
2
- export declare function inferFillText(action: SessionAction): string;
3
- export declare function uniqueStrings(values: string[]): string[];
@@ -1,11 +0,0 @@
1
- import { openAndroidApp, snapshotAndroid, getAndroidAppState } from '../platforms/android/index.ts';
2
- import { runCmd } from '../utils/exec.ts';
3
- import type { SessionState } from './types.ts';
4
- export type AndroidBlockingDialogRecoveryResult = 'absent' | 'recovered' | 'failed';
5
- export declare function recoverAndroidBlockingSystemDialog(params: {
6
- session: SessionState;
7
- snapshotAndroidUi?: typeof snapshotAndroid;
8
- reopenAndroidApp?: typeof openAndroidApp;
9
- readAndroidAppState?: typeof getAndroidAppState;
10
- execCommand?: typeof runCmd;
11
- }): Promise<AndroidBlockingDialogRecoveryResult>;
@@ -1,4 +0,0 @@
1
- import fs from 'node:fs';
2
- import { type AppLogResult } from './app-log-process.ts';
3
- export declare function assertAndroidPackageArgSafe(appBundleId: string): void;
4
- export declare function startAndroidAppLog(deviceId: string, appBundleId: string, stream: fs.WriteStream, redactionPatterns: RegExp[], pidPath?: string): Promise<AppLogResult>;
@@ -1,7 +0,0 @@
1
- import fs from 'node:fs';
2
- import { type AppLogResult } from './app-log-process.ts';
3
- export declare function buildAppleLogPredicate(appBundleId: string): string;
4
- export declare function buildIosDeviceLogStreamArgs(deviceId: string): string[];
5
- export declare function startIosSimulatorAppLog(appBundleId: string, stream: fs.WriteStream, redactionPatterns: RegExp[], pidPath?: string): Promise<AppLogResult>;
6
- export declare function startMacOsAppLog(appBundleId: string, stream: fs.WriteStream, redactionPatterns: RegExp[], pidPath?: string): Promise<AppLogResult>;
7
- export declare function startIosDeviceAppLog(deviceId: string, stream: fs.WriteStream, redactionPatterns: RegExp[], pidPath?: string): Promise<AppLogResult>;
@@ -1,15 +0,0 @@
1
- export declare const APP_LOG_PID_FILENAME = "app-log.pid";
2
- export type AppLogResult = {
3
- backend: 'ios-simulator' | 'ios-device' | 'android' | 'macos';
4
- getState: () => 'active' | 'failed';
5
- startedAt: number;
6
- stop: () => Promise<void>;
7
- wait: Promise<{
8
- stdout: string;
9
- stderr: string;
10
- exitCode: number;
11
- }>;
12
- };
13
- export declare function writePidFile(pidPath: string | undefined, pid: number): void;
14
- export declare function clearPidFile(pidPath: string | undefined): void;
15
- export declare function cleanupStaleAppLogProcesses(sessionsDir: string): void;
@@ -1,19 +0,0 @@
1
- import { spawn } from 'node:child_process';
2
- import fs from 'node:fs';
3
- import type { ExecResult } from '../utils/exec.ts';
4
- export declare function waitForChildExit(wait: Promise<ExecResult>, timeoutMs?: number): Promise<void>;
5
- export declare function sleep(ms: number): Promise<void>;
6
- export declare function createLineWriter(stream: fs.WriteStream, options: {
7
- redactionPatterns: RegExp[];
8
- includeTokens?: string[];
9
- }): {
10
- onChunk: (chunk: string) => void;
11
- flush: () => void;
12
- };
13
- export declare function attachChildToStream(child: ReturnType<typeof spawn>, stream: fs.WriteStream, options: {
14
- endStreamOnClose: boolean;
15
- writer: {
16
- onChunk: (chunk: string) => void;
17
- flush: () => void;
18
- };
19
- }): Promise<ExecResult>;
@@ -1,28 +0,0 @@
1
- import type { DeviceInfo } from '../utils/device.ts';
2
- import type { AppLogResult } from './app-log-process.ts';
3
- export type { AppLogResult } from './app-log-process.ts';
4
- export { APP_LOG_PID_FILENAME, cleanupStaleAppLogProcesses } from './app-log-process.ts';
5
- export { assertAndroidPackageArgSafe } from './app-log-android.ts';
6
- export { buildAppleLogPredicate, buildIosDeviceLogStreamArgs } from './app-log-ios.ts';
7
- export type AppLogDoctorResult = {
8
- checks: Record<string, boolean>;
9
- notes: string[];
10
- };
11
- export declare function rotateAppLogIfNeeded(outPath: string, config: {
12
- maxBytes: number;
13
- maxRotatedFiles: number;
14
- }): void;
15
- export declare function getAppLogPathMetadata(outPath: string): {
16
- exists: boolean;
17
- sizeBytes: number;
18
- modifiedAt?: string;
19
- };
20
- export declare function startAppLog(device: DeviceInfo, appBundleId: string, outPath: string, pidPath?: string): Promise<AppLogResult>;
21
- export declare function stopAppLog(appLog: AppLogResult): Promise<void>;
22
- export declare function runAppLogDoctor(device: DeviceInfo, appBundleId?: string): Promise<AppLogDoctorResult>;
23
- export declare function appendAppLogMarker(outPath: string, marker: string): void;
24
- export declare function clearAppLogFiles(outPath: string): {
25
- path: string;
26
- cleared: boolean;
27
- removedRotatedFiles: number;
28
- };
@@ -1,12 +0,0 @@
1
- export declare function extractTarInstallableArtifact(params: {
2
- archivePath: string;
3
- tempDir: string;
4
- platform: 'ios' | 'android';
5
- expectedRootName?: string;
6
- }): Promise<string>;
7
- export declare function resolveTarArchiveRootName(params: {
8
- archivePath: string;
9
- platform: 'ios' | 'android';
10
- expectedRootName?: string;
11
- }): Promise<string>;
12
- export declare function readZipEntries(archivePath: string): Promise<string[] | null>;
@@ -1,12 +0,0 @@
1
- export declare function sanitizeArtifactFilename(raw: string): string;
2
- export declare function createArtifactTempDir(requestId?: string): string;
3
- export declare function validateArtifactContentLength(rawLength: string | number | undefined): void;
4
- export declare function streamReadableToFile(source: NodeJS.ReadableStream, destPath: string): Promise<void>;
5
- export declare function downloadArtifactToTempDir(params: {
6
- url: string;
7
- headers?: Record<string, string>;
8
- requestId?: string;
9
- tempDir: string;
10
- }): Promise<{
11
- archivePath: string;
12
- }>;
@@ -1,17 +0,0 @@
1
- export type MaterializeArtifactParams = {
2
- platform: 'ios' | 'android';
3
- url: string;
4
- headers?: Record<string, string>;
5
- requestId?: string;
6
- };
7
- export type MaterializedArtifact = {
8
- archivePath: string;
9
- installablePath: string;
10
- detected: {
11
- packageName?: string;
12
- bundleId?: string;
13
- appName?: string;
14
- };
15
- };
16
- export declare function cleanupMaterializedArtifact(result: MaterializedArtifact): void;
17
- export declare function materializeArtifact(params: MaterializeArtifactParams): Promise<MaterializedArtifact>;
@@ -1,12 +0,0 @@
1
- export declare function trackDownloadableArtifact(params: {
2
- artifactPath: string;
3
- tenantId?: string;
4
- fileName?: string;
5
- deleteAfterDownload?: boolean;
6
- }): string;
7
- export declare function prepareDownloadableArtifact(artifactId: string, tenantId?: string): {
8
- artifactPath: string;
9
- fileName?: string;
10
- deleteAfterDownload: boolean;
11
- };
12
- export declare function cleanupDownloadableArtifact(artifactId: string): void;
@@ -1,16 +0,0 @@
1
- export type DaemonServerMode = 'socket' | 'http' | 'dual';
2
- export type DaemonTransportPreference = 'auto' | 'socket' | 'http';
3
- export type SessionIsolationMode = 'none' | 'tenant';
4
- export type DaemonPaths = {
5
- baseDir: string;
6
- infoPath: string;
7
- lockPath: string;
8
- logPath: string;
9
- sessionsDir: string;
10
- };
11
- export declare function resolveDaemonPaths(stateDir: string | undefined): DaemonPaths;
12
- export declare function resolveStateDir(raw: string | undefined): string;
13
- export declare function resolveDaemonServerMode(raw: string | undefined): DaemonServerMode;
14
- export declare function resolveDaemonTransportPreference(raw: string | undefined): DaemonTransportPreference;
15
- export declare function resolveSessionIsolationMode(raw: string | undefined): SessionIsolationMode;
16
- export declare function normalizeTenantId(raw: string | undefined): string | undefined;
@@ -1,25 +0,0 @@
1
- import type { CommandFlags } from '../core/dispatch.ts';
2
- import type { SessionSurface } from '../core/session-surface.ts';
3
- export type DaemonCommandContext = {
4
- requestId?: string;
5
- appBundleId?: string;
6
- activity?: string;
7
- verbose?: boolean;
8
- logPath?: string;
9
- traceLogPath?: string;
10
- snapshotInteractiveOnly?: boolean;
11
- snapshotCompact?: boolean;
12
- snapshotDepth?: number;
13
- snapshotScope?: string;
14
- snapshotRaw?: boolean;
15
- count?: number;
16
- intervalMs?: number;
17
- holdMs?: number;
18
- jitterPx?: number;
19
- doubleTap?: boolean;
20
- clickButton?: 'primary' | 'secondary' | 'middle';
21
- pauseMs?: number;
22
- pattern?: 'one-way' | 'ping-pong';
23
- surface?: SessionSurface;
24
- };
25
- export declare function contextFromFlags(logPath: string, flags: CommandFlags | undefined, appBundleId?: string, traceLogPath?: string, requestId?: string): DaemonCommandContext;