agent-device 0.20.9 → 0.20.10
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.20.9.apk → agent-device-android-ime-helper-0.20.10.apk} +0 -0
- package/android/ime-helper/dist/agent-device-android-ime-helper-0.20.10.apk.sha256 +1 -0
- package/android/ime-helper/dist/{agent-device-android-ime-helper-0.20.9.manifest.json → agent-device-android-ime-helper-0.20.10.manifest.json} +4 -4
- package/android/snapshot-helper/dist/{agent-device-android-snapshot-helper-0.20.9.apk → agent-device-android-snapshot-helper-0.20.10.apk} +0 -0
- package/android/snapshot-helper/dist/agent-device-android-snapshot-helper-0.20.10.apk.sha256 +1 -0
- package/android/snapshot-helper/dist/{agent-device-android-snapshot-helper-0.20.9.manifest.json → agent-device-android-snapshot-helper-0.20.10.manifest.json} +6 -6
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+AXSnapshotFallback.swift +6 -5
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+CommandExecution.swift +4 -4
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+FlatSnapshotFiltering.swift +94 -1
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Interaction.swift +22 -23
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Models.swift +3 -23
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Navigation.swift +10 -11
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+PrivateAXPresentation.swift +30 -12
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+ScrollGesture.swift +8 -5
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Snapshot.swift +133 -63
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+SnapshotCapturePlan.swift +13 -12
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+SnapshotPresentation.swift +183 -0
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+SnapshotPresentationTests.swift +0 -0
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+SystemModal.swift +20 -18
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+TextInputCandidatePolicy.swift +19 -0
- package/dist/src/agent-device-client.js +2 -2
- package/dist/src/ai-sdk.d.ts +61 -0
- package/dist/src/ai-sdk.js +1 -0
- package/dist/src/android-adb.d.ts +1 -1
- package/dist/src/app-lifecycle.js +1 -1
- package/dist/src/app-log-reconnect.js +1 -1
- package/dist/src/app-log-runtime.js +3 -3
- package/dist/src/app-resolution.js +2 -2
- package/dist/src/apps.js +5 -5
- package/dist/src/audio-probe.js +1 -1
- package/dist/src/boot-diagnostics.js +2 -2
- package/dist/src/cli-config.js +1 -1
- package/dist/src/cli-help.js +30 -23
- package/dist/src/cli-runner.js +1 -1
- package/dist/src/cli.js +7 -7
- package/dist/src/client-metro.js +1 -1
- package/dist/src/client-types.d.ts +1582 -0
- package/dist/src/command-tools.js +2 -0
- package/dist/src/connection-runtime.js +1 -1
- package/dist/src/contracts.d.ts +1 -1
- package/dist/src/contracts.js +1 -1
- package/dist/src/daemon-shutdown-report.js +1 -1
- package/dist/src/daemon.js +1 -1
- package/dist/src/debug-symbols.js +1 -1
- package/dist/src/device-input-state.js +1 -1
- package/dist/src/dispatch.js +1 -1
- package/dist/src/find.js +1 -1
- package/dist/src/finders.js +1 -1
- package/dist/src/generic-settle.js +1 -1
- package/dist/src/generic.js +1 -1
- package/dist/src/helper-package-install.js +1 -1
- package/dist/src/helper.js +1 -1
- package/dist/src/ime-lifecycle.js +1 -1
- package/dist/src/ime-recovery-marker.js +1 -1
- package/dist/src/index.d.ts +2 -1578
- package/dist/src/index.js +1 -1
- package/dist/src/input-actions.js +1 -1
- package/dist/src/input-actions3.js +1 -1
- package/dist/src/install-source2.js +1 -1
- package/dist/src/interaction-common.js +1 -1
- package/dist/src/interaction-runtime.js +1 -1
- package/dist/src/interaction-snapshot.js +1 -1
- package/dist/src/interaction.js +1 -1
- package/dist/src/interaction2.js +1 -1
- package/dist/src/interactor.js +2 -2
- package/dist/src/interactor2.js +1 -1
- package/dist/src/interactors.js +1 -1
- package/dist/src/internal/bin.js +2 -2
- package/dist/src/internal/daemon.js +4 -4
- package/dist/src/internal/png-worker.js +1 -1
- package/dist/src/lease-context.js +1 -1
- package/dist/src/lease.js +1 -1
- package/dist/src/limrun.d.ts +10 -2
- package/dist/src/linux.js +1 -1
- package/dist/src/location-coordinates.js +1 -1
- package/dist/src/{screenshot-geometry.js → mobile-snapshot-semantics.js} +1 -1
- package/dist/src/perf.js +1 -1
- package/dist/src/platform-runtime-open-target.js +1 -1
- package/dist/src/platform-runtime-operation-host.js +4 -4
- package/dist/src/platform-runtime.js +1 -1
- package/dist/src/platform-runtime2.js +1 -1
- package/dist/src/png-resize.js +1 -1
- package/dist/src/provider.js +1 -1
- package/dist/src/proxy.js +1 -1
- package/dist/src/react-native.js +1 -1
- package/dist/src/record-runtime.js +1 -1
- package/dist/src/registry.js +27 -27
- package/dist/src/remote-config2.js +1 -1
- package/dist/src/replay.js +2 -2
- package/dist/src/reporting.js +5 -5
- package/dist/src/runner-client.js +1 -1
- package/dist/src/runner-disposal.js +1 -1
- package/dist/src/runner-sequence.js +1 -1
- package/dist/src/runtime.js +3 -3
- package/dist/src/runtime2.js +4 -4
- package/dist/src/runtime3.js +1 -1
- package/dist/src/runtime4.js +3 -3
- 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/screenshot-result.js +4 -4
- package/dist/src/screenshot.js +1 -1
- package/dist/src/script-source-bundle.js +16 -0
- package/dist/src/sdk-android-adb.d.ts +40 -40
- package/dist/src/sdk-android-adb.js +4 -4
- package/dist/src/sdk-batch-runner.js +3 -3
- package/dist/src/sdk-contracts.d.ts +122 -85
- package/dist/src/sdk-contracts.js +2 -2
- package/dist/src/sdk-finders.d.ts +1 -1
- package/dist/src/sdk-finders.js +1 -1
- package/dist/src/sdk-selectors.d.ts +89 -77
- package/dist/src/sdk-selectors.js +1 -1
- package/dist/src/selector-runtime.js +1 -1
- package/dist/src/selectors.js +1 -1
- package/dist/src/server.js +10 -3
- package/dist/src/session-target-evidence.js +1 -1
- package/dist/src/session2.js +7 -8
- package/dist/src/shared.js +1 -1
- package/dist/src/snapshot-runtime.js +1 -1
- package/dist/src/snapshot-scope.js +1 -0
- package/dist/src/snapshot.js +6 -6
- package/dist/src/snapshot2.js +1 -1
- package/dist/src/snapshot3.js +1 -1
- package/dist/src/src.js +1 -1
- package/dist/src/src2.js +1 -1
- package/dist/src/src3.js +1 -1
- package/dist/src/src4.js +1 -0
- package/dist/src/tool-provider2.js +1 -1
- package/dist/src/tool-provider3.js +1 -0
- package/dist/src/verified-file.js +1 -1
- package/dist/src/web.js +1 -1
- package/package.json +21 -8
- package/server.json +2 -2
- package/android/ime-helper/dist/agent-device-android-ime-helper-0.20.9.apk.sha256 +0 -1
- package/android/snapshot-helper/dist/agent-device-android-snapshot-helper-0.20.9.apk.sha256 +0 -1
- package/dist/src/cancel.js +0 -1
- package/dist/src/prepare-kind.js +0 -15
- package/dist/src/selector-vocabulary.js +0 -1
package/dist/src/index.d.ts
CHANGED
|
@@ -1,1582 +1,6 @@
|
|
|
1
|
-
import { A as
|
|
2
|
-
import {
|
|
3
|
-
import { C as SessionSurface, D as BackMode, E as ClickButton, S as SnapshotDiagnosticsSummary, T as DeviceRotation, b as FindLocator, d as ClickCommandResponseData, f as FillCommandResponseData, g as SettleObservation, h as PressCommandResponseData, m as LongPressCommandResponseData, p as FindCommandResponseData, w as TvRemoteButton, x as ScreenshotResultData, y as AndroidSnapshotBackendMetadata } from "./sdk-selectors.js";
|
|
4
|
-
import { t as AppsFilter } from "./app-inventory.js";
|
|
5
|
-
import { r as CloudProviderSessionResult, t as AgentArtifactsResult } from "./cloud-artifacts.js";
|
|
6
|
-
import { t as BatchRunResult } from "./sdk-batch-runner.js";
|
|
7
|
-
import { a as RemoteConnectionProfileFields, c as MetroPrepareResult, i as CloudProviderProfileFields, l as MetroReloadOptions, s as MetroPrepareOptions, u as MetroReloadResult } from "./sdk-remote-config.js";
|
|
1
|
+
import { A as AppError, F as normalizeAgentDeviceError, P as isAgentDeviceError, k as centerOfRect } from "./sdk-contracts.js";
|
|
2
|
+
import { n as AgentDeviceClientConfig, r as AgentDeviceDaemonTransport, t as AgentDeviceClient } from "./client-types.js";
|
|
8
3
|
import { p as createLocalArtifactAdapter } from "./sdk-io.js";
|
|
9
|
-
//#region packages/contracts/src/alert-contract.d.ts
|
|
10
|
-
declare const ALERT_ACTIONS: readonly ['get', 'accept', 'dismiss', 'wait'];
|
|
11
|
-
type AlertAction = (typeof ALERT_ACTIONS)[number];
|
|
12
|
-
//#endregion
|
|
13
|
-
//#region packages/contracts/src/clipboard.d.ts
|
|
14
|
-
/**
|
|
15
|
-
* Closed result of the `clipboard` command. Mirrors the dispatch handler's
|
|
16
|
-
* literal return EXACTLY (src/core/dispatch.ts `handleClipboardCommand`): a
|
|
17
|
-
* discriminated union on `action`. `read` returns the clipboard `text`; `write`
|
|
18
|
-
* reports the written `textLength` plus the `successText` message. The handler
|
|
19
|
-
* spreads nothing else, so each branch is closed.
|
|
20
|
-
*/
|
|
21
|
-
type ClipboardCommandResult = {
|
|
22
|
-
action: 'read';
|
|
23
|
-
text: string;
|
|
24
|
-
} | {
|
|
25
|
-
action: 'write';
|
|
26
|
-
textLength: number;
|
|
27
|
-
message: string;
|
|
28
|
-
};
|
|
29
|
-
//#endregion
|
|
30
|
-
//#region packages/contracts/src/keyboard.d.ts
|
|
31
|
-
/**
|
|
32
|
-
* Closed result of the `keyboard` command, grounded in the dispatch handlers'
|
|
33
|
-
* literal returns (src/core/dispatch.ts `handleAndroidKeyboardCommand` /
|
|
34
|
-
* `handleIosKeyboardCommand`).
|
|
35
|
-
*
|
|
36
|
-
* `platform` and `action` are always present; the remaining fields appear per
|
|
37
|
-
* branch (Android `status`/`dismiss` carry the keyboard-state fields; `enter`
|
|
38
|
-
* and iOS `dismiss` carry a `message`). It is kept as a flat closed shape rather
|
|
39
|
-
* than a five-way `platform`×`action` union because the per-branch field sets
|
|
40
|
-
* overlap heavily and the underlying Android keyboard-state types live in the
|
|
41
|
-
* platform layer (below the public contract). The `Record` index signature of
|
|
42
|
-
* the previous hand-written mirror is dropped, and the spurious `| null`s are
|
|
43
|
-
* removed (the handler never returns `null` for these).
|
|
44
|
-
*/
|
|
45
|
-
type KeyboardCommandResult = {
|
|
46
|
-
platform: 'android' | 'ios';
|
|
47
|
-
action: 'status' | 'dismiss' | 'enter';
|
|
48
|
-
visible?: boolean;
|
|
49
|
-
wasVisible?: boolean;
|
|
50
|
-
dismissed?: boolean;
|
|
51
|
-
attempts?: number;
|
|
52
|
-
inputType?: string;
|
|
53
|
-
type?: 'text' | 'number' | 'email' | 'phone' | 'password' | 'datetime' | 'unknown';
|
|
54
|
-
inputMethodPackage?: string;
|
|
55
|
-
focusedPackage?: string;
|
|
56
|
-
focusedResourceId?: string;
|
|
57
|
-
inputOwner?: 'app' | 'ime' | 'unknown';
|
|
58
|
-
message?: string;
|
|
59
|
-
/** iOS `dismiss` only (#1598): which mechanism actually resigned the
|
|
60
|
-
* keyboard — 'dismissKey' (tapped the keyboard's own Hide/Dismiss/Done
|
|
61
|
-
* key). Generic background-tap dismissal is deliberately unsupported
|
|
62
|
-
* (#1606 review): no query can prove a coordinate is side-effect-free,
|
|
63
|
-
* so the runner only ever taps the keyboard's own control. Absent when
|
|
64
|
-
* the keyboard was not dismissed. */
|
|
65
|
-
mechanism?: 'dismissKey';
|
|
66
|
-
};
|
|
67
|
-
//#endregion
|
|
68
|
-
//#region packages/contracts/src/navigation.d.ts
|
|
69
|
-
/**
|
|
70
|
-
* Closed results of the navigation/global action commands. Each mirrors the
|
|
71
|
-
* dispatch handler's literal return EXACTLY (src/core/dispatch.ts
|
|
72
|
-
* `DISPATCH_HANDLERS`): a fixed `action` discriminant plus the always-present
|
|
73
|
-
* `successText` message (the handlers always pass a non-empty message, so it is
|
|
74
|
-
* required here). The handlers spread nothing else, so the shapes are closed —
|
|
75
|
-
* consistent with the `viewport` contract, the generic-dispatch Android
|
|
76
|
-
* dialog-recovery `warning` annotation is intentionally not part of the contract.
|
|
77
|
-
*/
|
|
78
|
-
/** `home` — `{ action: 'home', message: 'Home' }`. */
|
|
79
|
-
type HomeCommandResult = {
|
|
80
|
-
action: 'home';
|
|
81
|
-
message: string;
|
|
82
|
-
};
|
|
83
|
-
/**
|
|
84
|
-
* `back` — `{ action: 'back', mode, message: 'Back' }`; `mode` defaults to
|
|
85
|
-
* `'in-app'`. The one field the generic route may add on top of the dispatch
|
|
86
|
-
* handler's literal return: `settle`, the opt-in `--settle` observation
|
|
87
|
-
* (#1638), attached after the command by the generic dispatcher.
|
|
88
|
-
*/
|
|
89
|
-
type BackCommandResult = {
|
|
90
|
-
action: 'back';
|
|
91
|
-
mode: BackMode;
|
|
92
|
-
message: string;
|
|
93
|
-
settle?: SettleObservation;
|
|
94
|
-
};
|
|
95
|
-
/** `orientation` — `{ action: 'orientation', orientation, message: 'Rotated to <orientation>' }`. */
|
|
96
|
-
type OrientationCommandResult = {
|
|
97
|
-
action: 'orientation';
|
|
98
|
-
orientation: DeviceRotation;
|
|
99
|
-
message: string;
|
|
100
|
-
};
|
|
101
|
-
/**
|
|
102
|
-
* @deprecated The `rotate` command was renamed to `orientation`. This is the
|
|
103
|
-
* legacy response contract (`action: 'rotate'`) that shipped in v0.18/v0.19,
|
|
104
|
-
* retained for existing SDK consumers until the next major version. New code
|
|
105
|
-
* should use {@link OrientationCommandResult}.
|
|
106
|
-
*/
|
|
107
|
-
type RotateCommandResult = {
|
|
108
|
-
action: 'rotate';
|
|
109
|
-
orientation: DeviceRotation;
|
|
110
|
-
message: string;
|
|
111
|
-
};
|
|
112
|
-
/** `app-switcher` — `{ action: 'app-switcher', message: 'Opened app switcher' }`. */
|
|
113
|
-
type AppSwitcherCommandResult = {
|
|
114
|
-
action: 'app-switcher';
|
|
115
|
-
message: string;
|
|
116
|
-
};
|
|
117
|
-
/** `tv-remote` — `{ action: 'tv-remote', button, durationMs?, message }`. */
|
|
118
|
-
type TvRemoteCommandResult = {
|
|
119
|
-
action: 'tv-remote';
|
|
120
|
-
button: TvRemoteButton;
|
|
121
|
-
durationMs?: number;
|
|
122
|
-
message: string;
|
|
123
|
-
};
|
|
124
|
-
//#endregion
|
|
125
|
-
//#region packages/contracts/src/wait.d.ts
|
|
126
|
-
/**
|
|
127
|
-
* Public daemon result for `wait`. The runtime-local result carries a `kind`
|
|
128
|
-
* discriminant, but `toDaemonWaitData` intentionally projects the normal daemon
|
|
129
|
-
* payload to this compact shape. The direct iOS selector fast path may still
|
|
130
|
-
* include `kind: 'selector'` additively.
|
|
131
|
-
*/
|
|
132
|
-
type WaitCommandResult = {
|
|
133
|
-
waitedMs: number;
|
|
134
|
-
kind?: 'selector';
|
|
135
|
-
text?: string;
|
|
136
|
-
selector?: string;
|
|
137
|
-
captures?: number;
|
|
138
|
-
nodeCount?: number;
|
|
139
|
-
hint?: string;
|
|
140
|
-
warning?: string;
|
|
141
|
-
};
|
|
142
|
-
//#endregion
|
|
143
|
-
//#region packages/contracts/src/app-events.d.ts
|
|
144
|
-
type TriggerAppEventCommandResult = {
|
|
145
|
-
event: string;
|
|
146
|
-
eventUrl: string;
|
|
147
|
-
transport: 'deep-link';
|
|
148
|
-
message: string;
|
|
149
|
-
};
|
|
150
|
-
//#endregion
|
|
151
|
-
//#region packages/contracts/src/app-state.d.ts
|
|
152
|
-
/**
|
|
153
|
-
* Closed result of the `appstate` command, grounded in the daemon handler's
|
|
154
|
-
* success returns (src/daemon/handlers/session-state.ts `handleAppStateCommand`).
|
|
155
|
-
* A discriminated union on `platform`:
|
|
156
|
-
* - Apple (`ios` / `macos`) session state, with iOS-only device locators that
|
|
157
|
-
* the previous hand-written mirror omitted; and
|
|
158
|
-
* - Android and HarmonyOS foreground `package` / `activity`.
|
|
159
|
-
*
|
|
160
|
-
* The handler returns one of these fixed objects (errors take the `ok: false`
|
|
161
|
-
* path), so each branch is closed.
|
|
162
|
-
*/
|
|
163
|
-
type AppStateCommandResult = {
|
|
164
|
-
platform: 'ios' | 'macos';
|
|
165
|
-
appName: string;
|
|
166
|
-
appBundleId?: string;
|
|
167
|
-
source: 'session';
|
|
168
|
-
surface: SessionSurface;
|
|
169
|
-
/** iOS only — the session device's UDID. */
|
|
170
|
-
device_udid?: string;
|
|
171
|
-
/** iOS only — the simulator set path, or `null` when unknown. */
|
|
172
|
-
ios_simulator_device_set?: string | null;
|
|
173
|
-
} | {
|
|
174
|
-
platform: 'android' | 'harmonyos';
|
|
175
|
-
package: string;
|
|
176
|
-
activity: string;
|
|
177
|
-
};
|
|
178
|
-
//#endregion
|
|
179
|
-
//#region packages/contracts/src/target-shutdown-contract.d.ts
|
|
180
|
-
type TargetShutdownResult = {
|
|
181
|
-
success: boolean;
|
|
182
|
-
exitCode: number;
|
|
183
|
-
stdout: string;
|
|
184
|
-
stderr: string;
|
|
185
|
-
error?: NormalizedError;
|
|
186
|
-
};
|
|
187
|
-
//#endregion
|
|
188
|
-
//#region packages/contracts/src/device.d.ts
|
|
189
|
-
/**
|
|
190
|
-
* Closed result of the `boot` command. Mirrors the daemon handler's only
|
|
191
|
-
* success return EXACTLY (src/daemon/handlers/session-state.ts) — the fixed
|
|
192
|
-
* object literal `{ platform, target, device, id, kind, booted }` plus the
|
|
193
|
-
* additive `appleOs` discriminant, emitted only for Apple devices.
|
|
194
|
-
*/
|
|
195
|
-
type BootCommandResult = {
|
|
196
|
-
platform: PublicPlatform;
|
|
197
|
-
target: DeviceTarget;
|
|
198
|
-
/** Human-readable device name (`device.name`). */
|
|
199
|
-
device: string;
|
|
200
|
-
/** Stable device id (`device.id`). */
|
|
201
|
-
id: string;
|
|
202
|
-
kind: DeviceKind;
|
|
203
|
-
/** Always `true` on the success path. */
|
|
204
|
-
booted: true;
|
|
205
|
-
/**
|
|
206
|
-
* Additive Apple-OS discriminant (`device.appleOs`): iPhone/iPad/tvOS/visionOS/macOS.
|
|
207
|
-
* Present only for Apple devices; absent for non-Apple platforms. `platform` stays the
|
|
208
|
-
* leaf (`ios`/`macos`) — this is an extra field, not a replacement.
|
|
209
|
-
*/
|
|
210
|
-
appleOs?: AppleOS;
|
|
211
|
-
};
|
|
212
|
-
/**
|
|
213
|
-
* Closed result of the `shutdown` command. Mirrors the daemon handler's success
|
|
214
|
-
* return EXACTLY (src/daemon/handlers/session-state.ts) — the fixed object
|
|
215
|
-
* literal `{ platform, target, device, id, kind, shutdown }` plus the additive
|
|
216
|
-
* `appleOs` discriminant (Apple devices only). The `shutdown` field is the raw
|
|
217
|
-
* {@link TargetShutdownResult} returned by the bound `shutdownTarget` operation.
|
|
218
|
-
*/
|
|
219
|
-
type ShutdownCommandResult = {
|
|
220
|
-
platform: PublicPlatform;
|
|
221
|
-
target: DeviceTarget;
|
|
222
|
-
/** Human-readable device name (`device.name`). */
|
|
223
|
-
device: string;
|
|
224
|
-
/** Stable device id (`device.id`). */
|
|
225
|
-
id: string;
|
|
226
|
-
kind: DeviceKind;
|
|
227
|
-
shutdown: TargetShutdownResult;
|
|
228
|
-
/**
|
|
229
|
-
* Additive Apple-OS discriminant (`device.appleOs`): iPhone/iPad/tvOS/visionOS/macOS.
|
|
230
|
-
* Present only for Apple devices; absent for non-Apple platforms. `platform` stays the
|
|
231
|
-
* leaf (`ios`/`macos`) — this is an extra field, not a replacement.
|
|
232
|
-
*/
|
|
233
|
-
appleOs?: AppleOS;
|
|
234
|
-
};
|
|
235
|
-
//#endregion
|
|
236
|
-
//#region packages/contracts/src/json.d.ts
|
|
237
|
-
type JsonPrimitive = string | number | boolean | null;
|
|
238
|
-
type JsonValue = JsonPrimitive | JsonObject | JsonValue[];
|
|
239
|
-
type JsonObject = {
|
|
240
|
-
[key: string]: JsonValue;
|
|
241
|
-
};
|
|
242
|
-
//#endregion
|
|
243
|
-
//#region packages/contracts/src/logs.d.ts
|
|
244
|
-
declare const LOG_ACTION_VALUES: readonly ['path', 'start', 'stop', 'doctor', 'mark', 'clear'];
|
|
245
|
-
type LogAction = (typeof LOG_ACTION_VALUES)[number];
|
|
246
|
-
//#endregion
|
|
247
|
-
//#region packages/contracts/src/recording-export-quality.d.ts
|
|
248
|
-
declare const RECORDING_EXPORT_QUALITIES: readonly ['medium', 'high'];
|
|
249
|
-
type RecordingExportQuality = (typeof RECORDING_EXPORT_QUALITIES)[number];
|
|
250
|
-
//#endregion
|
|
251
|
-
//#region packages/contracts/src/recording-scope.d.ts
|
|
252
|
-
declare const RECORDING_SCOPE_VALUES: readonly ['app', 'device', 'system'];
|
|
253
|
-
type RecordingScope = (typeof RECORDING_SCOPE_VALUES)[number];
|
|
254
|
-
//#endregion
|
|
255
|
-
//#region packages/contracts/src/recording.d.ts
|
|
256
|
-
type RecordingAppIdentity = {
|
|
257
|
-
bundleId: string;
|
|
258
|
-
name?: string;
|
|
259
|
-
};
|
|
260
|
-
type RecordingStartCommandResult = {
|
|
261
|
-
recording: 'started';
|
|
262
|
-
outPath: string;
|
|
263
|
-
sessionStateDir: string;
|
|
264
|
-
recordingBackend?: string;
|
|
265
|
-
recordingScope?: RecordingScope;
|
|
266
|
-
recordOnlySession?: boolean;
|
|
267
|
-
activeSessionApp?: RecordingAppIdentity;
|
|
268
|
-
showTouches: boolean;
|
|
269
|
-
};
|
|
270
|
-
type RecordingStopCommandResult = {
|
|
271
|
-
recording: 'stopped';
|
|
272
|
-
outPath: string;
|
|
273
|
-
telemetryPath?: string;
|
|
274
|
-
artifacts: DaemonArtifact[];
|
|
275
|
-
recordingBackend?: string;
|
|
276
|
-
recordingScope?: RecordingScope;
|
|
277
|
-
recordOnlySession?: boolean;
|
|
278
|
-
activeSessionApp?: RecordingAppIdentity;
|
|
279
|
-
durationMs: number;
|
|
280
|
-
showTouches: boolean;
|
|
281
|
-
warning?: string;
|
|
282
|
-
overlayWarning?: string;
|
|
283
|
-
chunks?: Array<{
|
|
284
|
-
index: number;
|
|
285
|
-
path: string;
|
|
286
|
-
}>;
|
|
287
|
-
};
|
|
288
|
-
type RecordingCommandResult = RecordingStartCommandResult | RecordingStopCommandResult;
|
|
289
|
-
type TraceCommandResult = {
|
|
290
|
-
trace: 'started';
|
|
291
|
-
outPath: string;
|
|
292
|
-
} | {
|
|
293
|
-
trace: 'stopped';
|
|
294
|
-
outPath: string;
|
|
295
|
-
artifacts: DaemonArtifact[];
|
|
296
|
-
};
|
|
297
|
-
//#endregion
|
|
298
|
-
//#region packages/contracts/src/prepare.d.ts
|
|
299
|
-
type PrepareIosRunnerCacheKind = 'exact' | 'restore-key' | 'miss' | 'external';
|
|
300
|
-
type PrepareIosRunnerArtifactState = 'valid' | 'rebuilt';
|
|
301
|
-
type PrepareIosRunnerTiming = {
|
|
302
|
-
totalMs: number;
|
|
303
|
-
additiveParts: {
|
|
304
|
-
buildMs?: number;
|
|
305
|
-
connectAfterBuildMs: number;
|
|
306
|
-
healthCheckMs: number;
|
|
307
|
-
};
|
|
308
|
-
containment: {
|
|
309
|
-
connectMs?: ['buildMs'];
|
|
310
|
-
healthCheckMs: [];
|
|
311
|
-
};
|
|
312
|
-
note: string;
|
|
313
|
-
};
|
|
314
|
-
/**
|
|
315
|
-
* Public daemon result for `prepare ios-runner`. The runner-local prepare result
|
|
316
|
-
* is projected by `prepareIosRunnerResponseData` with device identity and timing
|
|
317
|
-
* guidance before it reaches the client.
|
|
318
|
-
*/
|
|
319
|
-
type PrepareCommandResult = {
|
|
320
|
-
action: 'ios-runner';
|
|
321
|
-
platform: PublicPlatform;
|
|
322
|
-
deviceId: string;
|
|
323
|
-
deviceName: string;
|
|
324
|
-
kind: DeviceKind;
|
|
325
|
-
durationMs: number;
|
|
326
|
-
runner: JsonObject;
|
|
327
|
-
cache?: PrepareIosRunnerCacheKind;
|
|
328
|
-
artifact?: PrepareIosRunnerArtifactState;
|
|
329
|
-
buildMs?: number;
|
|
330
|
-
connectMs: number;
|
|
331
|
-
healthCheckMs: number;
|
|
332
|
-
xctestrunPath?: string;
|
|
333
|
-
recoveryReason?: string;
|
|
334
|
-
failureReason?: string;
|
|
335
|
-
timing: PrepareIosRunnerTiming;
|
|
336
|
-
message: string;
|
|
337
|
-
};
|
|
338
|
-
//#endregion
|
|
339
|
-
//#region packages/contracts/src/push.d.ts
|
|
340
|
-
type PushCommandResult = {
|
|
341
|
-
platform: 'ios';
|
|
342
|
-
bundleId: string;
|
|
343
|
-
message: string;
|
|
344
|
-
} | {
|
|
345
|
-
platform: 'android';
|
|
346
|
-
package: string;
|
|
347
|
-
action: string;
|
|
348
|
-
extrasCount: number;
|
|
349
|
-
message: string;
|
|
350
|
-
};
|
|
351
|
-
//#endregion
|
|
352
|
-
//#region packages/contracts/src/client-connection.d.ts
|
|
353
|
-
type AgentDeviceDaemonTransportContext = {
|
|
354
|
-
authToken?: string;
|
|
355
|
-
};
|
|
356
|
-
type AgentDeviceDaemonTransport = (req: Omit<DaemonRequest, 'token'>, context?: AgentDeviceDaemonTransportContext) => Promise<DaemonResponse>;
|
|
357
|
-
type AgentDeviceClientConfig = RemoteConnectionProfileFields & CloudProviderProfileFields & {
|
|
358
|
-
session?: string;
|
|
359
|
-
lockPolicy?: DaemonLockPolicy;
|
|
360
|
-
lockPlatform?: PlatformSelector;
|
|
361
|
-
requestId?: string;
|
|
362
|
-
sessionIsolation?: SessionIsolationMode;
|
|
363
|
-
leaseBackend?: LeaseBackend;
|
|
364
|
-
leaseTtlMs?: number;
|
|
365
|
-
runtime?: SessionRuntimeHints;
|
|
366
|
-
cwd?: string;
|
|
367
|
-
debug?: boolean;
|
|
368
|
-
cost?: boolean;
|
|
369
|
-
responseLevel?: ResponseLevel;
|
|
370
|
-
iosXctestrunFile?: string;
|
|
371
|
-
iosXctestDerivedDataPath?: string;
|
|
372
|
-
iosXctestEnvDir?: string;
|
|
373
|
-
};
|
|
374
|
-
type AgentDeviceRequestOverrides = Pick<AgentDeviceClientConfig, 'session' | 'lockPolicy' | 'lockPlatform' | 'requestId' | 'daemonBaseUrl' | 'daemonAuthToken' | 'daemonTransport' | 'daemonServerMode' | 'tenant' | 'sessionIsolation' | 'runId' | 'leaseId' | 'leaseBackend' | 'leaseProvider' | 'deviceKey' | 'clientId' | 'providerApp' | 'providerOsVersion' | 'providerProject' | 'providerBuild' | 'providerSessionName' | 'providerDeviceOrientation' | 'providerGeoLocation' | 'providerTimezone' | 'providerLanguage' | 'providerLocale' | 'providerNetworkProfile' | 'providerCustomNetwork' | 'providerNoResignApp' | 'awsProjectArn' | 'awsDeviceArn' | 'awsAppArn' | 'awsRegion' | 'awsInteractionMode' | 'leaseTtlMs' | 'cwd' | 'debug' | 'cost' | 'responseLevel' | 'iosXctestrunFile' | 'iosXctestDerivedDataPath' | 'iosXctestEnvDir'>;
|
|
375
|
-
type AgentDeviceIdentifiers = {
|
|
376
|
-
session?: string;
|
|
377
|
-
deviceId?: string;
|
|
378
|
-
deviceName?: string;
|
|
379
|
-
udid?: string;
|
|
380
|
-
serial?: string;
|
|
381
|
-
appId?: string;
|
|
382
|
-
appBundleId?: string;
|
|
383
|
-
package?: string;
|
|
384
|
-
};
|
|
385
|
-
type AgentDeviceSelectionOptions = {
|
|
386
|
-
platform?: PlatformSelector;
|
|
387
|
-
target?: DeviceTarget;
|
|
388
|
-
device?: string;
|
|
389
|
-
udid?: string;
|
|
390
|
-
serial?: string;
|
|
391
|
-
iosSimulatorDeviceSet?: string;
|
|
392
|
-
androidDeviceAllowlist?: string;
|
|
393
|
-
};
|
|
394
|
-
type DeviceCommandBaseOptions = AgentDeviceRequestOverrides & AgentDeviceSelectionOptions;
|
|
395
|
-
//#endregion
|
|
396
|
-
//#region packages/contracts/src/client-device-view.d.ts
|
|
397
|
-
type AgentDeviceDevice = {
|
|
398
|
-
platform: PublicPlatform;
|
|
399
|
-
target: DeviceTarget;
|
|
400
|
-
kind: DeviceKind;
|
|
401
|
-
id: string;
|
|
402
|
-
name: string;
|
|
403
|
-
booted?: boolean;
|
|
404
|
-
/**
|
|
405
|
-
* Additive Apple-OS discriminant (iPhone/iPad/tvOS/visionOS/macOS). Present only for
|
|
406
|
-
* Apple devices; `platform` still carries the leaf (`ios`/`macos`).
|
|
407
|
-
*/
|
|
408
|
-
appleOs?: AppleOS;
|
|
409
|
-
identifiers: AgentDeviceIdentifiers;
|
|
410
|
-
ios?: {
|
|
411
|
-
udid: string;
|
|
412
|
-
};
|
|
413
|
-
android?: {
|
|
414
|
-
serial: string;
|
|
415
|
-
};
|
|
416
|
-
harmonyos?: {
|
|
417
|
-
serial: string;
|
|
418
|
-
};
|
|
419
|
-
vega?: {
|
|
420
|
-
serial: string;
|
|
421
|
-
};
|
|
422
|
-
};
|
|
423
|
-
type AgentDeviceCapabilitiesResult = {
|
|
424
|
-
device: AgentDeviceDevice;
|
|
425
|
-
availableCommands: string[];
|
|
426
|
-
};
|
|
427
|
-
type AgentDeviceSessionDevice = {
|
|
428
|
-
platform: PublicPlatform;
|
|
429
|
-
target: DeviceTarget;
|
|
430
|
-
id: string;
|
|
431
|
-
name: string;
|
|
432
|
-
/**
|
|
433
|
-
* Additive Apple-OS discriminant (iPhone/iPad/tvOS/visionOS/macOS). Present only for
|
|
434
|
-
* Apple devices; `platform` still carries the leaf (`ios`/`macos`).
|
|
435
|
-
*/
|
|
436
|
-
appleOs?: AppleOS;
|
|
437
|
-
identifiers: AgentDeviceIdentifiers;
|
|
438
|
-
ios?: {
|
|
439
|
-
udid: string;
|
|
440
|
-
simulatorSetPath?: string | null;
|
|
441
|
-
};
|
|
442
|
-
android?: {
|
|
443
|
-
serial: string;
|
|
444
|
-
};
|
|
445
|
-
harmonyos?: {
|
|
446
|
-
serial: string;
|
|
447
|
-
};
|
|
448
|
-
vega?: {
|
|
449
|
-
serial: string;
|
|
450
|
-
};
|
|
451
|
-
};
|
|
452
|
-
type AgentDeviceSession = {
|
|
453
|
-
name: string;
|
|
454
|
-
createdAt: number;
|
|
455
|
-
sessionStateDir?: string;
|
|
456
|
-
runnerLogPath?: string;
|
|
457
|
-
device: AgentDeviceSessionDevice;
|
|
458
|
-
identifiers: AgentDeviceIdentifiers;
|
|
459
|
-
};
|
|
460
|
-
type StartupPerfSample = {
|
|
461
|
-
durationMs: number;
|
|
462
|
-
measuredAt: string;
|
|
463
|
-
method: string;
|
|
464
|
-
appTarget?: string;
|
|
465
|
-
appBundleId?: string;
|
|
466
|
-
};
|
|
467
|
-
type DeviceBootOptions = DeviceCommandBaseOptions & {
|
|
468
|
-
headless?: boolean;
|
|
469
|
-
};
|
|
470
|
-
type DeviceShutdownOptions = DeviceCommandBaseOptions;
|
|
471
|
-
//#endregion
|
|
472
|
-
//#region packages/contracts/src/client-app.d.ts
|
|
473
|
-
type AppInstallOptions = AgentDeviceRequestOverrides & AgentDeviceSelectionOptions & {
|
|
474
|
-
app?: string;
|
|
475
|
-
appPath: string;
|
|
476
|
-
};
|
|
477
|
-
type AppDeployOptions = AgentDeviceRequestOverrides & AgentDeviceSelectionOptions & {
|
|
478
|
-
app: string;
|
|
479
|
-
appPath: string;
|
|
480
|
-
};
|
|
481
|
-
type AppDeployResult = {
|
|
482
|
-
app: string;
|
|
483
|
-
appPath: string;
|
|
484
|
-
platform: PublicPlatform;
|
|
485
|
-
appId?: string;
|
|
486
|
-
bundleId?: string;
|
|
487
|
-
package?: string;
|
|
488
|
-
identifiers: AgentDeviceIdentifiers;
|
|
489
|
-
};
|
|
490
|
-
type AppOpenOptions = AgentDeviceRequestOverrides & AgentDeviceSelectionOptions & {
|
|
491
|
-
app?: string;
|
|
492
|
-
url?: string;
|
|
493
|
-
surface?: SessionSurface;
|
|
494
|
-
activity?: string;
|
|
495
|
-
launchConsole?: string;
|
|
496
|
-
launchArgs?: string[];
|
|
497
|
-
relaunch?: boolean;
|
|
498
|
-
/**
|
|
499
|
-
* Include the initial interactive snapshot in a fresh open response. With
|
|
500
|
-
* no app argument, iOS can discover the sole running app on the sole booted
|
|
501
|
-
* simulator and fails closed when that environment is ambiguous.
|
|
502
|
-
*/
|
|
503
|
-
foreground?: boolean;
|
|
504
|
-
saveScript?: boolean | string;
|
|
505
|
-
/** #1258: overwrite an existing --save-script target instead of refusing. Alias: --overwrite. */
|
|
506
|
-
force?: boolean;
|
|
507
|
-
deviceHub?: boolean;
|
|
508
|
-
testIme?: boolean;
|
|
509
|
-
noRecord?: boolean;
|
|
510
|
-
runtime?: SessionRuntimeHints;
|
|
511
|
-
};
|
|
512
|
-
type AppOpenResult = {
|
|
513
|
-
session: string;
|
|
514
|
-
warnings?: string[];
|
|
515
|
-
sessionStateDir?: string;
|
|
516
|
-
runnerLogPath?: string;
|
|
517
|
-
requestLogPath?: string;
|
|
518
|
-
eventLogPath?: string;
|
|
519
|
-
appName?: string;
|
|
520
|
-
appBundleId?: string;
|
|
521
|
-
appId?: string;
|
|
522
|
-
startup?: StartupPerfSample;
|
|
523
|
-
runtime?: SessionRuntimeHints;
|
|
524
|
-
device?: AgentDeviceSessionDevice;
|
|
525
|
-
/**
|
|
526
|
-
* Initial interactive snapshot captured immediately after an open that
|
|
527
|
-
* requested `foreground`, composed from the same snapshot-runtime dispatch
|
|
528
|
-
* `agent-device snapshot -i` uses. It stays loosely typed rather than reusing
|
|
529
|
-
* `CaptureSnapshotResult` because the daemon-side composition does not attach
|
|
530
|
-
* client-only fields like `identifiers`.
|
|
531
|
-
*/
|
|
532
|
-
snapshot?: Record<string, unknown>;
|
|
533
|
-
/**
|
|
534
|
-
* open --foreground: present when the session opened successfully but the
|
|
535
|
-
* composed initial snapshot capture failed. Carries the FULL daemon error
|
|
536
|
-
* shape (code, message, hint, details, diagnosticId, logPath) so recovery
|
|
537
|
-
* guidance survives to the caller; the session itself is open and usable —
|
|
538
|
-
* a `warnings` entry says so and points at `snapshot -i`.
|
|
539
|
-
*/
|
|
540
|
-
initialSnapshotError?: DaemonError;
|
|
541
|
-
identifiers: AgentDeviceIdentifiers;
|
|
542
|
-
};
|
|
543
|
-
type AppCloseOptions = AgentDeviceRequestOverrides & {
|
|
544
|
-
app?: string;
|
|
545
|
-
shutdown?: boolean;
|
|
546
|
-
saveScript?: boolean | string;
|
|
547
|
-
/** #1258: overwrite an existing --save-script target instead of refusing. Alias: --overwrite. */
|
|
548
|
-
force?: boolean;
|
|
549
|
-
};
|
|
550
|
-
type AppCloseResult = {
|
|
551
|
-
session: string;
|
|
552
|
-
closedApp?: string;
|
|
553
|
-
shutdown?: TargetShutdownResult;
|
|
554
|
-
/**
|
|
555
|
-
* #1258: absolute path of the committed session/healed script when this close
|
|
556
|
-
* published one (`close --save-script`, or a repair-armed session's finalize)
|
|
557
|
-
* — so a client that requested publication learns where the file landed.
|
|
558
|
-
*/
|
|
559
|
-
savedScript?: string;
|
|
560
|
-
identifiers: AgentDeviceIdentifiers;
|
|
561
|
-
};
|
|
562
|
-
type AppInstallFromSourceOptions = AgentDeviceRequestOverrides & AgentDeviceSelectionOptions & {
|
|
563
|
-
source: DaemonInstallSource;
|
|
564
|
-
retainPaths?: boolean;
|
|
565
|
-
retentionMs?: number;
|
|
566
|
-
};
|
|
567
|
-
type AppInstallFromSourceResult = {
|
|
568
|
-
appName?: string;
|
|
569
|
-
appId?: string;
|
|
570
|
-
bundleId?: string;
|
|
571
|
-
packageName?: string;
|
|
572
|
-
launchTarget: string;
|
|
573
|
-
installablePath?: string;
|
|
574
|
-
archivePath?: string;
|
|
575
|
-
materializationId?: string;
|
|
576
|
-
materializationExpiresAt?: string;
|
|
577
|
-
identifiers: AgentDeviceIdentifiers;
|
|
578
|
-
};
|
|
579
|
-
type AppListOptions = AgentDeviceRequestOverrides & AgentDeviceSelectionOptions & {
|
|
580
|
-
appsFilter?: AppsFilter;
|
|
581
|
-
};
|
|
582
|
-
type AppPushOptions = DeviceCommandBaseOptions & {
|
|
583
|
-
app: string;
|
|
584
|
-
payload: string | JsonObject;
|
|
585
|
-
};
|
|
586
|
-
type AppTriggerEventOptions = DeviceCommandBaseOptions & {
|
|
587
|
-
event: string;
|
|
588
|
-
payload?: JsonObject;
|
|
589
|
-
};
|
|
590
|
-
type MaterializationReleaseOptions = AgentDeviceRequestOverrides & {
|
|
591
|
-
materializationId: string;
|
|
592
|
-
};
|
|
593
|
-
type MaterializationReleaseResult = {
|
|
594
|
-
released: boolean;
|
|
595
|
-
materializationId: string;
|
|
596
|
-
identifiers: AgentDeviceIdentifiers;
|
|
597
|
-
};
|
|
598
|
-
//#endregion
|
|
599
|
-
//#region packages/contracts/src/snapshot-capture-annotations.d.ts
|
|
600
|
-
type SnapshotCaptureAnalysis = {
|
|
601
|
-
rawNodeCount: number;
|
|
602
|
-
maxDepth: number;
|
|
603
|
-
};
|
|
604
|
-
type SnapshotCaptureFreshness = {
|
|
605
|
-
action: string;
|
|
606
|
-
retryCount: number;
|
|
607
|
-
staleAfterRetries: boolean;
|
|
608
|
-
reason?: 'empty-interactive' | 'sharp-drop' | 'stuck-route';
|
|
609
|
-
};
|
|
610
|
-
type SnapshotCaptureAnnotations = {
|
|
611
|
-
analysis?: SnapshotCaptureAnalysis;
|
|
612
|
-
androidSnapshot?: AndroidSnapshotBackendMetadata;
|
|
613
|
-
freshness?: SnapshotCaptureFreshness;
|
|
614
|
-
quality?: SnapshotQualityVerdict;
|
|
615
|
-
warnings?: string[];
|
|
616
|
-
};
|
|
617
|
-
type PublicSnapshotCaptureAnnotations = Pick<SnapshotCaptureAnnotations, 'androidSnapshot' | 'warnings'> & {
|
|
618
|
-
snapshotQuality?: SnapshotQualityVerdict;
|
|
619
|
-
};
|
|
620
|
-
//#endregion
|
|
621
|
-
//#region packages/contracts/src/client-capture.d.ts
|
|
622
|
-
type CaptureSnapshotOptions = AgentDeviceRequestOverrides & AgentDeviceSelectionOptions & {
|
|
623
|
-
interactiveOnly?: boolean;
|
|
624
|
-
depth?: number;
|
|
625
|
-
scope?: string;
|
|
626
|
-
raw?: boolean;
|
|
627
|
-
/** List accessibility custom actions on merged elements (iOS simulator). */
|
|
628
|
-
customActions?: boolean;
|
|
629
|
-
forceFull?: boolean;
|
|
630
|
-
timeoutMs?: number;
|
|
631
|
-
/**
|
|
632
|
-
* #1271 stage 2 (ADR 0012 amendment): `snapshot` is observation-only and
|
|
633
|
-
* excluded from a repair-armed heal by default; `record` forces it
|
|
634
|
-
* through. Mutually exclusive with `noRecord`.
|
|
635
|
-
*/
|
|
636
|
-
noRecord?: boolean;
|
|
637
|
-
record?: boolean;
|
|
638
|
-
};
|
|
639
|
-
type CaptureSnapshotResult = {
|
|
640
|
-
nodes: SnapshotNode[];
|
|
641
|
-
truncated: boolean;
|
|
642
|
-
appName?: string;
|
|
643
|
-
appBundleId?: string;
|
|
644
|
-
visibility?: SnapshotVisibility;
|
|
645
|
-
unchanged?: SnapshotUnchanged;
|
|
646
|
-
snapshotDiagnostics?: SnapshotDiagnosticsSummary;
|
|
647
|
-
/**
|
|
648
|
-
* Screenshot captured automatically when the semantic snapshot was sparse.
|
|
649
|
-
* Remote clients receive a materialized local path through the daemon artifact channel.
|
|
650
|
-
*/
|
|
651
|
-
fallbackScreenshotPath?: string;
|
|
652
|
-
identifiers: AgentDeviceIdentifiers;
|
|
653
|
-
/**
|
|
654
|
-
* ADR 0014: the response-level ref-frame epoch the plain node refs were minted
|
|
655
|
-
* from. A ref-issuing snapshot carries it ONCE (nodes stay plain `@e12` for the
|
|
656
|
-
* token budget); pair a ref with it (`@e12~s<refsGeneration>`) before a mutation.
|
|
657
|
-
*/
|
|
658
|
-
refsGeneration?: number;
|
|
659
|
-
/**
|
|
660
|
-
* Digest response view only: a capped list of `{ ref, label? }` pairs taken
|
|
661
|
-
* from the full `nodes` tree so the MCP layer can still pin refs when the
|
|
662
|
-
* default-level `nodes` payload is intentionally omitted.
|
|
663
|
-
*/
|
|
664
|
-
refs?: Array<{
|
|
665
|
-
ref: string;
|
|
666
|
-
label?: string;
|
|
667
|
-
}>;
|
|
668
|
-
} & PublicSnapshotCaptureAnnotations;
|
|
669
|
-
type CaptureScreenshotOptions = AgentDeviceRequestOverrides & {
|
|
670
|
-
path?: string;
|
|
671
|
-
overlayRefs?: boolean;
|
|
672
|
-
pixelDensity?: number;
|
|
673
|
-
fullscreen?: boolean;
|
|
674
|
-
scale?: number;
|
|
675
|
-
stabilize?: boolean;
|
|
676
|
-
normalizeStatusBar?: boolean;
|
|
677
|
-
surface?: SessionSurface;
|
|
678
|
-
};
|
|
679
|
-
type CaptureScreenshotResult = ScreenshotResultData & {
|
|
680
|
-
path: string;
|
|
681
|
-
identifiers: AgentDeviceIdentifiers;
|
|
682
|
-
};
|
|
683
|
-
type CaptureDiffOptions = DeviceCommandBaseOptions & Pick<CaptureSnapshotOptions, 'interactiveOnly' | 'depth' | 'scope' | 'raw'> & {
|
|
684
|
-
kind: 'snapshot';
|
|
685
|
-
out?: string;
|
|
686
|
-
};
|
|
687
|
-
type SelectorSnapshotCommandOptions = Pick<CaptureSnapshotOptions, 'depth' | 'scope' | 'raw'>;
|
|
688
|
-
type FindSnapshotCommandOptions = Pick<CaptureSnapshotOptions, 'depth' | 'raw'>;
|
|
689
|
-
//#endregion
|
|
690
|
-
//#region packages/contracts/src/client-target.d.ts
|
|
691
|
-
type PointTarget = {
|
|
692
|
-
x: number;
|
|
693
|
-
y: number;
|
|
694
|
-
ref?: never;
|
|
695
|
-
selector?: never;
|
|
696
|
-
label?: never;
|
|
697
|
-
};
|
|
698
|
-
type RefTarget = {
|
|
699
|
-
ref: string;
|
|
700
|
-
label?: string;
|
|
701
|
-
x?: never;
|
|
702
|
-
y?: never;
|
|
703
|
-
selector?: never;
|
|
704
|
-
};
|
|
705
|
-
type SelectorTarget = {
|
|
706
|
-
selector: string;
|
|
707
|
-
x?: never;
|
|
708
|
-
y?: never;
|
|
709
|
-
ref?: never;
|
|
710
|
-
label?: never;
|
|
711
|
-
};
|
|
712
|
-
type InteractionTarget = PointTarget | RefTarget | SelectorTarget;
|
|
713
|
-
type ElementTarget = RefTarget | SelectorTarget;
|
|
714
|
-
//#endregion
|
|
715
|
-
//#region packages/contracts/src/client-gesture.d.ts
|
|
716
|
-
type RepeatedPressOptions = {
|
|
717
|
-
count?: number;
|
|
718
|
-
intervalMs?: number;
|
|
719
|
-
holdMs?: number;
|
|
720
|
-
jitterPx?: number;
|
|
721
|
-
doubleTap?: boolean;
|
|
722
|
-
};
|
|
723
|
-
/**
|
|
724
|
-
* Opt-in (#1101): after the action, wait for the UI to go quiet and return the
|
|
725
|
-
* settled diff vs the pre-action tree (`settle` on the result) in the same
|
|
726
|
-
* response. Best-effort — never fails the action. `settleQuietMs` tunes the
|
|
727
|
-
* quiet window (default 500ms); `timeoutMs` bounds the settle wait (default
|
|
728
|
-
* 10s) when `settle` is true. A bare `timeoutMs` without `settle` is ignored
|
|
729
|
-
* for compatibility; `settleQuietMs` still requires `settle`.
|
|
730
|
-
*/
|
|
731
|
-
type SettleCommandOptions = {
|
|
732
|
-
settle?: boolean;
|
|
733
|
-
settleQuietMs?: number;
|
|
734
|
-
timeoutMs?: number;
|
|
735
|
-
};
|
|
736
|
-
type ClickOptions = DeviceCommandBaseOptions & SelectorSnapshotCommandOptions & InteractionTarget & RepeatedPressOptions & SettleCommandOptions & {
|
|
737
|
-
button?: ClickButton;
|
|
738
|
-
/**
|
|
739
|
-
* Opt-in (#1047): return cheap post-action evidence (AX digest, node counts,
|
|
740
|
-
* changedFromBefore) in the response instead of requiring a follow-up
|
|
741
|
-
* snapshot to confirm the action had an effect.
|
|
742
|
-
*/
|
|
743
|
-
verify?: boolean;
|
|
744
|
-
};
|
|
745
|
-
type PressOptions = DeviceCommandBaseOptions & SelectorSnapshotCommandOptions & InteractionTarget & RepeatedPressOptions & SettleCommandOptions & {
|
|
746
|
-
verify?: boolean;
|
|
747
|
-
};
|
|
748
|
-
type LongPressOptions = DeviceCommandBaseOptions & SelectorSnapshotCommandOptions & InteractionTarget & SettleCommandOptions & {
|
|
749
|
-
durationMs?: number;
|
|
750
|
-
};
|
|
751
|
-
type SwipeOptions = DeviceCommandBaseOptions & {
|
|
752
|
-
from: {
|
|
753
|
-
x: number;
|
|
754
|
-
y: number;
|
|
755
|
-
};
|
|
756
|
-
to: {
|
|
757
|
-
x: number;
|
|
758
|
-
y: number;
|
|
759
|
-
};
|
|
760
|
-
count?: number;
|
|
761
|
-
pauseMs?: number;
|
|
762
|
-
pattern?: SwipePattern;
|
|
763
|
-
};
|
|
764
|
-
type PanOptions = DeviceCommandBaseOptions & {
|
|
765
|
-
x: number;
|
|
766
|
-
y: number;
|
|
767
|
-
dx: number;
|
|
768
|
-
dy: number;
|
|
769
|
-
pointerCount?: GesturePointerCount;
|
|
770
|
-
durationMs?: number;
|
|
771
|
-
};
|
|
772
|
-
type DragOptions = DeviceCommandBaseOptions & {
|
|
773
|
-
source: string;
|
|
774
|
-
destination: string;
|
|
775
|
-
sourceHoldMs?: number;
|
|
776
|
-
moveMs?: number;
|
|
777
|
-
destinationHoldMs?: number;
|
|
778
|
-
};
|
|
779
|
-
type FlingOptions = DeviceCommandBaseOptions & {
|
|
780
|
-
direction: ScrollDirection;
|
|
781
|
-
x: number;
|
|
782
|
-
y: number;
|
|
783
|
-
distance?: number;
|
|
784
|
-
};
|
|
785
|
-
type SwipeGestureOptions = DeviceCommandBaseOptions & {
|
|
786
|
-
preset: SwipePreset;
|
|
787
|
-
};
|
|
788
|
-
type FocusOptions = DeviceCommandBaseOptions & {
|
|
789
|
-
x: number;
|
|
790
|
-
y: number;
|
|
791
|
-
};
|
|
792
|
-
type TypeTextOptions = DeviceCommandBaseOptions & {
|
|
793
|
-
text: string;
|
|
794
|
-
delayMs?: number;
|
|
795
|
-
};
|
|
796
|
-
type FillOptions = DeviceCommandBaseOptions & SelectorSnapshotCommandOptions & InteractionTarget & SettleCommandOptions & {
|
|
797
|
-
text: string;
|
|
798
|
-
delayMs?: number;
|
|
799
|
-
/** Publish this fill value as `${VAR}` when script recording is armed. */
|
|
800
|
-
recordAs?: string;
|
|
801
|
-
verify?: boolean;
|
|
802
|
-
};
|
|
803
|
-
type PinchOptions = DeviceCommandBaseOptions & {
|
|
804
|
-
scale: number;
|
|
805
|
-
x?: number;
|
|
806
|
-
y?: number;
|
|
807
|
-
};
|
|
808
|
-
type RotateGestureOptions = DeviceCommandBaseOptions & {
|
|
809
|
-
degrees: number;
|
|
810
|
-
x?: number;
|
|
811
|
-
y?: number;
|
|
812
|
-
};
|
|
813
|
-
type TransformGestureOptions = DeviceCommandBaseOptions & TransformGestureParams;
|
|
814
|
-
type ScrollOptions = DeviceCommandBaseOptions & SettleCommandOptions & {
|
|
815
|
-
direction: ScrollInputDirection;
|
|
816
|
-
amount?: number;
|
|
817
|
-
pixels?: number;
|
|
818
|
-
durationMs?: number;
|
|
819
|
-
};
|
|
820
|
-
//#endregion
|
|
821
|
-
//#region packages/contracts/src/client-lease.d.ts
|
|
822
|
-
type Lease = {
|
|
823
|
-
leaseId: string;
|
|
824
|
-
tenantId: string;
|
|
825
|
-
runId: string;
|
|
826
|
-
backend: LeaseBackend;
|
|
827
|
-
leaseProvider?: string;
|
|
828
|
-
deviceKey?: string;
|
|
829
|
-
clientId?: string;
|
|
830
|
-
createdAt?: number;
|
|
831
|
-
heartbeatAt?: number;
|
|
832
|
-
expiresAt?: number;
|
|
833
|
-
};
|
|
834
|
-
type LeaseOptions = AgentDeviceRequestOverrides & AgentDeviceSelectionOptions & {
|
|
835
|
-
ttlMs?: number;
|
|
836
|
-
};
|
|
837
|
-
type LeaseAllocateOptions = LeaseOptions & {
|
|
838
|
-
tenant: string;
|
|
839
|
-
runId: string;
|
|
840
|
-
leaseBackend?: LeaseBackend;
|
|
841
|
-
leaseProvider?: string;
|
|
842
|
-
provider?: string;
|
|
843
|
-
deviceKey?: string;
|
|
844
|
-
clientId?: string;
|
|
845
|
-
};
|
|
846
|
-
type LeaseScopedOptions = LeaseOptions & {
|
|
847
|
-
tenant?: string;
|
|
848
|
-
runId?: string;
|
|
849
|
-
leaseId: string;
|
|
850
|
-
leaseBackend?: LeaseBackend;
|
|
851
|
-
leaseProvider?: string;
|
|
852
|
-
provider?: string;
|
|
853
|
-
deviceKey?: string;
|
|
854
|
-
clientId?: string;
|
|
855
|
-
};
|
|
856
|
-
type CloudArtifactsOptions = AgentDeviceRequestOverrides & {
|
|
857
|
-
provider?: string;
|
|
858
|
-
providerSessionId?: string;
|
|
859
|
-
};
|
|
860
|
-
//#endregion
|
|
861
|
-
//#region packages/contracts/src/perf.d.ts
|
|
862
|
-
declare const PERF_AREA_VALUES: readonly ['metrics', 'frames', 'memory', 'cpu', 'trace'];
|
|
863
|
-
declare const PERF_ACTION_VALUES: readonly ['sample', 'snapshot', 'start', 'stop', 'report'];
|
|
864
|
-
declare const PERF_SUBJECT_VALUES: readonly ['profile'];
|
|
865
|
-
declare const PERF_KIND_VALUES: readonly ['xctrace', 'simpleperf', 'perfetto', 'android-hprof', 'memgraph'];
|
|
866
|
-
type PerfArea = (typeof PERF_AREA_VALUES)[number];
|
|
867
|
-
type PerfAction = (typeof PERF_ACTION_VALUES)[number];
|
|
868
|
-
type PerfSubject = (typeof PERF_SUBJECT_VALUES)[number];
|
|
869
|
-
type PerfKind = (typeof PERF_KIND_VALUES)[number];
|
|
870
|
-
//#endregion
|
|
871
|
-
//#region packages/contracts/src/client-observability.d.ts
|
|
872
|
-
type PerfOptions = DeviceCommandBaseOptions & {
|
|
873
|
-
/**
|
|
874
|
-
* Select focused performance evidence. Omitted values retain the deprecated aggregate
|
|
875
|
-
* metrics response for compatibility; prefer an explicit area.
|
|
876
|
-
*/
|
|
877
|
-
area?: PerfArea;
|
|
878
|
-
subject?: PerfSubject;
|
|
879
|
-
action?: PerfAction;
|
|
880
|
-
kind?: PerfKind;
|
|
881
|
-
template?: string;
|
|
882
|
-
out?: string;
|
|
883
|
-
tracePath?: string;
|
|
884
|
-
};
|
|
885
|
-
type LogsOptions = AgentDeviceRequestOverrides & {
|
|
886
|
-
action?: LogAction;
|
|
887
|
-
message?: string;
|
|
888
|
-
restart?: boolean;
|
|
889
|
-
};
|
|
890
|
-
type EventsOptions = AgentDeviceRequestOverrides & {
|
|
891
|
-
cursor?: string;
|
|
892
|
-
limit?: number;
|
|
893
|
-
};
|
|
894
|
-
type NetworkOptions = DeviceCommandBaseOptions & {
|
|
895
|
-
action?: 'dump' | 'log';
|
|
896
|
-
limit?: number;
|
|
897
|
-
include?: NetworkIncludeMode;
|
|
898
|
-
};
|
|
899
|
-
type AudioOptions = DeviceCommandBaseOptions & {
|
|
900
|
-
action?: 'probe';
|
|
901
|
-
probeAction?: 'start' | 'status' | 'stop';
|
|
902
|
-
durationMs?: number;
|
|
903
|
-
bucketMs?: number;
|
|
904
|
-
};
|
|
905
|
-
type RecordOptions = AgentDeviceRequestOverrides & {
|
|
906
|
-
action: 'start' | 'stop';
|
|
907
|
-
path?: string;
|
|
908
|
-
fps?: number;
|
|
909
|
-
quality?: RecordingExportQuality;
|
|
910
|
-
hideTouches?: boolean;
|
|
911
|
-
recordingScope?: RecordingScope;
|
|
912
|
-
};
|
|
913
|
-
type TraceOptions = AgentDeviceRequestOverrides & {
|
|
914
|
-
action: 'start' | 'stop';
|
|
915
|
-
path?: string;
|
|
916
|
-
};
|
|
917
|
-
//#endregion
|
|
918
|
-
//#region packages/contracts/src/client-replay.d.ts
|
|
919
|
-
type ReplayRunOptions = AgentDeviceRequestOverrides & AgentDeviceSelectionOptions & {
|
|
920
|
-
path: string;
|
|
921
|
-
runtime?: SessionRuntimeHints;
|
|
922
|
-
/**
|
|
923
|
-
* @deprecated ADR 0012 migration step 6: `--update` no longer rewrites
|
|
924
|
-
* the script. Accepted for backward compatibility; every divergence
|
|
925
|
-
* already carries ranked selector suggestions regardless of this flag.
|
|
926
|
-
*/
|
|
927
|
-
update?: boolean;
|
|
928
|
-
/** @deprecated Use backend: 'maestro'. */
|
|
929
|
-
maestro?: boolean;
|
|
930
|
-
backend?: string;
|
|
931
|
-
env?: string[];
|
|
932
|
-
timeoutMs?: number;
|
|
933
|
-
/**
|
|
934
|
-
* ADR 0012 decision 4 / migration step 5: resume at this 1-based plan
|
|
935
|
-
* step, skipping `1..resumeFrom-1` without executing them. Requires
|
|
936
|
-
* `resumePlanDigest` from the divergence report that reported this
|
|
937
|
-
* step as the failure. `replay` only — `test` has no resume fields.
|
|
938
|
-
*/
|
|
939
|
-
resumeFrom?: number;
|
|
940
|
-
/** The `resume.planDigest` from the divergence report `resumeFrom` came from. */
|
|
941
|
-
resumePlanDigest?: string;
|
|
942
|
-
/** Leave the session active by suppressing an authored terminal `close` in native `.ad`. */
|
|
943
|
-
keepSession?: boolean;
|
|
944
|
-
/**
|
|
945
|
-
* ADR 0012 decision 6, R1/R6: arms agent-supervised re-record repair
|
|
946
|
-
* from this replay attempt onward. Optional string value is the healed
|
|
947
|
-
* `.ad`'s output path; absent one, it defaults to the `<path>` sibling
|
|
948
|
-
* `<stem>.healed.ad` when the repair ends with `close --save-script`.
|
|
949
|
-
*/
|
|
950
|
-
saveScript?: boolean | string;
|
|
951
|
-
/** #1258: overwrite an existing --save-script target instead of refusing. Alias: --overwrite. */
|
|
952
|
-
force?: boolean;
|
|
953
|
-
};
|
|
954
|
-
type ReplayTestOptions = AgentDeviceRequestOverrides & AgentDeviceSelectionOptions & {
|
|
955
|
-
paths: string[];
|
|
956
|
-
runtime?: SessionRuntimeHints;
|
|
957
|
-
update?: boolean;
|
|
958
|
-
/** @deprecated Use backend: 'maestro'. */
|
|
959
|
-
maestro?: boolean;
|
|
960
|
-
backend?: string;
|
|
961
|
-
env?: string[];
|
|
962
|
-
failFast?: boolean;
|
|
963
|
-
timeoutMs?: number;
|
|
964
|
-
retries?: number;
|
|
965
|
-
recordVideo?: boolean;
|
|
966
|
-
artifactsDir?: string;
|
|
967
|
-
/** @deprecated Use the CLI --reporter junit:<path> or --report-junit <path>. */
|
|
968
|
-
reportJunit?: string;
|
|
969
|
-
shardAll?: number;
|
|
970
|
-
shardSplit?: number;
|
|
971
|
-
};
|
|
972
|
-
type BatchStep = {
|
|
973
|
-
command: string;
|
|
974
|
-
input: Record<string, unknown>;
|
|
975
|
-
runtime?: SessionRuntimeHints;
|
|
976
|
-
};
|
|
977
|
-
type BatchRunOptions = AgentDeviceRequestOverrides & {
|
|
978
|
-
steps: BatchStep[];
|
|
979
|
-
onError?: 'stop';
|
|
980
|
-
maxSteps?: number;
|
|
981
|
-
out?: string;
|
|
982
|
-
};
|
|
983
|
-
//#endregion
|
|
984
|
-
//#region packages/contracts/src/client-request.d.ts
|
|
985
|
-
type CommandRequestResult = DaemonResponseData;
|
|
986
|
-
//#endregion
|
|
987
|
-
//#region packages/contracts/src/client-selector-read.d.ts
|
|
988
|
-
/**
|
|
989
|
-
* #1271 stage 2 (ADR 0012 amendment): `get`/`is`/`find` are observation-only
|
|
990
|
-
* and excluded from a repair-armed heal by default. `record` forces this
|
|
991
|
-
* action through (the corrective-read case); `noRecord` continues to opt the
|
|
992
|
-
* action out entirely. Mutually exclusive.
|
|
993
|
-
*/
|
|
994
|
-
type RecordControlOptions = {
|
|
995
|
-
noRecord?: boolean;
|
|
996
|
-
record?: boolean;
|
|
997
|
-
};
|
|
998
|
-
type GetOptions = DeviceCommandBaseOptions & SelectorSnapshotCommandOptions & ElementTarget & RecordControlOptions & {
|
|
999
|
-
format: 'text' | 'attrs';
|
|
1000
|
-
};
|
|
1001
|
-
type IsTextPredicateOptions = DeviceCommandBaseOptions & SelectorSnapshotCommandOptions & RecordControlOptions & {
|
|
1002
|
-
predicate: 'text';
|
|
1003
|
-
selector: string;
|
|
1004
|
-
value: string;
|
|
1005
|
-
};
|
|
1006
|
-
type IsStatePredicateOptions = DeviceCommandBaseOptions & SelectorSnapshotCommandOptions & RecordControlOptions & {
|
|
1007
|
-
predicate: 'visible' | 'hidden' | 'exists' | 'editable' | 'selected' | 'focused';
|
|
1008
|
-
selector: string;
|
|
1009
|
-
value?: never;
|
|
1010
|
-
};
|
|
1011
|
-
type IsOptions = IsTextPredicateOptions | IsStatePredicateOptions;
|
|
1012
|
-
type FindBaseOptions = DeviceCommandBaseOptions & FindSnapshotCommandOptions & RecordControlOptions & {
|
|
1013
|
-
locator?: FindLocator;
|
|
1014
|
-
query: string;
|
|
1015
|
-
first?: boolean;
|
|
1016
|
-
last?: boolean;
|
|
1017
|
-
};
|
|
1018
|
-
type FindOptions = (FindBaseOptions & {
|
|
1019
|
-
action?: 'click' | 'focus' | 'exists' | 'getText' | 'getAttrs' | 'list';
|
|
1020
|
-
}) | (FindBaseOptions & {
|
|
1021
|
-
action: 'wait';
|
|
1022
|
-
timeoutMs?: number;
|
|
1023
|
-
}) | (FindBaseOptions & {
|
|
1024
|
-
action: 'fill' | 'type';
|
|
1025
|
-
value: string;
|
|
1026
|
-
});
|
|
1027
|
-
//#endregion
|
|
1028
|
-
//#region packages/contracts/src/client-session.d.ts
|
|
1029
|
-
type SessionCloseResult = {
|
|
1030
|
-
session: string;
|
|
1031
|
-
shutdown?: TargetShutdownResult;
|
|
1032
|
-
provider?: CloudProviderSessionResult;
|
|
1033
|
-
/**
|
|
1034
|
-
* #1258: absolute path of the committed session/healed script when this close
|
|
1035
|
-
* published one (`close --save-script`, or a repair-armed session's finalize)
|
|
1036
|
-
* — so a client that requested publication learns where the file landed.
|
|
1037
|
-
*/
|
|
1038
|
-
savedScript?: string;
|
|
1039
|
-
identifiers: AgentDeviceIdentifiers;
|
|
1040
|
-
};
|
|
1041
|
-
type SessionSaveScriptOptions = AgentDeviceRequestOverrides & {
|
|
1042
|
-
path?: string;
|
|
1043
|
-
/** Atomically replace an existing target instead of refusing publication. */
|
|
1044
|
-
force?: boolean;
|
|
1045
|
-
};
|
|
1046
|
-
type SessionSaveScriptResult = {
|
|
1047
|
-
session: string;
|
|
1048
|
-
savedScript: string;
|
|
1049
|
-
actionCount: number;
|
|
1050
|
-
identifiers: AgentDeviceIdentifiers;
|
|
1051
|
-
};
|
|
1052
|
-
//#endregion
|
|
1053
|
-
//#region packages/contracts/src/client-settings.d.ts
|
|
1054
|
-
type PermissionTarget = 'camera' | 'microphone' | 'photos' | 'contacts' | 'contacts-limited' | 'notifications' | 'calendar' | 'location' | 'location-always' | 'media-library' | 'motion' | 'reminders' | 'siri' | 'accessibility' | 'screen-recording' | 'input-monitoring';
|
|
1055
|
-
type SettingsUpdateOptions = (DeviceCommandBaseOptions & {
|
|
1056
|
-
setting: 'clear-app-state';
|
|
1057
|
-
state: 'clear';
|
|
1058
|
-
app?: string;
|
|
1059
|
-
}) | (DeviceCommandBaseOptions & {
|
|
1060
|
-
setting: 'wifi' | 'airplane' | 'location';
|
|
1061
|
-
state: 'on' | 'off';
|
|
1062
|
-
}) | (DeviceCommandBaseOptions & {
|
|
1063
|
-
setting: 'location';
|
|
1064
|
-
state: 'set';
|
|
1065
|
-
latitude: number;
|
|
1066
|
-
longitude: number;
|
|
1067
|
-
}) | (DeviceCommandBaseOptions & {
|
|
1068
|
-
setting: 'animations';
|
|
1069
|
-
state: 'on' | 'off';
|
|
1070
|
-
}) | (DeviceCommandBaseOptions & {
|
|
1071
|
-
setting: 'appearance';
|
|
1072
|
-
state: 'light' | 'dark' | 'toggle';
|
|
1073
|
-
}) | (DeviceCommandBaseOptions & {
|
|
1074
|
-
setting: 'faceid' | 'touchid';
|
|
1075
|
-
state: 'match' | 'nonmatch' | 'enroll' | 'unenroll';
|
|
1076
|
-
}) | (DeviceCommandBaseOptions & {
|
|
1077
|
-
setting: 'fingerprint';
|
|
1078
|
-
state: 'match' | 'nonmatch';
|
|
1079
|
-
}) | (DeviceCommandBaseOptions & {
|
|
1080
|
-
setting: 'permission';
|
|
1081
|
-
state: 'grant' | 'deny' | 'reset';
|
|
1082
|
-
permission: PermissionTarget;
|
|
1083
|
-
mode?: 'full' | 'limited';
|
|
1084
|
-
});
|
|
1085
|
-
//#endregion
|
|
1086
|
-
//#region packages/contracts/src/client-system.d.ts
|
|
1087
|
-
type WaitCommandTarget = {
|
|
1088
|
-
durationMs: number;
|
|
1089
|
-
text?: never;
|
|
1090
|
-
ref?: never;
|
|
1091
|
-
selector?: never;
|
|
1092
|
-
stable?: never;
|
|
1093
|
-
quietMs?: never;
|
|
1094
|
-
timeoutMs?: never;
|
|
1095
|
-
} | (SelectorSnapshotCommandOptions & {
|
|
1096
|
-
text: string;
|
|
1097
|
-
durationMs?: never;
|
|
1098
|
-
ref?: never;
|
|
1099
|
-
selector?: never;
|
|
1100
|
-
stable?: never;
|
|
1101
|
-
quietMs?: never;
|
|
1102
|
-
timeoutMs?: number;
|
|
1103
|
-
}) | (SelectorSnapshotCommandOptions & {
|
|
1104
|
-
ref: string;
|
|
1105
|
-
durationMs?: never;
|
|
1106
|
-
text?: never;
|
|
1107
|
-
selector?: never;
|
|
1108
|
-
stable?: never;
|
|
1109
|
-
quietMs?: never;
|
|
1110
|
-
timeoutMs?: number;
|
|
1111
|
-
}) | (SelectorSnapshotCommandOptions & {
|
|
1112
|
-
selector: string;
|
|
1113
|
-
durationMs?: never;
|
|
1114
|
-
text?: never;
|
|
1115
|
-
ref?: never;
|
|
1116
|
-
stable?: never;
|
|
1117
|
-
quietMs?: never;
|
|
1118
|
-
timeoutMs?: number;
|
|
1119
|
-
}) | (SelectorSnapshotCommandOptions & {
|
|
1120
|
-
stable: true;
|
|
1121
|
-
durationMs?: never;
|
|
1122
|
-
text?: never;
|
|
1123
|
-
ref?: never;
|
|
1124
|
-
selector?: never;
|
|
1125
|
-
quietMs?: number;
|
|
1126
|
-
timeoutMs?: number;
|
|
1127
|
-
});
|
|
1128
|
-
type WaitCommandOptions = DeviceCommandBaseOptions & WaitCommandTarget;
|
|
1129
|
-
type AlertCommandOptions = DeviceCommandBaseOptions & {
|
|
1130
|
-
action?: AlertAction;
|
|
1131
|
-
timeoutMs?: number;
|
|
1132
|
-
};
|
|
1133
|
-
type AppStateCommandOptions = DeviceCommandBaseOptions;
|
|
1134
|
-
type KeyboardCommandOptions = DeviceCommandBaseOptions & {
|
|
1135
|
-
action?: 'status' | 'dismiss' | 'enter' | 'return';
|
|
1136
|
-
};
|
|
1137
|
-
type ClipboardCommandOptions = (DeviceCommandBaseOptions & {
|
|
1138
|
-
action: 'read';
|
|
1139
|
-
}) | (DeviceCommandBaseOptions & {
|
|
1140
|
-
action: 'write';
|
|
1141
|
-
text: string;
|
|
1142
|
-
});
|
|
1143
|
-
type ReactNativeCommandOptions = DeviceCommandBaseOptions & {
|
|
1144
|
-
action: 'dismiss-overlay';
|
|
1145
|
-
};
|
|
1146
|
-
type PrepareCommandOptions = DeviceCommandBaseOptions & {
|
|
1147
|
-
action: 'ios-runner';
|
|
1148
|
-
timeoutMs?: number;
|
|
1149
|
-
};
|
|
1150
|
-
type DoctorCommandOptions = DeviceCommandBaseOptions & {
|
|
1151
|
-
targetApp?: string;
|
|
1152
|
-
remote?: boolean;
|
|
1153
|
-
};
|
|
1154
|
-
type ViewportCommandOptions = DeviceCommandBaseOptions & {
|
|
1155
|
-
width: number;
|
|
1156
|
-
height: number;
|
|
1157
|
-
};
|
|
1158
|
-
//#endregion
|
|
1159
|
-
//#region src/commands/command-contract.d.ts
|
|
1160
|
-
type JsonSchema = {
|
|
1161
|
-
type?: string | readonly string[];
|
|
1162
|
-
description?: string;
|
|
1163
|
-
properties?: Record<string, JsonSchema>;
|
|
1164
|
-
required?: readonly string[];
|
|
1165
|
-
additionalProperties?: boolean | JsonSchema;
|
|
1166
|
-
items?: JsonSchema;
|
|
1167
|
-
prefixItems?: readonly JsonSchema[];
|
|
1168
|
-
oneOf?: readonly JsonSchema[];
|
|
1169
|
-
not?: JsonSchema;
|
|
1170
|
-
enum?: readonly unknown[];
|
|
1171
|
-
const?: unknown;
|
|
1172
|
-
minimum?: number;
|
|
1173
|
-
maximum?: number;
|
|
1174
|
-
};
|
|
1175
|
-
type ExecutableCommandProjection<ClientMethod extends string = string> = {
|
|
1176
|
-
clientMethod: ClientMethod;
|
|
1177
|
-
outputSchema: JsonSchema;
|
|
1178
|
-
};
|
|
1179
|
-
//#endregion
|
|
1180
|
-
//#region src/commands/system/navigation-projection.d.ts
|
|
1181
|
-
declare const navigationCommandProjectionType: unique symbol;
|
|
1182
|
-
type NavigationCommandProjection<Options, Result, Required extends boolean, ClientMethod extends string> = ExecutableCommandProjection<ClientMethod> & {
|
|
1183
|
-
readonly [navigationCommandProjectionType]?: {
|
|
1184
|
-
options: Options;
|
|
1185
|
-
result: Result;
|
|
1186
|
-
required: Required;
|
|
1187
|
-
};
|
|
1188
|
-
};
|
|
1189
|
-
declare const NAVIGATION_COMMAND_PROJECTIONS: {
|
|
1190
|
-
readonly back: NavigationCommandProjection<{
|
|
1191
|
-
mode?: BackMode;
|
|
1192
|
-
} & SettleCommandOptions, BackCommandResult, false, "back">;
|
|
1193
|
-
readonly home: NavigationCommandProjection<{}, HomeCommandResult, false, "home">;
|
|
1194
|
-
readonly orientation: NavigationCommandProjection<{
|
|
1195
|
-
orientation: DeviceRotation;
|
|
1196
|
-
}, OrientationCommandResult, true, "orientation">;
|
|
1197
|
-
readonly 'app-switcher': NavigationCommandProjection<{}, AppSwitcherCommandResult, false, "appSwitcher">;
|
|
1198
|
-
readonly 'tv-remote': NavigationCommandProjection<{
|
|
1199
|
-
button: TvRemoteButton;
|
|
1200
|
-
durationMs?: number;
|
|
1201
|
-
}, TvRemoteCommandResult, true, "tvRemote">;
|
|
1202
|
-
};
|
|
1203
|
-
type NavigationCommandName = keyof typeof NAVIGATION_COMMAND_PROJECTIONS;
|
|
1204
|
-
type NavigationCommandOptions<Name extends NavigationCommandName> = (typeof NAVIGATION_COMMAND_PROJECTIONS)[Name] extends NavigationCommandProjection<infer Options, unknown, boolean, string> ? Options : never;
|
|
1205
|
-
type ProjectedNavigationCommandMethod<BaseOptions, Projection> = Projection extends NavigationCommandProjection<infer Options, infer Result, infer Required, string> ? Required extends true ? (options: BaseOptions & Options) => Promise<Result> : (options?: BaseOptions & Options) => Promise<Result> : never;
|
|
1206
|
-
type ProjectedNavigationCommandClient<BaseOptions> = { [Name in NavigationCommandName as (typeof NAVIGATION_COMMAND_PROJECTIONS)[Name]['clientMethod']]: ProjectedNavigationCommandMethod<BaseOptions, (typeof NAVIGATION_COMMAND_PROJECTIONS)[Name]>; };
|
|
1207
|
-
//#endregion
|
|
1208
|
-
//#region packages/contracts/src/debug-symbols.d.ts
|
|
1209
|
-
type DebugSymbolsOptions = {
|
|
1210
|
-
action?: 'symbols';
|
|
1211
|
-
artifact: string;
|
|
1212
|
-
dsym?: string;
|
|
1213
|
-
searchPath?: string;
|
|
1214
|
-
out?: string;
|
|
1215
|
-
cwd?: string;
|
|
1216
|
-
};
|
|
1217
|
-
type DebugSymbolsImage = {
|
|
1218
|
-
name: string;
|
|
1219
|
-
uuid: string;
|
|
1220
|
-
arch?: string;
|
|
1221
|
-
dsymPath: string;
|
|
1222
|
-
binaryPath: string;
|
|
1223
|
-
};
|
|
1224
|
-
type DebugSymbolsCrashFrame = {
|
|
1225
|
-
index: number;
|
|
1226
|
-
image: string;
|
|
1227
|
-
address: string;
|
|
1228
|
-
symbol?: string;
|
|
1229
|
-
};
|
|
1230
|
-
type DebugSymbolsCrashSummary = {
|
|
1231
|
-
format: 'ips' | 'text';
|
|
1232
|
-
appName?: string;
|
|
1233
|
-
bundleId?: string;
|
|
1234
|
-
version?: string;
|
|
1235
|
-
incident?: string;
|
|
1236
|
-
timestamp?: string;
|
|
1237
|
-
exceptionType?: string;
|
|
1238
|
-
exceptionCodes?: string;
|
|
1239
|
-
terminationReason?: string;
|
|
1240
|
-
crashedThread?: number;
|
|
1241
|
-
topFrames: DebugSymbolsCrashFrame[];
|
|
1242
|
-
findings: string[];
|
|
1243
|
-
};
|
|
1244
|
-
type DebugSymbolsResult = {
|
|
1245
|
-
kind: 'debugSymbols';
|
|
1246
|
-
platform: 'apple';
|
|
1247
|
-
artifactPath: string;
|
|
1248
|
-
outPath: string;
|
|
1249
|
-
crash: DebugSymbolsCrashSummary;
|
|
1250
|
-
matchedImages: DebugSymbolsImage[];
|
|
1251
|
-
symbolicatedFrames: number;
|
|
1252
|
-
skippedImages: number;
|
|
1253
|
-
warnings?: string[];
|
|
1254
|
-
message: string;
|
|
1255
|
-
};
|
|
1256
|
-
//#endregion
|
|
1257
|
-
//#region packages/contracts/src/doctor.d.ts
|
|
1258
|
-
type DoctorStatus = 'pass' | 'warn' | 'fail' | 'info';
|
|
1259
|
-
type DoctorKind = 'auto' | 'react-native' | 'expo' | 'repack';
|
|
1260
|
-
type DoctorCheck = {
|
|
1261
|
-
id: string;
|
|
1262
|
-
status: DoctorStatus;
|
|
1263
|
-
summary: string;
|
|
1264
|
-
hint?: string;
|
|
1265
|
-
command?: string;
|
|
1266
|
-
evidence?: Record<string, unknown>;
|
|
1267
|
-
};
|
|
1268
|
-
type DoctorCommandResult = {
|
|
1269
|
-
status: DoctorStatus;
|
|
1270
|
-
summary: string;
|
|
1271
|
-
kind: DoctorKind;
|
|
1272
|
-
platform?: PlatformSelector;
|
|
1273
|
-
target?: DeviceTarget;
|
|
1274
|
-
targetApp?: string;
|
|
1275
|
-
metro?: {
|
|
1276
|
-
host: string;
|
|
1277
|
-
port: number;
|
|
1278
|
-
};
|
|
1279
|
-
checks: DoctorCheck[];
|
|
1280
|
-
};
|
|
1281
|
-
//#endregion
|
|
1282
|
-
//#region packages/contracts/src/diff.d.ts
|
|
1283
|
-
type SnapshotDiffLine = {
|
|
1284
|
-
kind: 'added' | 'removed' | 'unchanged';
|
|
1285
|
-
text: string;
|
|
1286
|
-
/**
|
|
1287
|
-
* Plain ref body (`e12`) of the current-tree node behind an added line.
|
|
1288
|
-
* Only populated with `withRefs`; removed and unchanged lines never carry it.
|
|
1289
|
-
*/
|
|
1290
|
-
ref?: string;
|
|
1291
|
-
};
|
|
1292
|
-
type SnapshotDiffSummary = {
|
|
1293
|
-
additions: number;
|
|
1294
|
-
removals: number;
|
|
1295
|
-
unchanged: number;
|
|
1296
|
-
};
|
|
1297
|
-
type DiffSnapshotCommandResult = {
|
|
1298
|
-
mode: 'snapshot';
|
|
1299
|
-
baselineInitialized: boolean;
|
|
1300
|
-
summary: SnapshotDiffSummary;
|
|
1301
|
-
lines: SnapshotDiffLine[];
|
|
1302
|
-
warnings?: string[];
|
|
1303
|
-
};
|
|
1304
|
-
//#endregion
|
|
1305
|
-
//#region packages/contracts/src/viewport.d.ts
|
|
1306
|
-
/**
|
|
1307
|
-
* Closed result of the `viewport` command. Mirrors the dispatch handler's return
|
|
1308
|
-
* EXACTLY (src/core/dispatch.ts `handleViewportCommand`) — `{ width, height }`
|
|
1309
|
-
* plus the always-present `successText` message. The generic dispatch path
|
|
1310
|
-
* returns this object unchanged (viewport has no Android dialog guard, so no
|
|
1311
|
-
* `warning` is ever appended), so the shape is intentionally closed.
|
|
1312
|
-
*/
|
|
1313
|
-
type ViewportCommandResult = {
|
|
1314
|
-
width: number;
|
|
1315
|
-
height: number;
|
|
1316
|
-
message: string;
|
|
1317
|
-
};
|
|
1318
|
-
//#endregion
|
|
1319
|
-
//#region packages/contracts/src/replay.d.ts
|
|
1320
|
-
type ReplayCommandResult = {
|
|
1321
|
-
replayed: number;
|
|
1322
|
-
healed: number;
|
|
1323
|
-
session: string;
|
|
1324
|
-
/**
|
|
1325
|
-
* True iff `session` still exists in the daemon's session store when the
|
|
1326
|
-
* response is built. This remains true when replay suppresses an authored
|
|
1327
|
-
* terminal `close` for an explicit live-session handoff. The client uses
|
|
1328
|
-
* this, not script parsing, to decide whether an owned one-shot daemon must
|
|
1329
|
-
* stay alive so the caller can keep addressing this session.
|
|
1330
|
-
*/
|
|
1331
|
-
sessionActive: boolean;
|
|
1332
|
-
artifactPaths: string[];
|
|
1333
|
-
warnings?: string[];
|
|
1334
|
-
snapshotDiagnostics?: SnapshotDiagnosticsSummary;
|
|
1335
|
-
message: string;
|
|
1336
|
-
};
|
|
1337
|
-
type ReplaySuiteTestSkipReason = 'skipped-by-filter';
|
|
1338
|
-
type ReplaySuiteAttemptFailure = {
|
|
1339
|
-
attempt: number;
|
|
1340
|
-
message: string;
|
|
1341
|
-
durationMs?: number;
|
|
1342
|
-
};
|
|
1343
|
-
type ReplaySuiteTestPassed = {
|
|
1344
|
-
file: string;
|
|
1345
|
-
title?: string;
|
|
1346
|
-
session: string;
|
|
1347
|
-
status: 'passed';
|
|
1348
|
-
durationMs: number;
|
|
1349
|
-
finalAttemptDurationMs?: number;
|
|
1350
|
-
attempts: number;
|
|
1351
|
-
artifactsDir?: string;
|
|
1352
|
-
replayed: number;
|
|
1353
|
-
healed: number;
|
|
1354
|
-
warnings?: string[];
|
|
1355
|
-
attemptFailures?: ReplaySuiteAttemptFailure[];
|
|
1356
|
-
shardIndex?: number;
|
|
1357
|
-
shardCount?: number;
|
|
1358
|
-
deviceId?: string;
|
|
1359
|
-
deviceName?: string;
|
|
1360
|
-
snapshotDiagnostics?: SnapshotDiagnosticsSummary;
|
|
1361
|
-
};
|
|
1362
|
-
type ReplaySuiteTestFailed = {
|
|
1363
|
-
file: string;
|
|
1364
|
-
title?: string;
|
|
1365
|
-
session: string;
|
|
1366
|
-
status: 'failed';
|
|
1367
|
-
durationMs: number;
|
|
1368
|
-
attempts: number;
|
|
1369
|
-
artifactsDir?: string;
|
|
1370
|
-
error: DaemonError;
|
|
1371
|
-
shardIndex?: number;
|
|
1372
|
-
shardCount?: number;
|
|
1373
|
-
deviceId?: string;
|
|
1374
|
-
deviceName?: string;
|
|
1375
|
-
snapshotDiagnostics?: SnapshotDiagnosticsSummary;
|
|
1376
|
-
};
|
|
1377
|
-
type ReplaySuiteTestSkipped = {
|
|
1378
|
-
file: string;
|
|
1379
|
-
title?: string;
|
|
1380
|
-
status: 'skipped';
|
|
1381
|
-
durationMs: 0;
|
|
1382
|
-
reason: ReplaySuiteTestSkipReason;
|
|
1383
|
-
message: string;
|
|
1384
|
-
};
|
|
1385
|
-
type ReplaySuiteTestResult = ReplaySuiteTestPassed | ReplaySuiteTestFailed | ReplaySuiteTestSkipped;
|
|
1386
|
-
type ReplaySuiteResult = {
|
|
1387
|
-
total: number;
|
|
1388
|
-
executed: number;
|
|
1389
|
-
passed: number;
|
|
1390
|
-
failed: number;
|
|
1391
|
-
skipped: number;
|
|
1392
|
-
notRun: number;
|
|
1393
|
-
durationMs: number;
|
|
1394
|
-
failures: ReplaySuiteTestFailed[];
|
|
1395
|
-
tests: ReplaySuiteTestResult[];
|
|
1396
|
-
snapshotDiagnostics?: SnapshotDiagnosticsSummary;
|
|
1397
|
-
};
|
|
1398
|
-
//#endregion
|
|
1399
|
-
//#region src/core/command-descriptor/command-result.d.ts
|
|
1400
|
-
/**
|
|
1401
|
-
* The additive typed-result spine (ADR-0008, Phase 1 step 6).
|
|
1402
|
-
*
|
|
1403
|
-
* Maps a command name to the per-command result type from `@agent-device/contracts`. It
|
|
1404
|
-
* is SEEDED, not exhaustive: a command is listed here only once its accurate,
|
|
1405
|
-
* closed result shape lives in the contracts layer. Commands whose daemon
|
|
1406
|
-
* handler spreads dynamic/Record data (screenshot overlays, gesture
|
|
1407
|
-
* visualization, perf, logs, …) are deliberately omitted rather than given an
|
|
1408
|
-
* invented shape.
|
|
1409
|
-
*
|
|
1410
|
-
* Batches 1-2 wired `boot` / `shutdown` / `viewport` and the navigation/action
|
|
1411
|
-
* commands `home` / `back` / `orientation` / `app-switcher` alongside the seed
|
|
1412
|
-
* interaction quartet. Batch 3 adds `clipboard` (a closed `read`/`write` union) and
|
|
1413
|
-
* `appstate` (a closed `platform` union — Apple session state with the iOS-only
|
|
1414
|
-
* device locators, or Android package/activity). Batch 4 adds `keyboard` (a
|
|
1415
|
-
* closed flat shape). Batch 5 adds the compact daemon projections for `wait`,
|
|
1416
|
-
* `prepare`, `push`, and `trigger-app-event`. Each entry is grounded in a
|
|
1417
|
-
* re-read of the handler's literal return; see the per-type docstrings.
|
|
1418
|
-
*/
|
|
1419
|
-
interface CommandResultMap {
|
|
1420
|
-
press: PressCommandResponseData;
|
|
1421
|
-
click: ClickCommandResponseData;
|
|
1422
|
-
fill: FillCommandResponseData;
|
|
1423
|
-
longpress: LongPressCommandResponseData;
|
|
1424
|
-
find: FindCommandResponseData;
|
|
1425
|
-
boot: BootCommandResult;
|
|
1426
|
-
shutdown: ShutdownCommandResult;
|
|
1427
|
-
viewport: ViewportCommandResult;
|
|
1428
|
-
home: HomeCommandResult;
|
|
1429
|
-
back: BackCommandResult;
|
|
1430
|
-
orientation: OrientationCommandResult;
|
|
1431
|
-
'app-switcher': AppSwitcherCommandResult;
|
|
1432
|
-
clipboard: ClipboardCommandResult;
|
|
1433
|
-
appstate: AppStateCommandResult;
|
|
1434
|
-
keyboard: KeyboardCommandResult;
|
|
1435
|
-
'tv-remote': TvRemoteCommandResult;
|
|
1436
|
-
wait: WaitCommandResult;
|
|
1437
|
-
prepare: PrepareCommandResult;
|
|
1438
|
-
push: PushCommandResult;
|
|
1439
|
-
'trigger-app-event': TriggerAppEventCommandResult;
|
|
1440
|
-
doctor: DoctorCommandResult;
|
|
1441
|
-
diff: DiffSnapshotCommandResult;
|
|
1442
|
-
replay: ReplayCommandResult;
|
|
1443
|
-
test: ReplaySuiteResult;
|
|
1444
|
-
record: RecordingCommandResult;
|
|
1445
|
-
trace: TraceCommandResult;
|
|
1446
|
-
}
|
|
1447
|
-
/**
|
|
1448
|
-
* The typed result for a command named `N`. Seeded commands resolve to their
|
|
1449
|
-
* contract result type from {@link CommandResultMap}; every other (unmigrated)
|
|
1450
|
-
* command falls back to the untyped `Record<string, unknown>` bag. That default
|
|
1451
|
-
* branch is what keeps the mapping total over every command name, so consumers
|
|
1452
|
-
* can switch to `CommandResult<Name>` without first migrating every command.
|
|
1453
|
-
*/
|
|
1454
|
-
type CommandResult<N extends string> = N extends keyof CommandResultMap ? CommandResultMap[N] : Record<string, unknown>;
|
|
1455
|
-
//#endregion
|
|
1456
|
-
//#region src/client/client-types.d.ts
|
|
1457
|
-
type OrientationCommandOptions = DeviceCommandBaseOptions & NavigationCommandOptions<'orientation'>;
|
|
1458
|
-
/** @deprecated Renamed to `OrientationCommandOptions`. Retained until the next major. */
|
|
1459
|
-
type RotateCommandOptions = OrientationCommandOptions;
|
|
1460
|
-
type NonNavigationCommandClient = {
|
|
1461
|
-
wait: (options: WaitCommandOptions) => Promise<CommandResult<'wait'>>;
|
|
1462
|
-
alert: (options?: AlertCommandOptions) => Promise<CommandRequestResult>;
|
|
1463
|
-
appState: (options?: AppStateCommandOptions) => Promise<CommandResult<'appstate'>>;
|
|
1464
|
-
keyboard: (options?: KeyboardCommandOptions) => Promise<CommandResult<'keyboard'>>;
|
|
1465
|
-
clipboard: (options: ClipboardCommandOptions) => Promise<CommandResult<'clipboard'>>;
|
|
1466
|
-
reactNative: (options: ReactNativeCommandOptions) => Promise<CommandRequestResult>;
|
|
1467
|
-
doctor: (options?: DoctorCommandOptions) => Promise<CommandResult<'doctor'>>;
|
|
1468
|
-
/**
|
|
1469
|
-
* JSON prepare results include timing.additiveParts for additive wall-clock phases.
|
|
1470
|
-
* Top-level buildMs/connectMs/healthCheckMs are diagnostics and may overlap.
|
|
1471
|
-
*/
|
|
1472
|
-
prepare: (options: PrepareCommandOptions) => Promise<CommandResult<'prepare'>>;
|
|
1473
|
-
viewport: (options: ViewportCommandOptions) => Promise<CommandResult<'viewport'>>;
|
|
1474
|
-
};
|
|
1475
|
-
type AgentDeviceCommandClient = ProjectedNavigationCommandClient<DeviceCommandBaseOptions> & NonNavigationCommandClient & DeprecatedCommandClient;
|
|
1476
|
-
/** Renamed command methods retained for existing consumers until the next major. */
|
|
1477
|
-
type DeprecatedCommandClient = {
|
|
1478
|
-
/**
|
|
1479
|
-
* @deprecated Renamed to `orientation`. Delegates to it and returns the legacy
|
|
1480
|
-
* `action: 'rotate'` response contract. Retained until the next major version.
|
|
1481
|
-
*/
|
|
1482
|
-
rotate: (options: RotateCommandOptions) => Promise<RotateCommandResult>;
|
|
1483
|
-
};
|
|
1484
|
-
type AgentDeviceClient = {
|
|
1485
|
-
command: AgentDeviceCommandClient;
|
|
1486
|
-
devices: {
|
|
1487
|
-
list: (options?: AgentDeviceRequestOverrides & AgentDeviceSelectionOptions) => Promise<AgentDeviceDevice[]>;
|
|
1488
|
-
capabilities: (options?: AgentDeviceRequestOverrides & AgentDeviceSelectionOptions) => Promise<AgentDeviceCapabilitiesResult>;
|
|
1489
|
-
boot: (options?: DeviceBootOptions) => Promise<CommandResult<'boot'>>;
|
|
1490
|
-
shutdown: (options?: DeviceShutdownOptions) => Promise<CommandResult<'shutdown'>>;
|
|
1491
|
-
};
|
|
1492
|
-
sessions: {
|
|
1493
|
-
list: (options?: AgentDeviceRequestOverrides) => Promise<AgentDeviceSession[]>;
|
|
1494
|
-
stateDir: (options?: AgentDeviceRequestOverrides & Pick<AgentDeviceClientConfig, 'stateDir'>) => Promise<string>;
|
|
1495
|
-
close: (options?: AgentDeviceRequestOverrides & {
|
|
1496
|
-
shutdown?: boolean;
|
|
1497
|
-
saveScript?: boolean | string;
|
|
1498
|
-
/** #1258: overwrite an existing --save-script target instead of refusing. Alias: --overwrite. */
|
|
1499
|
-
force?: boolean;
|
|
1500
|
-
}) => Promise<SessionCloseResult>;
|
|
1501
|
-
saveScript: (options?: SessionSaveScriptOptions) => Promise<SessionSaveScriptResult>;
|
|
1502
|
-
artifacts: (options?: CloudArtifactsOptions) => Promise<AgentArtifactsResult>;
|
|
1503
|
-
};
|
|
1504
|
-
apps: {
|
|
1505
|
-
install: (options: AppInstallOptions) => Promise<AppDeployResult>;
|
|
1506
|
-
reinstall: (options: AppDeployOptions) => Promise<AppDeployResult>;
|
|
1507
|
-
installFromSource: (options: AppInstallFromSourceOptions) => Promise<AppInstallFromSourceResult>;
|
|
1508
|
-
list: (options?: AppListOptions) => Promise<string[]>;
|
|
1509
|
-
open: (options: AppOpenOptions) => Promise<AppOpenResult>;
|
|
1510
|
-
close: (options?: AppCloseOptions) => Promise<AppCloseResult>;
|
|
1511
|
-
push: (options: AppPushOptions) => Promise<CommandResult<'push'>>;
|
|
1512
|
-
triggerEvent: (options: AppTriggerEventOptions) => Promise<CommandResult<'trigger-app-event'>>;
|
|
1513
|
-
};
|
|
1514
|
-
materializations: {
|
|
1515
|
-
release: (options: MaterializationReleaseOptions) => Promise<MaterializationReleaseResult>;
|
|
1516
|
-
};
|
|
1517
|
-
leases: {
|
|
1518
|
-
allocate: (options: LeaseAllocateOptions) => Promise<Lease>;
|
|
1519
|
-
heartbeat: (options: LeaseScopedOptions) => Promise<Lease>;
|
|
1520
|
-
release: (options: LeaseScopedOptions) => Promise<{
|
|
1521
|
-
released: boolean;
|
|
1522
|
-
provider?: CloudProviderSessionResult;
|
|
1523
|
-
}>;
|
|
1524
|
-
};
|
|
1525
|
-
metro: {
|
|
1526
|
-
prepare: (options: MetroPrepareOptions) => Promise<MetroPrepareResult>;
|
|
1527
|
-
reload: (options?: MetroReloadOptions) => Promise<MetroReloadResult>;
|
|
1528
|
-
};
|
|
1529
|
-
capture: {
|
|
1530
|
-
snapshot: (options?: CaptureSnapshotOptions) => Promise<CaptureSnapshotResult>;
|
|
1531
|
-
screenshot: (options?: CaptureScreenshotOptions) => Promise<CaptureScreenshotResult>;
|
|
1532
|
-
diff: (options: CaptureDiffOptions) => Promise<CommandResult<'diff'>>;
|
|
1533
|
-
};
|
|
1534
|
-
interactions: {
|
|
1535
|
-
click: (options: ClickOptions) => Promise<CommandResult<'click'>>;
|
|
1536
|
-
press: (options: PressOptions) => Promise<CommandResult<'press'>>;
|
|
1537
|
-
longPress: (options: LongPressOptions) => Promise<CommandResult<'longpress'>>;
|
|
1538
|
-
swipe: (options: SwipeOptions) => Promise<CommandRequestResult>;
|
|
1539
|
-
pan: (options: PanOptions) => Promise<CommandRequestResult>;
|
|
1540
|
-
drag: (options: DragOptions) => Promise<CommandRequestResult>;
|
|
1541
|
-
fling: (options: FlingOptions) => Promise<CommandRequestResult>;
|
|
1542
|
-
swipeGesture: (options: SwipeGestureOptions) => Promise<CommandRequestResult>;
|
|
1543
|
-
focus: (options: FocusOptions) => Promise<CommandRequestResult>;
|
|
1544
|
-
type: (options: TypeTextOptions) => Promise<CommandRequestResult>;
|
|
1545
|
-
fill: (options: FillOptions) => Promise<CommandResult<'fill'>>;
|
|
1546
|
-
scroll: (options: ScrollOptions) => Promise<CommandRequestResult>;
|
|
1547
|
-
pinch: (options: PinchOptions) => Promise<CommandRequestResult>;
|
|
1548
|
-
rotateGesture: (options: RotateGestureOptions) => Promise<CommandRequestResult>;
|
|
1549
|
-
transformGesture: (options: TransformGestureOptions) => Promise<CommandRequestResult>;
|
|
1550
|
-
get: (options: GetOptions) => Promise<CommandRequestResult>;
|
|
1551
|
-
is: (options: IsOptions) => Promise<CommandRequestResult>;
|
|
1552
|
-
find: (options: FindOptions) => Promise<CommandResult<'find'>>;
|
|
1553
|
-
};
|
|
1554
|
-
replay: {
|
|
1555
|
-
run: (options: ReplayRunOptions) => Promise<CommandResult<'replay'>>;
|
|
1556
|
-
test: (options: ReplayTestOptions) => Promise<CommandResult<'test'>>;
|
|
1557
|
-
};
|
|
1558
|
-
batch: {
|
|
1559
|
-
run: (options: BatchRunOptions) => Promise<BatchRunResult>;
|
|
1560
|
-
};
|
|
1561
|
-
observability: {
|
|
1562
|
-
perf: (options?: PerfOptions) => Promise<CommandRequestResult>;
|
|
1563
|
-
logs: (options?: LogsOptions) => Promise<CommandRequestResult>;
|
|
1564
|
-
events: (options?: EventsOptions) => Promise<CommandRequestResult>;
|
|
1565
|
-
network: (options?: NetworkOptions) => Promise<CommandRequestResult>;
|
|
1566
|
-
audio: (options?: AudioOptions) => Promise<CommandRequestResult>;
|
|
1567
|
-
};
|
|
1568
|
-
debug: {
|
|
1569
|
-
symbols: (options: DebugSymbolsOptions) => Promise<DebugSymbolsResult>;
|
|
1570
|
-
};
|
|
1571
|
-
recording: {
|
|
1572
|
-
record: (options: RecordOptions) => Promise<CommandResult<'record'>>;
|
|
1573
|
-
trace: (options: TraceOptions) => Promise<CommandResult<'trace'>>;
|
|
1574
|
-
};
|
|
1575
|
-
settings: {
|
|
1576
|
-
update: (options: SettingsUpdateOptions) => Promise<CommandRequestResult>;
|
|
1577
|
-
};
|
|
1578
|
-
};
|
|
1579
|
-
//#endregion
|
|
1580
4
|
//#region src/agent-device-client.d.ts
|
|
1581
5
|
declare function createAgentDeviceClient(config?: AgentDeviceClientConfig, deps?: {
|
|
1582
6
|
transport?: AgentDeviceDaemonTransport;
|