@oniroproject/core 0.12.0 → 0.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -1008,13 +1008,20 @@ interface SendInputOptions {
1008
1008
  pxY2?: number;
1009
1009
  /** Velocity for swipe/drag/fling. */
1010
1010
  speed?: number;
1011
- /** Key id or symbolic name (Back/Home/Power) for keyEvent. */
1011
+ /** Key for keyEvent: a KeyCode id, a name (Back, Delete, Enter, …), or a combo like `Ctrl+A`. See {@link resolveKeyEvent}. */
1012
1012
  key?: string | number;
1013
1013
  /** Text for inputText. */
1014
1014
  text?: string;
1015
1015
  deviceSerial?: string;
1016
1016
  logger?: Logger;
1017
1017
  }
1018
+ /**
1019
+ * Resolve a key spec to `uitest uiInput keyEvent` arguments. Accepts uitest's
1020
+ * own names (Back/Home/Power), numeric KeyCode ids, named keys (Delete, Enter,
1021
+ * Tab, Escape, MoveHome, …), single letters, and combos of up to three keys
1022
+ * joined by "+" (e.g. `Ctrl+A`) or given as space-separated ids. Pure.
1023
+ */
1024
+ declare function resolveKeyEvent(key: string | number): string;
1018
1025
  /**
1019
1026
  * Build the `uitest uiInput …` command for an input action, in pixel space.
1020
1027
  * Pure (no I/O) so it is unit-testable. Mirrors the proven MCP construction
@@ -1125,6 +1132,8 @@ interface LayoutNode {
1125
1132
  type?: string;
1126
1133
  text?: string;
1127
1134
  desc?: string;
1135
+ /** Placeholder text, e.g. an empty TextInput's "you@example.com". */
1136
+ hint?: string;
1128
1137
  id?: string;
1129
1138
  key?: string;
1130
1139
  bundle?: string;
@@ -1135,28 +1144,105 @@ interface LayoutNode {
1135
1144
  focus?: boolean;
1136
1145
  scroll?: boolean;
1137
1146
  longClick?: boolean;
1147
+ /** The component is disabled (`enabled: false`). */
1148
+ disabled?: boolean;
1149
+ /** The node's center is painted over by a later filled node (an overlay, a
1150
+ * dialog scrim, the soft keyboard), so a tap there would land on that instead. */
1151
+ covered?: boolean;
1138
1152
  children?: LayoutNode[];
1139
1153
  }
1154
+ /** The soft keyboard, when an input-method window is on screen. */
1155
+ interface KeyboardState {
1156
+ shown: boolean;
1157
+ /** Bundle of the input-method window. */
1158
+ bundle?: string;
1159
+ /** Bounds [x1,y1,x2,y2] normalized to 0–1 of the display. */
1160
+ b?: [number, number, number, number];
1161
+ }
1140
1162
  interface DumpLayoutResult {
1141
1163
  display: DisplaySize | null;
1142
1164
  tree: LayoutNode;
1165
+ /** Present when the dump was asked to detect the soft keyboard. */
1166
+ keyboard?: KeyboardState;
1143
1167
  }
1144
1168
  /** Parse a uitest bounds string `"[x1,y1][x2,y2]"` into a tuple, or null. */
1145
1169
  declare function parseBounds(s: string | undefined): [number, number, number, number] | null;
1170
+ /**
1171
+ * Find nodes whose center is painted over by a later node with a visible
1172
+ * background fill — a full-screen overlay, a dialog scrim, a sticky bar, or the
1173
+ * soft-keyboard window. Paint order is depth-first, siblings ordered by
1174
+ * `zIndex`, windows in dump order; ancestors and descendants never cover a node.
1175
+ *
1176
+ * A heuristic: only background fills count (an Image or Text drawn on top does
1177
+ * not), which is what overlays in practice use.
1178
+ */
1179
+ declare function findCoveredNodes(root: RawLayoutNode): Set<RawLayoutNode>;
1146
1180
  /**
1147
1181
  * Prune a raw `uitest dumpLayout` tree into a compact, signal-bearing tree with
1148
1182
  * bounds/center normalized to 0–1 of the display. Structural wrapper nodes with
1149
1183
  * no signal collapse into their children. Returns a node, a flat list of nodes
1150
1184
  * (collapsed wrapper with multiple children), or null (nothing useful). Ported
1151
- * verbatim from the proven MCP `pruneNode`.
1185
+ * from the proven MCP `pruneNode`; `covered` (from {@link findCoveredNodes})
1186
+ * marks nodes hidden under an overlay.
1187
+ */
1188
+ declare function pruneLayout(node: RawLayoutNode, display: DisplaySize | null, covered?: ReadonlySet<RawLayoutNode>): LayoutNode | LayoutNode[] | null;
1189
+ /** A pruned layout node without children, tagged with the window it belongs to. */
1190
+ interface FlatLayoutNode extends Omit<LayoutNode, 'children'> {
1191
+ /** Bundle of the enclosing window (the nearest node carrying `bundle`). */
1192
+ window?: string;
1193
+ }
1194
+ /** Flatten a pruned layout tree into a depth-first (paint-order) list. */
1195
+ declare function flattenLayout(tree: LayoutNode): FlatLayoutNode[];
1196
+ /** Selects layout nodes by what an agent can read off the screen. */
1197
+ interface LayoutSelector {
1198
+ /** Matches `text`, `desc`, or `hint`: case-insensitive exact matches win; otherwise substring matches. */
1199
+ text?: string;
1200
+ /** Matches `id` or `key` exactly. */
1201
+ id?: string;
1202
+ /** Restricts to a component type (e.g. `Button`, `TextInput`); case-insensitive. */
1203
+ type?: string;
1204
+ }
1205
+ /** Throw unless `selector` constrains something: a non-blank text, an id, or a type. */
1206
+ declare function assertLayoutSelector(selector: LayoutSelector): void;
1207
+ /**
1208
+ * The tree without the windows owned by `bundle` — e.g. the soft keyboard, whose
1209
+ * keys ("Done", "9") would otherwise match element selectors. Pure.
1210
+ */
1211
+ declare function withoutWindow(tree: LayoutNode, bundle: string): LayoutNode;
1212
+ /**
1213
+ * Find the nodes matching `selector` in a pruned layout tree, in paint order.
1214
+ * For `text`, exact (case-insensitive, trimmed) matches are returned when any
1215
+ * exist; otherwise substring matches. Covered nodes are included — callers
1216
+ * decide what to do with them (see {@link pickTarget}).
1152
1217
  */
1153
- declare function pruneLayout(node: RawLayoutNode, display: DisplaySize | null): LayoutNode | LayoutNode[] | null;
1218
+ declare function findLayoutNodes(tree: LayoutNode, selector: LayoutSelector): FlatLayoutNode[];
1219
+ /** One-line summary of a node, used in errors and logs. */
1220
+ declare function describeLayoutNode(n: FlatLayoutNode): string;
1221
+ /** Why {@link pickTarget} could not choose a node. */
1222
+ type PickTargetFailure = 'none' | 'covered' | 'ambiguous';
1223
+ declare class TargetNotFoundError extends OniroError {
1224
+ readonly reason: PickTargetFailure;
1225
+ constructor(message: string, reason: PickTargetFailure);
1226
+ }
1227
+ /**
1228
+ * Choose the single node to act on for `selector`. Covered nodes are skipped;
1229
+ * clickable matches are preferred over plain ones (a "Sign in" Button over the
1230
+ * "Sign in" title); a match nested inside another clickable match collapses
1231
+ * into it. `index` picks among what remains, in paint order. Throws
1232
+ * {@link TargetNotFoundError} when nothing (or more than one node) qualifies.
1233
+ */
1234
+ declare function pickTarget(tree: LayoutNode, selector: LayoutSelector, index?: number): FlatLayoutNode;
1154
1235
  interface DumpLayoutOptions {
1155
1236
  config: ConfigProvider;
1156
1237
  /** Filter to a single window/bundle (`uitest dumpLayout -b '<bundle>'`). */
1157
1238
  bundleName?: string;
1158
1239
  /** When false, return the parsed-but-unpruned tree. Default true. */
1159
1240
  prune?: boolean;
1241
+ /**
1242
+ * Also report whether the soft keyboard is on screen (one extra `hidumper` call).
1243
+ * Ignored with `bundleName`, which filters the keyboard window out of the dump.
1244
+ */
1245
+ detectKeyboard?: boolean;
1160
1246
  deviceSerial?: string;
1161
1247
  timeoutMs?: number;
1162
1248
  logger?: Logger;
@@ -1167,6 +1253,125 @@ interface DumpLayoutOptions {
1167
1253
  */
1168
1254
  declare function dumpLayout(opts: DumpLayoutOptions): Promise<DumpLayoutResult>;
1169
1255
 
1256
+ /**
1257
+ * Extract input-method bundle names from `hidumper -s 3703 -a -a` output, whose
1258
+ * `imeList` entries look like `"ime": "com.example.kikakeyboard/ServiceExtAbility"`.
1259
+ * The current IME comes first. Pure.
1260
+ */
1261
+ declare function parseImeBundles(output: string): string[];
1262
+ /**
1263
+ * List the installed input-method bundles (current first). Empty when hidumper
1264
+ * fails or times out, so keyboard detection never fails the caller.
1265
+ */
1266
+ declare function getImeBundles(config: ConfigProvider, opts?: {
1267
+ deviceSerial?: string;
1268
+ logger?: Logger;
1269
+ }): Promise<string[]>;
1270
+ /**
1271
+ * Find the input-method window in a pruned layout tree. uitest lists the soft
1272
+ * keyboard as its own window (a node carrying the IME's `bundle`) only while it
1273
+ * is shown. With no known IME bundles, falls back to a name heuristic. Pure.
1274
+ */
1275
+ declare function findKeyboardWindow(tree: LayoutNode, imeBundles: readonly string[]): LayoutNode | null;
1276
+
1277
+ /** `uitest uiInput` actions plus the composite ones built on top of them. */
1278
+ type UiInputType = InputType | 'clearText' | 'hideKeyboard';
1279
+ interface DeviceOptions {
1280
+ config: ConfigProvider;
1281
+ deviceSerial?: string;
1282
+ logger?: Logger;
1283
+ }
1284
+ /**
1285
+ * Dismiss the soft keyboard with Back — only when it is actually on screen, since
1286
+ * Back without a keyboard navigates away. Returns whether a keyboard was dismissed.
1287
+ */
1288
+ declare function hideKeyboard(opts: DeviceOptions): Promise<boolean>;
1289
+ interface LocateTargetOptions extends DeviceOptions {
1290
+ selector: LayoutSelector;
1291
+ /** Picks among several matching elements (see {@link pickTarget}). */
1292
+ index?: number;
1293
+ /**
1294
+ * When the soft keyboard is up and the target is missing, covered, or matches
1295
+ * only a non-clickable label (the button may be hidden below the keyboard),
1296
+ * dismiss the keyboard and look again. Default true.
1297
+ */
1298
+ hideKeyboard?: boolean;
1299
+ }
1300
+ interface LocatedTarget {
1301
+ node: FlatLayoutNode;
1302
+ /** Center of the element in device pixels. */
1303
+ x: number;
1304
+ y: number;
1305
+ display: DisplaySize;
1306
+ /** The soft keyboard was dismissed to reach the element. */
1307
+ keyboardHidden: boolean;
1308
+ }
1309
+ /**
1310
+ * Resolve a selector against the live layout to one element and its pixel
1311
+ * center. Keys on the soft keyboard are not candidates.
1312
+ */
1313
+ declare function locateTarget(opts: LocateTargetOptions): Promise<LocatedTarget>;
1314
+ interface PerformInputOptions extends DeviceOptions {
1315
+ type: UiInputType;
1316
+ /** Start point in device pixels. */
1317
+ pxX?: number;
1318
+ pxY?: number;
1319
+ /** End point in device pixels (swipe/drag/fling). */
1320
+ pxX2?: number;
1321
+ pxY2?: number;
1322
+ /** Start point as 0–1 fractions of the display. */
1323
+ fx?: number;
1324
+ fy?: number;
1325
+ /** End point as 0–1 fractions of the display. */
1326
+ fx2?: number;
1327
+ fy2?: number;
1328
+ /** Start point: the center of the element matching this selector. */
1329
+ target?: LayoutSelector;
1330
+ /** Picks among several elements matching `target`. */
1331
+ targetIndex?: number;
1332
+ /** Velocity for swipe/drag/fling. */
1333
+ speed?: number;
1334
+ /** Key for keyEvent (see `resolveKeyEvent`). */
1335
+ key?: string | number;
1336
+ /** Text for inputText. */
1337
+ text?: string;
1338
+ /** inputText: clear the field before typing. */
1339
+ clear?: boolean;
1340
+ /** Dismiss the soft keyboard after the action, if it is up. */
1341
+ hideKeyboard?: boolean;
1342
+ }
1343
+ interface PerformInputResult {
1344
+ /** Resolved start point in device pixels, when the action has one. */
1345
+ x?: number;
1346
+ y?: number;
1347
+ /** The element `target` resolved to. */
1348
+ target?: FlatLayoutNode;
1349
+ /** The soft keyboard was dismissed (to reach the target, or because it was asked to). */
1350
+ keyboardHidden: boolean;
1351
+ }
1352
+ /**
1353
+ * Perform a UI input action. Beyond the raw `uitest uiInput` primitives, this
1354
+ * resolves the start point from an element selector (`target`), 0–1 display
1355
+ * fractions, or pixels; clears text fields (Ctrl+A, Delete); and dismisses the
1356
+ * soft keyboard only when it is up.
1357
+ */
1358
+ declare function performInput(opts: PerformInputOptions): Promise<PerformInputResult>;
1359
+ interface WaitForTargetOptions extends DeviceOptions {
1360
+ selector: LayoutSelector;
1361
+ /** Wait until no uncovered element matches, instead of until one does. */
1362
+ gone?: boolean;
1363
+ timeoutMs: number;
1364
+ /** Poll interval. Default 500 (each poll is a full layout dump). */
1365
+ pollMs?: number;
1366
+ abortSignal?: AbortSignal;
1367
+ }
1368
+ /**
1369
+ * Poll the layout until an uncovered element matches `selector` (resolving with
1370
+ * it), or with `gone`, until none does (resolving null). Keys on the soft
1371
+ * keyboard are ignored. Throws on timeout.
1372
+ */
1373
+ declare function waitForTarget(opts: WaitForTargetOptions): Promise<FlatLayoutNode | null>;
1374
+
1170
1375
  /**
1171
1376
  * Read the project's bundle name from `AppScope/app.json5`.
1172
1377
  */
@@ -2069,4 +2274,4 @@ declare function harmonyOsAutoSign(opts: HarmonyOsAutoSignOptions): Promise<Harm
2069
2274
 
2070
2275
  declare const VERSION: string;
2071
2276
 
2072
- export { ALL_SDKS, APL_VALUES, APP_FEATURE_VALUES, type AbilityInfo, type AgcAuthInfo, AgcError, type Apl, type AppFeature, type ApplyChangesOptions, type ApplyChangesResult, type BuildHapOptions, type BuildHapResult, type BundleOptions, CancelledError, type CaptureBurstOptions, ChecksumMismatchError, CmdToolsNotInstalledError, type CmdToolsStatus, type CmdWrapper, type CodelinterFinding, type CodelinterResult, CommandFailedError, type ConfigKey, type ConfigProvider, type CreateScaffoldOptions, type CreateScaffoldResult, type DeveloperAgreementStatus, type DeviceFullInfo, type DeviceInfo, type DiscoverHapsOptions, type DisplaySize, type DisplaySizeOptions, type DownloadOptions, type DumpLayoutOptions, type DumpLayoutResult, type DumpLogOptions, type ExtractZipOptions, type GenerateSigningConfigsOptions, type GestureUitestOptions, type GetDeviceInfoOptions, HARMONYOS_SDK_VERSIONS, HUAWEI_SITES, type HapAssetDiff, type HarmonyOsAutoSignOptions, type HarmonyOsSdk, type HarmonyOsSession, type HarmonyOsSessionOptions, type HarmonyOsSigningResult, type HdcExecOptions, type HdcExecResult, type HdcShellOptions, type HidumperOptions, type HilogEntry, type HilogLevel, type HuaweiSite, type HuaweiSiteCode, type HuaweiTeam, type HuaweiUserInfo, INSTALL_TMP_DIRNAME, type InputType, type InstallAppOptions, type InstallAppResult, type InstallCmdToolsOptions, type InstallEmulatorOptions, type InstallMethod, type InstallSdkOptions, type InstallTempDir, type InstallTempDirOptions, InsufficientSpaceError, type LaunchAppOptions, type LayoutNode, type Logger, type ModuleHaps, OHOS_URL_BASE, type OniroContext, OniroError, type OsFolder, type OutputSink, type ParamOptions, type PrepareSigningOptions, type PrepareSigningResult, type ProgressReporter, type ProgressUpdate, type ProjectModule, type Prompter, type ProvisionProfileInfo, type RawLayoutNode, type RawTouchEvent, type RebootDecision, type RebootOptions, type RecvFileOptions, type RunCodelinterOptions, type RunHvigorwOptions, type RunHvigorwResult, type RunOhpmOptions, type RunProcessOptions, type RunningProcess, type RuntimeOs, SIGNING_ERRORS, type ScreenDump, type Screenshot, type ScreenshotOptions, type SdkArchiveInfo, type SdkInfo, SdkNotInstalledError, type SdkRelease, type SendFileOptions, type SendGestureOptions, type SendInputOptions, type SendRawTouchOptions, type SetHilogLevelOptions, type SigningKind, type SigningMaterialPaths, type SigningPasswords, type StartEmulatorOptions, type StoredSession, type StreamHilogOptions, TMP_DIR_HINT, type TemplateOption, type TokenStore, UnsupportedPlatformError, VERSION, type WaitForBootOptions, type WaitForBundleOptions, type WaitForConditionOptions, type WaitForLogOptions, type WatchLogOptions, type Waypoint, applyChanges, attemptHdcConnection, buildCmdWrapper, buildGestureCommands, buildGestureUitestCommand, buildHap, buildHvigorwArgs, buildInputCommand, buildRawTouchCommand, captureBurst, consoleLogger, createHarmonyOsSession, createInstallTempDir, createMaterial, createScaffold, createTempWorkDir, createTokenStore, decideInstallMethod, decideReboot, decryptPwd, dedupEntries, defaultContext, defaultPaths, detectAaStartFailure, detectProjectSdkVersion, detectRuntimeOs, detectSigningConfigNames, diffEntryNames, diffHapAssets, discoverHaps, downloadAndInstallSdk, downloadFile, dumpLayout, dumpLog, dumpRenderService, dumpScreen, dumpWindow, encryptPwd, ensureFreeSpace, ensureOhModules, ensureOk, ensureRemoteOk, escapeCmdArgument, escapeCmdCommand, extractTarball, extractZipWithProgress, findAppProcessId, findCmdToolsSourceDir, findHarmonyOsSdk, findRunningProcess, forceStop, formatBytes, generateSigningConfigs, getBundleName, getCmdToolsBin, getCmdToolsDownloadUrl, getCmdToolsPath, getCmdToolsStatus, getDeviceInfo, getDisplaySize, getEmulatorDir, getFreeSpaceBytes, getHdcPath, getHvigorwPath, getInstalledSdks, getKey, getMainAbility, getOhosBaseSdkHome, getOhpmPath, getOsFolder, getSdkFilename, getSdkRootDir, getSupportedSdksForUi, harmonyOsAutoSign, harmonyOsSdkLabelForApi, hdcExec, installApp, installCmdTools, installEmulator, isCmdToolsInstalled, isEmulatorInstalled, isOutOfSpaceError, isRamBackedPath, isValidBundleName, isValidProjectName, killProcessTree, launchApp, listAbilities, listDevices, listModules, listRunningProcesses, listTemplates, needsCmdWrapper, nonInteractivePrompter, noopLogger, noopProgress, paramGet, paramSet, parseBounds, parseCodelinterFindings, parseDeviceList, parseHilogLine, parseMainAbilityFromBmDump, parseRemoteExit, pickSigningKind, prepareSigning, pruneLayout, readJson5File, readJsonFile, readProvisionProfile, reboot, recvFile, removeCmdTools, removeEmulator, removeSdk, removeTempWorkDir, requireHarmonyOsSdk, resolveTmpRoot, runCodelinter, runHvigorw, runOhpm, runProcess, scopedLogger, selectDevice, sendFile, sendGesture, sendInput, sendRawTouch, setHilogLevel, shell, shellChecked, spawnCompat, startEmulator, staticConfig, stopEmulator, streamHilog, takeScreenshot, toLongPath, toSpaceError, uninstallApp, validateTemplateLayout, verifySha256, waitForBoot, waitForBundle, waitForCondition, waitForLog, watchLog, waypointsToRawEvents, writeJson5File, writeJsonFile };
2277
+ export { ALL_SDKS, APL_VALUES, APP_FEATURE_VALUES, type AbilityInfo, type AgcAuthInfo, AgcError, type Apl, type AppFeature, type ApplyChangesOptions, type ApplyChangesResult, type BuildHapOptions, type BuildHapResult, type BundleOptions, CancelledError, type CaptureBurstOptions, ChecksumMismatchError, CmdToolsNotInstalledError, type CmdToolsStatus, type CmdWrapper, type CodelinterFinding, type CodelinterResult, CommandFailedError, type ConfigKey, type ConfigProvider, type CreateScaffoldOptions, type CreateScaffoldResult, type DeveloperAgreementStatus, type DeviceFullInfo, type DeviceInfo, type DiscoverHapsOptions, type DisplaySize, type DisplaySizeOptions, type DownloadOptions, type DumpLayoutOptions, type DumpLayoutResult, type DumpLogOptions, type ExtractZipOptions, type FlatLayoutNode, type GenerateSigningConfigsOptions, type GestureUitestOptions, type GetDeviceInfoOptions, HARMONYOS_SDK_VERSIONS, HUAWEI_SITES, type HapAssetDiff, type HarmonyOsAutoSignOptions, type HarmonyOsSdk, type HarmonyOsSession, type HarmonyOsSessionOptions, type HarmonyOsSigningResult, type HdcExecOptions, type HdcExecResult, type HdcShellOptions, type HidumperOptions, type HilogEntry, type HilogLevel, type HuaweiSite, type HuaweiSiteCode, type HuaweiTeam, type HuaweiUserInfo, INSTALL_TMP_DIRNAME, type InputType, type InstallAppOptions, type InstallAppResult, type InstallCmdToolsOptions, type InstallEmulatorOptions, type InstallMethod, type InstallSdkOptions, type InstallTempDir, type InstallTempDirOptions, InsufficientSpaceError, type KeyboardState, type LaunchAppOptions, type LayoutNode, type LayoutSelector, type LocateTargetOptions, type LocatedTarget, type Logger, type ModuleHaps, OHOS_URL_BASE, type OniroContext, OniroError, type OsFolder, type OutputSink, type ParamOptions, type PerformInputOptions, type PerformInputResult, type PickTargetFailure, type PrepareSigningOptions, type PrepareSigningResult, type ProgressReporter, type ProgressUpdate, type ProjectModule, type Prompter, type ProvisionProfileInfo, type RawLayoutNode, type RawTouchEvent, type RebootDecision, type RebootOptions, type RecvFileOptions, type RunCodelinterOptions, type RunHvigorwOptions, type RunHvigorwResult, type RunOhpmOptions, type RunProcessOptions, type RunningProcess, type RuntimeOs, SIGNING_ERRORS, type ScreenDump, type Screenshot, type ScreenshotOptions, type SdkArchiveInfo, type SdkInfo, SdkNotInstalledError, type SdkRelease, type SendFileOptions, type SendGestureOptions, type SendInputOptions, type SendRawTouchOptions, type SetHilogLevelOptions, type SigningKind, type SigningMaterialPaths, type SigningPasswords, type StartEmulatorOptions, type StoredSession, type StreamHilogOptions, TMP_DIR_HINT, TargetNotFoundError, type TemplateOption, type TokenStore, type UiInputType, UnsupportedPlatformError, VERSION, type WaitForBootOptions, type WaitForBundleOptions, type WaitForConditionOptions, type WaitForLogOptions, type WaitForTargetOptions, type WatchLogOptions, type Waypoint, applyChanges, assertLayoutSelector, attemptHdcConnection, buildCmdWrapper, buildGestureCommands, buildGestureUitestCommand, buildHap, buildHvigorwArgs, buildInputCommand, buildRawTouchCommand, captureBurst, consoleLogger, createHarmonyOsSession, createInstallTempDir, createMaterial, createScaffold, createTempWorkDir, createTokenStore, decideInstallMethod, decideReboot, decryptPwd, dedupEntries, defaultContext, defaultPaths, describeLayoutNode, detectAaStartFailure, detectProjectSdkVersion, detectRuntimeOs, detectSigningConfigNames, diffEntryNames, diffHapAssets, discoverHaps, downloadAndInstallSdk, downloadFile, dumpLayout, dumpLog, dumpRenderService, dumpScreen, dumpWindow, encryptPwd, ensureFreeSpace, ensureOhModules, ensureOk, ensureRemoteOk, escapeCmdArgument, escapeCmdCommand, extractTarball, extractZipWithProgress, findAppProcessId, findCmdToolsSourceDir, findCoveredNodes, findHarmonyOsSdk, findKeyboardWindow, findLayoutNodes, findRunningProcess, flattenLayout, forceStop, formatBytes, generateSigningConfigs, getBundleName, getCmdToolsBin, getCmdToolsDownloadUrl, getCmdToolsPath, getCmdToolsStatus, getDeviceInfo, getDisplaySize, getEmulatorDir, getFreeSpaceBytes, getHdcPath, getHvigorwPath, getImeBundles, getInstalledSdks, getKey, getMainAbility, getOhosBaseSdkHome, getOhpmPath, getOsFolder, getSdkFilename, getSdkRootDir, getSupportedSdksForUi, harmonyOsAutoSign, harmonyOsSdkLabelForApi, hdcExec, hideKeyboard, installApp, installCmdTools, installEmulator, isCmdToolsInstalled, isEmulatorInstalled, isOutOfSpaceError, isRamBackedPath, isValidBundleName, isValidProjectName, killProcessTree, launchApp, listAbilities, listDevices, listModules, listRunningProcesses, listTemplates, locateTarget, needsCmdWrapper, nonInteractivePrompter, noopLogger, noopProgress, paramGet, paramSet, parseBounds, parseCodelinterFindings, parseDeviceList, parseHilogLine, parseImeBundles, parseMainAbilityFromBmDump, parseRemoteExit, performInput, pickSigningKind, pickTarget, prepareSigning, pruneLayout, readJson5File, readJsonFile, readProvisionProfile, reboot, recvFile, removeCmdTools, removeEmulator, removeSdk, removeTempWorkDir, requireHarmonyOsSdk, resolveKeyEvent, resolveTmpRoot, runCodelinter, runHvigorw, runOhpm, runProcess, scopedLogger, selectDevice, sendFile, sendGesture, sendInput, sendRawTouch, setHilogLevel, shell, shellChecked, spawnCompat, startEmulator, staticConfig, stopEmulator, streamHilog, takeScreenshot, toLongPath, toSpaceError, uninstallApp, validateTemplateLayout, verifySha256, waitForBoot, waitForBundle, waitForCondition, waitForLog, waitForTarget, watchLog, waypointsToRawEvents, withoutWindow, writeJson5File, writeJsonFile };
package/dist/index.d.ts CHANGED
@@ -1008,13 +1008,20 @@ interface SendInputOptions {
1008
1008
  pxY2?: number;
1009
1009
  /** Velocity for swipe/drag/fling. */
1010
1010
  speed?: number;
1011
- /** Key id or symbolic name (Back/Home/Power) for keyEvent. */
1011
+ /** Key for keyEvent: a KeyCode id, a name (Back, Delete, Enter, …), or a combo like `Ctrl+A`. See {@link resolveKeyEvent}. */
1012
1012
  key?: string | number;
1013
1013
  /** Text for inputText. */
1014
1014
  text?: string;
1015
1015
  deviceSerial?: string;
1016
1016
  logger?: Logger;
1017
1017
  }
1018
+ /**
1019
+ * Resolve a key spec to `uitest uiInput keyEvent` arguments. Accepts uitest's
1020
+ * own names (Back/Home/Power), numeric KeyCode ids, named keys (Delete, Enter,
1021
+ * Tab, Escape, MoveHome, …), single letters, and combos of up to three keys
1022
+ * joined by "+" (e.g. `Ctrl+A`) or given as space-separated ids. Pure.
1023
+ */
1024
+ declare function resolveKeyEvent(key: string | number): string;
1018
1025
  /**
1019
1026
  * Build the `uitest uiInput …` command for an input action, in pixel space.
1020
1027
  * Pure (no I/O) so it is unit-testable. Mirrors the proven MCP construction
@@ -1125,6 +1132,8 @@ interface LayoutNode {
1125
1132
  type?: string;
1126
1133
  text?: string;
1127
1134
  desc?: string;
1135
+ /** Placeholder text, e.g. an empty TextInput's "you@example.com". */
1136
+ hint?: string;
1128
1137
  id?: string;
1129
1138
  key?: string;
1130
1139
  bundle?: string;
@@ -1135,28 +1144,105 @@ interface LayoutNode {
1135
1144
  focus?: boolean;
1136
1145
  scroll?: boolean;
1137
1146
  longClick?: boolean;
1147
+ /** The component is disabled (`enabled: false`). */
1148
+ disabled?: boolean;
1149
+ /** The node's center is painted over by a later filled node (an overlay, a
1150
+ * dialog scrim, the soft keyboard), so a tap there would land on that instead. */
1151
+ covered?: boolean;
1138
1152
  children?: LayoutNode[];
1139
1153
  }
1154
+ /** The soft keyboard, when an input-method window is on screen. */
1155
+ interface KeyboardState {
1156
+ shown: boolean;
1157
+ /** Bundle of the input-method window. */
1158
+ bundle?: string;
1159
+ /** Bounds [x1,y1,x2,y2] normalized to 0–1 of the display. */
1160
+ b?: [number, number, number, number];
1161
+ }
1140
1162
  interface DumpLayoutResult {
1141
1163
  display: DisplaySize | null;
1142
1164
  tree: LayoutNode;
1165
+ /** Present when the dump was asked to detect the soft keyboard. */
1166
+ keyboard?: KeyboardState;
1143
1167
  }
1144
1168
  /** Parse a uitest bounds string `"[x1,y1][x2,y2]"` into a tuple, or null. */
1145
1169
  declare function parseBounds(s: string | undefined): [number, number, number, number] | null;
1170
+ /**
1171
+ * Find nodes whose center is painted over by a later node with a visible
1172
+ * background fill — a full-screen overlay, a dialog scrim, a sticky bar, or the
1173
+ * soft-keyboard window. Paint order is depth-first, siblings ordered by
1174
+ * `zIndex`, windows in dump order; ancestors and descendants never cover a node.
1175
+ *
1176
+ * A heuristic: only background fills count (an Image or Text drawn on top does
1177
+ * not), which is what overlays in practice use.
1178
+ */
1179
+ declare function findCoveredNodes(root: RawLayoutNode): Set<RawLayoutNode>;
1146
1180
  /**
1147
1181
  * Prune a raw `uitest dumpLayout` tree into a compact, signal-bearing tree with
1148
1182
  * bounds/center normalized to 0–1 of the display. Structural wrapper nodes with
1149
1183
  * no signal collapse into their children. Returns a node, a flat list of nodes
1150
1184
  * (collapsed wrapper with multiple children), or null (nothing useful). Ported
1151
- * verbatim from the proven MCP `pruneNode`.
1185
+ * from the proven MCP `pruneNode`; `covered` (from {@link findCoveredNodes})
1186
+ * marks nodes hidden under an overlay.
1187
+ */
1188
+ declare function pruneLayout(node: RawLayoutNode, display: DisplaySize | null, covered?: ReadonlySet<RawLayoutNode>): LayoutNode | LayoutNode[] | null;
1189
+ /** A pruned layout node without children, tagged with the window it belongs to. */
1190
+ interface FlatLayoutNode extends Omit<LayoutNode, 'children'> {
1191
+ /** Bundle of the enclosing window (the nearest node carrying `bundle`). */
1192
+ window?: string;
1193
+ }
1194
+ /** Flatten a pruned layout tree into a depth-first (paint-order) list. */
1195
+ declare function flattenLayout(tree: LayoutNode): FlatLayoutNode[];
1196
+ /** Selects layout nodes by what an agent can read off the screen. */
1197
+ interface LayoutSelector {
1198
+ /** Matches `text`, `desc`, or `hint`: case-insensitive exact matches win; otherwise substring matches. */
1199
+ text?: string;
1200
+ /** Matches `id` or `key` exactly. */
1201
+ id?: string;
1202
+ /** Restricts to a component type (e.g. `Button`, `TextInput`); case-insensitive. */
1203
+ type?: string;
1204
+ }
1205
+ /** Throw unless `selector` constrains something: a non-blank text, an id, or a type. */
1206
+ declare function assertLayoutSelector(selector: LayoutSelector): void;
1207
+ /**
1208
+ * The tree without the windows owned by `bundle` — e.g. the soft keyboard, whose
1209
+ * keys ("Done", "9") would otherwise match element selectors. Pure.
1210
+ */
1211
+ declare function withoutWindow(tree: LayoutNode, bundle: string): LayoutNode;
1212
+ /**
1213
+ * Find the nodes matching `selector` in a pruned layout tree, in paint order.
1214
+ * For `text`, exact (case-insensitive, trimmed) matches are returned when any
1215
+ * exist; otherwise substring matches. Covered nodes are included — callers
1216
+ * decide what to do with them (see {@link pickTarget}).
1152
1217
  */
1153
- declare function pruneLayout(node: RawLayoutNode, display: DisplaySize | null): LayoutNode | LayoutNode[] | null;
1218
+ declare function findLayoutNodes(tree: LayoutNode, selector: LayoutSelector): FlatLayoutNode[];
1219
+ /** One-line summary of a node, used in errors and logs. */
1220
+ declare function describeLayoutNode(n: FlatLayoutNode): string;
1221
+ /** Why {@link pickTarget} could not choose a node. */
1222
+ type PickTargetFailure = 'none' | 'covered' | 'ambiguous';
1223
+ declare class TargetNotFoundError extends OniroError {
1224
+ readonly reason: PickTargetFailure;
1225
+ constructor(message: string, reason: PickTargetFailure);
1226
+ }
1227
+ /**
1228
+ * Choose the single node to act on for `selector`. Covered nodes are skipped;
1229
+ * clickable matches are preferred over plain ones (a "Sign in" Button over the
1230
+ * "Sign in" title); a match nested inside another clickable match collapses
1231
+ * into it. `index` picks among what remains, in paint order. Throws
1232
+ * {@link TargetNotFoundError} when nothing (or more than one node) qualifies.
1233
+ */
1234
+ declare function pickTarget(tree: LayoutNode, selector: LayoutSelector, index?: number): FlatLayoutNode;
1154
1235
  interface DumpLayoutOptions {
1155
1236
  config: ConfigProvider;
1156
1237
  /** Filter to a single window/bundle (`uitest dumpLayout -b '<bundle>'`). */
1157
1238
  bundleName?: string;
1158
1239
  /** When false, return the parsed-but-unpruned tree. Default true. */
1159
1240
  prune?: boolean;
1241
+ /**
1242
+ * Also report whether the soft keyboard is on screen (one extra `hidumper` call).
1243
+ * Ignored with `bundleName`, which filters the keyboard window out of the dump.
1244
+ */
1245
+ detectKeyboard?: boolean;
1160
1246
  deviceSerial?: string;
1161
1247
  timeoutMs?: number;
1162
1248
  logger?: Logger;
@@ -1167,6 +1253,125 @@ interface DumpLayoutOptions {
1167
1253
  */
1168
1254
  declare function dumpLayout(opts: DumpLayoutOptions): Promise<DumpLayoutResult>;
1169
1255
 
1256
+ /**
1257
+ * Extract input-method bundle names from `hidumper -s 3703 -a -a` output, whose
1258
+ * `imeList` entries look like `"ime": "com.example.kikakeyboard/ServiceExtAbility"`.
1259
+ * The current IME comes first. Pure.
1260
+ */
1261
+ declare function parseImeBundles(output: string): string[];
1262
+ /**
1263
+ * List the installed input-method bundles (current first). Empty when hidumper
1264
+ * fails or times out, so keyboard detection never fails the caller.
1265
+ */
1266
+ declare function getImeBundles(config: ConfigProvider, opts?: {
1267
+ deviceSerial?: string;
1268
+ logger?: Logger;
1269
+ }): Promise<string[]>;
1270
+ /**
1271
+ * Find the input-method window in a pruned layout tree. uitest lists the soft
1272
+ * keyboard as its own window (a node carrying the IME's `bundle`) only while it
1273
+ * is shown. With no known IME bundles, falls back to a name heuristic. Pure.
1274
+ */
1275
+ declare function findKeyboardWindow(tree: LayoutNode, imeBundles: readonly string[]): LayoutNode | null;
1276
+
1277
+ /** `uitest uiInput` actions plus the composite ones built on top of them. */
1278
+ type UiInputType = InputType | 'clearText' | 'hideKeyboard';
1279
+ interface DeviceOptions {
1280
+ config: ConfigProvider;
1281
+ deviceSerial?: string;
1282
+ logger?: Logger;
1283
+ }
1284
+ /**
1285
+ * Dismiss the soft keyboard with Back — only when it is actually on screen, since
1286
+ * Back without a keyboard navigates away. Returns whether a keyboard was dismissed.
1287
+ */
1288
+ declare function hideKeyboard(opts: DeviceOptions): Promise<boolean>;
1289
+ interface LocateTargetOptions extends DeviceOptions {
1290
+ selector: LayoutSelector;
1291
+ /** Picks among several matching elements (see {@link pickTarget}). */
1292
+ index?: number;
1293
+ /**
1294
+ * When the soft keyboard is up and the target is missing, covered, or matches
1295
+ * only a non-clickable label (the button may be hidden below the keyboard),
1296
+ * dismiss the keyboard and look again. Default true.
1297
+ */
1298
+ hideKeyboard?: boolean;
1299
+ }
1300
+ interface LocatedTarget {
1301
+ node: FlatLayoutNode;
1302
+ /** Center of the element in device pixels. */
1303
+ x: number;
1304
+ y: number;
1305
+ display: DisplaySize;
1306
+ /** The soft keyboard was dismissed to reach the element. */
1307
+ keyboardHidden: boolean;
1308
+ }
1309
+ /**
1310
+ * Resolve a selector against the live layout to one element and its pixel
1311
+ * center. Keys on the soft keyboard are not candidates.
1312
+ */
1313
+ declare function locateTarget(opts: LocateTargetOptions): Promise<LocatedTarget>;
1314
+ interface PerformInputOptions extends DeviceOptions {
1315
+ type: UiInputType;
1316
+ /** Start point in device pixels. */
1317
+ pxX?: number;
1318
+ pxY?: number;
1319
+ /** End point in device pixels (swipe/drag/fling). */
1320
+ pxX2?: number;
1321
+ pxY2?: number;
1322
+ /** Start point as 0–1 fractions of the display. */
1323
+ fx?: number;
1324
+ fy?: number;
1325
+ /** End point as 0–1 fractions of the display. */
1326
+ fx2?: number;
1327
+ fy2?: number;
1328
+ /** Start point: the center of the element matching this selector. */
1329
+ target?: LayoutSelector;
1330
+ /** Picks among several elements matching `target`. */
1331
+ targetIndex?: number;
1332
+ /** Velocity for swipe/drag/fling. */
1333
+ speed?: number;
1334
+ /** Key for keyEvent (see `resolveKeyEvent`). */
1335
+ key?: string | number;
1336
+ /** Text for inputText. */
1337
+ text?: string;
1338
+ /** inputText: clear the field before typing. */
1339
+ clear?: boolean;
1340
+ /** Dismiss the soft keyboard after the action, if it is up. */
1341
+ hideKeyboard?: boolean;
1342
+ }
1343
+ interface PerformInputResult {
1344
+ /** Resolved start point in device pixels, when the action has one. */
1345
+ x?: number;
1346
+ y?: number;
1347
+ /** The element `target` resolved to. */
1348
+ target?: FlatLayoutNode;
1349
+ /** The soft keyboard was dismissed (to reach the target, or because it was asked to). */
1350
+ keyboardHidden: boolean;
1351
+ }
1352
+ /**
1353
+ * Perform a UI input action. Beyond the raw `uitest uiInput` primitives, this
1354
+ * resolves the start point from an element selector (`target`), 0–1 display
1355
+ * fractions, or pixels; clears text fields (Ctrl+A, Delete); and dismisses the
1356
+ * soft keyboard only when it is up.
1357
+ */
1358
+ declare function performInput(opts: PerformInputOptions): Promise<PerformInputResult>;
1359
+ interface WaitForTargetOptions extends DeviceOptions {
1360
+ selector: LayoutSelector;
1361
+ /** Wait until no uncovered element matches, instead of until one does. */
1362
+ gone?: boolean;
1363
+ timeoutMs: number;
1364
+ /** Poll interval. Default 500 (each poll is a full layout dump). */
1365
+ pollMs?: number;
1366
+ abortSignal?: AbortSignal;
1367
+ }
1368
+ /**
1369
+ * Poll the layout until an uncovered element matches `selector` (resolving with
1370
+ * it), or with `gone`, until none does (resolving null). Keys on the soft
1371
+ * keyboard are ignored. Throws on timeout.
1372
+ */
1373
+ declare function waitForTarget(opts: WaitForTargetOptions): Promise<FlatLayoutNode | null>;
1374
+
1170
1375
  /**
1171
1376
  * Read the project's bundle name from `AppScope/app.json5`.
1172
1377
  */
@@ -2069,4 +2274,4 @@ declare function harmonyOsAutoSign(opts: HarmonyOsAutoSignOptions): Promise<Harm
2069
2274
 
2070
2275
  declare const VERSION: string;
2071
2276
 
2072
- export { ALL_SDKS, APL_VALUES, APP_FEATURE_VALUES, type AbilityInfo, type AgcAuthInfo, AgcError, type Apl, type AppFeature, type ApplyChangesOptions, type ApplyChangesResult, type BuildHapOptions, type BuildHapResult, type BundleOptions, CancelledError, type CaptureBurstOptions, ChecksumMismatchError, CmdToolsNotInstalledError, type CmdToolsStatus, type CmdWrapper, type CodelinterFinding, type CodelinterResult, CommandFailedError, type ConfigKey, type ConfigProvider, type CreateScaffoldOptions, type CreateScaffoldResult, type DeveloperAgreementStatus, type DeviceFullInfo, type DeviceInfo, type DiscoverHapsOptions, type DisplaySize, type DisplaySizeOptions, type DownloadOptions, type DumpLayoutOptions, type DumpLayoutResult, type DumpLogOptions, type ExtractZipOptions, type GenerateSigningConfigsOptions, type GestureUitestOptions, type GetDeviceInfoOptions, HARMONYOS_SDK_VERSIONS, HUAWEI_SITES, type HapAssetDiff, type HarmonyOsAutoSignOptions, type HarmonyOsSdk, type HarmonyOsSession, type HarmonyOsSessionOptions, type HarmonyOsSigningResult, type HdcExecOptions, type HdcExecResult, type HdcShellOptions, type HidumperOptions, type HilogEntry, type HilogLevel, type HuaweiSite, type HuaweiSiteCode, type HuaweiTeam, type HuaweiUserInfo, INSTALL_TMP_DIRNAME, type InputType, type InstallAppOptions, type InstallAppResult, type InstallCmdToolsOptions, type InstallEmulatorOptions, type InstallMethod, type InstallSdkOptions, type InstallTempDir, type InstallTempDirOptions, InsufficientSpaceError, type LaunchAppOptions, type LayoutNode, type Logger, type ModuleHaps, OHOS_URL_BASE, type OniroContext, OniroError, type OsFolder, type OutputSink, type ParamOptions, type PrepareSigningOptions, type PrepareSigningResult, type ProgressReporter, type ProgressUpdate, type ProjectModule, type Prompter, type ProvisionProfileInfo, type RawLayoutNode, type RawTouchEvent, type RebootDecision, type RebootOptions, type RecvFileOptions, type RunCodelinterOptions, type RunHvigorwOptions, type RunHvigorwResult, type RunOhpmOptions, type RunProcessOptions, type RunningProcess, type RuntimeOs, SIGNING_ERRORS, type ScreenDump, type Screenshot, type ScreenshotOptions, type SdkArchiveInfo, type SdkInfo, SdkNotInstalledError, type SdkRelease, type SendFileOptions, type SendGestureOptions, type SendInputOptions, type SendRawTouchOptions, type SetHilogLevelOptions, type SigningKind, type SigningMaterialPaths, type SigningPasswords, type StartEmulatorOptions, type StoredSession, type StreamHilogOptions, TMP_DIR_HINT, type TemplateOption, type TokenStore, UnsupportedPlatformError, VERSION, type WaitForBootOptions, type WaitForBundleOptions, type WaitForConditionOptions, type WaitForLogOptions, type WatchLogOptions, type Waypoint, applyChanges, attemptHdcConnection, buildCmdWrapper, buildGestureCommands, buildGestureUitestCommand, buildHap, buildHvigorwArgs, buildInputCommand, buildRawTouchCommand, captureBurst, consoleLogger, createHarmonyOsSession, createInstallTempDir, createMaterial, createScaffold, createTempWorkDir, createTokenStore, decideInstallMethod, decideReboot, decryptPwd, dedupEntries, defaultContext, defaultPaths, detectAaStartFailure, detectProjectSdkVersion, detectRuntimeOs, detectSigningConfigNames, diffEntryNames, diffHapAssets, discoverHaps, downloadAndInstallSdk, downloadFile, dumpLayout, dumpLog, dumpRenderService, dumpScreen, dumpWindow, encryptPwd, ensureFreeSpace, ensureOhModules, ensureOk, ensureRemoteOk, escapeCmdArgument, escapeCmdCommand, extractTarball, extractZipWithProgress, findAppProcessId, findCmdToolsSourceDir, findHarmonyOsSdk, findRunningProcess, forceStop, formatBytes, generateSigningConfigs, getBundleName, getCmdToolsBin, getCmdToolsDownloadUrl, getCmdToolsPath, getCmdToolsStatus, getDeviceInfo, getDisplaySize, getEmulatorDir, getFreeSpaceBytes, getHdcPath, getHvigorwPath, getInstalledSdks, getKey, getMainAbility, getOhosBaseSdkHome, getOhpmPath, getOsFolder, getSdkFilename, getSdkRootDir, getSupportedSdksForUi, harmonyOsAutoSign, harmonyOsSdkLabelForApi, hdcExec, installApp, installCmdTools, installEmulator, isCmdToolsInstalled, isEmulatorInstalled, isOutOfSpaceError, isRamBackedPath, isValidBundleName, isValidProjectName, killProcessTree, launchApp, listAbilities, listDevices, listModules, listRunningProcesses, listTemplates, needsCmdWrapper, nonInteractivePrompter, noopLogger, noopProgress, paramGet, paramSet, parseBounds, parseCodelinterFindings, parseDeviceList, parseHilogLine, parseMainAbilityFromBmDump, parseRemoteExit, pickSigningKind, prepareSigning, pruneLayout, readJson5File, readJsonFile, readProvisionProfile, reboot, recvFile, removeCmdTools, removeEmulator, removeSdk, removeTempWorkDir, requireHarmonyOsSdk, resolveTmpRoot, runCodelinter, runHvigorw, runOhpm, runProcess, scopedLogger, selectDevice, sendFile, sendGesture, sendInput, sendRawTouch, setHilogLevel, shell, shellChecked, spawnCompat, startEmulator, staticConfig, stopEmulator, streamHilog, takeScreenshot, toLongPath, toSpaceError, uninstallApp, validateTemplateLayout, verifySha256, waitForBoot, waitForBundle, waitForCondition, waitForLog, watchLog, waypointsToRawEvents, writeJson5File, writeJsonFile };
2277
+ export { ALL_SDKS, APL_VALUES, APP_FEATURE_VALUES, type AbilityInfo, type AgcAuthInfo, AgcError, type Apl, type AppFeature, type ApplyChangesOptions, type ApplyChangesResult, type BuildHapOptions, type BuildHapResult, type BundleOptions, CancelledError, type CaptureBurstOptions, ChecksumMismatchError, CmdToolsNotInstalledError, type CmdToolsStatus, type CmdWrapper, type CodelinterFinding, type CodelinterResult, CommandFailedError, type ConfigKey, type ConfigProvider, type CreateScaffoldOptions, type CreateScaffoldResult, type DeveloperAgreementStatus, type DeviceFullInfo, type DeviceInfo, type DiscoverHapsOptions, type DisplaySize, type DisplaySizeOptions, type DownloadOptions, type DumpLayoutOptions, type DumpLayoutResult, type DumpLogOptions, type ExtractZipOptions, type FlatLayoutNode, type GenerateSigningConfigsOptions, type GestureUitestOptions, type GetDeviceInfoOptions, HARMONYOS_SDK_VERSIONS, HUAWEI_SITES, type HapAssetDiff, type HarmonyOsAutoSignOptions, type HarmonyOsSdk, type HarmonyOsSession, type HarmonyOsSessionOptions, type HarmonyOsSigningResult, type HdcExecOptions, type HdcExecResult, type HdcShellOptions, type HidumperOptions, type HilogEntry, type HilogLevel, type HuaweiSite, type HuaweiSiteCode, type HuaweiTeam, type HuaweiUserInfo, INSTALL_TMP_DIRNAME, type InputType, type InstallAppOptions, type InstallAppResult, type InstallCmdToolsOptions, type InstallEmulatorOptions, type InstallMethod, type InstallSdkOptions, type InstallTempDir, type InstallTempDirOptions, InsufficientSpaceError, type KeyboardState, type LaunchAppOptions, type LayoutNode, type LayoutSelector, type LocateTargetOptions, type LocatedTarget, type Logger, type ModuleHaps, OHOS_URL_BASE, type OniroContext, OniroError, type OsFolder, type OutputSink, type ParamOptions, type PerformInputOptions, type PerformInputResult, type PickTargetFailure, type PrepareSigningOptions, type PrepareSigningResult, type ProgressReporter, type ProgressUpdate, type ProjectModule, type Prompter, type ProvisionProfileInfo, type RawLayoutNode, type RawTouchEvent, type RebootDecision, type RebootOptions, type RecvFileOptions, type RunCodelinterOptions, type RunHvigorwOptions, type RunHvigorwResult, type RunOhpmOptions, type RunProcessOptions, type RunningProcess, type RuntimeOs, SIGNING_ERRORS, type ScreenDump, type Screenshot, type ScreenshotOptions, type SdkArchiveInfo, type SdkInfo, SdkNotInstalledError, type SdkRelease, type SendFileOptions, type SendGestureOptions, type SendInputOptions, type SendRawTouchOptions, type SetHilogLevelOptions, type SigningKind, type SigningMaterialPaths, type SigningPasswords, type StartEmulatorOptions, type StoredSession, type StreamHilogOptions, TMP_DIR_HINT, TargetNotFoundError, type TemplateOption, type TokenStore, type UiInputType, UnsupportedPlatformError, VERSION, type WaitForBootOptions, type WaitForBundleOptions, type WaitForConditionOptions, type WaitForLogOptions, type WaitForTargetOptions, type WatchLogOptions, type Waypoint, applyChanges, assertLayoutSelector, attemptHdcConnection, buildCmdWrapper, buildGestureCommands, buildGestureUitestCommand, buildHap, buildHvigorwArgs, buildInputCommand, buildRawTouchCommand, captureBurst, consoleLogger, createHarmonyOsSession, createInstallTempDir, createMaterial, createScaffold, createTempWorkDir, createTokenStore, decideInstallMethod, decideReboot, decryptPwd, dedupEntries, defaultContext, defaultPaths, describeLayoutNode, detectAaStartFailure, detectProjectSdkVersion, detectRuntimeOs, detectSigningConfigNames, diffEntryNames, diffHapAssets, discoverHaps, downloadAndInstallSdk, downloadFile, dumpLayout, dumpLog, dumpRenderService, dumpScreen, dumpWindow, encryptPwd, ensureFreeSpace, ensureOhModules, ensureOk, ensureRemoteOk, escapeCmdArgument, escapeCmdCommand, extractTarball, extractZipWithProgress, findAppProcessId, findCmdToolsSourceDir, findCoveredNodes, findHarmonyOsSdk, findKeyboardWindow, findLayoutNodes, findRunningProcess, flattenLayout, forceStop, formatBytes, generateSigningConfigs, getBundleName, getCmdToolsBin, getCmdToolsDownloadUrl, getCmdToolsPath, getCmdToolsStatus, getDeviceInfo, getDisplaySize, getEmulatorDir, getFreeSpaceBytes, getHdcPath, getHvigorwPath, getImeBundles, getInstalledSdks, getKey, getMainAbility, getOhosBaseSdkHome, getOhpmPath, getOsFolder, getSdkFilename, getSdkRootDir, getSupportedSdksForUi, harmonyOsAutoSign, harmonyOsSdkLabelForApi, hdcExec, hideKeyboard, installApp, installCmdTools, installEmulator, isCmdToolsInstalled, isEmulatorInstalled, isOutOfSpaceError, isRamBackedPath, isValidBundleName, isValidProjectName, killProcessTree, launchApp, listAbilities, listDevices, listModules, listRunningProcesses, listTemplates, locateTarget, needsCmdWrapper, nonInteractivePrompter, noopLogger, noopProgress, paramGet, paramSet, parseBounds, parseCodelinterFindings, parseDeviceList, parseHilogLine, parseImeBundles, parseMainAbilityFromBmDump, parseRemoteExit, performInput, pickSigningKind, pickTarget, prepareSigning, pruneLayout, readJson5File, readJsonFile, readProvisionProfile, reboot, recvFile, removeCmdTools, removeEmulator, removeSdk, removeTempWorkDir, requireHarmonyOsSdk, resolveKeyEvent, resolveTmpRoot, runCodelinter, runHvigorw, runOhpm, runProcess, scopedLogger, selectDevice, sendFile, sendGesture, sendInput, sendRawTouch, setHilogLevel, shell, shellChecked, spawnCompat, startEmulator, staticConfig, stopEmulator, streamHilog, takeScreenshot, toLongPath, toSpaceError, uninstallApp, validateTemplateLayout, verifySha256, waitForBoot, waitForBundle, waitForCondition, waitForLog, waitForTarget, watchLog, waypointsToRawEvents, withoutWindow, writeJson5File, writeJsonFile };