Skip to content

Commit 896ac3e

Browse files
strzhaoclaude
andcommitted
docs(install): surface app-management install discovery across skill, help, and docs
QA agents on HarmonyOS fall back to raw hdc bm install because no surface names the install shape for .hap. Name app management in the agent-device skill description, add the HarmonyOS .hap path-only example to install's help body and the commands doc, and state that the bundle name is read from the archive when the app identifier is absent. Co-Authored-By: Claude Code <[email protected]>
1 parent a68693c commit 896ac3e

4 files changed

Lines changed: 24 additions & 3 deletions

File tree

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import assert from 'node:assert/strict';
2+
import { test } from 'vitest';
3+
import { helpBody } from '@agent-device/command-registry/command-text';
4+
import { listCommandFamilyCliSchemas } from '../family/registry.ts';
5+
6+
// The install synopsis names only generic paths, so the help body is the one
7+
// surface that tells an agent which binary formats install accepts and shows
8+
// the path-only HarmonyOS .hap shape. Losing the cliDetail drops that example
9+
// without breaking any structural invariant.
10+
test('install help body names the app formats and the HarmonyOS .hap shape', () => {
11+
const body = helpBody(listCommandFamilyCliSchemas().install!.text);
12+
assert.match(body, /Formats: Android \.apk and \.aab, iOS \.app and \.ipa, HarmonyOS \.hap\./);
13+
assert.match(
14+
body,
15+
/agent-device install \.\/build\/entry-default-signed\.hap --platform harmonyos/,
16+
);
17+
assert.match(body, /the bundle name is read from the archive when the app identifier is absent/);
18+
});

‎packages/command-surface/src/management/install.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,8 @@ const installCommandFacet = defineCommandFacet({
135135
name: 'install',
136136
text: {
137137
summary: 'Install an app binary from a path',
138+
cliDetail:
139+
'Formats: Android .apk and .aab, iOS .app and .ipa, HarmonyOS .hap. A HarmonyOS .hap installs from its path alone, for example agent-device install ./build/entry-default-signed.hap --platform harmonyos; the bundle name is read from the archive when the app identifier is absent.',
138140
},
139141
metadata: installCommandMetadata,
140142
run: (client, input) => client.apps.install(input),

‎skills/agent-device/SKILL.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: agent-device
3-
description: Automates Apple-platform apps (iOS, tvOS, macOS), Android devices (including Android TV and Fire TV on Fire OS), and Amazon Vega OS TV apps in Vega Virtual Devices. Use when navigating apps, taking snapshots/screenshots where supported, driving TV remotes, tapping, typing, scrolling, extracting UI info, collecting evidence, or planning agent-device CLI commands.
3+
description: Automates Apple-platform apps (iOS, tvOS, macOS), Android devices (including Android TV and Fire TV on Fire OS), HarmonyOS devices, and Amazon Vega OS TV apps in Vega Virtual Devices. Use when navigating apps, taking snapshots/screenshots where supported, driving TV remotes, tapping, typing, scrolling, extracting UI info, installing or replacing an app binary, collecting evidence, or planning agent-device CLI commands. Install, replace, or remove an app binary (.apk, .aab, .app, .ipa, .hap) with install, reinstall, or uninstall instead of adb install, hdc install, or bm install.
44
---
55

66
# agent-device

‎website/docs/docs/commands.md‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -651,11 +651,12 @@ See [Batching](/docs/batching) for payload format, response shape, and usage gui
651651
```bash
652652
agent-device install com.example.app ./build/app.apk --platform android
653653
agent-device install com.example.app ./build/MyApp.app --platform ios
654+
agent-device install ./build/entry-default-signed.hap --platform harmonyos
654655
```
655656
656657
- `install <app> <path>` installs from a binary path without uninstalling first, keeping existing app data where the platform allows. Use it for upgrade flows.
657-
- Supports Android devices/emulators, iOS simulators, and CoreDevice-backed iOS physical devices. On xctrace-only devices, install the app with Xcode before opening it by bundle ID.
658-
- Formats: Android `.apk`/`.aab`, iOS `.app`/`.ipa`, HarmonyOS `.hap`. For an `.ipa` with several app bundles, `<app>` picks one by bundle id or name.
658+
- Supports Android devices/emulators, iOS simulators, CoreDevice-backed iOS physical devices, and HarmonyOS devices. On xctrace-only devices, install the app with Xcode before opening it by bundle ID.
659+
- Formats: Android `.apk`/`.aab`, iOS `.app`/`.ipa`, HarmonyOS `.hap`. For an `.ipa` with several app bundles, `<app>` picks one by bundle id or name. A `.hap` installs from its path alone; `agent-device` reads the bundle name from the archive, and `<app>` is a fallback hint.
659660
- On local Android and iOS targets, each install step times out after 120 seconds. `install`, `reinstall`, and `uninstall` allow 480 seconds overall, including device startup. For `.aab`, building and installing the APK set each have a 120-second limit.
660661
- `.aab` requires `bundletool` in `PATH`, or `AGENT_DEVICE_BUNDLETOOL_JAR=<absolute-path-to-bundletool-all.jar>` with `java` in `PATH`; it installs a universal APK.
661662
- Remote daemons upload local app files automatically; prefix the path with `remote:` to use a path on the daemon host as is. A daemon that serves the public remote surface (proxy marker or auth hook) refuses daemon host paths with reason `REMOTE_HOST_INPUT_DENIED`.

0 commit comments

Comments
 (0)