DeepSeek Harness 插件

dsh-plugin-devecocli

HarmonyOS development for DeepSeek Harness: device/emulator management, UI automation, build & deploy, logs, lint and docs via the devecocli CLI(英文原文)

跳到安装方式

来源信息

GitHub 仓库
frankq007/dsh-plugin-devecocli
最近更新
2026年8月14日
分类
插件开发工具
GitHub stars
1
载体类型
plugin
目录证据
上游声明已找到 dsh.bundle
证据路径
package.json#dsh.bundle
核对版本
0.1.0-rc.8
上游核对日期
2026-08-20

该证据由上游目录提供。本站没有安装、运行或安全审核这个插件。

安装

默认先复制一段 Prompt,让 Agent 读 GitHub 仓库和源码;需要自己装时再切到命令。

复制这段 Prompt,发给 DSH、Codex 或其他 Agent,让它先读 GitHub 仓库和源码。

请先不要安装或执行任何命令。阅读这个插件的 GitHub 仓库、README 和关键源码,然后用清楚、直接的方式回答以下问题,帮助我判断它是否适合我的需求:

1. 这个插件是什么,解决什么问题;
2. 适合哪些用户和典型使用场景;
3. 安装后如何使用,并给出一个最小使用示例;
4. 有哪些已知限制,以及隐私、安全、兼容性或维护风险;
5. 给出“推荐 / 有条件推荐 / 不推荐”的明确建议和理由。

请区分仓库明确说明、根据源码推断和未知信息。证据不足时请明确说明,不要猜测或照抄 README。

GitHub:https://github.com/frankq007/dsh-plugin-devecocli
插件名:dsh-plugin-devecocli
作者:frankq007

检查来源文件

安装前先看这个插件目录里的 README 和其他文件。

文件资源管理器3 个文件
README.md来源说明 · 只读预览

dsh-plugin-devecocli

> HarmonyOS development tools for DeepSeek Harness, > backed by the devecocli CLI (@deveco/deveco-cli). Registers 13 harmony_* model tools: > device/emulator management, screen capture & UI automation, build & deploy, logs, lint, > signing and offline HarmonyOS docs. > > 让 DSH 掌握鸿蒙开发能力:设备/模拟器管理、截图与 UI 自动化、构建部署、日志诊断、Lint、签名与本地文档检索。

Features / 工具清单(13 个)

ToolPurposedevecocli command
harmony_device_listList connected devices/emulatorsdevice list --format json
harmony_emulator_listList emulator instances & statusemulator list --format json
harmony_emulator_controlstart/stop/shake/power/rotate/volume/battery/geolocation/sensor/scene/foldemulator <action> ...
harmony_screenshotCapture device screen to PNGui screenshot --path
harmony_ui_dumpDump on-screen UI node treeui layout --format json
harmony_ui_interactclick/doubleclick/longclick/swipe/fling/drag/textui <gesture> ...
harmony_logDevice app logs (level/bundle/keyword/crash)log --...
harmony_buildBuild project (optional clean first)build [clean]
harmony_deployDeploy to device (default --skip-build fast install)run
harmony_signatureGenerate signing materials into projectsignature generate
harmony_check_lintDevEco Code Linter (optional --fix)check lint
harmony_docsOffline HarmonyOS doc searchdocs search
harmony_execEscape hatch for any devecocli subcommand (whitelisted)any

Requirements / 前置要求

  • DeepSeek Harness (dsh) — any profile
  • devecocli on PATH (install via DevEco Studio or npm i -g @deveco/deveco-cli)
  • HarmonyOS emulator/device connected (for device tools)
  • Full-access session for device/SDK commands (see Sandbox below)

Install / 安装

Option A — bundle (recommended, persistent)

Install into any profile as a Cordis bundle:

dsh plugin --profile <name> add dsh-plugin-devecocli
# or from git / tarball / local checkout:
dsh plugin --profile <name> add github:<owner>/dsh-plugin-devecocli
dsh plugin --profile <name> add ./dsh-plugin-devecocli-0.1.0.tgz

Restart your DSH profile. The 13 harmony_* tools become available to every agent in that profile. Remove with dsh plugin --profile <name> remove dsh-plugin-devecocli.

For git installs, pnpm ≥10 requires authorizing the prepare script — copy the exact package key pnpm prints into the profile's pnpm-workspace.yaml allowBuilds, then re-run add.

Option B — dynamic plugin (no install, session-local)

In a creator-mode (cordis) session, register the plugin at runtime:

1. cordis_inspect_listcordis_inspect_query (confirm Host shell service and harness API) 2. cordis_define with code.host = body of [code.host.js](./code.host.js) 3. cordis_run (approve in UI if prompted)

Dynamic plugins are process-local: they disappear when DSH restarts. code.host.js is the persisted source for re-install. See [code.host.js](./code.host.js).

Verification / 实测验证(T1–T9 PASS)

Executed on dsh-web creator-mode session (deve-1/pkg-4, 13 tools).

#CheckResult
T1Plugin activation✅ 3 activations OK, deve-1/pkg-4 running
T2harmony_device_list[{"name":"dcode_api24","serial":"127.0.0.1:5555","kind":"emulator","deviceType":"phone"}]
T3harmony_screenshot✅ 132032-byte PNG produced
T4harmony_ui_dump✅ real UI tree with bounds returned
T5harmony_exec fallback✅ same output as T2
T6Error path (not logged in)✅ structured error: Run devecocli auth login to sign in.
T7Lifecycle stop/run✅ tools disappear on stop, restored on run
T8Source persisted✅ code.host.js + README
T9harmony_check_lint✅ 10 warnings / 0 errors

Extra: harmony_exec ["--version"] → 1.2.2; harmony_docs search arkts → 3 JSON results. Bundle layer verified locally: dsh --profile <test> --dump-config shows the dsh-plugin-devecocli layer with row devecocli-tools.

Sandbox / 沙箱注意事项

  • Restricted sandbox (workspace-write): devecocli launches (--version, auth status,

docs search work) but device/SDK commands are denied: The executable is not digitally signed: ...\hdc.exe. The plugin detects this and returns a hint. 受限沙箱下仅文档/认证/版本类命令可用。

  • Full-access session (danger-full-access): all device/SDK commands work (T2–T5, T9).

需要完整权限会话才能发挥全部能力。

  • Not logged in to Huawei Developer account → harmony_signature fails with a clear

hint; run devecocli auth login (interactive, not suitable via tools).

Development / 开发

node --check index.js        # syntax check
npm run check

Known limits / 已知限制

  • Bundle tools register in the profile layer; a creator-mode dynamic copy coexists

without conflicts (different scope layers).

  • ui layout full output can be hundreds of KB — tools return truncated tail (64KB) + JSON summary.
  • Builds are long-running (minutes) — single execution has a timeout, returns tail output.
  • Interactive commands (auth login, emulator license) don't fit tool execution.

License

MIT — see [LICENSE](./LICENSE).