agent-device 0.10.2 → 0.11.0

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 (203) hide show
  1. package/README.md +6 -0
  2. package/dist/src/36.js +3 -0
  3. package/dist/src/bin.js +82 -66
  4. package/dist/src/daemon.js +40 -39
  5. package/dist/src/index.d.ts +567 -5
  6. package/dist/src/index.js +3 -1
  7. package/ios-runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+CommandExecution.swift +84 -16
  8. package/ios-runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Interaction.swift +140 -50
  9. package/ios-runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Lifecycle.swift +13 -2
  10. package/ios-runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Models.swift +22 -9
  11. package/ios-runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Snapshot.swift +221 -0
  12. package/ios-runner/README.md +17 -2
  13. package/ios-runner/RUNNER_PROTOCOL.md +73 -0
  14. package/package.json +11 -6
  15. package/skills/agent-device/SKILL.md +38 -12
  16. package/skills/agent-device/references/bootstrap-install.md +55 -15
  17. package/skills/agent-device/references/exploration.md +65 -8
  18. package/skills/agent-device/references/macos-desktop.md +1 -2
  19. package/skills/agent-device/references/remote-tenancy.md +15 -2
  20. package/skills/agent-device/references/verification.md +7 -3
  21. package/dist/src/224.js +0 -2
  22. package/dist/src/331.js +0 -3
  23. package/dist/src/425.js +0 -1
  24. package/dist/src/bin.d.ts +0 -1
  25. package/dist/src/cli-client-commands.d.ts +0 -8
  26. package/dist/src/cli.d.ts +0 -6
  27. package/dist/src/client-metro.d.ts +0 -64
  28. package/dist/src/client-normalizers.d.ts +0 -20
  29. package/dist/src/client-shared.d.ts +0 -20
  30. package/dist/src/client-types.d.ts +0 -269
  31. package/dist/src/client.d.ts +0 -5
  32. package/dist/src/core/app-events.d.ts +0 -8
  33. package/dist/src/core/batch.d.ts +0 -17
  34. package/dist/src/core/capabilities.d.ts +0 -3
  35. package/dist/src/core/click-button.d.ts +0 -20
  36. package/dist/src/core/dispatch-payload.d.ts +0 -1
  37. package/dist/src/core/dispatch-resolve.d.ts +0 -29
  38. package/dist/src/core/dispatch-series.d.ts +0 -7
  39. package/dist/src/core/dispatch.d.ts +0 -37
  40. package/dist/src/core/open-target.d.ts +0 -4
  41. package/dist/src/core/session-surface.d.ts +0 -3
  42. package/dist/src/core/settings-contract.d.ts +0 -9
  43. package/dist/src/daemon/action-utils.d.ts +0 -3
  44. package/dist/src/daemon/android-system-dialog.d.ts +0 -11
  45. package/dist/src/daemon/app-log-android.d.ts +0 -4
  46. package/dist/src/daemon/app-log-ios.d.ts +0 -7
  47. package/dist/src/daemon/app-log-process.d.ts +0 -15
  48. package/dist/src/daemon/app-log-stream.d.ts +0 -19
  49. package/dist/src/daemon/app-log.d.ts +0 -28
  50. package/dist/src/daemon/artifact-archive.d.ts +0 -12
  51. package/dist/src/daemon/artifact-download.d.ts +0 -12
  52. package/dist/src/daemon/artifact-materialization.d.ts +0 -17
  53. package/dist/src/daemon/artifact-registry.d.ts +0 -12
  54. package/dist/src/daemon/config.d.ts +0 -16
  55. package/dist/src/daemon/context.d.ts +0 -25
  56. package/dist/src/daemon/device-ready.d.ts +0 -6
  57. package/dist/src/daemon/handlers/find.d.ts +0 -40
  58. package/dist/src/daemon/handlers/install-source.d.ts +0 -44
  59. package/dist/src/daemon/handlers/interaction-common.d.ts +0 -41
  60. package/dist/src/daemon/handlers/interaction-flags.d.ts +0 -4
  61. package/dist/src/daemon/handlers/interaction-get.d.ts +0 -3
  62. package/dist/src/daemon/handlers/interaction-is.d.ts +0 -3
  63. package/dist/src/daemon/handlers/interaction-read.d.ts +0 -14
  64. package/dist/src/daemon/handlers/interaction-scroll.d.ts +0 -3
  65. package/dist/src/daemon/handlers/interaction-selector.d.ts +0 -27
  66. package/dist/src/daemon/handlers/interaction-snapshot.d.ts +0 -8
  67. package/dist/src/daemon/handlers/interaction-targeting.d.ts +0 -28
  68. package/dist/src/daemon/handlers/interaction-touch.d.ts +0 -45
  69. package/dist/src/daemon/handlers/interaction.d.ts +0 -9
  70. package/dist/src/daemon/handlers/lease.d.ts +0 -8
  71. package/dist/src/daemon/handlers/parse-utils.d.ts +0 -3
  72. package/dist/src/daemon/handlers/record-trace-android.d.ts +0 -18
  73. package/dist/src/daemon/handlers/record-trace-ios.d.ts +0 -52
  74. package/dist/src/daemon/handlers/record-trace-recording.d.ts +0 -32
  75. package/dist/src/daemon/handlers/record-trace.d.ts +0 -10
  76. package/dist/src/daemon/handlers/session-batch.d.ts +0 -2
  77. package/dist/src/daemon/handlers/session-close.d.ts +0 -31
  78. package/dist/src/daemon/handlers/session-deploy.d.ts +0 -37
  79. package/dist/src/daemon/handlers/session-device-utils.d.ts +0 -26
  80. package/dist/src/daemon/handlers/session-open-target.d.ts +0 -3
  81. package/dist/src/daemon/handlers/session-open.d.ts +0 -22
  82. package/dist/src/daemon/handlers/session-perf.d.ts +0 -2
  83. package/dist/src/daemon/handlers/session-replay-heal.d.ts +0 -8
  84. package/dist/src/daemon/handlers/session-replay-script.d.ts +0 -3
  85. package/dist/src/daemon/handlers/session-runtime-command.d.ts +0 -9
  86. package/dist/src/daemon/handlers/session-runtime.d.ts +0 -36
  87. package/dist/src/daemon/handlers/session-startup-metrics.d.ts +0 -11
  88. package/dist/src/daemon/handlers/session.d.ts +0 -50
  89. package/dist/src/daemon/handlers/snapshot-alert.d.ts +0 -13
  90. package/dist/src/daemon/handlers/snapshot-capture.d.ts +0 -34
  91. package/dist/src/daemon/handlers/snapshot-session.d.ts +0 -15
  92. package/dist/src/daemon/handlers/snapshot-settings.d.ts +0 -24
  93. package/dist/src/daemon/handlers/snapshot-wait.d.ts +0 -37
  94. package/dist/src/daemon/handlers/snapshot.d.ts +0 -16
  95. package/dist/src/daemon/http-server.d.ts +0 -26
  96. package/dist/src/daemon/install-source-resolution.d.ts +0 -5
  97. package/dist/src/daemon/is-predicates.d.ts +0 -15
  98. package/dist/src/daemon/lease-context.d.ts +0 -9
  99. package/dist/src/daemon/lease-registry.d.ts +0 -63
  100. package/dist/src/daemon/materialized-path-registry.d.ts +0 -15
  101. package/dist/src/daemon/network-log.d.ts +0 -32
  102. package/dist/src/daemon/record-trace-errors.d.ts +0 -6
  103. package/dist/src/daemon/recording-gestures.d.ts +0 -3
  104. package/dist/src/daemon/recording-telemetry.d.ts +0 -20
  105. package/dist/src/daemon/recording-timing.d.ts +0 -24
  106. package/dist/src/daemon/request-cancel.d.ts +0 -9
  107. package/dist/src/daemon/request-lock-policy.d.ts +0 -2
  108. package/dist/src/daemon/request-router.d.ts +0 -23
  109. package/dist/src/daemon/runtime-hints.d.ts +0 -19
  110. package/dist/src/daemon/script-utils.d.ts +0 -28
  111. package/dist/src/daemon/scroll-planner.d.ts +0 -12
  112. package/dist/src/daemon/selectors-build.d.ts +0 -5
  113. package/dist/src/daemon/selectors-match.d.ts +0 -6
  114. package/dist/src/daemon/selectors-parse.d.ts +0 -29
  115. package/dist/src/daemon/selectors-resolve.d.ts +0 -33
  116. package/dist/src/daemon/selectors.d.ts +0 -5
  117. package/dist/src/daemon/server-lifecycle.d.ts +0 -23
  118. package/dist/src/daemon/session-open-script.d.ts +0 -7
  119. package/dist/src/daemon/session-routing.d.ts +0 -3
  120. package/dist/src/daemon/session-selector.d.ts +0 -10
  121. package/dist/src/daemon/session-store.d.ts +0 -33
  122. package/dist/src/daemon/snapshot-diff.d.ts +0 -20
  123. package/dist/src/daemon/snapshot-processing.d.ts +0 -10
  124. package/dist/src/daemon/touch-reference-frame.d.ts +0 -7
  125. package/dist/src/daemon/transport.d.ts +0 -6
  126. package/dist/src/daemon/types.d.ts +0 -173
  127. package/dist/src/daemon/upload-registry.d.ts +0 -7
  128. package/dist/src/daemon/upload.d.ts +0 -5
  129. package/dist/src/daemon-client.d.ts +0 -40
  130. package/dist/src/daemon.d.ts +0 -1
  131. package/dist/src/platforms/android/adb.d.ts +0 -5
  132. package/dist/src/platforms/android/app-lifecycle.d.ts +0 -31
  133. package/dist/src/platforms/android/device-input-state.d.ts +0 -19
  134. package/dist/src/platforms/android/devices.d.ts +0 -26
  135. package/dist/src/platforms/android/index.d.ts +0 -8
  136. package/dist/src/platforms/android/input-actions.d.ts +0 -17
  137. package/dist/src/platforms/android/install-artifact.d.ts +0 -11
  138. package/dist/src/platforms/android/manifest.d.ts +0 -1
  139. package/dist/src/platforms/android/notifications.d.ts +0 -11
  140. package/dist/src/platforms/android/open-target.d.ts +0 -4
  141. package/dist/src/platforms/android/screenshot.d.ts +0 -16
  142. package/dist/src/platforms/android/sdk.d.ts +0 -2
  143. package/dist/src/platforms/android/settings.d.ts +0 -3
  144. package/dist/src/platforms/android/snapshot.d.ts +0 -7
  145. package/dist/src/platforms/android/ui-hierarchy.d.ts +0 -21
  146. package/dist/src/platforms/appearance.d.ts +0 -2
  147. package/dist/src/platforms/boot-diagnostics.d.ts +0 -14
  148. package/dist/src/platforms/install-source.d.ts +0 -29
  149. package/dist/src/platforms/ios/app-filter.d.ts +0 -2
  150. package/dist/src/platforms/ios/apps.d.ts +0 -34
  151. package/dist/src/platforms/ios/config.d.ts +0 -10
  152. package/dist/src/platforms/ios/devicectl.d.ts +0 -13
  153. package/dist/src/platforms/ios/devices.d.ts +0 -40
  154. package/dist/src/platforms/ios/ensure-simulator.d.ts +0 -18
  155. package/dist/src/platforms/ios/index.d.ts +0 -3
  156. package/dist/src/platforms/ios/install-artifact.d.ts +0 -18
  157. package/dist/src/platforms/ios/launch-diagnostics.d.ts +0 -11
  158. package/dist/src/platforms/ios/macos-apps.d.ts +0 -12
  159. package/dist/src/platforms/ios/macos-helper.d.ts +0 -69
  160. package/dist/src/platforms/ios/plist.d.ts +0 -1
  161. package/dist/src/platforms/ios/runner-client.d.ts +0 -38
  162. package/dist/src/platforms/ios/runner-errors.d.ts +0 -20
  163. package/dist/src/platforms/ios/runner-macos-products.d.ts +0 -3
  164. package/dist/src/platforms/ios/runner-session.d.ts +0 -30
  165. package/dist/src/platforms/ios/runner-transport.d.ts +0 -10
  166. package/dist/src/platforms/ios/runner-xctestrun-products.d.ts +0 -2
  167. package/dist/src/platforms/ios/runner-xctestrun.d.ts +0 -38
  168. package/dist/src/platforms/ios/screenshot-status-bar.d.ts +0 -2
  169. package/dist/src/platforms/ios/screenshot.d.ts +0 -14
  170. package/dist/src/platforms/ios/simctl.d.ts +0 -7
  171. package/dist/src/platforms/ios/simulator.d.ts +0 -11
  172. package/dist/src/platforms/permission-utils.d.ts +0 -9
  173. package/dist/src/recording/overlay.d.ts +0 -10
  174. package/dist/src/upload-client.d.ts +0 -7
  175. package/dist/src/utils/args.d.ts +0 -27
  176. package/dist/src/utils/cli-config.d.ts +0 -10
  177. package/dist/src/utils/cli-option-schema.d.ts +0 -19
  178. package/dist/src/utils/cli-options.d.ts +0 -13
  179. package/dist/src/utils/command-schema.d.ts +0 -123
  180. package/dist/src/utils/device-isolation.d.ts +0 -3
  181. package/dist/src/utils/device.d.ts +0 -35
  182. package/dist/src/utils/diagnostics.d.ts +0 -30
  183. package/dist/src/utils/errors.d.ts +0 -26
  184. package/dist/src/utils/exec.d.ts +0 -32
  185. package/dist/src/utils/finders.d.ts +0 -12
  186. package/dist/src/utils/interactors.d.ts +0 -38
  187. package/dist/src/utils/json-input.d.ts +0 -1
  188. package/dist/src/utils/keyed-lock.d.ts +0 -1
  189. package/dist/src/utils/output.d.ts +0 -27
  190. package/dist/src/utils/path-resolution.d.ts +0 -8
  191. package/dist/src/utils/payload-input.d.ts +0 -12
  192. package/dist/src/utils/process-identity.d.ts +0 -11
  193. package/dist/src/utils/remote-config.d.ts +0 -15
  194. package/dist/src/utils/remote-open.d.ts +0 -9
  195. package/dist/src/utils/retry.d.ts +0 -54
  196. package/dist/src/utils/screenshot-diff.d.ts +0 -23
  197. package/dist/src/utils/session-binding.d.ts +0 -18
  198. package/dist/src/utils/snapshot-lines.d.ts +0 -15
  199. package/dist/src/utils/snapshot.d.ts +0 -49
  200. package/dist/src/utils/text-surface.d.ts +0 -19
  201. package/dist/src/utils/timeouts.d.ts +0 -3
  202. package/dist/src/utils/version.d.ts +0 -2
  203. package/dist/src/utils/video.d.ts +0 -9
@@ -1,13 +0,0 @@
1
- import type { DeviceInfo } from '../../utils/device.ts';
2
- export type IosAppInfo = {
3
- bundleId: string;
4
- name: string;
5
- };
6
- export declare function runIosDevicectl(args: string[], context: {
7
- action: string;
8
- deviceId: string;
9
- }): Promise<void>;
10
- export declare function listIosDeviceApps(device: DeviceInfo, filter: 'user-installed' | 'all'): Promise<IosAppInfo[]>;
11
- export declare function parseIosDeviceAppsPayload(payload: unknown): IosAppInfo[];
12
- export declare const IOS_DEVICECTL_DEFAULT_HINT = "Ensure the iOS device is unlocked, trusted, and available in Xcode > Devices, then retry.";
13
- export declare function resolveIosDevicectlHint(stdout: string, stderr: string): string | null;
@@ -1,40 +0,0 @@
1
- import type { DeviceInfo, DeviceTarget } from '../../utils/device.ts';
2
- type DevicectlAppleDevice = {
3
- identifier?: string;
4
- name?: string;
5
- hardwareProperties?: {
6
- platform?: string;
7
- udid?: string;
8
- productType?: string;
9
- };
10
- deviceProperties?: {
11
- name?: string;
12
- productType?: string;
13
- deviceType?: string;
14
- };
15
- connectionProperties?: {
16
- tunnelState?: string;
17
- };
18
- };
19
- type IosDeviceDiscoveryOptions = {
20
- simulatorSetPath?: string;
21
- };
22
- export declare function isAppleProductType(productType: string): boolean;
23
- export declare function isAppleTvProductType(productType: string): boolean;
24
- export declare function resolveAppleTargetFromDevicectlDevice(device: DevicectlAppleDevice): DeviceTarget;
25
- export declare function isSupportedAppleDevicectlDevice(device: DevicectlAppleDevice): boolean;
26
- type FindBootableSimulatorOptions = IosDeviceDiscoveryOptions & {
27
- target?: DeviceTarget;
28
- };
29
- /**
30
- * Finds an available iOS simulator by querying simctl directly. This is used
31
- * as a fallback when `listIosDevices` returned no simulators (e.g. all filtered
32
- * out) or only a physical device. Only simulators with `isAvailable: true` are
33
- * considered so the caller can safely boot the result.
34
- *
35
- * Returns `null` when no suitable simulator can be found.
36
- */
37
- export declare function findBootableIosSimulator(options?: FindBootableSimulatorOptions): Promise<DeviceInfo | null>;
38
- export declare function listAppleDevices(options?: IosDeviceDiscoveryOptions): Promise<DeviceInfo[]>;
39
- export declare const listIosDevices: typeof listAppleDevices;
40
- export {};
@@ -1,18 +0,0 @@
1
- import type { DeviceInfo } from '../../utils/device.ts';
2
- export type EnsureSimulatorResult = {
3
- udid: string;
4
- device: string;
5
- runtime: string;
6
- created: boolean;
7
- booted: boolean;
8
- };
9
- type EnsureSimulatorOptions = {
10
- deviceName: string;
11
- runtime?: string;
12
- simulatorSetPath?: string | null;
13
- reuseExisting: boolean;
14
- boot: boolean;
15
- ensureReady: (device: DeviceInfo) => Promise<void>;
16
- };
17
- export declare function ensureSimulatorExists(options: EnsureSimulatorOptions): Promise<EnsureSimulatorResult>;
18
- export {};
@@ -1,3 +0,0 @@
1
- export { closeIosApp, installIosApp, installIosInstallablePath, listIosApps, listSimulatorApps, openIosApp, openIosDevice, pushIosNotification, readIosClipboardText, reinstallIosApp, resolveIosApp, screenshotIos, setIosSetting, uninstallIosApp, writeIosClipboardText, } from './apps.ts';
2
- export { ensureBootedSimulator } from './simulator.ts';
3
- export { parseIosDeviceAppsPayload, type IosAppInfo } from './devicectl.ts';
@@ -1,18 +0,0 @@
1
- import { type MaterializeInstallSource } from '../install-source.ts';
2
- type InstallIosArtifactOptions = {
3
- appIdentifierHint?: string;
4
- signal?: AbortSignal;
5
- };
6
- export type PreparedIosInstallArtifact = {
7
- archivePath?: string;
8
- installablePath: string;
9
- bundleId?: string;
10
- appName?: string;
11
- cleanup: () => Promise<void>;
12
- };
13
- export declare function prepareIosInstallArtifact(source: MaterializeInstallSource, options?: InstallIosArtifactOptions): Promise<PreparedIosInstallArtifact>;
14
- export declare function readIosBundleInfo(appBundlePath: string): Promise<{
15
- bundleId?: string;
16
- appName?: string;
17
- }>;
18
- export {};
@@ -1,11 +0,0 @@
1
- import type { DeviceInfo } from '../../utils/device.ts';
2
- export type LaunchFailureReason = 'ARCH_MISMATCH' | 'APP_NOT_INSTALLED' | 'PERSISTENT_LAUNCH_FAIL' | 'UNKNOWN';
3
- type LaunchProbeResult = {
4
- installed: boolean;
5
- simulatorCompatible?: boolean;
6
- };
7
- export declare function isSimulatorLaunchFBSError(error: unknown): boolean;
8
- export declare function probeSimulatorLaunchContext(device: DeviceInfo, bundleId: string): Promise<LaunchProbeResult>;
9
- export declare function classifyLaunchFailure(probe: LaunchProbeResult): LaunchFailureReason;
10
- export declare function launchFailureHint(reason: LaunchFailureReason): string;
11
- export {};
@@ -1,12 +0,0 @@
1
- import type { DeviceInfo } from '../../utils/device.ts';
2
- import type { IosAppInfo } from './devicectl.ts';
3
- export declare function resolveMacOsApp(app: string): Promise<string>;
4
- export declare function openMacOsApp(_device: DeviceInfo, app: string, options?: {
5
- appBundleId?: string;
6
- url?: string;
7
- }): Promise<void>;
8
- export declare function closeMacOsApp(_device: DeviceInfo, app: string): Promise<void>;
9
- export declare function readMacOsClipboardText(): Promise<string>;
10
- export declare function writeMacOsClipboardText(text: string): Promise<void>;
11
- export declare function setMacOsAppearance(state: string): Promise<void>;
12
- export declare function listMacApps(filter?: 'user-installed' | 'all'): Promise<IosAppInfo[]>;
@@ -1,69 +0,0 @@
1
- import type { SessionSurface } from '../../core/session-surface.ts';
2
- export type MacOsPermissionTarget = 'accessibility' | 'screen-recording' | 'input-monitoring';
3
- export type MacOsSnapshotNode = {
4
- index: number;
5
- type?: string;
6
- role?: string;
7
- subrole?: string;
8
- label?: string;
9
- value?: string;
10
- identifier?: string;
11
- rect?: {
12
- x: number;
13
- y: number;
14
- width: number;
15
- height: number;
16
- };
17
- enabled?: boolean;
18
- selected?: boolean;
19
- hittable?: boolean;
20
- depth?: number;
21
- parentIndex?: number;
22
- pid?: number;
23
- bundleId?: string;
24
- appName?: string;
25
- windowTitle?: string;
26
- surface?: string;
27
- };
28
- export declare function resolveMacOsHelperPackageRootFrom(modulePath: string): string;
29
- export declare function resolveFrontmostMacOsApp(): Promise<{
30
- bundleId?: string;
31
- appName?: string;
32
- pid?: number;
33
- }>;
34
- export declare function quitMacOsApp(bundleId: string): Promise<{
35
- bundleId: string;
36
- running: boolean;
37
- terminated: boolean;
38
- forceTerminated: boolean;
39
- }>;
40
- export declare function runMacOsPermissionAction(action: 'grant' | 'reset', target: MacOsPermissionTarget): Promise<{
41
- target: MacOsPermissionTarget;
42
- granted: boolean;
43
- requested: boolean;
44
- openedSettings: boolean;
45
- action: 'grant' | 'reset';
46
- message?: string;
47
- }>;
48
- export declare function runMacOsAlertAction(action: 'get' | 'accept' | 'dismiss', options?: {
49
- bundleId?: string;
50
- surface?: SessionSurface;
51
- }): Promise<{
52
- title?: string;
53
- role?: string;
54
- buttons?: string[];
55
- action?: string;
56
- bundleId?: string;
57
- }>;
58
- export declare function runMacOsSnapshotAction(surface: Exclude<SessionSurface, 'app'>): Promise<{
59
- surface: Exclude<SessionSurface, 'app'>;
60
- nodes: MacOsSnapshotNode[];
61
- truncated: boolean;
62
- backend: 'macos-helper';
63
- }>;
64
- export declare function runMacOsReadTextAction(x: number, y: number, options?: {
65
- bundleId?: string;
66
- surface?: SessionSurface;
67
- }): Promise<{
68
- text: string;
69
- }>;
@@ -1 +0,0 @@
1
- export declare function readInfoPlistString(infoPlistPath: string, key: string): Promise<string | undefined>;
@@ -1,38 +0,0 @@
1
- import type { DeviceInfo } from '../../utils/device.ts';
2
- import type { ClickButton } from '../../core/click-button.ts';
3
- export type RunnerCommand = {
4
- command: 'tap' | 'mouseClick' | 'tapSeries' | 'longPress' | 'drag' | 'dragSeries' | 'type' | 'swipe' | 'findText' | 'readText' | 'snapshot' | 'screenshot' | 'back' | 'home' | 'appSwitcher' | 'alert' | 'pinch' | 'recordStart' | 'recordStop' | 'uptime' | 'shutdown';
5
- appBundleId?: string;
6
- text?: string;
7
- action?: 'get' | 'accept' | 'dismiss';
8
- x?: number;
9
- y?: number;
10
- button?: ClickButton;
11
- count?: number;
12
- intervalMs?: number;
13
- doubleTap?: boolean;
14
- pauseMs?: number;
15
- pattern?: 'one-way' | 'ping-pong';
16
- x2?: number;
17
- y2?: number;
18
- durationMs?: number;
19
- direction?: 'up' | 'down' | 'left' | 'right';
20
- scale?: number;
21
- outPath?: string;
22
- fps?: number;
23
- interactiveOnly?: boolean;
24
- compact?: boolean;
25
- depth?: number;
26
- scope?: string;
27
- raw?: boolean;
28
- clearFirst?: boolean;
29
- };
30
- export declare function runIosRunnerCommand(device: DeviceInfo, command: RunnerCommand, options?: {
31
- verbose?: boolean;
32
- logPath?: string;
33
- traceLogPath?: string;
34
- requestId?: string;
35
- }): Promise<Record<string, unknown>>;
36
- export { isRetryableRunnerError, shouldRetryRunnerConnectError, resolveRunnerEarlyExitHint, } from './runner-errors.ts';
37
- export { resolveRunnerDestination, resolveRunnerBuildDestination, resolveRunnerMaxConcurrentDestinationsFlag, resolveRunnerSigningBuildSettings, resolveRunnerBundleBuildSettings, assertSafeDerivedCleanup, IOS_RUNNER_CONTAINER_BUNDLE_IDS, } from './runner-xctestrun.ts';
38
- export { getRunnerSessionSnapshot, stopIosRunnerSession, abortAllIosRunnerSessions, stopAllIosRunnerSessions, } from './runner-session.ts';
@@ -1,20 +0,0 @@
1
- import { AppError } from '../../utils/errors.ts';
2
- import type { RunnerCommand } from './runner-client.ts';
3
- import type { RunnerSession } from './runner-session.ts';
4
- export declare function isRetryableRunnerError(err: unknown): boolean;
5
- export declare function shouldRetryRunnerConnectError(error: unknown): boolean;
6
- export declare function resolveRunnerEarlyExitHint(message: string, stdout: string, stderr: string): string;
7
- export declare function buildRunnerConnectError(params: {
8
- port: number;
9
- endpoints: string[];
10
- logPath?: string;
11
- lastError: unknown;
12
- }): AppError;
13
- export declare function buildRunnerEarlyExitError(params: {
14
- session: RunnerSession;
15
- port: number;
16
- logPath?: string;
17
- }): Promise<AppError>;
18
- export declare function resolveSigningFailureHint(error: AppError): string | undefined;
19
- export declare function isReadOnlyRunnerCommand(command: RunnerCommand['command']): boolean;
20
- export declare function assertRunnerRequestActive(requestId: string | undefined): void;
@@ -1,3 +0,0 @@
1
- import type { DeviceInfo } from '../../utils/device.ts';
2
- export declare function repairMacOsRunnerProductsIfNeeded(device: DeviceInfo, productPaths: string[], xctestrunPath: string): Promise<void>;
3
- export declare function isExpectedRunnerRepairFailure(error: unknown): boolean;
@@ -1,30 +0,0 @@
1
- import { type ExecResult, type ExecBackgroundResult } from '../../utils/exec.ts';
2
- import type { DeviceInfo } from '../../utils/device.ts';
3
- import type { RunnerCommand } from './runner-client.ts';
4
- export type RunnerSession = {
5
- sessionId: string;
6
- device: DeviceInfo;
7
- deviceId: string;
8
- port: number;
9
- xctestrunPath: string;
10
- jsonPath: string;
11
- testPromise: Promise<ExecResult>;
12
- child: ExecBackgroundResult['child'];
13
- ready: boolean;
14
- };
15
- export declare function ensureRunnerSession(device: DeviceInfo, options: {
16
- verbose?: boolean;
17
- logPath?: string;
18
- traceLogPath?: string;
19
- }): Promise<RunnerSession>;
20
- export declare function getRunnerSessionSnapshot(deviceId: string): {
21
- sessionId: string;
22
- alive: boolean;
23
- } | null;
24
- export declare function stopRunnerSession(session: RunnerSession): Promise<void>;
25
- export declare function stopIosRunnerSession(deviceId: string): Promise<void>;
26
- export declare function abortAllIosRunnerSessions(): Promise<void>;
27
- export declare function stopAllIosRunnerSessions(): Promise<void>;
28
- export declare function validateRunnerDevice(device: DeviceInfo): void;
29
- export declare function executeRunnerCommandWithSession(device: DeviceInfo, session: RunnerSession, command: RunnerCommand, logPath: string | undefined, timeoutMs: number, signal?: AbortSignal): Promise<Record<string, unknown>>;
30
- export declare function parseRunnerResponse(response: Response, session: RunnerSession, logPath?: string): Promise<Record<string, unknown>>;
@@ -1,10 +0,0 @@
1
- import type { DeviceInfo } from '../../utils/device.ts';
2
- import type { RunnerCommand } from './runner-client.ts';
3
- import type { RunnerSession } from './runner-session.ts';
4
- export declare const RUNNER_STARTUP_TIMEOUT_MS: number;
5
- export declare const RUNNER_COMMAND_TIMEOUT_MS: number;
6
- export declare const RUNNER_DESTINATION_TIMEOUT_SECONDS: number;
7
- export declare function waitForRunner(device: DeviceInfo, port: number, command: RunnerCommand, logPath?: string, timeoutMs?: number, session?: RunnerSession, signal?: AbortSignal): Promise<Response>;
8
- export declare function getFreePort(): Promise<number>;
9
- export declare function logChunk(chunk: string, logPath?: string, traceLogPath?: string, verbose?: boolean): void;
10
- export declare function cleanupTempFile(filePath: string): void;
@@ -1,2 +0,0 @@
1
- export declare function xctestrunReferencesExistingProducts(xctestrunPath: string): boolean;
2
- export declare function resolveExistingXctestrunProductPaths(xctestrunPath: string): string[] | null;
@@ -1,38 +0,0 @@
1
- import { type DeviceInfo } from '../../utils/device.ts';
2
- export { xctestrunReferencesExistingProducts } from './runner-xctestrun-products.ts';
3
- export declare const runnerPrepProcesses: Set<import("child_process").ChildProcess>;
4
- export declare const IOS_RUNNER_CONTAINER_BUNDLE_IDS: string[];
5
- type EnsureXctestrunDeps = {
6
- findProjectRoot: () => string;
7
- findXctestrun: (root: string, device?: DeviceInfo) => string | null;
8
- xctestrunReferencesProjectRoot: (xctestrunPath: string, projectRoot: string) => boolean;
9
- resolveExistingXctestrunProductPaths: (xctestrunPath: string) => string[] | null;
10
- repairRunnerProductsIfNeeded: (device: DeviceInfo, productPaths: string[], xctestrunPath: string) => Promise<void>;
11
- assertSafeDerivedCleanup: (derivedPath: string) => void;
12
- cleanRunnerDerivedArtifacts: (derivedPath: string) => void;
13
- buildRunnerXctestrun: (device: DeviceInfo, projectPath: string, derived: string, options: {
14
- verbose?: boolean;
15
- logPath?: string;
16
- traceLogPath?: string;
17
- }) => Promise<void>;
18
- };
19
- export declare function ensureXctestrun(device: DeviceInfo, options: {
20
- verbose?: boolean;
21
- logPath?: string;
22
- traceLogPath?: string;
23
- }, deps?: EnsureXctestrunDeps): Promise<string>;
24
- export declare function shouldDeleteRunnerDerivedRootEntry(entryName: string): boolean;
25
- export declare function findXctestrun(root: string, device?: DeviceInfo): string | null;
26
- export declare function scoreXctestrunCandidate(candidatePath: string, device: DeviceInfo): number;
27
- export declare function xctestrunReferencesProjectRoot(xctestrunPath: string, projectRoot: string): boolean;
28
- export declare function prepareXctestrunWithEnv(xctestrunPath: string, envVars: Record<string, string>, suffix: string): Promise<{
29
- xctestrunPath: string;
30
- jsonPath: string;
31
- }>;
32
- export declare function resolveRunnerDestination(device: DeviceInfo): string;
33
- export declare function resolveRunnerBuildDestination(device: DeviceInfo): string;
34
- export declare function resolveRunnerMaxConcurrentDestinationsFlag(device: DeviceInfo): string;
35
- export declare function resolveRunnerSigningBuildSettings(env?: NodeJS.ProcessEnv, forDevice?: boolean, platform?: DeviceInfo['platform']): string[];
36
- export declare function resolveRunnerBundleBuildSettings(env?: NodeJS.ProcessEnv): string[];
37
- export declare function resolveRunnerPerformanceBuildSettings(): string[];
38
- export declare function assertSafeDerivedCleanup(derivedPath: string, env?: NodeJS.ProcessEnv): void;
@@ -1,2 +0,0 @@
1
- import type { DeviceInfo } from '../../utils/device.ts';
2
- export declare function prepareSimulatorStatusBarForScreenshot(device: DeviceInfo): Promise<() => Promise<void>>;
@@ -1,14 +0,0 @@
1
- import type { DeviceInfo } from '../../utils/device.ts';
2
- type SimulatorScreenshotFlowDeps = {
3
- ensureBooted: (device: DeviceInfo) => Promise<void>;
4
- prepareStatusBarForScreenshot: (device: DeviceInfo) => Promise<() => Promise<void>>;
5
- captureWithRetry: (device: DeviceInfo, outPath: string) => Promise<void>;
6
- captureWithRunner: (device: DeviceInfo, outPath: string, appBundleId?: string) => Promise<void>;
7
- shouldFallbackToRunner: (error: unknown) => boolean;
8
- };
9
- export declare function screenshotIos(device: DeviceInfo, outPath: string, appBundleId?: string): Promise<void>;
10
- export declare function captureSimulatorScreenshotWithFallback(device: DeviceInfo, outPath: string, appBundleId?: string, deps?: SimulatorScreenshotFlowDeps): Promise<void>;
11
- export declare function resolveSimulatorRunnerScreenshotCandidatePaths(containerPath: string, remoteFileName: string): string[];
12
- export declare function shouldFallbackToRunnerForIosScreenshot(error: unknown): boolean;
13
- export declare function shouldRetryIosSimulatorScreenshot(error: unknown): boolean;
14
- export { prepareSimulatorStatusBarForScreenshot } from './screenshot-status-bar.ts';
@@ -1,7 +0,0 @@
1
- import type { DeviceInfo } from '../../utils/device.ts';
2
- type SimctlArgsOptions = {
3
- simulatorSetPath?: string;
4
- };
5
- export declare function buildSimctlArgs(args: string[], options?: SimctlArgsOptions): string[];
6
- export declare function buildSimctlArgsForDevice(device: DeviceInfo, args: string[]): string[];
7
- export {};
@@ -1,11 +0,0 @@
1
- import type { DeviceInfo } from '../../utils/device.ts';
2
- export declare function ensureSimulator(device: DeviceInfo, command: string): void;
3
- export declare function focusIosSimulatorWindow(): Promise<void>;
4
- export declare function ensureBootedSimulator(device: DeviceInfo): Promise<void>;
5
- export declare function shutdownSimulator(device: DeviceInfo): Promise<{
6
- success: boolean;
7
- exitCode: number;
8
- stdout: string;
9
- stderr: string;
10
- }>;
11
- export declare function getSimulatorState(deviceOrUdid: DeviceInfo | string): Promise<string | null>;
@@ -1,9 +0,0 @@
1
- export type PermissionAction = 'grant' | 'deny' | 'reset';
2
- export type PermissionTarget = 'camera' | 'microphone' | 'photos' | 'contacts' | 'contacts-limited' | 'notifications' | 'calendar' | 'location' | 'location-always' | 'media-library' | 'motion' | 'reminders' | 'siri';
3
- export type PermissionSettingOptions = {
4
- permissionTarget?: string;
5
- permissionMode?: string;
6
- };
7
- export declare const PERMISSION_TARGETS: readonly PermissionTarget[];
8
- export declare function parsePermissionAction(action: string): PermissionAction;
9
- export declare function parsePermissionTarget(value: string | undefined): PermissionTarget;
@@ -1,10 +0,0 @@
1
- export declare function getRecordingOverlaySupportWarning(hostPlatform?: NodeJS.Platform): string | undefined;
2
- export declare function trimRecordingStart(params: {
3
- videoPath: string;
4
- trimStartMs: number;
5
- }): Promise<void>;
6
- export declare function overlayRecordingTouches(params: {
7
- videoPath: string;
8
- telemetryPath: string;
9
- targetLabel?: string;
10
- }): Promise<void>;
@@ -1,7 +0,0 @@
1
- type UploadArtifactOptions = {
2
- localPath: string;
3
- baseUrl: string;
4
- token: string;
5
- };
6
- export declare function uploadArtifact(options: UploadArtifactOptions): Promise<string>;
7
- export {};
@@ -1,27 +0,0 @@
1
- import { type CliFlags, type FlagKey } from './command-schema.ts';
2
- type ParsedArgs = {
3
- command: string | null;
4
- positionals: string[];
5
- flags: CliFlags;
6
- warnings: string[];
7
- };
8
- type ParseArgsOptions = {
9
- strictFlags?: boolean;
10
- };
11
- type ParsedFlagRecord = {
12
- key: FlagKey;
13
- token: string;
14
- };
15
- type RawParsedArgs = ParsedArgs & {
16
- providedFlags: ParsedFlagRecord[];
17
- };
18
- type FinalizeArgsOptions = ParseArgsOptions & {
19
- defaultFlags?: Partial<CliFlags>;
20
- };
21
- export declare function parseArgs(argv: string[], options?: FinalizeArgsOptions): ParsedArgs;
22
- export declare function parseRawArgs(argv: string[]): RawParsedArgs;
23
- export declare function finalizeParsedArgs(parsed: RawParsedArgs, options?: FinalizeArgsOptions): ParsedArgs;
24
- export declare function toDaemonFlags(flags: CliFlags): Omit<CliFlags, 'json' | 'config' | 'remoteConfig' | 'help' | 'version'>;
25
- export declare function usage(): string;
26
- export declare function usageForCommand(command: string): string | null;
27
- export {};
@@ -1,10 +0,0 @@
1
- import { type CliFlags, type FlagKey } from './command-schema.ts';
2
- type EnvMap = Record<string, string | undefined>;
3
- export declare function resolveConfigBackedFlagDefaults(options: {
4
- command: string | null;
5
- cwd: string;
6
- cliFlags: CliFlags;
7
- env?: EnvMap;
8
- }): Partial<CliFlags>;
9
- export declare function readEnvFlagDefaultsForKeys(env: EnvMap, keys: readonly FlagKey[]): Partial<CliFlags>;
10
- export {};
@@ -1,19 +0,0 @@
1
- import { type FlagDefinition, type FlagKey } from './command-schema.ts';
2
- export type OptionSpec = {
3
- key: FlagKey;
4
- flagDefinitions: readonly FlagDefinition[];
5
- config: {
6
- enabled: boolean;
7
- key: string;
8
- };
9
- env: {
10
- names: readonly string[];
11
- };
12
- supportsCommand(command: string | null): boolean;
13
- };
14
- export declare function getOptionSpecs(): readonly OptionSpec[];
15
- export declare function getOptionSpec(key: FlagKey): OptionSpec | undefined;
16
- export declare function getOptionSpecForToken(token: string): OptionSpec | undefined;
17
- export declare function getConfigurableOptionSpecs(command: string | null): OptionSpec[];
18
- export declare function isFlagSupportedForCommand(key: FlagKey, command: string | null): boolean;
19
- export declare function parseOptionValueFromSource(spec: OptionSpec, value: unknown, sourceLabel: string, rawKey: string): unknown;
@@ -1,13 +0,0 @@
1
- import type { CliFlags } from './command-schema.ts';
2
- type EnvMap = Record<string, string | undefined>;
3
- export declare function resolveCliOptions(argv: string[], options?: {
4
- cwd?: string;
5
- env?: EnvMap;
6
- strictFlags?: boolean;
7
- }): {
8
- command: string | null;
9
- positionals: string[];
10
- flags: CliFlags;
11
- warnings: string[];
12
- };
13
- export {};
@@ -1,123 +0,0 @@
1
- export type CliFlags = {
2
- json: boolean;
3
- config?: string;
4
- remoteConfig?: string;
5
- stateDir?: string;
6
- daemonBaseUrl?: string;
7
- daemonAuthToken?: string;
8
- daemonTransport?: 'auto' | 'socket' | 'http';
9
- daemonServerMode?: 'socket' | 'http' | 'dual';
10
- tenant?: string;
11
- sessionIsolation?: 'none' | 'tenant';
12
- runId?: string;
13
- leaseId?: string;
14
- sessionLock?: 'reject' | 'strip';
15
- sessionLocked?: boolean;
16
- sessionLockConflicts?: 'reject' | 'strip';
17
- platform?: 'ios' | 'macos' | 'android' | 'apple';
18
- target?: 'mobile' | 'tv' | 'desktop';
19
- device?: string;
20
- udid?: string;
21
- serial?: string;
22
- iosSimulatorDeviceSet?: string;
23
- androidDeviceAllowlist?: string;
24
- out?: string;
25
- session?: string;
26
- runtime?: string;
27
- metroHost?: string;
28
- metroPort?: number;
29
- metroProjectRoot?: string;
30
- metroKind?: 'auto' | 'react-native' | 'expo';
31
- metroPublicBaseUrl?: string;
32
- metroProxyBaseUrl?: string;
33
- metroBearerToken?: string;
34
- metroPreparePort?: number;
35
- metroListenHost?: string;
36
- metroStatusHost?: string;
37
- metroStartupTimeoutMs?: number;
38
- metroProbeTimeoutMs?: number;
39
- metroRuntimeFile?: string;
40
- metroNoReuseExisting?: boolean;
41
- metroNoInstallDeps?: boolean;
42
- bundleUrl?: string;
43
- launchUrl?: string;
44
- boot?: boolean;
45
- reuseExisting?: boolean;
46
- verbose?: boolean;
47
- snapshotInteractiveOnly?: boolean;
48
- snapshotCompact?: boolean;
49
- snapshotDepth?: number;
50
- snapshotScope?: string;
51
- snapshotRaw?: boolean;
52
- baseline?: string;
53
- threshold?: string;
54
- appsFilter?: 'user-installed' | 'all';
55
- count?: number;
56
- fps?: number;
57
- hideTouches?: boolean;
58
- intervalMs?: number;
59
- holdMs?: number;
60
- jitterPx?: number;
61
- doubleTap?: boolean;
62
- clickButton?: 'primary' | 'secondary' | 'middle';
63
- pauseMs?: number;
64
- pattern?: 'one-way' | 'ping-pong';
65
- activity?: string;
66
- header?: string[];
67
- saveScript?: boolean | string;
68
- shutdown?: boolean;
69
- relaunch?: boolean;
70
- surface?: 'app' | 'frontmost-app' | 'desktop' | 'menubar';
71
- headless?: boolean;
72
- restart?: boolean;
73
- noRecord?: boolean;
74
- retainPaths?: boolean;
75
- retentionMs?: number;
76
- replayUpdate?: boolean;
77
- steps?: string;
78
- stepsFile?: string;
79
- batchOnError?: 'stop';
80
- batchMaxSteps?: number;
81
- batchSteps?: Array<{
82
- command: string;
83
- positionals?: string[];
84
- flags?: Record<string, unknown>;
85
- }>;
86
- help: boolean;
87
- version: boolean;
88
- };
89
- export type FlagKey = keyof CliFlags;
90
- type FlagType = 'boolean' | 'int' | 'enum' | 'string' | 'booleanOrString';
91
- export type FlagDefinition = {
92
- key: FlagKey;
93
- names: readonly string[];
94
- type: FlagType;
95
- multiple?: boolean;
96
- enumValues?: readonly string[];
97
- min?: number;
98
- max?: number;
99
- setValue?: CliFlags[FlagKey];
100
- usageLabel?: string;
101
- usageDescription?: string;
102
- };
103
- type CommandSchema = {
104
- helpDescription: string;
105
- summary?: string;
106
- positionalArgs: readonly string[];
107
- allowsExtraPositionals?: boolean;
108
- allowedFlags: readonly FlagKey[];
109
- defaults?: Partial<CliFlags>;
110
- skipCapabilityCheck?: boolean;
111
- usageOverride?: string;
112
- listUsageOverride?: string;
113
- };
114
- export declare const GLOBAL_FLAG_KEYS: Set<keyof CliFlags>;
115
- export declare function getFlagDefinition(token: string): FlagDefinition | undefined;
116
- export declare function getFlagDefinitions(): readonly FlagDefinition[];
117
- export declare function getCommandSchema(command: string | null): CommandSchema | undefined;
118
- export declare function getCliCommandNames(): string[];
119
- export declare function getSchemaCapabilityKeys(): string[];
120
- export declare function isStrictFlagModeEnabled(value: string | undefined): boolean;
121
- export declare function buildUsageText(): string;
122
- export declare function buildCommandUsageText(commandName: string): string | null;
123
- export {};
@@ -1,3 +0,0 @@
1
- export declare function resolveIosSimulatorDeviceSetPath(flagValue: string | undefined, env?: NodeJS.ProcessEnv): string | undefined;
2
- export declare function parseSerialAllowlist(value: string): Set<string>;
3
- export declare function resolveAndroidSerialAllowlist(flagValue: string | undefined, env?: NodeJS.ProcessEnv): ReadonlySet<string> | undefined;