agent-device 0.21.12 → 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.
- package/android/ime-helper/dist/{agent-device-android-ime-helper-0.21.12.apk → agent-device-android-ime-helper-0.21.13.apk} +0 -0
- package/android/ime-helper/dist/agent-device-android-ime-helper-0.21.13.apk.sha256 +1 -0
- package/android/ime-helper/dist/{agent-device-android-ime-helper-0.21.12.manifest.json → agent-device-android-ime-helper-0.21.13.manifest.json} +4 -4
- package/android/snapshot-helper/dist/{agent-device-android-snapshot-helper-0.21.12.apk → agent-device-android-snapshot-helper-0.21.13.apk} +0 -0
- package/android/snapshot-helper/dist/agent-device-android-snapshot-helper-0.21.13.apk.sha256 +1 -0
- package/android/snapshot-helper/dist/{agent-device-android-snapshot-helper-0.21.12.manifest.json → agent-device-android-snapshot-helper-0.21.13.manifest.json} +6 -6
- package/apple/macos-helper/Package.swift +4 -0
- package/apple/macos-helper/Sources/AgentDeviceMacOSHelper/main.swift +3 -6
- package/apple/macos-helper/Tests/AgentDeviceMacOSHelperTests/ScreenshotResponseTests.swift +15 -0
- package/apple/snapshot-bridge/SnapshotBridgeRuntime.m +47 -1
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunner/AgentDeviceRunnerApp.m +99 -42
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunner/Info.plist +23 -0
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunner.xcodeproj/project.pbxproj +17 -0
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerAppScreenCapture.swift +21 -13
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerScrollViewportPolicy.swift +1 -162
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerSynthesizedGesture.h +0 -9
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerSynthesizedGesture.m +0 -56
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerSystemSurfaceHostPolicy.swift +0 -48
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTapPointPolicy.swift +0 -50
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+AXSnapshotFallback.swift +22 -568
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Alert.swift +21 -9
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+BlockingSystemModalResolution.swift +0 -36
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+CommandDispatch.swift +630 -0
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+CommandExecution.swift +18 -2236
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+CommandJournal.swift +1 -338
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Environment.swift +0 -12
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+GestureExecution.swift +165 -0
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Interaction.swift +0 -24
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Keyboard.swift +0 -142
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Lifecycle.swift +90 -39
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+MainThreadWork.swift +78 -106
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Models.swift +23 -2
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Navigation.swift +147 -95
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+PrivateAXPresentation.swift +0 -209
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+ScreenRecorder.swift +86 -10
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+ScrollDragExecution.swift +287 -0
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+ScrollGesture.swift +1 -200
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+SequenceExecution.swift +0 -185
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Snapshot.swift +75 -285
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+SnapshotAcquisition.swift +23 -10
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+SnapshotBackendCapabilities.swift +0 -78
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+SnapshotCapturePlan.swift +83 -578
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+SnapshotCaptureTarget.swift +106 -0
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+SnapshotExecution.swift +142 -0
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+SnapshotTiming.swift +49 -78
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+SynthesizedCommitDeadline.swift +0 -44
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+SynthesizedGesturePolicy.swift +27 -97
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+SynthesizedInteraction.swift +1 -11
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+SynthesizedTextEntry.swift +11 -87
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+SystemModal.swift +2 -10
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+TextEntry.swift +1 -1
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+TextEntryFocus.swift +0 -35
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+TextInputCandidatePolicy.swift +0 -31
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+TextTyping.swift +2 -18
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Transport.swift +34 -52
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+TvRemote.swift +0 -22
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+TypeExecution.swift +142 -0
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests.swift +22 -6
- package/dist/apple/runner/AgentDeviceRunner/RecordingScripts/recording-overlay.swift +140 -20
- package/dist/src/absence-observation-errors.js +1 -1
- package/dist/src/adapter.js +1 -1
- package/dist/src/agent-device-client.js +1 -1
- package/dist/src/alert-runtime.js +1 -1
- package/dist/src/android-adb.d.ts +1 -1
- package/dist/src/app-launch.js +2 -2
- package/dist/src/app-log-runtime2.js +3 -3
- package/dist/src/app-resolution.js +2 -2
- package/dist/src/back-mode.js +1 -1
- package/dist/src/capture-disclosure.js +1 -1
- package/dist/src/capture.js +1 -1
- package/dist/src/cli-config.js +1 -1
- package/dist/src/cli-help.js +6 -5
- package/dist/src/cli-runner.js +1 -1
- package/dist/src/cli.js +1 -1
- package/dist/src/client-types.d.ts +4 -5
- package/dist/src/code-signature.js +1 -1
- package/dist/src/command-schema.js +3 -3
- package/dist/src/command-tools.js +3 -3
- package/dist/src/connection.js +1 -1
- package/dist/src/daemon-client-lifecycle.js +1 -1
- package/dist/src/daemon-resolution.js +1 -1
- package/dist/src/device-claim-rule.js +2 -2
- package/dist/src/device-input-state.d.ts +1 -1
- package/dist/src/device-session.js +1 -1
- package/dist/src/devicectl.js +1 -1
- package/dist/src/display-inventory.js +1 -1
- package/dist/src/doctor-facade.js +1 -1
- package/dist/src/find.js +1 -1
- package/dist/src/gesture-plan-types.d.ts +38 -0
- package/dist/src/harmonyos.js +1 -1
- package/dist/src/helper.js +1 -1
- package/dist/src/host.js +1 -1
- package/dist/src/install-source-network-transport.js +1 -1
- package/dist/src/install-source2.js +1 -1
- package/dist/src/interaction-ref-policy.js +1 -1
- package/dist/src/interaction2.js +1 -1
- package/dist/src/interactor-operation-catalog.js +1 -1
- package/dist/src/interactor.js +4 -4
- package/dist/src/interactor2.js +1 -1
- package/dist/src/internal/bin.js +1 -1
- package/dist/src/internal/daemon.js +2 -2
- package/dist/src/inventory2.js +1 -1
- package/dist/src/ios-snapshot-acquisition.js +1 -1
- package/dist/src/ios-snapshot-runtime.js +1 -1
- package/dist/src/limrun-runtime-dependencies.js +1 -1
- package/dist/src/limrun.d.ts +435 -4
- package/dist/src/linux.js +1 -1
- package/dist/src/local-interactor-operation-set.js +1 -1
- package/dist/src/managed-device-scope.js +1 -1
- package/dist/src/mechanics.js +4 -4
- package/dist/src/mobile-snapshot-semantics.js +1 -1
- package/dist/src/perf-facade.js +1 -2
- package/dist/src/perf-runtime-plan.js +1 -1
- package/dist/src/perf-target.js +2 -0
- package/dist/src/physical-device-apps.js +1 -0
- package/dist/src/physical-device-control.js +1 -1
- package/dist/src/platform-request-scope.js +1 -1
- package/dist/src/platform-runtime-operation-host.js +1 -1
- package/dist/src/platform-runtime-screen-recording-finalizer-host.js +1 -1
- package/dist/src/platform-runtime-unavailable.js +1 -1
- package/dist/src/platform-runtime.js +1 -1
- package/dist/src/platform-runtime2.js +1 -1
- package/dist/src/provider-webdriver.js +1 -1
- package/dist/src/proxy.js +1 -1
- package/dist/src/quality-warnings.js +1 -1
- package/dist/src/react-native.js +1 -1
- package/dist/src/record-runtime.js +1 -1
- package/dist/src/registry.js +35 -35
- package/dist/src/request-admission.js +1 -1
- package/dist/src/request-runtime-binding.js +1 -1
- package/dist/src/runner-client.js +1 -1
- package/dist/src/runner-dev-tools-security.js +1 -1
- package/dist/src/runner-device-readiness.js +1 -1
- package/dist/src/runner-disposal.js +1 -1
- package/dist/src/runner-error-classification.js +3 -0
- package/dist/src/runner-operations-facade.js +1 -1
- package/dist/src/runner-presentation.js +1 -1
- package/dist/src/runner.js +1 -1
- package/dist/src/runtime.js +3 -3
- package/dist/src/runtime10.js +1 -1
- package/dist/src/runtime2.js +2 -2
- package/dist/src/runtime4.js +5 -5
- package/dist/src/runtime5.js +1 -1
- package/dist/src/runtime6.js +1 -1
- package/dist/src/runtime7.js +1 -1
- package/dist/src/runtime8.js +1 -1
- package/dist/src/runtime9.js +1 -1
- package/dist/src/screen-recording-admission-ledger.js +1 -1
- package/dist/src/screen-recording-resource-recovery.js +1 -1
- package/dist/src/screen-recording-transport.js +1 -1
- package/dist/src/screenshot-runtime.js +1 -1
- package/dist/src/screenshot3.js +1 -1
- package/dist/src/script.js +1 -1
- package/dist/src/scroll-command.d.ts +377 -0
- package/dist/src/scroll-command.js +1 -1
- package/dist/src/sdk-batch.js +2 -2
- package/dist/src/sdk-contracts.d.ts +9 -0
- package/dist/src/sdk-device.js +1 -1
- package/dist/src/sdk-selectors.d.ts +23 -726
- package/dist/src/selection.js +0 -0
- package/dist/src/selector-runtime.js +1 -1
- package/dist/src/semantic-index.js +1 -1
- package/dist/src/server.js +1 -1
- package/dist/src/session-observation.js +1 -1
- package/dist/src/session-snapshot.js +1 -1
- package/dist/src/session2.js +2 -2
- package/dist/src/simctl-facade.js +1 -1
- package/dist/src/simctl.js +1 -1
- package/dist/src/simulator-state.js +1 -1
- package/dist/src/simulator.js +1 -1
- package/dist/src/snapshot-runtime-binding.js +1 -1
- package/dist/src/snapshot-runtime.js +1 -1
- package/dist/src/snapshot-state.js +1 -1
- package/dist/src/snapshot4.js +1 -1
- package/dist/src/src7.js +1 -1
- package/dist/src/text-entry-focus.js +1 -1
- package/dist/src/tool-provider.js +1 -1
- package/dist/src/touch-runtime.js +1 -1
- package/dist/src/tree.js +1 -1
- package/dist/src/update-check.js +1 -1
- package/dist/src/version.js +1 -1
- package/dist/src/web2.js +1 -1
- package/package.json +3 -2
- package/server.json +2 -2
- package/android/ime-helper/dist/agent-device-android-ime-helper-0.21.12.apk.sha256 +0 -1
- package/android/snapshot-helper/dist/agent-device-android-snapshot-helper-0.21.12.apk.sha256 +0 -1
- package/dist/src/app-inventory.d.ts +0 -4
- package/dist/src/apps-simctl.js +0 -1
- package/dist/src/cloud-artifacts.d.ts +0 -61
- package/dist/src/runner-contract.js +0 -3
|
@@ -1,304 +1,35 @@
|
|
|
1
|
-
import {
|
|
2
|
-
//#region packages/contracts/src/session-surface.d.ts
|
|
3
|
-
declare const SESSION_SURFACES: readonly ['app', 'frontmost-app', 'desktop', 'menubar'];
|
|
4
|
-
type SessionSurface = (typeof SESSION_SURFACES)[number];
|
|
5
|
-
//#endregion
|
|
6
|
-
//#region packages/contracts/src/snapshot-diagnostics.d.ts
|
|
7
|
-
type SnapshotTimingStats = {
|
|
8
|
-
count: number;
|
|
9
|
-
p50Ms: number;
|
|
10
|
-
p95Ms: number;
|
|
11
|
-
maxMs: number;
|
|
12
|
-
slowThresholdMs: number;
|
|
13
|
-
platform?: PublicPlatform;
|
|
14
|
-
backends?: Record<string, number>;
|
|
15
|
-
};
|
|
16
|
-
type SnapshotDiagnosticsSummary = {
|
|
17
|
-
stats: SnapshotTimingStats;
|
|
18
|
-
warning?: string;
|
|
19
|
-
};
|
|
20
|
-
//#endregion
|
|
21
|
-
//#region packages/contracts/src/snapshot-types.d.ts
|
|
22
|
-
type ScreenshotResultData = {
|
|
23
|
-
path?: string;
|
|
24
|
-
width?: number;
|
|
25
|
-
height?: number;
|
|
26
|
-
logicalWidth?: number;
|
|
27
|
-
logicalHeight?: number;
|
|
28
|
-
pixelDensity?: number;
|
|
29
|
-
overlayRefs?: ScreenshotOverlayRef[];
|
|
30
|
-
warnings?: string[];
|
|
31
|
-
};
|
|
32
|
-
type BackendSnapshotResult = {
|
|
33
|
-
nodes?: SnapshotNode[];
|
|
34
|
-
truncated?: boolean;
|
|
35
|
-
backend?: string;
|
|
36
|
-
snapshot?: SnapshotState;
|
|
37
|
-
appName?: string;
|
|
38
|
-
appBundleId?: string;
|
|
39
|
-
snapshotDiagnostics?: SnapshotDiagnosticsSummary;
|
|
40
|
-
analysis?: {
|
|
41
|
-
rawNodeCount: number;
|
|
42
|
-
maxDepth: number;
|
|
43
|
-
};
|
|
44
|
-
androidSnapshot?: AndroidSnapshotBackendMetadata;
|
|
45
|
-
freshness?: {
|
|
46
|
-
action: string;
|
|
47
|
-
retryCount: number;
|
|
48
|
-
staleAfterRetries: boolean;
|
|
49
|
-
reason?: 'empty-interactive' | 'sharp-drop' | 'stuck-route';
|
|
50
|
-
};
|
|
51
|
-
quality?: SnapshotQualityVerdict;
|
|
52
|
-
warnings?: string[];
|
|
53
|
-
};
|
|
54
|
-
type AndroidSnapshotBackendMetadata = {
|
|
55
|
-
backend: 'android-helper';
|
|
56
|
-
helperVersion?: string;
|
|
57
|
-
helperApiVersion?: string;
|
|
58
|
-
helperTransport?: string;
|
|
59
|
-
helperSessionReused?: boolean;
|
|
60
|
-
installReason?: string;
|
|
61
|
-
waitForIdleTimeoutMs?: number;
|
|
62
|
-
waitForIdleQuietMs?: number;
|
|
63
|
-
timeoutMs?: number;
|
|
64
|
-
maxDepth?: number;
|
|
65
|
-
maxNodes?: number;
|
|
66
|
-
rootPresent?: boolean;
|
|
67
|
-
captureMode?: string;
|
|
68
|
-
systemSurfaceOnly?: boolean;
|
|
69
|
-
windowCount?: number;
|
|
70
|
-
nodeCount?: number;
|
|
71
|
-
helperTruncated?: boolean;
|
|
72
|
-
elapsedMs?: number;
|
|
73
|
-
presentationFailure?: {
|
|
74
|
-
phase: 'deadline' | 'complexity' | 'regular-invariant';
|
|
75
|
-
workUnits: number;
|
|
76
|
-
maxWorkUnits?: number;
|
|
77
|
-
};
|
|
78
|
-
/** API 23 exposes no sibling drawing order, so same-window occlusion fails conservative. */
|
|
79
|
-
occlusionScanUnavailable?: boolean;
|
|
80
|
-
};
|
|
81
|
-
type FindLocator = 'any' | 'text' | 'label' | 'value' | 'role' | 'id';
|
|
82
|
-
//#endregion
|
|
1
|
+
import { C as Platform, L as SnapshotState, N as SnapshotNode, T as PublicPlatform, h as ResponseCost, k as Rect } from "./sdk-contracts.js";
|
|
83
2
|
//#region packages/contracts/src/click-button.d.ts
|
|
84
3
|
declare const CLICK_BUTTONS: readonly ['primary', 'secondary', 'middle'];
|
|
85
4
|
type ClickButton = (typeof CLICK_BUTTONS)[number];
|
|
86
5
|
//#endregion
|
|
87
|
-
//#region packages/contracts/src/
|
|
88
|
-
declare const SCROLL_INPUT_DIRECTIONS: readonly ['up', 'down', 'left', 'right', 'top', 'bottom'];
|
|
89
|
-
type ScrollInputDirection = (typeof SCROLL_INPUT_DIRECTIONS)[number];
|
|
90
|
-
declare const SCROLL_DIRECTIONS: readonly ['up', 'down', 'left', 'right'];
|
|
91
|
-
type ScrollDirection = (typeof SCROLL_DIRECTIONS)[number];
|
|
92
|
-
declare const SWIPE_PRESETS: readonly ['left', 'right', 'left-edge', 'right-edge'];
|
|
93
|
-
type SwipePreset = (typeof SWIPE_PRESETS)[number];
|
|
94
|
-
declare const SWIPE_PATTERNS: readonly ['one-way', 'ping-pong'];
|
|
95
|
-
type SwipePattern = (typeof SWIPE_PATTERNS)[number];
|
|
96
|
-
type TransformGestureParams = {
|
|
97
|
-
x: number;
|
|
98
|
-
y: number;
|
|
99
|
-
dx: number;
|
|
100
|
-
dy: number;
|
|
101
|
-
scale: number;
|
|
102
|
-
degrees: number;
|
|
103
|
-
durationMs?: number;
|
|
104
|
-
};
|
|
105
|
-
//#endregion
|
|
106
|
-
//#region packages/contracts/src/gesture-plan-types.d.ts
|
|
107
|
-
type GesturePointerCount = 1 | 2;
|
|
108
|
-
/** Selects one-pointer release timing without changing semantic gesture intent. */
|
|
109
|
-
type GestureExecutionProfile = 'endpoint-hold' | 'timed-pan';
|
|
110
|
-
type PointerTrajectorySample = {
|
|
111
|
-
offsetMs: number;
|
|
112
|
-
point: Point;
|
|
113
|
-
};
|
|
114
|
-
type PointerTrajectory = {
|
|
115
|
-
pointerId: 0 | 1;
|
|
116
|
-
samples: readonly PointerTrajectorySample[];
|
|
117
|
-
};
|
|
118
|
-
type SinglePointerTrajectory = {
|
|
119
|
-
pointerId: 0;
|
|
120
|
-
samples: readonly [PointerTrajectorySample, PointerTrajectorySample, ...PointerTrajectorySample[]];
|
|
121
|
-
};
|
|
122
|
-
type SinglePointerGesturePlan = {
|
|
123
|
-
topology: 'single';
|
|
124
|
-
intent: 'fling' | 'pan';
|
|
125
|
-
executionProfile: GestureExecutionProfile;
|
|
126
|
-
durationMs: number;
|
|
127
|
-
viewport: Rect;
|
|
128
|
-
pointers: readonly [SinglePointerTrajectory];
|
|
129
|
-
};
|
|
130
|
-
type MultiTouchGesturePlan = {
|
|
131
|
-
topology: 'two';
|
|
132
|
-
intent: 'pan' | 'pinch' | 'rotate' | 'transform';
|
|
133
|
-
durationMs: number;
|
|
134
|
-
viewport: Rect;
|
|
135
|
-
pointers: readonly [PointerTrajectory, PointerTrajectory];
|
|
136
|
-
};
|
|
137
|
-
type GesturePlan = SinglePointerGesturePlan | MultiTouchGesturePlan;
|
|
138
|
-
//#endregion
|
|
139
|
-
//#region packages/contracts/src/back-mode.d.ts
|
|
140
|
-
declare const BACK_MODES: readonly ['in-app', 'system'];
|
|
141
|
-
type BackMode = (typeof BACK_MODES)[number];
|
|
142
|
-
//#endregion
|
|
143
|
-
//#region packages/contracts/src/settings.d.ts
|
|
6
|
+
//#region packages/contracts/src/fill-evidence.d.ts
|
|
144
7
|
/**
|
|
145
|
-
* The
|
|
146
|
-
*
|
|
147
|
-
*
|
|
148
|
-
*
|
|
149
|
-
*
|
|
150
|
-
* Acceptance is not support: each backend keeps its own target mapping and its own support check,
|
|
151
|
-
* so a name accepted here never promises that the selected platform serves it.
|
|
8
|
+
* The evidence a `fill` carries when it changed a field but could not confirm the text it sent.
|
|
9
|
+
* Both the fill response and `Interactor.fill`'s return need these shapes, so they sit below both
|
|
10
|
+
* of those modules rather than in either. This is the cross-language shape, not Android's probing:
|
|
11
|
+
* `packages/platform-android/src/fill-verification.ts` builds Android's copy of it.
|
|
152
12
|
*/
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
type PermissionAction = (typeof PERMISSION_ACTIONS)[number];
|
|
160
|
-
type PermissionMode = (typeof PERMISSION_MODES)[number];
|
|
161
|
-
/**
|
|
162
|
-
* The preferred-text-size ladder `settings text-size` accepts, in the order `settings` help lists
|
|
163
|
-
* it. Apple serves it natively — `simctl ui <device> content_size` reads and writes exactly these
|
|
164
|
-
* names — and Android serves it through its `system font_scale` multiplier, so this ladder is the
|
|
165
|
-
* cross-platform vocabulary and each owner maps it in its own native terms. Acceptance is not
|
|
166
|
-
* support: an owner that cannot serve the ladder refuses at admission, on its own fact.
|
|
167
|
-
*/
|
|
168
|
-
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'];
|
|
169
|
-
type TextSizeCategory = (typeof TEXT_SIZE_CATEGORIES)[number];
|
|
170
|
-
/**
|
|
171
|
-
* The settings that answer a bare `settings <setting>` with the value the target holds. This is the
|
|
172
|
-
* vocabulary every settings type and every settings owner reads it from; the matching value is
|
|
173
|
-
* `READABLE_SETTINGS` in `platform-runtime-operations.ts`, where the CLI hub can evaluate it, and
|
|
174
|
-
* that module pins the two equal in both directions at compile time.
|
|
175
|
-
*/
|
|
176
|
-
type ReadableSetting = 'text-size';
|
|
177
|
-
/**
|
|
178
|
-
* What `text-size` answers with. The ladder is shared across platforms, so a read names the
|
|
179
|
-
* category the ladder calls the device's value *and* the value the platform itself reported: an
|
|
180
|
-
* Apple content-size name, or an Android `font_scale` multiplier. The ladder is coarser than any
|
|
181
|
-
* one platform's own scale, and `platformValue` is what keeps a normalized answer auditable.
|
|
182
|
-
*/
|
|
183
|
-
type TextSizeSettingPayload = Readonly<{
|
|
184
|
-
setting: 'text-size';
|
|
185
|
-
category: TextSizeCategory;
|
|
186
|
-
platformValue: string;
|
|
187
|
-
}>;
|
|
188
|
-
/**
|
|
189
|
-
* The payload a readable setting answers with, keyed by the setting that answered. Each readable
|
|
190
|
-
* setting has its own shape — a category and a multiplier are not the same observation — so the
|
|
191
|
-
* discriminant is what lets a response be composed, recorded, and printed from one place without
|
|
192
|
-
* assuming every setting is a ladder rung. A second readable setting joins this union and supplies
|
|
193
|
-
* its own sentence in `describeSettingRead`, which is where the compiler then asks for it.
|
|
194
|
-
*/
|
|
195
|
-
type ReadSettingResult = TextSizeSettingPayload;
|
|
196
|
-
type SettingOptions = {
|
|
197
|
-
permissionTarget?: string;
|
|
198
|
-
permissionMode?: string;
|
|
199
|
-
latitude?: number;
|
|
200
|
-
longitude?: number;
|
|
13
|
+
/** The field a fill aimed at, as the platform that performed it names it. */
|
|
14
|
+
type FillVerificationTarget = {
|
|
15
|
+
resourceId: string | null;
|
|
16
|
+
className: string | null;
|
|
17
|
+
packageName: string | null;
|
|
18
|
+
rect: Rect;
|
|
201
19
|
};
|
|
202
|
-
//#endregion
|
|
203
|
-
//#region packages/contracts/src/device-rotation.d.ts
|
|
204
|
-
declare const DEVICE_ROTATIONS: readonly ['portrait', 'portrait-upside-down', 'landscape-left', 'landscape-right'];
|
|
205
|
-
type DeviceRotation = (typeof DEVICE_ROTATIONS)[number];
|
|
206
20
|
/**
|
|
207
|
-
*
|
|
208
|
-
*
|
|
209
|
-
*
|
|
210
|
-
*
|
|
21
|
+
* Target-bound evidence that a fill moved a field's content from `before` to `after` without raw
|
|
22
|
+
* equality with `requested` being reachable, because app-owned formatting prevents it. Bound to the
|
|
23
|
+
* {@link FillVerificationTarget} it was collected against so another field, or the same field after
|
|
24
|
+
* it re-laid out, cannot borrow this evidence.
|
|
211
25
|
*/
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
type SetFoldPoseInput = Readonly<{
|
|
219
|
-
pose: FoldPose;
|
|
220
|
-
keyframes?: never;
|
|
221
|
-
}> | Readonly<{
|
|
222
|
-
keyframes: readonly FoldKeyframe[];
|
|
223
|
-
pose?: never;
|
|
224
|
-
}>;
|
|
225
|
-
//#endregion
|
|
226
|
-
//#region packages/contracts/src/tv-remote.d.ts
|
|
227
|
-
declare const TV_REMOTE_BUTTON_DEFINITIONS: {
|
|
228
|
-
readonly up: {
|
|
229
|
-
readonly aliases: readonly [];
|
|
230
|
-
readonly androidKeyevent: 'KEYCODE_DPAD_UP';
|
|
231
|
-
readonly appleRemoteButton: 'up';
|
|
232
|
-
readonly vegaKey: 'KEY_UP';
|
|
233
|
-
};
|
|
234
|
-
readonly down: {
|
|
235
|
-
readonly aliases: readonly [];
|
|
236
|
-
readonly androidKeyevent: 'KEYCODE_DPAD_DOWN';
|
|
237
|
-
readonly appleRemoteButton: 'down';
|
|
238
|
-
readonly vegaKey: 'KEY_DOWN';
|
|
239
|
-
};
|
|
240
|
-
readonly left: {
|
|
241
|
-
readonly aliases: readonly [];
|
|
242
|
-
readonly androidKeyevent: 'KEYCODE_DPAD_LEFT';
|
|
243
|
-
readonly appleRemoteButton: 'left';
|
|
244
|
-
readonly vegaKey: 'KEY_LEFT';
|
|
245
|
-
};
|
|
246
|
-
readonly right: {
|
|
247
|
-
readonly aliases: readonly [];
|
|
248
|
-
readonly androidKeyevent: 'KEYCODE_DPAD_RIGHT';
|
|
249
|
-
readonly appleRemoteButton: 'right';
|
|
250
|
-
readonly vegaKey: 'KEY_RIGHT';
|
|
251
|
-
};
|
|
252
|
-
readonly select: {
|
|
253
|
-
readonly aliases: readonly ["ok", "center", "enter"];
|
|
254
|
-
readonly androidKeyevent: 'KEYCODE_DPAD_CENTER';
|
|
255
|
-
readonly appleRemoteButton: 'select';
|
|
256
|
-
readonly vegaKey: 'KEY_ENTER';
|
|
257
|
-
};
|
|
258
|
-
readonly menu: {
|
|
259
|
-
readonly aliases: readonly [];
|
|
260
|
-
readonly androidKeyevent: 'KEYCODE_MENU';
|
|
261
|
-
readonly appleRemoteButton: 'menu';
|
|
262
|
-
readonly vegaKey: 'KEY_MENU';
|
|
263
|
-
};
|
|
264
|
-
readonly home: {
|
|
265
|
-
readonly aliases: readonly [];
|
|
266
|
-
readonly androidKeyevent: 'KEYCODE_HOME';
|
|
267
|
-
readonly appleRemoteButton: 'home';
|
|
268
|
-
readonly vegaKey: 'KEY_HOMEPAGE';
|
|
269
|
-
};
|
|
270
|
-
readonly back: {
|
|
271
|
-
readonly aliases: readonly [];
|
|
272
|
-
readonly androidKeyevent: 'KEYCODE_BACK';
|
|
273
|
-
readonly appleRemoteButton: 'menu';
|
|
274
|
-
readonly vegaKey: 'KEY_BACK';
|
|
275
|
-
};
|
|
26
|
+
type FillUnconfirmedVerification = {
|
|
27
|
+
verification: 'unconfirmed';
|
|
28
|
+
requested: string;
|
|
29
|
+
before: string | null;
|
|
30
|
+
after: string | null;
|
|
31
|
+
target: FillVerificationTarget;
|
|
276
32
|
};
|
|
277
|
-
declare const TV_REMOTE_BUTTONS: (keyof typeof TV_REMOTE_BUTTON_DEFINITIONS)[];
|
|
278
|
-
type TvRemoteButton = (typeof TV_REMOTE_BUTTONS)[number];
|
|
279
|
-
//#endregion
|
|
280
|
-
//#region packages/contracts/src/ios-system-surface.d.ts
|
|
281
|
-
/**
|
|
282
|
-
* iOS out-of-process system surfaces that agent-device observes and drives IN PLACE, never by
|
|
283
|
-
* activation: launching or activating the host cancels what it presents (issue #2438), so the
|
|
284
|
-
* runner addresses the host process while it is foreground and the `open` path refuses it. The set
|
|
285
|
-
* is deliberately closed and tiny; add a host only with live evidence that it presents out of
|
|
286
|
-
* process and dies on activation. Rationale per host lives in the canonical fixture
|
|
287
|
-
* `contracts/fixtures/ios-system-surface-hosts.json` (see also docs/adr/0004); this module and the
|
|
288
|
-
* Swift `SystemSurfaceHostRegistry` both mirror it, each guarded by a parity test.
|
|
289
|
-
*/
|
|
290
|
-
/** Why a system surface is served in place; carried at snapshot-response level as provenance. */
|
|
291
|
-
type IosSystemSurfaceKind = 'web-auth' | 'payment';
|
|
292
|
-
/**
|
|
293
|
-
* Whole-snapshot provenance: the capture describes a system surface presented over the session app,
|
|
294
|
-
* not the app itself. Carried at response level (it applies to the entire snapshot) and folded into
|
|
295
|
-
* iOS snapshot lineage so `--verify`/`--settle` never compare an app baseline against a sheet
|
|
296
|
-
* capture. Mirrors the Android system-chrome/system-surface provenance model.
|
|
297
|
-
*/
|
|
298
|
-
type IosSystemSurfaceProvenance = Readonly<{
|
|
299
|
-
bundleId: string;
|
|
300
|
-
kind: IosSystemSurfaceKind;
|
|
301
|
-
}>;
|
|
302
33
|
//#endregion
|
|
303
34
|
//#region packages/contracts/src/interaction.d.ts
|
|
304
35
|
/** The decisive criterion separating a resolveSelectorChain winner from its strongest runner-up (ADR 0012). */
|
|
@@ -570,440 +301,6 @@ type FindCommandResponseData = {
|
|
|
570
301
|
cost?: ResponseCost;
|
|
571
302
|
};
|
|
572
303
|
//#endregion
|
|
573
|
-
//#region packages/contracts/src/scroll-command.d.ts
|
|
574
|
-
type ScrollReleaseBehavior = 'controlled' | 'inertial';
|
|
575
|
-
type ScrollDistanceOptions = {
|
|
576
|
-
amount?: number;
|
|
577
|
-
pixels?: number;
|
|
578
|
-
};
|
|
579
|
-
type ScrollTimingOptions = {
|
|
580
|
-
durationMs?: number;
|
|
581
|
-
};
|
|
582
|
-
type ScrollCommandOptions = ScrollDistanceOptions & ScrollTimingOptions;
|
|
583
|
-
type ScrollExecutionOptions = ScrollCommandOptions & {
|
|
584
|
-
releaseBehavior?: ScrollReleaseBehavior;
|
|
585
|
-
};
|
|
586
|
-
/**
|
|
587
|
-
* `scroll` — the generic-route result built by `buildDispatchedScrollResult`
|
|
588
|
-
* (src/core/dispatch-scroll.ts): the resolved direction, the edge-pass
|
|
589
|
-
* bookkeeping for `top`/`bottom` scrolls, the honored distance/timing echo,
|
|
590
|
-
* and the success message. Platform leaves add gesture-plan coordinates
|
|
591
|
-
* (`x1`/`y1`/`x2`/`y2`, reference frame) on top; the output schema stays
|
|
592
|
-
* non-strict so those additive fields validate. The one field the dispatcher
|
|
593
|
-
* itself may add: `settle`, the opt-in `--settle` observation (#1638),
|
|
594
|
-
* attached after the command — same shape as `BackCommandResult`.
|
|
595
|
-
*/
|
|
596
|
-
type ScrollCommandResult = {
|
|
597
|
-
direction: ScrollDirection;
|
|
598
|
-
/** Set for `top`/`bottom` requests: the extreme being scrolled to. */
|
|
599
|
-
edge?: 'top' | 'bottom';
|
|
600
|
-
/** Set for `--until` requests: the selector the passes stopped on. */
|
|
601
|
-
until?: string;
|
|
602
|
-
/** Edge and until scrolls only: how many scroll-and-check passes ran. */
|
|
603
|
-
passes?: number;
|
|
604
|
-
amount?: number;
|
|
605
|
-
pixels?: number;
|
|
606
|
-
durationMs?: number;
|
|
607
|
-
message?: string;
|
|
608
|
-
settle?: SettleObservation;
|
|
609
|
-
/**
|
|
610
|
-
* Set only when an on-screen keyboard made the owner clip the swipe into the band above it
|
|
611
|
-
* (#2500). Absent means the swipe was not clipped, which is not the same claim as `false`: a
|
|
612
|
-
* platform that never runs the clip has nothing to report. The platform leaf's `referenceHeight`
|
|
613
|
-
* names the shortened axis the reported `pixels` were planned against, and `keyboardMinY` names
|
|
614
|
-
* where the keyboard began. A surface the owner refused to swipe at all fails instead, under the
|
|
615
|
-
* `scroll_keyboard_occludes_surface` reason.
|
|
616
|
-
*/
|
|
617
|
-
keyboardAvoided?: true;
|
|
618
|
-
/** The keyboard's edge in the same unit as the gesture coordinates, when the swipe was clipped. */
|
|
619
|
-
keyboardMinY?: number;
|
|
620
|
-
};
|
|
621
|
-
//#endregion
|
|
622
|
-
//#region packages/contracts/src/runner-lease-context.d.ts
|
|
623
|
-
type RunnerLogicalLeaseContext = {
|
|
624
|
-
leaseId?: string;
|
|
625
|
-
clientId?: string;
|
|
626
|
-
tenantId?: string;
|
|
627
|
-
runId?: string;
|
|
628
|
-
leaseProvider?: string;
|
|
629
|
-
deviceKey?: string;
|
|
630
|
-
};
|
|
631
|
-
//#endregion
|
|
632
|
-
//#region packages/contracts/src/ios-snapshot.d.ts
|
|
633
|
-
type IosSnapshotProducer = 'apple-runner' | 'simulator-ax-bridge' | 'appium-source' | 'limrun-ios-tree';
|
|
634
|
-
type IosAcquisitionProducer = Exclude<IosSnapshotProducer, 'apple-runner'>;
|
|
635
|
-
type IosAcquisitionIntent = 'full' | 'surface-observation';
|
|
636
|
-
type IosSnapshotProjection = 'regular' | 'raw';
|
|
637
|
-
type IosSnapshotGeneration = string;
|
|
638
|
-
type IosSnapshotLineage = Readonly<{
|
|
639
|
-
targetId?: string;
|
|
640
|
-
generation?: IosSnapshotGeneration;
|
|
641
|
-
}>;
|
|
642
|
-
type IosSnapshotPresentationKey = Readonly<{
|
|
643
|
-
projection: IosSnapshotProjection;
|
|
644
|
-
interactiveOnly: boolean;
|
|
645
|
-
depth: number | null;
|
|
646
|
-
scope: string | null;
|
|
647
|
-
customActions: boolean;
|
|
648
|
-
}>;
|
|
649
|
-
type CaptureHint = Readonly<{
|
|
650
|
-
projection: IosSnapshotProjection;
|
|
651
|
-
rawTraversalDepth: number | null;
|
|
652
|
-
regularPresentedDepth: number | null;
|
|
653
|
-
interactiveOnly: boolean;
|
|
654
|
-
customActions: boolean;
|
|
655
|
-
acquisitionIntent: IosAcquisitionIntent;
|
|
656
|
-
}>;
|
|
657
|
-
type IosSnapshotFact = 'acquisition-depth' | 'scope' | 'interactive-query' | 'viewport' | 'hittability' | 'generation' | 'truncation';
|
|
658
|
-
type IosViewportEvidence = Readonly<{
|
|
659
|
-
kind: 'reported';
|
|
660
|
-
rect: Rect;
|
|
661
|
-
}> | Readonly<{
|
|
662
|
-
kind: 'derived';
|
|
663
|
-
rect: Rect;
|
|
664
|
-
}> | Readonly<{
|
|
665
|
-
kind: 'missing';
|
|
666
|
-
reason: 'not-provided' | 'not-supported' | 'invalid';
|
|
667
|
-
}>;
|
|
668
|
-
type IosProviderPrunedField = 'nodes' | 'depth' | 'scope' | 'interactive-only';
|
|
669
|
-
type IosAcquisitionResidue = Readonly<{
|
|
670
|
-
kind: 'provider-pruned';
|
|
671
|
-
fields: readonly IosProviderPrunedField[];
|
|
672
|
-
}> | Readonly<{
|
|
673
|
-
kind: 'missing-viewport';
|
|
674
|
-
reason: 'not-provided' | 'not-supported' | 'invalid';
|
|
675
|
-
}> | Readonly<{
|
|
676
|
-
kind: 'truncated';
|
|
677
|
-
}> | Readonly<{
|
|
678
|
-
kind: 'stale-generation';
|
|
679
|
-
expected?: IosSnapshotGeneration;
|
|
680
|
-
observed?: IosSnapshotGeneration;
|
|
681
|
-
}> | Readonly<{
|
|
682
|
-
kind: 'unknown-generation';
|
|
683
|
-
captureId: string;
|
|
684
|
-
}> | Readonly<{
|
|
685
|
-
kind: 'unavailable-fact';
|
|
686
|
-
fact: IosSnapshotFact;
|
|
687
|
-
}> | Readonly<{
|
|
688
|
-
kind: 'fallback-source';
|
|
689
|
-
producer: IosSnapshotProducer;
|
|
690
|
-
}>;
|
|
691
|
-
type IosSnapshotAcquisitionForIntent<Intent extends IosAcquisitionIntent> = Readonly<{
|
|
692
|
-
producer: IosAcquisitionProducer;
|
|
693
|
-
intent: Intent;
|
|
694
|
-
hint: CaptureHint & Readonly<{
|
|
695
|
-
acquisitionIntent: Intent;
|
|
696
|
-
}>;
|
|
697
|
-
nodes: readonly RawSnapshotNode[];
|
|
698
|
-
truncated?: boolean;
|
|
699
|
-
viewport: IosViewportEvidence;
|
|
700
|
-
lineage: IosSnapshotLineage;
|
|
701
|
-
residue: readonly IosAcquisitionResidue[];
|
|
702
|
-
}>;
|
|
703
|
-
type IosSnapshotAcquisition = IosSnapshotAcquisitionForIntent<'full'> | IosSnapshotAcquisitionForIntent<'surface-observation'>;
|
|
704
|
-
type IosSnapshotAcquisitionFacts = Omit<IosSnapshotAcquisition, 'hint'>;
|
|
705
|
-
type IosSnapshotComparisonIdentity = Readonly<{
|
|
706
|
-
producer: IosSnapshotProducer;
|
|
707
|
-
intent: IosAcquisitionIntent;
|
|
708
|
-
lineage: IosSnapshotLineage;
|
|
709
|
-
presentationKey: IosSnapshotPresentationKey;
|
|
710
|
-
residue: readonly IosAcquisitionResidue[];
|
|
711
|
-
}>;
|
|
712
|
-
//#endregion
|
|
713
|
-
//#region packages/contracts/src/interactor-types.d.ts
|
|
714
|
-
type RunnerContext = {
|
|
715
|
-
requestId?: string;
|
|
716
|
-
signal?: AbortSignal;
|
|
717
|
-
appBundleId?: string;
|
|
718
|
-
verbose?: boolean;
|
|
719
|
-
logPath?: string;
|
|
720
|
-
traceLogPath?: string;
|
|
721
|
-
iosXctestrunFile?: string;
|
|
722
|
-
iosXctestDerivedDataPath?: string;
|
|
723
|
-
iosXctestEnvDir?: string;
|
|
724
|
-
runnerLeaseContext?: RunnerLogicalLeaseContext;
|
|
725
|
-
};
|
|
726
|
-
type ScreenshotOptions = {
|
|
727
|
-
appBundleId?: string;
|
|
728
|
-
pixelDensity?: number;
|
|
729
|
-
fullscreen?: boolean;
|
|
730
|
-
normalizeStatusBar?: boolean;
|
|
731
|
-
stabilize?: boolean;
|
|
732
|
-
surface?: SessionSurface;
|
|
733
|
-
skipIosSimulatorBootCheck?: boolean;
|
|
734
|
-
captureBackend?: 'runner';
|
|
735
|
-
};
|
|
736
|
-
type ElementSelectorKey = 'id' | 'label' | 'text' | 'value';
|
|
737
|
-
type ElementSelectorTapOptions = {
|
|
738
|
-
key: ElementSelectorKey;
|
|
739
|
-
value: string;
|
|
740
|
-
allowNonHittableCoordinateFallback?: boolean;
|
|
741
|
-
expectedPoint?: Point;
|
|
742
|
-
};
|
|
743
|
-
type PressPointOptions = Readonly<{
|
|
744
|
-
button: 'primary' | 'secondary' | 'middle';
|
|
745
|
-
count: number;
|
|
746
|
-
intervalMs: number;
|
|
747
|
-
holdMs: number;
|
|
748
|
-
jitterPx: number;
|
|
749
|
-
doubleTap: boolean;
|
|
750
|
-
surface?: SessionSurface;
|
|
751
|
-
}>;
|
|
752
|
-
/**
|
|
753
|
-
* The channel the XCTest runner actually entered text through — the Swift
|
|
754
|
-
* `TextEntryResult.textEntryRoute` (RunnerTests+TextTyping.swift,
|
|
755
|
-
* RunnerTests+SynthesizedTextEntry.swift). Closed set, because the runner is
|
|
756
|
-
* its only producer and the boundary that narrows it
|
|
757
|
-
* (readTypeTextBackendResult, packages/platform-apple/src/interactions.ts) drops a
|
|
758
|
-
* route it cannot name — so a Swift-side addition would silently vanish. The
|
|
759
|
-
* route-parity test in packages/platform-apple/src/core/__tests__/interactions.test.ts
|
|
760
|
-
* reads the Swift sources and fails instead.
|
|
761
|
-
*/
|
|
762
|
-
declare const TEXT_ENTRY_ROUTES: readonly ['xctest-element', 'synthesized-first-responder', 'synthesized-first-responder-replacement', 'xctest-application-fallback'];
|
|
763
|
-
type TextEntryRoute = (typeof TEXT_ENTRY_ROUTES)[number];
|
|
764
|
-
/**
|
|
765
|
-
* What `Interactor.type` reports back about the entry it performed. Only the
|
|
766
|
-
* Apple runner populates it; every other platform types blind and returns void.
|
|
767
|
-
*/
|
|
768
|
-
type TypeTextBackendResult = {
|
|
769
|
-
textEntryRoute?: TextEntryRoute;
|
|
770
|
-
};
|
|
771
|
-
type FillVerificationTarget = {
|
|
772
|
-
resourceId: string | null;
|
|
773
|
-
className: string | null;
|
|
774
|
-
packageName: string | null;
|
|
775
|
-
rect: Rect;
|
|
776
|
-
};
|
|
777
|
-
type FillUnconfirmedVerification = {
|
|
778
|
-
verification: 'unconfirmed';
|
|
779
|
-
requested: string;
|
|
780
|
-
before: string | null;
|
|
781
|
-
after: string | null;
|
|
782
|
-
target: FillVerificationTarget;
|
|
783
|
-
};
|
|
784
|
-
type SnapshotOptions = SnapshotOptions$1 & {
|
|
785
|
-
appBundleId?: string;
|
|
786
|
-
signal?: AbortSignal;
|
|
787
|
-
includeRects?: boolean;
|
|
788
|
-
includeHiddenContentHints?: boolean;
|
|
789
|
-
surface?: SessionSurface;
|
|
790
|
-
/** Internal capture purpose; action outcomes always require the full tree. */
|
|
791
|
-
acquisitionIntent?: 'full' | 'surface-observation';
|
|
792
|
-
};
|
|
793
|
-
/**
|
|
794
|
-
* Android's live IME status read. Optional on {@link Interactor}: parity with the retired leaf,
|
|
795
|
-
* which refused `status`/`get` on every other family (no other platform's runner exposes one).
|
|
796
|
-
* A single-member discriminated union rather than a bare object so the daemon can derive its wire
|
|
797
|
-
* `platform` label from `kind` the same way it does for dismiss and enter — an owner can only ever
|
|
798
|
-
* produce its own result shape.
|
|
799
|
-
*/
|
|
800
|
-
type KeyboardStatusResult = Readonly<{
|
|
801
|
-
kind: 'ime-probe';
|
|
802
|
-
visible: boolean;
|
|
803
|
-
inputType?: string;
|
|
804
|
-
type?: string;
|
|
805
|
-
inputMethodPackage?: string;
|
|
806
|
-
focusedPackage?: string;
|
|
807
|
-
focusedResourceId?: string;
|
|
808
|
-
inputOwner?: string;
|
|
809
|
-
}>;
|
|
810
|
-
/**
|
|
811
|
-
* Owner-shaped dismiss evidence, discriminated by which owner produced it: Android's IME probe
|
|
812
|
-
* fields, or iOS's `mechanism` disclosure (#1598), or HarmonyOS's bare acknowledgment (its HDC
|
|
813
|
-
* key press reports nothing beyond success). The daemon derives the wire `platform` label from
|
|
814
|
-
* `kind` rather than re-deriving it from the device, so an owner can only ever produce its own
|
|
815
|
-
* result shape — an android-probe result under an `ios` label is unrepresentable.
|
|
816
|
-
*/
|
|
817
|
-
type KeyboardDismissResult = Readonly<{
|
|
818
|
-
kind: 'ime-probe';
|
|
819
|
-
attempts?: number;
|
|
820
|
-
wasVisible?: boolean;
|
|
821
|
-
dismissed?: boolean;
|
|
822
|
-
visible?: boolean;
|
|
823
|
-
inputType?: string;
|
|
824
|
-
type?: string;
|
|
825
|
-
inputMethodPackage?: string;
|
|
826
|
-
focusedPackage?: string;
|
|
827
|
-
focusedResourceId?: string;
|
|
828
|
-
inputOwner?: string;
|
|
829
|
-
}> | Readonly<{
|
|
830
|
-
kind: 'mechanism';
|
|
831
|
-
wasVisible?: boolean;
|
|
832
|
-
dismissed?: boolean;
|
|
833
|
-
visible?: boolean;
|
|
834
|
-
mechanism?: string;
|
|
835
|
-
}> | Readonly<{
|
|
836
|
-
kind: 'acknowledged';
|
|
837
|
-
}>;
|
|
838
|
-
/**
|
|
839
|
-
* Only the Apple runner echoes visibility around the return-key press; Android and HarmonyOS
|
|
840
|
-
* acknowledge with no fields beyond success. Kind is owner-specific, not just content-shaped —
|
|
841
|
-
* Android's and HarmonyOS's acknowledgments are structurally identical, so only the discriminant
|
|
842
|
-
* itself tells the daemon which owner actually pressed enter.
|
|
843
|
-
*/
|
|
844
|
-
type KeyboardEnterResult = Readonly<{
|
|
845
|
-
kind: 'visibility-echo';
|
|
846
|
-
visible?: boolean;
|
|
847
|
-
wasVisible?: boolean;
|
|
848
|
-
}> | Readonly<{
|
|
849
|
-
kind: 'android-acknowledged';
|
|
850
|
-
}> | Readonly<{
|
|
851
|
-
kind: 'harmonyos-acknowledged';
|
|
852
|
-
}>;
|
|
853
|
-
/**
|
|
854
|
-
* Every acquisition carries its provenance pair atomically: the channel alone cannot say who
|
|
855
|
-
* acquired the tree or which guarantees it carries, and `SnapshotProvenance`
|
|
856
|
-
* (`@agent-device/kernel/snapshot`) makes a cross-channel `backend`/`producer` combination
|
|
857
|
-
* fail to compile.
|
|
858
|
-
*/
|
|
859
|
-
type SnapshotResult = Omit<BackendSnapshotResult, 'backend' | 'nodes'> & {
|
|
860
|
-
nodes?: RawSnapshotNode[];
|
|
861
|
-
comparisonIdentity?: IosSnapshotComparisonIdentity;
|
|
862
|
-
/**
|
|
863
|
-
* Set when the capture describes an in-place iOS system surface (a web sign-in sheet) presented
|
|
864
|
-
* over the session app rather than the app itself (#2438).
|
|
865
|
-
*/
|
|
866
|
-
systemSurface?: IosSystemSurfaceProvenance;
|
|
867
|
-
/**
|
|
868
|
-
* The keyboard band the producer measured while capturing, when it can measure one (#2660). A
|
|
869
|
-
* producer that publishes nothing measured nothing, so the tap-path guard keeps deriving the band
|
|
870
|
-
* from `nodes`; see {@link SnapshotKeyboardBandFact}.
|
|
871
|
-
*/
|
|
872
|
-
keyboard?: SnapshotKeyboardBandFact;
|
|
873
|
-
/**
|
|
874
|
-
* Set when this capture's own command had to bring the session app back to the foreground, i.e.
|
|
875
|
-
* something else held it and an earlier observation described that instead (#2682).
|
|
876
|
-
*/
|
|
877
|
-
targetActivation?: IosTargetActivation;
|
|
878
|
-
} & SnapshotProvenance;
|
|
879
|
-
type SnapshotRuntimeAcquiredResult = Readonly<{
|
|
880
|
-
stage: 'acquired';
|
|
881
|
-
acquisition: IosSnapshotAcquisitionFacts & Readonly<{
|
|
882
|
-
producer: IosAcquisitionProducer;
|
|
883
|
-
}>;
|
|
884
|
-
}>;
|
|
885
|
-
type SnapshotRuntimeResult = SnapshotResult | SnapshotRuntimeAcquiredResult;
|
|
886
|
-
type Interactor = {
|
|
887
|
-
open(app: string, options?: {
|
|
888
|
-
activity?: string;
|
|
889
|
-
appBundleId?: string;
|
|
890
|
-
launchConsole?: string;
|
|
891
|
-
launchArgs?: string[];
|
|
892
|
-
terminateRunningApp?: boolean;
|
|
893
|
-
url?: string;
|
|
894
|
-
}): Promise<void>;
|
|
895
|
-
openDevice(): Promise<void>;
|
|
896
|
-
close(app: string): Promise<void>;
|
|
897
|
-
tap(x: number, y: number): Promise<Record<string, unknown> | void>;
|
|
898
|
-
/** Complete point-press semantics for owners with fused series, alternate buttons, or surfaces. */
|
|
899
|
-
pressPoint?(point: Point, options: PressPointOptions): Promise<Record<string, unknown> | void>;
|
|
900
|
-
/** Alternate mouse buttons for owners that otherwise use the shared point-press series. */
|
|
901
|
-
alternateClick?(point: Point, button: 'secondary' | 'middle'): Promise<Record<string, unknown> | void>;
|
|
902
|
-
/** Owner-native ref routes; currently the managed web runtime is their only local owner. */
|
|
903
|
-
tapRef?(ref: string): Promise<Record<string, unknown> | void>;
|
|
904
|
-
tapElementSelector?(selector: ElementSelectorTapOptions): Promise<Record<string, unknown> | void>;
|
|
905
|
-
doubleTap(x: number, y: number): Promise<Record<string, unknown> | void>;
|
|
906
|
-
longPress(x: number, y: number, durationMs?: number): Promise<Record<string, unknown> | void>;
|
|
907
|
-
/**
|
|
908
|
-
* Move the pointer to a point without pressing. Only pointer-driven
|
|
909
|
-
* platforms (web today) implement it; touch platforms have no hover state
|
|
910
|
-
* and leave it undefined, which the `hover` command reports as unsupported.
|
|
911
|
-
*/
|
|
912
|
-
hover?(x: number, y: number): Promise<Record<string, unknown> | void>;
|
|
913
|
-
hoverRef?(ref: string): Promise<Record<string, unknown> | void>;
|
|
914
|
-
focus(x: number, y: number): Promise<Record<string, unknown> | void>;
|
|
915
|
-
type(text: string, delayMs?: number): Promise<TypeTextBackendResult | void>;
|
|
916
|
-
/**
|
|
917
|
-
* Replace the target's text with `text`. The empty string is the clear request (#2063), not a
|
|
918
|
-
* no-op: an implementation must empty the field or fail — never report success over an
|
|
919
|
-
* untouched value. A backend with no clear mechanism refuses the empty text up front (see the
|
|
920
|
-
* webdriver interactor).
|
|
921
|
-
*/
|
|
922
|
-
fill(x: number, y: number, text: string, delayMs?: number, options?: {
|
|
923
|
-
allowNonHittableCoordinateFallback?: boolean;
|
|
924
|
-
}): Promise<Record<string, unknown> | void>;
|
|
925
|
-
fillRef?(ref: string, text: string, delayMs?: number): Promise<Record<string, unknown> | void>;
|
|
926
|
-
scroll(direction: ScrollDirection, options?: ScrollExecutionOptions): Promise<Record<string, unknown> | void>;
|
|
927
|
-
screenshot(outPath: string, options?: ScreenshotOptions): Promise<void>;
|
|
928
|
-
setViewport?(width: number, height: number): Promise<Record<string, unknown> | void>;
|
|
929
|
-
snapshot(options?: SnapshotOptions): Promise<SnapshotRuntimeResult>;
|
|
930
|
-
/**
|
|
931
|
-
* Native reading of the live text at a point, when the backend has one. Answers the text the
|
|
932
|
-
* owner can see right now, which can exceed what an already-captured node carries (an editable
|
|
933
|
-
* field whose value is longer than its label). Optional: a backend without it leaves the
|
|
934
|
-
* captured tree as the complete answer.
|
|
935
|
-
*/
|
|
936
|
-
readTextAtPoint?(point: Point, options?: {
|
|
937
|
-
appBundleId?: string;
|
|
938
|
-
surface?: SessionSurface;
|
|
939
|
-
signal?: AbortSignal;
|
|
940
|
-
}): Promise<string | undefined>;
|
|
941
|
-
/**
|
|
942
|
-
* Native text-presence reading, when the backend has one that does not require a tree capture.
|
|
943
|
-
* A `true` answer is authoritative; anything else means "not proven here" and the caller
|
|
944
|
-
* consults the canonical tree (see `FindTextResult`).
|
|
945
|
-
*/
|
|
946
|
-
findText?(text: string, options?: {
|
|
947
|
-
appBundleId?: string;
|
|
948
|
-
signal?: AbortSignal;
|
|
949
|
-
}): Promise<{
|
|
950
|
-
found: boolean;
|
|
951
|
-
}>;
|
|
952
|
-
gestureViewport?(): Promise<Rect>;
|
|
953
|
-
back(mode?: BackMode): Promise<void>;
|
|
954
|
-
home(): Promise<void>;
|
|
955
|
-
setOrientation(orientation: DeviceRotation): Promise<{
|
|
956
|
-
orientation?: DeviceRotation;
|
|
957
|
-
} | void>;
|
|
958
|
-
performGesture?(plan: GesturePlan): Promise<Record<string, unknown> | void>;
|
|
959
|
-
appSwitcher(): Promise<void>;
|
|
960
|
-
tvRemote(button: TvRemoteButton, durationMs?: number): Promise<void>;
|
|
961
|
-
/**
|
|
962
|
-
* Optional (parity with `keyboardDismiss`): presses the iPhone/iPad Action Button, hardware only
|
|
963
|
-
* the Apple owner carries. An owner without the button leaves it undefined; its fact refuses the
|
|
964
|
-
* press before binding, and the system-button binder fails closed rather than resolving an
|
|
965
|
-
* absent member as a successful no-op.
|
|
966
|
-
*/
|
|
967
|
-
actionButton?(): Promise<void>;
|
|
968
|
-
/** Optional: only Android implements a live status read (see {@link KeyboardStatusResult}). */
|
|
969
|
-
keyboardStatus?(): Promise<KeyboardStatusResult>;
|
|
970
|
-
/** Optional: platforms with no keyboard-dismiss concept leave it undefined. */
|
|
971
|
-
keyboardDismiss?(): Promise<KeyboardDismissResult>;
|
|
972
|
-
/** Optional: platforms with no keyboard-return concept leave it undefined. */
|
|
973
|
-
keyboardEnter?(): Promise<KeyboardEnterResult>;
|
|
974
|
-
readClipboard(): Promise<string>;
|
|
975
|
-
writeClipboard(text: string): Promise<void>;
|
|
976
|
-
setSetting(setting: string, state: string, appId?: string, options?: SettingOptions): Promise<Record<string, unknown> | void>;
|
|
977
|
-
/**
|
|
978
|
-
* Optional: reads back the value a device holds for one readable setting. The name is narrowed to
|
|
979
|
-
* `READABLE_SETTINGS`, which is not every setting the write switch serves, and an owner's dispatch
|
|
980
|
-
* is exhaustive over it — a setting joins the list only with an owner that answers it. An owner with
|
|
981
|
-
* no read path leaves the member undefined; its fact refuses the read before binding, so an absent
|
|
982
|
-
* method can never resolve into an empty answer.
|
|
983
|
-
*/
|
|
984
|
-
readSetting?(setting: ReadableSetting): Promise<ReadSettingResult>;
|
|
985
|
-
/**
|
|
986
|
-
* The four alert legs. Each owner runs its own observation and, where it needs one, its own
|
|
987
|
-
* poll: an alert is a transient device surface, and how long to look for it — and how to press
|
|
988
|
-
* its buttons — is family mechanics, not something a caller can supply. `timeoutMs` is the
|
|
989
|
-
* whole window the caller allows; the owner spends it however its backend requires.
|
|
990
|
-
*/
|
|
991
|
-
readAlert(options?: AlertInteractorOptions): Promise<Record<string, unknown>>;
|
|
992
|
-
awaitAlert(options?: AlertInteractorOptions): Promise<Record<string, unknown>>;
|
|
993
|
-
acceptAlert(options?: AlertInteractorOptions): Promise<Record<string, unknown>>;
|
|
994
|
-
dismissAlert(options?: AlertInteractorOptions): Promise<Record<string, unknown>>;
|
|
995
|
-
};
|
|
996
|
-
/**
|
|
997
|
-
* The session-derived target one alert leg acts on. `appBundleId` is separate from the runner
|
|
998
|
-
* context's because the macOS helper reads a frontmost-app surface with no bundle at all, and
|
|
999
|
-
* the two must not collapse into one field that means both.
|
|
1000
|
-
*/
|
|
1001
|
-
type AlertInteractorOptions = {
|
|
1002
|
-
timeoutMs?: number;
|
|
1003
|
-
appBundleId?: string;
|
|
1004
|
-
surface?: SessionSurface;
|
|
1005
|
-
};
|
|
1006
|
-
//#endregion
|
|
1007
304
|
//#region packages/selectors/src/internal/parse.d.ts
|
|
1008
305
|
type SelectorKey = 'id' | 'role' | 'text' | 'label' | 'value' | 'appname' | 'windowtitle' | 'visible' | 'hidden' | 'editable' | 'selected' | 'focused' | 'enabled' | 'hittable';
|
|
1009
306
|
type SelectorTerm = {
|
|
@@ -1098,4 +395,4 @@ declare function formatSelectorFailure(chain: SelectorChain | string, diagnostic
|
|
|
1098
395
|
unique?: boolean;
|
|
1099
396
|
}): string;
|
|
1100
397
|
//#endregion
|
|
1101
|
-
export {
|
|
398
|
+
export { SettleObservation as _, resolveSelectorChain as a, isSelectorToken as c, ClickCommandResponseData as d, FillCommandResponseData as f, PressCommandResponseData as g, LongPressCommandResponseData as h, findSelectorChainMatch as i, parseSelectorChain as l, HoverCommandResponseData as m, isNodeEditable as n, SelectorDiagnostics as o, FindCommandResponseData as p, isNodeVisible as r, SelectorChain as s, formatSelectorFailure as t, tryParseSelectorChain as u, ClickButton as v };
|