@oniroproject/core 0.7.0 → 0.8.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
@@ -28,7 +28,7 @@ declare const noopProgress: ProgressReporter;
28
28
  * Keys read from the ConfigProvider by core. Frontends (CLI, VS Code extension)
29
29
  * implement the provider however they like (env vars, settings.json, etc.).
30
30
  */
31
- type ConfigKey = 'sdkRootDir' | 'cmdToolsPath' | 'emulatorDir' | 'hapPath' | 'cmdToolsUrlLinux' | 'cmdToolsUrlWindows' | 'cmdToolsUrlMac' | 'emulatorUrl' | 'sdkUrlBase' | 'applicationCertPath';
31
+ type ConfigKey = 'sdkRootDir' | 'cmdToolsPath' | 'hdcPath' | 'emulatorDir' | 'hapPath' | 'cmdToolsUrlLinux' | 'cmdToolsUrlWindows' | 'cmdToolsUrlMac' | 'emulatorUrl' | 'tmpDir' | 'sdkUrlBase' | 'applicationCertPath';
32
32
  interface ConfigProvider {
33
33
  /**
34
34
  * Get the configured value for `key`, or `fallback` if unset/empty.
@@ -96,6 +96,15 @@ declare class ChecksumMismatchError extends OniroError {
96
96
  readonly actual: string;
97
97
  constructor(expected: string, actual: string);
98
98
  }
99
+ /**
100
+ * A download/extract ran out of room on the filesystem holding its scratch
101
+ * directory. The message is built by the caller (see `sdk/tmp.ts`) so it can name
102
+ * the directory, whether it is RAM-backed, and how to point elsewhere.
103
+ */
104
+ declare class InsufficientSpaceError extends OniroError {
105
+ readonly dir: string;
106
+ constructor(message: string, dir: string, cause?: unknown);
107
+ }
99
108
  declare class CancelledError extends OniroError {
100
109
  constructor(message?: string);
101
110
  }
@@ -182,7 +191,10 @@ declare function getCmdToolsBin(config: ConfigProvider, name?: string): string;
182
191
  /** Resolve the OHPM binary path inside the command-line tools install. */
183
192
  declare function getOhpmPath(config: ConfigProvider): string;
184
193
  /**
185
- * Resolve the hdc binary path inside the SDK toolchains tree.
194
+ * Resolve the hdc binary. An explicit `hdcPath` override (config key / `ONIRO_HDC`
195
+ * env var) wins — point it at a wrapper/proxy hdc when the device is not directly
196
+ * attached here (e.g. a remote device behind an SSH-tunnel `hdc` wrapper). When
197
+ * unset, fall back to the hdc bundled in the SDK toolchains tree.
186
198
  */
187
199
  declare function getHdcPath(config: ConfigProvider): string;
188
200
  /**
@@ -202,6 +214,82 @@ declare function getHvigorwPath(config: ConfigProvider, projectDir: string): str
202
214
  */
203
215
  declare function detectProjectSdkVersion(projectRoot: string, logger?: Logger): number | undefined;
204
216
 
217
+ /** Name of the scratch folder created next to an install target. */
218
+ declare const INSTALL_TMP_DIRNAME = ".oniro-tmp";
219
+ /** Advice appended to out-of-space failures in the scratch directory. */
220
+ declare const TMP_DIR_HINT: string;
221
+ /**
222
+ * Resolve the directory that download/extract scratch space is created in.
223
+ *
224
+ * Precedence: explicit override (CLI `--tmp-dir`) → `tmpDir` config key
225
+ * (`ONIRO_TMP_DIR`) → `<installRoot>/.oniro-tmp` → the system temp dir.
226
+ *
227
+ * The default sits next to the install target so that the unpacked tree is renamed
228
+ * into place rather than copied across a device boundary, and so the system temp dir
229
+ * — a RAM-backed `tmpfs` on most Linux systems, and far smaller than a multi-GB
230
+ * archive — is never in the picture.
231
+ */
232
+ declare function resolveTmpRoot(config: ConfigProvider, override?: string, installRoot?: string): string;
233
+ /** Create a private scratch directory under `root`, creating `root` if needed. */
234
+ declare function createTempWorkDir(root: string, prefix: string): string;
235
+ /**
236
+ * Remove a scratch directory once an install is done, taking the `.oniro-tmp` root
237
+ * with it when that leaves it empty. A root the caller named explicitly is left alone,
238
+ * as are roots another install is still using (the rmdir simply fails).
239
+ */
240
+ declare function removeTempWorkDir(dir: string, root?: string): void;
241
+ interface InstallTempDirOptions {
242
+ config: ConfigProvider;
243
+ /** Explicit scratch directory (CLI `--tmp-dir`). */
244
+ override?: string;
245
+ /** Directory the install lands in; the default scratch root is created inside it. */
246
+ installRoot: string;
247
+ prefix: string;
248
+ logger?: Logger;
249
+ }
250
+ interface InstallTempDir {
251
+ /** The private per-run scratch directory. Remove it when the install finishes. */
252
+ dir: string;
253
+ /** The configurable root it was created under, for out-of-space messages. */
254
+ root: string;
255
+ }
256
+ /**
257
+ * Create the scratch directory for an install, defaulting to `<installRoot>/.oniro-tmp`.
258
+ *
259
+ * When that default is unusable — a read-only or root-owned install parent, say — the
260
+ * system temp dir is used instead. A directory the caller asked for explicitly is never
261
+ * swapped out silently, and a full filesystem is reported rather than papered over.
262
+ */
263
+ declare function createInstallTempDir(opts: InstallTempDirOptions): InstallTempDir;
264
+ /**
265
+ * Bytes available to an unprivileged user on the filesystem holding `dir`.
266
+ * Returns null when the platform cannot report it.
267
+ */
268
+ declare function getFreeSpaceBytes(dir: string): number | null;
269
+ /**
270
+ * Whether `dir` lives on a RAM-backed filesystem (`tmpfs`/`ramfs`), i.e. one whose
271
+ * capacity comes out of memory rather than disk.
272
+ */
273
+ declare function isRamBackedPath(dir: string): boolean;
274
+ declare function formatBytes(bytes: number): string;
275
+ /** Recognise an out-of-disk-space failure from fs/stream errors and their wrappers. */
276
+ declare function isOutOfSpaceError(err: unknown): boolean;
277
+ /**
278
+ * Fail before writing a byte when the filesystem holding `dir` cannot take
279
+ * `requiredBytes`. A no-op when free space cannot be determined.
280
+ */
281
+ declare function ensureFreeSpace(dir: string, requiredBytes: number, what: string): void;
282
+ /**
283
+ * Convert an out-of-space failure into an {@link InsufficientSpaceError}; any other
284
+ * error is returned unchanged, so callers can `throw toSpaceError(err, ...)`.
285
+ *
286
+ * `tmpRoot` is the scratch directory the operation was using. Failures under it are
287
+ * reported against it (not the per-run subdirectory the user cannot configure) and get
288
+ * the `--tmp-dir` remedy; failures elsewhere — an install target that is full — name
289
+ * their own directory and skip the remedy, which would not help.
290
+ */
291
+ declare function toSpaceError(err: unknown, tmpRoot: string, what: string): unknown;
292
+
205
293
  interface DownloadOptions {
206
294
  url: string;
207
295
  dest: string;
@@ -211,10 +299,21 @@ interface DownloadOptions {
211
299
  start?: number;
212
300
  /** Overall progress range to consume (0..100). Default 100. */
213
301
  range?: number;
302
+ /** What the download is for, used in out-of-space messages. */
303
+ what?: string;
304
+ /**
305
+ * Configurable scratch root that `dest` lives under, if any. Out-of-space messages
306
+ * name it instead of the per-run subdirectory, since that is what the user can change.
307
+ */
308
+ tmpRoot?: string;
214
309
  }
215
310
  /**
216
311
  * Stream a remote file to disk with optional progress reporting and cancellation.
217
312
  * Follows redirects via the `follow-redirects` library.
313
+ *
314
+ * Fails fast with an `InsufficientSpaceError` when the destination filesystem cannot
315
+ * hold the advertised `content-length` — the common case being a system temp dir on a
316
+ * RAM-backed tmpfs that is far smaller than the SDK/tools archives.
218
317
  */
219
318
  declare function downloadFile(opts: DownloadOptions): Promise<void>;
220
319
  /**
@@ -273,6 +372,11 @@ interface InstallSdkOptions {
273
372
  progress?: ProgressReporter;
274
373
  abortSignal?: AbortSignal;
275
374
  logger?: Logger;
375
+ /**
376
+ * Scratch directory for the download/extract temporaries. Overrides the `tmpDir`
377
+ * config key and the default location next to the install target.
378
+ */
379
+ tmpDir?: string;
276
380
  }
277
381
  /**
278
382
  * Download and install an OpenHarmony SDK release into `<sdkRootDir>/<osFolder>/<api>`.
@@ -310,6 +414,11 @@ interface InstallCmdToolsOptions {
310
414
  logger?: Logger;
311
415
  /** Skip download and install from a local zip the caller already has. */
312
416
  localZipPath?: string;
417
+ /**
418
+ * Scratch directory for the download/extract temporaries. Overrides the `tmpDir`
419
+ * config key and the default location next to the install target.
420
+ */
421
+ tmpDir?: string;
313
422
  }
314
423
  /**
315
424
  * Install the OpenHarmony command-line tools into `<cmdToolsPath>`.
@@ -437,6 +546,11 @@ interface InstallEmulatorOptions {
437
546
  progress?: ProgressReporter;
438
547
  abortSignal?: AbortSignal;
439
548
  logger?: Logger;
549
+ /**
550
+ * Scratch directory for the downloaded ZIP. Overrides the `tmpDir` config key and
551
+ * the default location next to the install target.
552
+ */
553
+ tmpDir?: string;
440
554
  }
441
555
  /**
442
556
  * Download and extract the Oniro emulator into the configured `emulatorDir`.
@@ -554,6 +668,33 @@ declare function shell(opts: HdcShellOptions): Promise<HdcExecResult>;
554
668
  * return the result unchanged. Lets callers opt into throw-semantics.
555
669
  */
556
670
  declare function ensureOk(result: HdcExecResult, command: string): HdcExecResult;
671
+ /**
672
+ * Parse the exit-code marker appended by {@link shellChecked}. Pure/testable.
673
+ * Returns the remote exit code plus stdout with every marker occurrence
674
+ * stripped, or `null` when no marker is present (the command was killed/timed
675
+ * out, or the device shell never reached the trailing `echo`).
676
+ */
677
+ declare function parseRemoteExit(stdout: string): {
678
+ code: number;
679
+ stdout: string;
680
+ } | null;
681
+ /**
682
+ * Like {@link shell}, but recovers the REMOTE command's exit status.
683
+ *
684
+ * `hdc shell "<cmd>"` reports hdc's OWN exit code (≈ always 0) regardless of
685
+ * whether `<cmd>` succeeded on the device — so on-device failures (`uinput`
686
+ * rejecting its args, a `bm install` error, a missing binary) otherwise look
687
+ * like success. We append an exit-code marker, parse it back out, and report
688
+ * it as `code`, with the marker stripped from stdout. Pair with
689
+ * {@link ensureRemoteOk} to throw on a non-zero remote exit.
690
+ */
691
+ declare function shellChecked(opts: HdcShellOptions): Promise<HdcExecResult>;
692
+ /**
693
+ * Throw a typed {@link CommandFailedError} on a non-zero result, preferring
694
+ * stderr but falling back to stdout for the detail — device tools like
695
+ * `uinput`/`uitest` print their errors to stdout, not stderr.
696
+ */
697
+ declare function ensureRemoteOk(result: HdcExecResult, command: string): HdcExecResult;
557
698
 
558
699
  interface DeviceInfo {
559
700
  /** Connect key — a USB serial or a `host:port` for a TCP target. */
@@ -827,10 +968,35 @@ interface SendRawTouchOptions {
827
968
  * interleaving `-i <ms>` intervals from the event time deltas. Pure.
828
969
  */
829
970
  declare function buildRawTouchCommand(events: RawTouchEvent[]): string;
971
+ /** Expand a waypoint path (+ optional holds) into raw down/move/up events for
972
+ * the `uinput` escape hatch ({@link sendRawTouch} / {@link buildRawTouchCommand}). */
973
+ declare function waypointsToRawEvents(waypoints: Waypoint[], holdStartMs?: number, holdEndMs?: number): RawTouchEvent[];
974
+ interface GestureUitestOptions {
975
+ /** A leading press-hold; when > 0 the stroke uses `drag` (press-and-hold,
976
+ * then move) instead of `swipe`. uitest has no arbitrary hold duration. */
977
+ holdStartMs?: number;
978
+ }
830
979
  /**
831
- * Drive a smooth multi-waypoint path. With no holds, issues chained
832
- * `uitest uiInput drag` segments. When `holdStartMs`/`holdEndMs` are set, routes
833
- * through {@link sendRawTouch} (uinput), the only path with real press-time control.
980
+ * Build a single continuous `uitest uiInput` stroke for a waypoint path. Pure.
981
+ *
982
+ * uitest has no polyline or stationary-hold primitive, so the path is collapsed
983
+ * to first→last (gesture-nav strokes are straight lines) with the velocity
984
+ * derived from the total elapsed time and clamped to uitest's range. A
985
+ * requested `holdStartMs` maps to `drag` (which presses-and-holds before
986
+ * moving — uitest's nearest equivalent to a leading hold); otherwise `swipe`.
987
+ */
988
+ declare function buildGestureUitestCommand(waypoints: Waypoint[], opts?: GestureUitestOptions): string;
989
+ /**
990
+ * Drive a swipe-style gesture via a single continuous `uitest uiInput` stroke —
991
+ * the MMI-injection path that `inputMonitor`-based services (gesture-nav,
992
+ * systemui overlays) actually observe. Preferred over raw `uinput`, whose
993
+ * kernel virtual-device events do not reach `inputMonitor` on some native-boot
994
+ * devices (and whose multi-op form some on-device `uinput` builds reject).
995
+ *
996
+ * uitest has no polyline or stationary-hold primitive: a multi-waypoint path is
997
+ * collapsed to first→last, `holdStartMs` maps to `drag` (press-hold-then-move),
998
+ * and `holdEndMs` has no equivalent (ignored). For true press-time control use
999
+ * {@link sendRawTouch} (raw `uinput`) — accepting the device caveats above.
834
1000
  */
835
1001
  declare function sendGesture(opts: SendGestureOptions): Promise<void>;
836
1002
  /**
@@ -840,6 +1006,12 @@ declare function sendGesture(opts: SendGestureOptions): Promise<void>;
840
1006
  * WARNING: uinput's gesture form `uinput -T -g x1 y1 x2 y2 [press] [total]`
841
1007
  * silently no-ops if `press < 500ms` or `total - press < 500ms` ("press time is
842
1008
  * out of range" — it runs nothing). Keep press and post-press windows ≥ 500ms.
1009
+ *
1010
+ * DEVICE CAVEAT: on some native-boot devices these kernel-`uinput` events never
1011
+ * reach MMI `inputMonitor` services (gesture-nav, systemui), and some on-device
1012
+ * `uinput` builds reject the multi-op `-d/-m/-u` form with "wrong number of
1013
+ * parameters". Prefer {@link sendGesture} (uitest) for those; this path now
1014
+ * surfaces such failures instead of silently succeeding.
843
1015
  */
844
1016
  declare function sendRawTouch(opts: SendRawTouchOptions): Promise<void>;
845
1017
 
@@ -935,11 +1107,19 @@ interface InstallAppResult {
935
1107
  declare function installApp(opts: InstallAppOptions): Promise<InstallAppResult>;
936
1108
  interface LaunchAppOptions {
937
1109
  config: ConfigProvider;
938
- projectDir: string;
939
- /** Override the module name if it isn't the default `entry`. */
1110
+ /** Project mode: resolve bundle + main ability from the project. Required unless `bundleName` is given. */
1111
+ projectDir?: string;
1112
+ /**
1113
+ * Bundle mode: launch an already-installed app directly by bundle name (no
1114
+ * project needed). When set, `projectDir` is ignored. If `abilityName` is
1115
+ * omitted, the main ability is resolved from the device via `bm dump -n`.
1116
+ */
1117
+ bundleName?: string;
1118
+ /** Override the module name if it isn't the default `entry` (project mode). */
940
1119
  moduleName?: string;
941
- /** Explicit ability to launch; defaults to the module's mainElement / first visible ability. */
1120
+ /** Explicit ability to launch; defaults to the module's mainElement / first visible ability (project mode) or the installed bundle's main ability (bundle mode). */
942
1121
  abilityName?: string;
1122
+ deviceSerial?: string;
943
1123
  logger?: Logger;
944
1124
  }
945
1125
  /**
@@ -949,6 +1129,14 @@ interface LaunchAppOptions {
949
1129
  * failed launch, or null when it looks like a success.
950
1130
  */
951
1131
  declare function detectAaStartFailure(output: string): string | null;
1132
+ /**
1133
+ * Parse the main ability of an installed bundle from `bm dump -n <bundle>`
1134
+ * output. Pure/testable. The output is a bundle-name prefix line followed by a
1135
+ * JSON blob; we take the entry module's `mainElementName` (fallback
1136
+ * `mainAbility`), or the first module that declares one. Returns null when the
1137
+ * bundle isn't installed or the output is unparseable.
1138
+ */
1139
+ declare function parseMainAbilityFromBmDump(stdout: string): string | null;
952
1140
  declare function launchApp(opts: LaunchAppOptions): Promise<void>;
953
1141
  interface RunningProcess {
954
1142
  pid: string;
@@ -973,10 +1161,16 @@ interface BundleOptions {
973
1161
  logger?: Logger;
974
1162
  }
975
1163
  /**
976
- * Non-throwing companion to {@link listRunningProcesses}: resolve the running
977
- * process for a bundle via `pidof`, or `null` when it isn't running. Suitable
978
- * for "is X running?" checks (e.g. the pre/post-install pid comparison in
979
- * applyChanges).
1164
+ * Non-throwing companion to {@link listRunningProcesses}: resolve a running
1165
+ * process for a bundle, or `null` when it isn't running. Suitable for "is X
1166
+ * running?" checks (e.g. the pre/post-install pid comparison in applyChanges).
1167
+ *
1168
+ * `pidof` matches the bundle's main (UIAbility) process. When that isn't found,
1169
+ * we fall back to `track-jpid` to also catch **extension-ability** processes,
1170
+ * which run under a separate process name `"<bundle>:<ext>"` (e.g. a
1171
+ * ServiceExtension, FormExtension, UIExtension or input method). Without this,
1172
+ * "verify the running process took the change" silently reported nothing for an
1173
+ * app whose only live process is an extension.
980
1174
  */
981
1175
  declare function findRunningProcess(opts: BundleOptions): Promise<RunningProcess | null>;
982
1176
  /** Uninstall an app by bundle name (`hdc uninstall <bundle>`). */
@@ -1144,9 +1338,10 @@ interface DiscoverHapsOptions {
1144
1338
  }
1145
1339
  /**
1146
1340
  * Walk a project's build outputs and group `*-signed.hap` / `*-unsigned.hap`
1147
- * by module folder. Skips `node_modules` / `oh_modules` / `.git`. Ported from
1148
- * the proven MCP `findHaps`, extended with per-module grouping so multi-module
1149
- * projects can install the right HAP. Empty object when nothing is built.
1341
+ * by build module name (parsed from the HAP filename). Skips `node_modules` /
1342
+ * `oh_modules` / `.git`. Ported from the proven MCP `findHaps`, extended with
1343
+ * per-module grouping so multi-module projects can install the right HAP.
1344
+ * Empty object when nothing is built.
1150
1345
  */
1151
1346
  declare function discoverHaps(opts: DiscoverHapsOptions): Promise<Record<string, ModuleHaps>>;
1152
1347
 
@@ -1476,4 +1671,4 @@ declare function applyChanges(opts: ApplyChangesOptions): Promise<ApplyChangesRe
1476
1671
 
1477
1672
  declare const VERSION: string;
1478
1673
 
1479
- export { ALL_SDKS, APL_VALUES, APP_FEATURE_VALUES, type AbilityInfo, type Apl, type AppFeature, type ApplyChangesOptions, type ApplyChangesResult, type BuildHapOptions, type BuildHapResult, type BundleOptions, CancelledError, type CaptureBurstOptions, ChecksumMismatchError, CmdToolsNotInstalledError, type CmdToolsStatus, type CodelinterFinding, type CodelinterResult, CommandFailedError, type ConfigKey, type ConfigProvider, type CreateScaffoldOptions, type CreateScaffoldResult, type DeviceFullInfo, type DeviceInfo, type DiscoverHapsOptions, type DisplaySize, type DisplaySizeOptions, type DownloadOptions, type DumpLayoutOptions, type DumpLayoutResult, type DumpLogOptions, type ExtractZipOptions, type GenerateSigningConfigsOptions, type GetDeviceInfoOptions, type HapAssetDiff, type HdcExecOptions, type HdcExecResult, type HdcShellOptions, type HidumperOptions, type HilogEntry, type HilogLevel, type InputType, type InstallAppOptions, type InstallAppResult, type InstallCmdToolsOptions, type InstallEmulatorOptions, type InstallMethod, type InstallSdkOptions, 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 RawLayoutNode, type RawTouchEvent, type RebootDecision, type RebootOptions, type RecvFileOptions, type RunCodelinterOptions, type RunHvigorwOptions, type RunHvigorwResult, type RunOhpmOptions, type RunProcessOptions, type RunningProcess, 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 SigningPasswords, type StartEmulatorOptions, type StreamHilogOptions, type TemplateOption, UnsupportedPlatformError, VERSION, type WaitForBootOptions, type WaitForBundleOptions, type WaitForConditionOptions, type WaitForLogOptions, type WatchLogOptions, type Waypoint, applyChanges, attemptHdcConnection, buildGestureCommands, buildHap, buildHvigorwArgs, buildInputCommand, buildRawTouchCommand, captureBurst, consoleLogger, createMaterial, createScaffold, decideInstallMethod, decideReboot, decryptPwd, dedupEntries, defaultContext, defaultPaths, detectAaStartFailure, detectProjectSdkVersion, detectSigningConfigNames, diffEntryNames, diffHapAssets, discoverHaps, downloadAndInstallSdk, downloadFile, dumpLayout, dumpLog, dumpRenderService, dumpScreen, dumpWindow, encryptPwd, ensureOhModules, ensureOk, extractTarball, extractZipWithProgress, findAppProcessId, findCmdToolsSourceDir, findRunningProcess, forceStop, generateSigningConfigs, getBundleName, getCmdToolsBin, getCmdToolsDownloadUrl, getCmdToolsPath, getCmdToolsStatus, getDeviceInfo, getDisplaySize, getEmulatorDir, getHdcPath, getHvigorwPath, getInstalledSdks, getKey, getMainAbility, getOhosBaseSdkHome, getOhpmPath, getOsFolder, getSdkFilename, getSdkRootDir, getSupportedSdksForUi, hdcExec, installApp, installCmdTools, installEmulator, isCmdToolsInstalled, isEmulatorInstalled, isValidBundleName, isValidProjectName, launchApp, listAbilities, listDevices, listModules, listRunningProcesses, listTemplates, nonInteractivePrompter, noopLogger, noopProgress, paramGet, paramSet, parseBounds, parseCodelinterFindings, parseDeviceList, parseHilogLine, pickSigningKind, prepareSigning, pruneLayout, readJson5File, readJsonFile, reboot, recvFile, removeCmdTools, removeEmulator, removeSdk, runCodelinter, runHvigorw, runOhpm, runProcess, scopedLogger, selectDevice, sendFile, sendGesture, sendInput, sendRawTouch, setHilogLevel, shell, startEmulator, staticConfig, stopEmulator, streamHilog, takeScreenshot, uninstallApp, validateTemplateLayout, verifySha256, waitForBoot, waitForBundle, waitForCondition, waitForLog, watchLog, writeJson5File, writeJsonFile };
1674
+ export { ALL_SDKS, APL_VALUES, APP_FEATURE_VALUES, type AbilityInfo, type Apl, type AppFeature, type ApplyChangesOptions, type ApplyChangesResult, type BuildHapOptions, type BuildHapResult, type BundleOptions, CancelledError, type CaptureBurstOptions, ChecksumMismatchError, CmdToolsNotInstalledError, type CmdToolsStatus, type CodelinterFinding, type CodelinterResult, CommandFailedError, type ConfigKey, type ConfigProvider, type CreateScaffoldOptions, type CreateScaffoldResult, 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, type HapAssetDiff, type HdcExecOptions, type HdcExecResult, type HdcShellOptions, type HidumperOptions, type HilogEntry, type HilogLevel, 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 RawLayoutNode, type RawTouchEvent, type RebootDecision, type RebootOptions, type RecvFileOptions, type RunCodelinterOptions, type RunHvigorwOptions, type RunHvigorwResult, type RunOhpmOptions, type RunProcessOptions, type RunningProcess, 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 SigningPasswords, type StartEmulatorOptions, type StreamHilogOptions, TMP_DIR_HINT, type TemplateOption, UnsupportedPlatformError, VERSION, type WaitForBootOptions, type WaitForBundleOptions, type WaitForConditionOptions, type WaitForLogOptions, type WatchLogOptions, type Waypoint, applyChanges, attemptHdcConnection, buildGestureCommands, buildGestureUitestCommand, buildHap, buildHvigorwArgs, buildInputCommand, buildRawTouchCommand, captureBurst, consoleLogger, createInstallTempDir, createMaterial, createScaffold, createTempWorkDir, decideInstallMethod, decideReboot, decryptPwd, dedupEntries, defaultContext, defaultPaths, detectAaStartFailure, detectProjectSdkVersion, detectSigningConfigNames, diffEntryNames, diffHapAssets, discoverHaps, downloadAndInstallSdk, downloadFile, dumpLayout, dumpLog, dumpRenderService, dumpScreen, dumpWindow, encryptPwd, ensureFreeSpace, ensureOhModules, ensureOk, ensureRemoteOk, extractTarball, extractZipWithProgress, findAppProcessId, findCmdToolsSourceDir, findRunningProcess, forceStop, formatBytes, generateSigningConfigs, getBundleName, getCmdToolsBin, getCmdToolsDownloadUrl, getCmdToolsPath, getCmdToolsStatus, getDeviceInfo, getDisplaySize, getEmulatorDir, getFreeSpaceBytes, getHdcPath, getHvigorwPath, getInstalledSdks, getKey, getMainAbility, getOhosBaseSdkHome, getOhpmPath, getOsFolder, getSdkFilename, getSdkRootDir, getSupportedSdksForUi, hdcExec, installApp, installCmdTools, installEmulator, isCmdToolsInstalled, isEmulatorInstalled, isOutOfSpaceError, isRamBackedPath, isValidBundleName, isValidProjectName, launchApp, listAbilities, listDevices, listModules, listRunningProcesses, listTemplates, nonInteractivePrompter, noopLogger, noopProgress, paramGet, paramSet, parseBounds, parseCodelinterFindings, parseDeviceList, parseHilogLine, parseMainAbilityFromBmDump, parseRemoteExit, pickSigningKind, prepareSigning, pruneLayout, readJson5File, readJsonFile, reboot, recvFile, removeCmdTools, removeEmulator, removeSdk, removeTempWorkDir, resolveTmpRoot, runCodelinter, runHvigorw, runOhpm, runProcess, scopedLogger, selectDevice, sendFile, sendGesture, sendInput, sendRawTouch, setHilogLevel, shell, shellChecked, startEmulator, staticConfig, stopEmulator, streamHilog, takeScreenshot, toSpaceError, uninstallApp, validateTemplateLayout, verifySha256, waitForBoot, waitForBundle, waitForCondition, waitForLog, watchLog, waypointsToRawEvents, writeJson5File, writeJsonFile };