agent-device 0.21.11 → 0.21.13

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 (201) hide show
  1. package/android/ime-helper/dist/{agent-device-android-ime-helper-0.21.11.apk → agent-device-android-ime-helper-0.21.13.apk} +0 -0
  2. package/android/ime-helper/dist/agent-device-android-ime-helper-0.21.13.apk.sha256 +1 -0
  3. package/android/ime-helper/dist/{agent-device-android-ime-helper-0.21.11.manifest.json → agent-device-android-ime-helper-0.21.13.manifest.json} +4 -4
  4. package/android/snapshot-helper/dist/{agent-device-android-snapshot-helper-0.21.11.apk → agent-device-android-snapshot-helper-0.21.13.apk} +0 -0
  5. package/android/snapshot-helper/dist/agent-device-android-snapshot-helper-0.21.13.apk.sha256 +1 -0
  6. package/android/snapshot-helper/dist/{agent-device-android-snapshot-helper-0.21.11.manifest.json → agent-device-android-snapshot-helper-0.21.13.manifest.json} +6 -6
  7. package/apple/fold-helper/Fold.m +97 -0
  8. package/apple/macos-helper/Package.swift +3 -6
  9. package/apple/macos-helper/Sources/AgentDeviceMacOSHelper/main.swift +3 -8
  10. package/apple/macos-helper/Tests/AgentDeviceMacOSHelperTests/ScreenshotResponseTests.swift +15 -0
  11. package/apple/snapshot-bridge/SnapshotBridgeRuntime.m +47 -1
  12. package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunner/AgentDeviceRunnerApp.m +99 -42
  13. package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunner/Info.plist +23 -0
  14. package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunner.xcodeproj/project.pbxproj +17 -0
  15. package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerAppScreenCapture.swift +21 -13
  16. package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerScrollViewportPolicy.swift +1 -162
  17. package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerSynthesizedGesture.h +0 -9
  18. package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerSynthesizedGesture.m +0 -56
  19. package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerSystemSurfaceHostPolicy.swift +0 -48
  20. package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTapPointPolicy.swift +0 -50
  21. package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+AXSnapshotFallback.swift +22 -568
  22. package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Alert.swift +21 -9
  23. package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+BlockingSystemModalResolution.swift +0 -36
  24. package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+CommandDispatch.swift +630 -0
  25. package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+CommandExecution.swift +18 -2236
  26. package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+CommandJournal.swift +1 -338
  27. package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Environment.swift +0 -12
  28. package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+GestureExecution.swift +165 -0
  29. package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Interaction.swift +0 -24
  30. package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Keyboard.swift +0 -142
  31. package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Lifecycle.swift +90 -39
  32. package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+MainThreadWork.swift +78 -106
  33. package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Models.swift +23 -2
  34. package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Navigation.swift +147 -95
  35. package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+PrivateAXPresentation.swift +0 -209
  36. package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+ScreenRecorder.swift +86 -10
  37. package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+ScrollDragExecution.swift +287 -0
  38. package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+ScrollGesture.swift +1 -200
  39. package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+SequenceExecution.swift +0 -185
  40. package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Snapshot.swift +75 -285
  41. package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+SnapshotAcquisition.swift +23 -10
  42. package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+SnapshotBackendCapabilities.swift +0 -78
  43. package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+SnapshotCapturePlan.swift +83 -578
  44. package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+SnapshotCaptureTarget.swift +106 -0
  45. package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+SnapshotExecution.swift +142 -0
  46. package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+SnapshotTiming.swift +49 -78
  47. package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+SynthesizedCommitDeadline.swift +0 -44
  48. package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+SynthesizedGesturePolicy.swift +27 -97
  49. package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+SynthesizedInteraction.swift +1 -11
  50. package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+SynthesizedTextEntry.swift +11 -87
  51. package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+SystemModal.swift +2 -10
  52. package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+TextEntry.swift +1 -1
  53. package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+TextEntryFocus.swift +0 -35
  54. package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+TextInputCandidatePolicy.swift +0 -31
  55. package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+TextTyping.swift +2 -18
  56. package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Transport.swift +34 -52
  57. package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+TvRemote.swift +0 -22
  58. package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+TypeExecution.swift +142 -0
  59. package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests.swift +22 -6
  60. package/dist/apple/runner/AgentDeviceRunner/RecordingScripts/recording-overlay.swift +140 -20
  61. package/dist/src/absence-observation-errors.js +1 -1
  62. package/dist/src/adapter.js +1 -1
  63. package/dist/src/agent-device-client.js +1 -1
  64. package/dist/src/alert-runtime.js +1 -1
  65. package/dist/src/android-adb.d.ts +1 -1
  66. package/dist/src/app-launch.js +2 -2
  67. package/dist/src/app-log-runtime2.js +3 -3
  68. package/dist/src/app-resolution.js +2 -2
  69. package/dist/src/back-mode.js +1 -1
  70. package/dist/src/capture-disclosure.js +1 -1
  71. package/dist/src/capture.js +1 -1
  72. package/dist/src/cli-config.js +1 -1
  73. package/dist/src/cli-help.js +10 -7
  74. package/dist/src/cli-runner.js +1 -1
  75. package/dist/src/cli.js +1 -1
  76. package/dist/src/client-types.d.ts +5 -8
  77. package/dist/src/code-signature.js +1 -1
  78. package/dist/src/command-schema.js +3 -3
  79. package/dist/src/command-tools.js +3 -3
  80. package/dist/src/connection.js +1 -1
  81. package/dist/src/daemon-client-lifecycle.js +1 -1
  82. package/dist/src/daemon-resolution.js +1 -1
  83. package/dist/src/device-claim-rule.js +2 -2
  84. package/dist/src/device-input-state.d.ts +1 -1
  85. package/dist/src/device-rotation.js +1 -1
  86. package/dist/src/device-session.js +1 -1
  87. package/dist/src/devicectl.js +1 -1
  88. package/dist/src/display-inventory.js +1 -1
  89. package/dist/src/doctor-facade.js +1 -1
  90. package/dist/src/find.js +1 -1
  91. package/dist/src/gesture-plan-types.d.ts +38 -0
  92. package/dist/src/harmonyos.js +1 -1
  93. package/dist/src/helper.js +2 -2
  94. package/dist/src/host.js +1 -1
  95. package/dist/src/install-source-network-transport.js +1 -1
  96. package/dist/src/install-source2.js +1 -1
  97. package/dist/src/interaction-ref-policy.js +1 -1
  98. package/dist/src/interaction2.js +1 -1
  99. package/dist/src/interactor-operation-catalog.js +1 -1
  100. package/dist/src/interactor.js +4 -4
  101. package/dist/src/interactor2.js +1 -1
  102. package/dist/src/internal/bin.js +1 -1
  103. package/dist/src/internal/daemon.js +2 -2
  104. package/dist/src/inventory2.js +1 -1
  105. package/dist/src/ios-snapshot-acquisition.js +1 -1
  106. package/dist/src/ios-snapshot-runtime.js +1 -1
  107. package/dist/src/limrun-runtime-dependencies.js +1 -1
  108. package/dist/src/limrun.d.ts +435 -4
  109. package/dist/src/linux.js +1 -1
  110. package/dist/src/local-interactor-operation-set.js +1 -1
  111. package/dist/src/macos-facade.js +1 -1
  112. package/dist/src/managed-device-scope.js +1 -1
  113. package/dist/src/mechanics.js +4 -4
  114. package/dist/src/mobile-snapshot-semantics.js +1 -1
  115. package/dist/src/perf-facade.js +1 -2
  116. package/dist/src/perf-runtime-plan.js +1 -1
  117. package/dist/src/perf-target.js +2 -0
  118. package/dist/src/physical-device-apps.js +1 -0
  119. package/dist/src/physical-device-control.js +1 -1
  120. package/dist/src/platform-request-scope.js +1 -1
  121. package/dist/src/platform-runtime-operation-host.js +1 -1
  122. package/dist/src/platform-runtime-screen-recording-finalizer-host.js +1 -1
  123. package/dist/src/platform-runtime-unavailable.js +1 -1
  124. package/dist/src/platform-runtime.js +1 -1
  125. package/dist/src/platform-runtime2.js +1 -1
  126. package/dist/src/provider-webdriver.js +1 -1
  127. package/dist/src/proxy.js +1 -1
  128. package/dist/src/quality-warnings.js +1 -1
  129. package/dist/src/react-native.js +1 -1
  130. package/dist/src/record-runtime.js +1 -1
  131. package/dist/src/registry.js +35 -35
  132. package/dist/src/request-admission.js +1 -1
  133. package/dist/src/request-runtime-binding.js +1 -1
  134. package/dist/src/runner-client.js +1 -1
  135. package/dist/src/runner-dev-tools-security.js +1 -1
  136. package/dist/src/runner-device-readiness.js +1 -1
  137. package/dist/src/runner-disposal.js +1 -1
  138. package/dist/src/runner-error-classification.js +3 -0
  139. package/dist/src/runner-operations-facade.js +1 -1
  140. package/dist/src/runner-presentation.js +1 -1
  141. package/dist/src/runner.js +1 -1
  142. package/dist/src/runtime.js +3 -3
  143. package/dist/src/runtime10.js +1 -1
  144. package/dist/src/runtime2.js +2 -2
  145. package/dist/src/runtime4.js +5 -5
  146. package/dist/src/runtime5.js +1 -1
  147. package/dist/src/runtime6.js +1 -1
  148. package/dist/src/runtime7.js +1 -1
  149. package/dist/src/runtime8.js +1 -1
  150. package/dist/src/runtime9.js +1 -1
  151. package/dist/src/screen-recording-admission-ledger.js +1 -1
  152. package/dist/src/screen-recording-resource-recovery.js +1 -1
  153. package/dist/src/screen-recording-transport.js +1 -1
  154. package/dist/src/screenshot-runtime.js +1 -1
  155. package/dist/src/screenshot3.js +1 -1
  156. package/dist/src/script.js +1 -1
  157. package/dist/src/scroll-command.d.ts +377 -0
  158. package/dist/src/scroll-command.js +1 -1
  159. package/dist/src/sdk-batch.js +2 -2
  160. package/dist/src/sdk-contracts.d.ts +9 -0
  161. package/dist/src/sdk-device.js +1 -1
  162. package/dist/src/sdk-selectors.d.ts +23 -715
  163. package/dist/src/selection.js +0 -0
  164. package/dist/src/selector-runtime.js +1 -1
  165. package/dist/src/semantic-index.js +1 -1
  166. package/dist/src/server.js +1 -1
  167. package/dist/src/session-observation.js +1 -1
  168. package/dist/src/session-snapshot.js +1 -1
  169. package/dist/src/session2.js +2 -2
  170. package/dist/src/simctl-facade.js +1 -1
  171. package/dist/src/simctl.js +1 -1
  172. package/dist/src/simulator-facade.js +1 -1
  173. package/dist/src/simulator-state.js +1 -1
  174. package/dist/src/simulator.js +1 -1
  175. package/dist/src/snapshot-runtime-binding.js +1 -1
  176. package/dist/src/snapshot-runtime.js +1 -1
  177. package/dist/src/snapshot-state.js +1 -1
  178. package/dist/src/snapshot4.js +1 -1
  179. package/dist/src/src7.js +1 -1
  180. package/dist/src/text-entry-focus.js +1 -1
  181. package/dist/src/tool-provider.js +1 -1
  182. package/dist/src/touch-runtime.js +1 -1
  183. package/dist/src/tree.js +1 -1
  184. package/dist/src/update-check.js +1 -1
  185. package/dist/src/version.js +1 -1
  186. package/dist/src/web2.js +1 -1
  187. package/package.json +4 -2
  188. package/server.json +2 -2
  189. package/android/ime-helper/dist/agent-device-android-ime-helper-0.21.11.apk.sha256 +0 -1
  190. package/android/snapshot-helper/dist/agent-device-android-snapshot-helper-0.21.11.apk.sha256 +0 -1
  191. package/apple/macos-helper/Sources/AgentDeviceMacOSDeviceHub/DeviceHubPose.swift +0 -47
  192. package/apple/macos-helper/Sources/AgentDeviceMacOSDeviceHub/DeviceHubWindowInventory.swift +0 -65
  193. package/apple/macos-helper/Sources/AgentDeviceMacOSHelper/DeviceHubPose.swift +0 -225
  194. package/apple/macos-helper/Sources/AgentDeviceMacOSHelper/DeviceHubSidebar.swift +0 -57
  195. package/apple/macos-helper/Sources/AgentDeviceMacOSHelper/DeviceHubWindowDiscovery.swift +0 -108
  196. package/apple/macos-helper/Tests/AgentDeviceMacOSDeviceHubTests/DeviceHubPoseTests.swift +0 -30
  197. package/apple/macos-helper/Tests/AgentDeviceMacOSDeviceHubTests/DeviceHubWindowInventoryTests.swift +0 -65
  198. package/dist/src/app-inventory.d.ts +0 -4
  199. package/dist/src/apps-simctl.js +0 -1
  200. package/dist/src/cloud-artifacts.d.ts +0 -61
  201. package/dist/src/runner-contract.js +0 -3
@@ -0,0 +1,377 @@
1
+ import { A as ScreenshotOverlayRef, I as SnapshotQualityVerdict, L as SnapshotState, N as SnapshotNode, T as PublicPlatform, n as DaemonArtifactType } from "./sdk-contracts.js";
2
+ import { _ as SettleObservation } from "./sdk-selectors.js";
3
+ //#region packages/contracts/src/session-surface.d.ts
4
+ declare const SESSION_SURFACES: readonly ['app', 'frontmost-app', 'desktop', 'menubar'];
5
+ type SessionSurface = (typeof SESSION_SURFACES)[number];
6
+ //#endregion
7
+ //#region packages/contracts/src/snapshot-diagnostics.d.ts
8
+ type SnapshotTimingStats = {
9
+ count: number;
10
+ p50Ms: number;
11
+ p95Ms: number;
12
+ maxMs: number;
13
+ slowThresholdMs: number;
14
+ platform?: PublicPlatform;
15
+ backends?: Record<string, number>;
16
+ };
17
+ type SnapshotDiagnosticsSummary = {
18
+ stats: SnapshotTimingStats;
19
+ warning?: string;
20
+ };
21
+ //#endregion
22
+ //#region packages/contracts/src/snapshot-types.d.ts
23
+ type ScreenshotResultData = {
24
+ path?: string;
25
+ width?: number;
26
+ height?: number;
27
+ logicalWidth?: number;
28
+ logicalHeight?: number;
29
+ pixelDensity?: number;
30
+ overlayRefs?: ScreenshotOverlayRef[];
31
+ warnings?: string[];
32
+ };
33
+ type BackendSnapshotResult = {
34
+ nodes?: SnapshotNode[];
35
+ truncated?: boolean;
36
+ backend?: string;
37
+ snapshot?: SnapshotState;
38
+ appName?: string;
39
+ appBundleId?: string;
40
+ snapshotDiagnostics?: SnapshotDiagnosticsSummary;
41
+ analysis?: {
42
+ rawNodeCount: number;
43
+ maxDepth: number;
44
+ };
45
+ androidSnapshot?: AndroidSnapshotBackendMetadata;
46
+ freshness?: {
47
+ action: string;
48
+ retryCount: number;
49
+ staleAfterRetries: boolean;
50
+ reason?: 'empty-interactive' | 'sharp-drop' | 'stuck-route';
51
+ };
52
+ quality?: SnapshotQualityVerdict;
53
+ warnings?: string[];
54
+ };
55
+ type AndroidSnapshotBackendMetadata = {
56
+ backend: 'android-helper';
57
+ helperVersion?: string;
58
+ helperApiVersion?: string;
59
+ helperTransport?: string;
60
+ helperSessionReused?: boolean;
61
+ installReason?: string;
62
+ waitForIdleTimeoutMs?: number;
63
+ waitForIdleQuietMs?: number;
64
+ timeoutMs?: number;
65
+ maxDepth?: number;
66
+ maxNodes?: number;
67
+ rootPresent?: boolean;
68
+ captureMode?: string;
69
+ systemSurfaceOnly?: boolean;
70
+ windowCount?: number;
71
+ nodeCount?: number;
72
+ helperTruncated?: boolean;
73
+ elapsedMs?: number;
74
+ presentationFailure?: {
75
+ phase: 'deadline' | 'complexity' | 'regular-invariant';
76
+ workUnits: number;
77
+ maxWorkUnits?: number;
78
+ };
79
+ /** API 23 exposes no sibling drawing order, so same-window occlusion fails conservative. */
80
+ occlusionScanUnavailable?: boolean;
81
+ };
82
+ type FindLocator = 'any' | 'text' | 'label' | 'value' | 'role' | 'id';
83
+ //#endregion
84
+ //#region packages/contracts/src/scroll-gesture.d.ts
85
+ declare const SCROLL_INPUT_DIRECTIONS: readonly ['up', 'down', 'left', 'right', 'top', 'bottom'];
86
+ type ScrollInputDirection = (typeof SCROLL_INPUT_DIRECTIONS)[number];
87
+ declare const SCROLL_DIRECTIONS: readonly ['up', 'down', 'left', 'right'];
88
+ type ScrollDirection = (typeof SCROLL_DIRECTIONS)[number];
89
+ declare const SWIPE_PRESETS: readonly ['left', 'right', 'left-edge', 'right-edge'];
90
+ type SwipePreset = (typeof SWIPE_PRESETS)[number];
91
+ declare const SWIPE_PATTERNS: readonly ['one-way', 'ping-pong'];
92
+ type SwipePattern = (typeof SWIPE_PATTERNS)[number];
93
+ type TransformGestureParams = {
94
+ x: number;
95
+ y: number;
96
+ dx: number;
97
+ dy: number;
98
+ scale: number;
99
+ degrees: number;
100
+ durationMs?: number;
101
+ };
102
+ //#endregion
103
+ //#region packages/contracts/src/back-mode.d.ts
104
+ declare const BACK_MODES: readonly ['in-app', 'system'];
105
+ type BackMode = (typeof BACK_MODES)[number];
106
+ //#endregion
107
+ //#region packages/contracts/src/cloud-artifacts.d.ts
108
+ declare const CLOUD_ARTIFACT_KINDS: readonly ['video', 'appium-log', 'device-log', 'automation-log', 'provider-session', 'raw'];
109
+ type CloudArtifactKind = (typeof CLOUD_ARTIFACT_KINDS)[number];
110
+ type CloudArtifactAvailability = 'ready' | 'pending' | 'unavailable' | 'expired';
111
+ type CloudArtifact = {
112
+ provider: string;
113
+ kind: CloudArtifactKind;
114
+ name: string;
115
+ url?: string;
116
+ providerSessionId?: string;
117
+ providerArtifactId?: string;
118
+ contentType?: string;
119
+ extension?: string;
120
+ availability?: CloudArtifactAvailability;
121
+ metadata?: Record<string, unknown>;
122
+ };
123
+ type CloudArtifactsStatus = 'ready' | 'pending' | 'unavailable';
124
+ type CloudArtifactsResult = {
125
+ provider: string;
126
+ status: CloudArtifactsStatus;
127
+ cloudArtifacts: CloudArtifact[];
128
+ providerSessionId?: string;
129
+ message?: string;
130
+ };
131
+ type DaemonArtifactInventoryEntry = {
132
+ id: string;
133
+ artifactType?: DaemonArtifactType;
134
+ filename: string;
135
+ mimeType: string;
136
+ sizeBytes: number;
137
+ createdAt: string;
138
+ expiresAt: string;
139
+ };
140
+ type DaemonArtifactsResult = {
141
+ source: 'daemon';
142
+ status: 'ready';
143
+ artifacts: DaemonArtifactInventoryEntry[];
144
+ message?: string;
145
+ };
146
+ type AgentArtifactsResult = CloudArtifactsResult | DaemonArtifactsResult;
147
+ type CloudArtifactsQuery = {
148
+ provider?: string;
149
+ leaseId?: string;
150
+ providerSessionId?: string;
151
+ };
152
+ type CloudProviderSessionResult = {
153
+ provider?: string;
154
+ providerSessionId?: string;
155
+ cloudArtifacts?: CloudArtifactsResult;
156
+ } & Record<string, unknown>;
157
+ /**
158
+ * Return undefined only when this provider implementation does not handle the query.
159
+ * Return a CloudArtifactsResult with status "unavailable" when the provider handled the
160
+ * query but artifact retrieval failed, and "pending" when artifacts are not finalized yet.
161
+ */
162
+ type CloudArtifactProvider = {
163
+ listCloudArtifacts?: (query: CloudArtifactsQuery) => Promise<CloudArtifactsResult | undefined>;
164
+ };
165
+ //#endregion
166
+ //#region packages/contracts/src/settings.d.ts
167
+ /**
168
+ * The `settings permission` vocabulary, declared once. These collections are what the parsers
169
+ * below, the public client permission types, the CLI's membership sets, and the permission-name
170
+ * fragments of `settings` help and its invalid-args message are built from, and their order is
171
+ * the order `settings` help lists the names in.
172
+ *
173
+ * Acceptance is not support: each backend keeps its own target mapping and its own support check,
174
+ * so a name accepted here never promises that the selected platform serves it.
175
+ */
176
+ declare const PERMISSION_ACTIONS: readonly ['grant', 'deny', 'reset'];
177
+ declare const PERMISSION_MODES: readonly ['full', 'limited'];
178
+ /** The app-scoped targets, the only ones `parsePermissionTarget` accepts. */
179
+ declare const MOBILE_PERMISSION_TARGETS: readonly ['all', 'camera', 'microphone', 'photos', 'contacts', 'contacts-limited', 'notifications', 'calendar', 'location', 'location-always', 'media-library', 'motion', 'reminders', 'siri'];
180
+ /** The desktop targets the CLI and the public client accept; `parsePermissionTarget` refuses them. */
181
+ declare const MACOS_PERMISSION_TARGETS: readonly ['accessibility', 'screen-recording', 'input-monitoring'];
182
+ type PermissionAction = (typeof PERMISSION_ACTIONS)[number];
183
+ type PermissionMode = (typeof PERMISSION_MODES)[number];
184
+ /**
185
+ * The preferred-text-size ladder `settings text-size` accepts, in the order `settings` help lists
186
+ * it. Apple serves it natively — `simctl ui <device> content_size` reads and writes exactly these
187
+ * names — and Android serves it through its `system font_scale` multiplier, so this ladder is the
188
+ * cross-platform vocabulary and each owner maps it in its own native terms. Acceptance is not
189
+ * support: an owner that cannot serve the ladder refuses at admission, on its own fact.
190
+ */
191
+ declare const TEXT_SIZE_CATEGORIES: readonly ['extra-small', 'small', 'medium', 'large', 'extra-large', 'extra-extra-large', 'extra-extra-extra-large', 'accessibility-medium', 'accessibility-large', 'accessibility-extra-large', 'accessibility-extra-extra-large', 'accessibility-extra-extra-extra-large'];
192
+ type TextSizeCategory = (typeof TEXT_SIZE_CATEGORIES)[number];
193
+ /**
194
+ * The settings that answer a bare `settings <setting>` with the value the target holds. This is the
195
+ * vocabulary every settings type and every settings owner reads it from; the matching value is
196
+ * `READABLE_SETTINGS` in `platform-runtime-operations.ts`, where the CLI hub can evaluate it, and
197
+ * that module pins the two equal in both directions at compile time.
198
+ */
199
+ type ReadableSetting = 'text-size';
200
+ /**
201
+ * What `text-size` answers with. The ladder is shared across platforms, so a read names the
202
+ * category the ladder calls the device's value *and* the value the platform itself reported: an
203
+ * Apple content-size name, or an Android `font_scale` multiplier. The ladder is coarser than any
204
+ * one platform's own scale, and `platformValue` is what keeps a normalized answer auditable.
205
+ */
206
+ type TextSizeSettingPayload = Readonly<{
207
+ setting: 'text-size';
208
+ category: TextSizeCategory;
209
+ platformValue: string;
210
+ }>;
211
+ /**
212
+ * The payload a readable setting answers with, keyed by the setting that answered. Each readable
213
+ * setting has its own shape — a category and a multiplier are not the same observation — so the
214
+ * discriminant is what lets a response be composed, recorded, and printed from one place without
215
+ * assuming every setting is a ladder rung. A second readable setting joins this union and supplies
216
+ * its own sentence in `describeSettingRead`, which is where the compiler then asks for it.
217
+ */
218
+ type ReadSettingResult = TextSizeSettingPayload;
219
+ type SettingOptions = {
220
+ permissionTarget?: string;
221
+ permissionMode?: string;
222
+ latitude?: number;
223
+ longitude?: number;
224
+ };
225
+ //#endregion
226
+ //#region packages/contracts/src/device-rotation.d.ts
227
+ declare const DEVICE_ROTATIONS: readonly ['portrait', 'portrait-upside-down', 'landscape-left', 'landscape-right'];
228
+ type DeviceRotation = (typeof DEVICE_ROTATIONS)[number];
229
+ /**
230
+ * The three hinge poses a foldable Apple device can be put in, named after what an agent sees
231
+ * rather than after Apple's `UIHinge.Status` cases: `closed` lights the outer panel only,
232
+ * `half-open` and `open` light the inner panel. Device Hub calls them Closed, Book, and Open;
233
+ * `UIHinge.Status` calls them `.closed`, `.partiallyOpen`, and `.fullyOpen`.
234
+ */
235
+ declare const FOLD_POSES: readonly ['closed', 'half-open', 'open'];
236
+ type FoldPose = (typeof FOLD_POSES)[number];
237
+ type FoldKeyframe = Readonly<{
238
+ atMs: number;
239
+ angle: number;
240
+ }>;
241
+ type SetFoldPoseInput = Readonly<{
242
+ pose: FoldPose;
243
+ keyframes?: never;
244
+ }> | Readonly<{
245
+ keyframes: readonly FoldKeyframe[];
246
+ pose?: never;
247
+ }>;
248
+ //#endregion
249
+ //#region packages/contracts/src/tv-remote.d.ts
250
+ declare const TV_REMOTE_BUTTON_DEFINITIONS: {
251
+ readonly up: {
252
+ readonly aliases: readonly [];
253
+ readonly androidKeyevent: 'KEYCODE_DPAD_UP';
254
+ readonly appleRemoteButton: 'up';
255
+ readonly vegaKey: 'KEY_UP';
256
+ };
257
+ readonly down: {
258
+ readonly aliases: readonly [];
259
+ readonly androidKeyevent: 'KEYCODE_DPAD_DOWN';
260
+ readonly appleRemoteButton: 'down';
261
+ readonly vegaKey: 'KEY_DOWN';
262
+ };
263
+ readonly left: {
264
+ readonly aliases: readonly [];
265
+ readonly androidKeyevent: 'KEYCODE_DPAD_LEFT';
266
+ readonly appleRemoteButton: 'left';
267
+ readonly vegaKey: 'KEY_LEFT';
268
+ };
269
+ readonly right: {
270
+ readonly aliases: readonly [];
271
+ readonly androidKeyevent: 'KEYCODE_DPAD_RIGHT';
272
+ readonly appleRemoteButton: 'right';
273
+ readonly vegaKey: 'KEY_RIGHT';
274
+ };
275
+ readonly select: {
276
+ readonly aliases: readonly ["ok", "center", "enter"];
277
+ readonly androidKeyevent: 'KEYCODE_DPAD_CENTER';
278
+ readonly appleRemoteButton: 'select';
279
+ readonly vegaKey: 'KEY_ENTER';
280
+ };
281
+ readonly menu: {
282
+ readonly aliases: readonly [];
283
+ readonly androidKeyevent: 'KEYCODE_MENU';
284
+ readonly appleRemoteButton: 'menu';
285
+ readonly vegaKey: 'KEY_MENU';
286
+ };
287
+ readonly home: {
288
+ readonly aliases: readonly [];
289
+ readonly androidKeyevent: 'KEYCODE_HOME';
290
+ readonly appleRemoteButton: 'home';
291
+ readonly vegaKey: 'KEY_HOMEPAGE';
292
+ };
293
+ readonly back: {
294
+ readonly aliases: readonly [];
295
+ readonly androidKeyevent: 'KEYCODE_BACK';
296
+ readonly appleRemoteButton: 'menu';
297
+ readonly vegaKey: 'KEY_BACK';
298
+ };
299
+ };
300
+ declare const TV_REMOTE_BUTTONS: (keyof typeof TV_REMOTE_BUTTON_DEFINITIONS)[];
301
+ type TvRemoteButton = (typeof TV_REMOTE_BUTTONS)[number];
302
+ //#endregion
303
+ //#region packages/contracts/src/scroll-command.d.ts
304
+ type ScrollReleaseBehavior = 'controlled' | 'inertial';
305
+ /**
306
+ * What a directional scroll actually SAW after its gesture, which is the only evidence that can
307
+ * back the distance the same response reports (#2714).
308
+ *
309
+ * - `'moved'`: the post-gesture surface differs from the pre-gesture one, so content did move.
310
+ * - `'at-edge'`: the surface is identical and the resolved container names no hidden content in
311
+ * that direction — the scroll was a legitimate no-op at the end of the content.
312
+ * - `'unchanged'`: the surface is identical and the direction has no end-of-content signal to read
313
+ * (a horizontal scroll: the hidden-content analyzer only covers the vertical axis), so the
314
+ * response says what it measured without guessing which of the two it was.
315
+ * - `'unobserved'`: nothing comparable was available, so the distance rests on the gesture plan
316
+ * alone. Callers that need the effect confirmed ask for a capture or a `--settle` observation.
317
+ *
318
+ * A directional scroll that measures an unchanged surface WITH hidden content still in that
319
+ * direction does not answer at all: it fails with `scroll_no_progress`.
320
+ */
321
+ type ScrollMovementObservation = 'moved' | 'at-edge' | 'unchanged' | 'unobserved';
322
+ type ScrollDistanceOptions = {
323
+ amount?: number;
324
+ pixels?: number;
325
+ };
326
+ type ScrollTimingOptions = {
327
+ durationMs?: number;
328
+ };
329
+ type ScrollCommandOptions = ScrollDistanceOptions & ScrollTimingOptions;
330
+ type ScrollExecutionOptions = ScrollCommandOptions & {
331
+ releaseBehavior?: ScrollReleaseBehavior;
332
+ };
333
+ /**
334
+ * `scroll` — the generic-route result built by `buildDispatchedScrollResult`
335
+ * (src/core/dispatch-scroll.ts): the resolved direction, the edge-pass
336
+ * bookkeeping for `top`/`bottom` scrolls, the honored distance/timing echo,
337
+ * and the success message. Platform leaves add gesture-plan coordinates
338
+ * (`x1`/`y1`/`x2`/`y2`, reference frame) on top; the output schema stays
339
+ * non-strict so those additive fields validate. The one field the dispatcher
340
+ * itself may add: `settle`, the opt-in `--settle` observation (#1638),
341
+ * attached after the command — same shape as `BackCommandResult`.
342
+ */
343
+ type ScrollCommandResult = {
344
+ direction: ScrollDirection;
345
+ /** Set for `top`/`bottom` requests: the extreme being scrolled to. */
346
+ edge?: 'top' | 'bottom';
347
+ /** Set for `--until` requests: the selector the passes stopped on. */
348
+ until?: string;
349
+ /** Edge and until scrolls only: how many scroll-and-check passes ran. */
350
+ passes?: number;
351
+ amount?: number;
352
+ pixels?: number;
353
+ durationMs?: number;
354
+ message?: string;
355
+ settle?: SettleObservation;
356
+ /**
357
+ * The observation that gated this response's distance claim. See
358
+ * {@link ScrollMovementObservation}: `scroll` answers with what it measured after the gesture,
359
+ * and only `'moved'` and `'at-edge'` confirm the surface's fate. Absent on the tiers that verify
360
+ * per pass instead of per gesture (`scroll top`/`bottom` and `--until`), and on platforms whose
361
+ * scroll owner never dispatches a swipe (the Linux wheel).
362
+ */
363
+ movement?: ScrollMovementObservation;
364
+ /**
365
+ * Set only when an on-screen keyboard made the owner clip the swipe into the band above it
366
+ * (#2500). Absent means the swipe was not clipped, which is not the same claim as `false`: a
367
+ * platform that never runs the clip has nothing to report. The platform leaf's `referenceHeight`
368
+ * names the shortened axis the reported `pixels` were planned against, and `keyboardMinY` names
369
+ * where the keyboard began. A surface the owner refused to swipe at all fails instead, under the
370
+ * `scroll_keyboard_occludes_surface` reason.
371
+ */
372
+ keyboardAvoided?: true;
373
+ /** The keyboard's edge in the same unit as the gesture coordinates, when the swipe was clipped. */
374
+ keyboardMinY?: number;
375
+ };
376
+ //#endregion
377
+ export { TransformGestureParams as C, ScreenshotResultData as D, FindLocator as E, SnapshotDiagnosticsSummary as O, SwipePreset as S, BackendSnapshotResult as T, CloudProviderSessionResult as _, FoldPose as a, ScrollInputDirection as b, MOBILE_PERMISSION_TARGETS as c, ReadSettingResult as d, ReadableSetting as f, CloudArtifactProvider as g, AgentArtifactsResult as h, DeviceRotation as i, SessionSurface as k, PermissionAction as l, TextSizeCategory as m, ScrollExecutionOptions as n, SetFoldPoseInput as o, SettingOptions as p, TvRemoteButton as r, MACOS_PERMISSION_TARGETS as s, ScrollCommandResult as t, PermissionMode as u, BackMode as v, AndroidSnapshotBackendMetadata as w, SwipePattern as x, ScrollDirection as y };
@@ -1 +1 @@
1
- import{D as e}from"./sdk-contracts.js";const t=1e4,n=.65;function r(e,t){return{...e,releaseBehavior:t===void 0?`controlled`:`inertial`}}function i(t,n=`scroll accepts either a relative amount or --pixels, not both`){if(t.amount!==void 0&&t.pixels!==void 0)throw new e(`INVALID_ARGS`,n)}function a(t){if(t.until!==void 0&&t.edge!==void 0)throw new e(`INVALID_ARGS`,`scroll ${t.edge} already scrolls to the ${t.edge} edge and cannot take --until`,{hint:`Use scroll ${t.edge===`bottom`?`down`:`up`} --until <selector> to stop at the target, or scroll ${t.edge} to reach the edge.`})}function o(t,n={}){if(t===void 0)return;let r=n.field??`scroll durationMs`,i=n.max??1e4,a=n.invalidMessage??`${r} must be a non-negative integer`;if(!Number.isFinite(t)||!Number.isInteger(t)||t<0)throw new e(`INVALID_ARGS`,a);if(t>i)throw new e(`INVALID_ARGS`,`${r} must be a non-negative integer at most ${i}`);return t}function s(e){return typeof e?.pixels==`number`?e.pixels:void 0}function c(e){return typeof e?.durationMs==`number`?e.durationMs:void 0}export{c as a,r as c,a as i,t as n,s as o,i as r,o as s,n as t};
1
+ import{D as e}from"./sdk-contracts.js";const t=1e4,n=.65;function r(e,t){return{...e,releaseBehavior:t===void 0?`controlled`:`inertial`}}function i(t,n=`scroll accepts either a relative amount or --pixels, not both`){if(t.amount!==void 0&&t.pixels!==void 0)throw new e(`INVALID_ARGS`,n)}function a(t){if(t.until!==void 0&&t.edge!==void 0)throw new e(`INVALID_ARGS`,`scroll ${t.edge} already scrolls to the ${t.edge} edge and cannot take --until`,{hint:`Use scroll ${t.edge===`bottom`?`down`:`up`} --until <selector> to stop at the target, or scroll ${t.edge} to reach the edge.`})}function o(t,n={}){if(t===void 0)return;let r=n.field??`scroll durationMs`,i=n.max??1e4,a=n.invalidMessage??`${r} must be a non-negative integer`;if(!Number.isFinite(t)||!Number.isInteger(t)||t<0)throw new e(`INVALID_ARGS`,a);if(t>i)throw new e(`INVALID_ARGS`,`${r} must be a non-negative integer at most ${i}`);return t}function s(e){return typeof e?.pixels==`number`?e.pixels:void 0}function c(e){return typeof e?.durationMs==`number`?e.durationMs:void 0}function l(e){let t=u(e?.x1),n=u(e?.y1),r=u(e?.x2),i=u(e?.y2);if(t!==void 0&&n!==void 0&&r!==void 0&&i!==void 0)return{x:(t+r)/2,y:(n+i)/2}}function u(e){return typeof e==`number`&&Number.isFinite(e)?e:void 0}export{c as a,o as c,a as i,r as l,t as n,s as o,i as r,l as s,n as t};