@oniroproject/core 0.11.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
@@ -146,6 +146,12 @@ interface SdkRelease {
146
146
  linuxWindows: number;
147
147
  darwin: number;
148
148
  };
149
+ /**
150
+ * Appended to the archive basename when the mirror re-published a release under a
151
+ * dated name (e.g. 7.0 ships `ohos-sdk-windows_linux-public_20260829.tar.gz`, whose
152
+ * components are the `-Release` build; the undated archive holds `-Beta` ones).
153
+ */
154
+ archiveSuffix?: string;
149
155
  }
150
156
  /**
151
157
  * Known OpenHarmony SDK releases. Kept in sync with the bash CLI / extension.
@@ -171,8 +177,8 @@ interface SdkArchiveInfo {
171
177
  *
172
178
  * The Huawei mirror packages Linux and Windows together in one tarball with `linux/` and
173
179
  * `windows/` subfolders; macOS tarballs have a deeper layout. The per-release strip counts
174
- * live in {@link ALL_SDKS} (`tarballStrip`). An unrecognized version falls back to the
175
- * historical default (linux/windows=1, darwin=3).
180
+ * live in {@link ALL_SDKS} (`tarballStrip`), as does any dated `archiveSuffix`. An
181
+ * unrecognized version falls back to the historical default (linux/windows=1, darwin=3).
176
182
  */
177
183
  declare function getSdkFilename(version?: string): SdkArchiveInfo;
178
184
 
@@ -1002,13 +1008,20 @@ interface SendInputOptions {
1002
1008
  pxY2?: number;
1003
1009
  /** Velocity for swipe/drag/fling. */
1004
1010
  speed?: number;
1005
- /** 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}. */
1006
1012
  key?: string | number;
1007
1013
  /** Text for inputText. */
1008
1014
  text?: string;
1009
1015
  deviceSerial?: string;
1010
1016
  logger?: Logger;
1011
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;
1012
1025
  /**
1013
1026
  * Build the `uitest uiInput …` command for an input action, in pixel space.
1014
1027
  * Pure (no I/O) so it is unit-testable. Mirrors the proven MCP construction
@@ -1119,6 +1132,8 @@ interface LayoutNode {
1119
1132
  type?: string;
1120
1133
  text?: string;
1121
1134
  desc?: string;
1135
+ /** Placeholder text, e.g. an empty TextInput's "you@example.com". */
1136
+ hint?: string;
1122
1137
  id?: string;
1123
1138
  key?: string;
1124
1139
  bundle?: string;
@@ -1129,28 +1144,105 @@ interface LayoutNode {
1129
1144
  focus?: boolean;
1130
1145
  scroll?: boolean;
1131
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;
1132
1152
  children?: LayoutNode[];
1133
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
+ }
1134
1162
  interface DumpLayoutResult {
1135
1163
  display: DisplaySize | null;
1136
1164
  tree: LayoutNode;
1165
+ /** Present when the dump was asked to detect the soft keyboard. */
1166
+ keyboard?: KeyboardState;
1137
1167
  }
1138
1168
  /** Parse a uitest bounds string `"[x1,y1][x2,y2]"` into a tuple, or null. */
1139
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>;
1140
1180
  /**
1141
1181
  * Prune a raw `uitest dumpLayout` tree into a compact, signal-bearing tree with
1142
1182
  * bounds/center normalized to 0–1 of the display. Structural wrapper nodes with
1143
1183
  * no signal collapse into their children. Returns a node, a flat list of nodes
1144
1184
  * (collapsed wrapper with multiple children), or null (nothing useful). Ported
1145
- * 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.
1146
1210
  */
1147
- declare function pruneLayout(node: RawLayoutNode, display: DisplaySize | null): LayoutNode | LayoutNode[] | null;
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}).
1217
+ */
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;
1148
1235
  interface DumpLayoutOptions {
1149
1236
  config: ConfigProvider;
1150
1237
  /** Filter to a single window/bundle (`uitest dumpLayout -b '<bundle>'`). */
1151
1238
  bundleName?: string;
1152
1239
  /** When false, return the parsed-but-unpruned tree. Default true. */
1153
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;
1154
1246
  deviceSerial?: string;
1155
1247
  timeoutMs?: number;
1156
1248
  logger?: Logger;
@@ -1161,6 +1253,125 @@ interface DumpLayoutOptions {
1161
1253
  */
1162
1254
  declare function dumpLayout(opts: DumpLayoutOptions): Promise<DumpLayoutResult>;
1163
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
+
1164
1375
  /**
1165
1376
  * Read the project's bundle name from `AppScope/app.json5`.
1166
1377
  */
@@ -2063,4 +2274,4 @@ declare function harmonyOsAutoSign(opts: HarmonyOsAutoSignOptions): Promise<Harm
2063
2274
 
2064
2275
  declare const VERSION: string;
2065
2276
 
2066
- 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
@@ -146,6 +146,12 @@ interface SdkRelease {
146
146
  linuxWindows: number;
147
147
  darwin: number;
148
148
  };
149
+ /**
150
+ * Appended to the archive basename when the mirror re-published a release under a
151
+ * dated name (e.g. 7.0 ships `ohos-sdk-windows_linux-public_20260829.tar.gz`, whose
152
+ * components are the `-Release` build; the undated archive holds `-Beta` ones).
153
+ */
154
+ archiveSuffix?: string;
149
155
  }
150
156
  /**
151
157
  * Known OpenHarmony SDK releases. Kept in sync with the bash CLI / extension.
@@ -171,8 +177,8 @@ interface SdkArchiveInfo {
171
177
  *
172
178
  * The Huawei mirror packages Linux and Windows together in one tarball with `linux/` and
173
179
  * `windows/` subfolders; macOS tarballs have a deeper layout. The per-release strip counts
174
- * live in {@link ALL_SDKS} (`tarballStrip`). An unrecognized version falls back to the
175
- * historical default (linux/windows=1, darwin=3).
180
+ * live in {@link ALL_SDKS} (`tarballStrip`), as does any dated `archiveSuffix`. An
181
+ * unrecognized version falls back to the historical default (linux/windows=1, darwin=3).
176
182
  */
177
183
  declare function getSdkFilename(version?: string): SdkArchiveInfo;
178
184
 
@@ -1002,13 +1008,20 @@ interface SendInputOptions {
1002
1008
  pxY2?: number;
1003
1009
  /** Velocity for swipe/drag/fling. */
1004
1010
  speed?: number;
1005
- /** 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}. */
1006
1012
  key?: string | number;
1007
1013
  /** Text for inputText. */
1008
1014
  text?: string;
1009
1015
  deviceSerial?: string;
1010
1016
  logger?: Logger;
1011
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;
1012
1025
  /**
1013
1026
  * Build the `uitest uiInput …` command for an input action, in pixel space.
1014
1027
  * Pure (no I/O) so it is unit-testable. Mirrors the proven MCP construction
@@ -1119,6 +1132,8 @@ interface LayoutNode {
1119
1132
  type?: string;
1120
1133
  text?: string;
1121
1134
  desc?: string;
1135
+ /** Placeholder text, e.g. an empty TextInput's "you@example.com". */
1136
+ hint?: string;
1122
1137
  id?: string;
1123
1138
  key?: string;
1124
1139
  bundle?: string;
@@ -1129,28 +1144,105 @@ interface LayoutNode {
1129
1144
  focus?: boolean;
1130
1145
  scroll?: boolean;
1131
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;
1132
1152
  children?: LayoutNode[];
1133
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
+ }
1134
1162
  interface DumpLayoutResult {
1135
1163
  display: DisplaySize | null;
1136
1164
  tree: LayoutNode;
1165
+ /** Present when the dump was asked to detect the soft keyboard. */
1166
+ keyboard?: KeyboardState;
1137
1167
  }
1138
1168
  /** Parse a uitest bounds string `"[x1,y1][x2,y2]"` into a tuple, or null. */
1139
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>;
1140
1180
  /**
1141
1181
  * Prune a raw `uitest dumpLayout` tree into a compact, signal-bearing tree with
1142
1182
  * bounds/center normalized to 0–1 of the display. Structural wrapper nodes with
1143
1183
  * no signal collapse into their children. Returns a node, a flat list of nodes
1144
1184
  * (collapsed wrapper with multiple children), or null (nothing useful). Ported
1145
- * 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.
1146
1210
  */
1147
- declare function pruneLayout(node: RawLayoutNode, display: DisplaySize | null): LayoutNode | LayoutNode[] | null;
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}).
1217
+ */
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;
1148
1235
  interface DumpLayoutOptions {
1149
1236
  config: ConfigProvider;
1150
1237
  /** Filter to a single window/bundle (`uitest dumpLayout -b '<bundle>'`). */
1151
1238
  bundleName?: string;
1152
1239
  /** When false, return the parsed-but-unpruned tree. Default true. */
1153
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;
1154
1246
  deviceSerial?: string;
1155
1247
  timeoutMs?: number;
1156
1248
  logger?: Logger;
@@ -1161,6 +1253,125 @@ interface DumpLayoutOptions {
1161
1253
  */
1162
1254
  declare function dumpLayout(opts: DumpLayoutOptions): Promise<DumpLayoutResult>;
1163
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
+
1164
1375
  /**
1165
1376
  * Read the project's bundle name from `AppScope/app.json5`.
1166
1377
  */
@@ -2063,4 +2274,4 @@ declare function harmonyOsAutoSign(opts: HarmonyOsAutoSignOptions): Promise<Harm
2063
2274
 
2064
2275
  declare const VERSION: string;
2065
2276
 
2066
- 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 };