dsh-plugin-devecocli
by frankq007
DeepSeek Harness 的鸿蒙开发工具:设备/模拟器管理、UI 自动化、构建部署等
HarmonyOS development tools for DeepSeek Harness: device/emulator management, UI automation, build & deploy, l
安装
dsh plugin --profile web add github:frankq007/dsh-plugin-devecocliGitHub 源码安装:首次需按提示配置 allowBuilds 构建授权后重试
安装与环境配置指引、插件开发教程见 DSH 中文社区文档 ↗
安装即在你的机器上以你的权限运行第三方代码——它可读写文件、使用凭据、访问网络,DSH 的工具审批不会为插件代码加沙箱。「检测到 manifest」仅代表发现 dsh.bundle / dsh.plugin 清单,不构成兼容性或安全审查;安装前请审阅源码,不熟悉的插件先在不含密钥的环境试用。
README
目录
HarmonyOS development tools for DeepSeek Harness, backed by the
devecocliCLI (@deveco/deveco-cli). Registers 13harmony_*model tools: device/emulator management, screen capture & UI automation, build & deploy, logs, lint, signing and offline HarmonyOS docs.让 DSH 掌握鸿蒙开发能力:设备/模拟器管理、截图与 UI 自动化、构建部署、日志诊断、Lint、签名与本地文档检索。
Features / 工具清单(13 个)
| Tool | Purpose | devecocli command |
|---|---|---|
harmony_device_list |
List connected devices/emulators | device list --format json |
harmony_emulator_list |
List emulator instances & status | emulator list --format json |
harmony_emulator_control |
start/stop/shake/power/rotate/volume/battery/geolocation/sensor/scene/fold | emulator <action> ... |
harmony_screenshot |
Capture device screen to PNG | ui screenshot --path |
harmony_ui_dump |
Dump on-screen UI node tree | ui layout --format json |
harmony_ui_interact |
click/doubleclick/longclick/swipe/fling/drag/text | ui <gesture> ... |
harmony_log |
Device app logs (level/bundle/keyword/crash) | log --... |
harmony_build |
Build project (optional clean first) | build [clean] |
harmony_deploy |
Deploy to device (default --skip-build fast install) |
run |
harmony_signature |
Generate signing materials into project | signature generate |
harmony_check_lint |
DevEco Code Linter (optional --fix) |
check lint |
harmony_docs |
Offline HarmonyOS doc search | docs search |
harmony_exec |
Escape hatch for any devecocli subcommand (whitelisted) | any |
Requirements / 前置要求
- DeepSeek Harness (dsh) — any profile
devecoclion PATH (install via DevEco Studio ornpm 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:
cordis_inspect_list→cordis_inspect_query(confirm Hostshellservice andharnessAPI)cordis_definewithcode.host= body ofcode.host.jscordis_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.
Verification / 实测验证(T1–T9 PASS)
Executed on dsh-web creator-mode session (deve-1/pkg-4, 13 tools).
| # | Check | Result |
|---|---|---|
| T1 | Plugin activation | ✅ 3 activations OK, deve-1/pkg-4 running |
| T2 | harmony_device_list |
✅ [{"name":"dcode_api24","serial":"127.0.0.1:5555","kind":"emulator","deviceType":"phone"}] |
| T3 | harmony_screenshot |
✅ 132032-byte PNG produced |
| T4 | harmony_ui_dump |
✅ real UI tree with bounds returned |
| T5 | harmony_exec fallback |
✅ same output as T2 |
| T6 | Error path (not logged in) | ✅ structured error: Run devecocli auth login to sign in. |
| T7 | Lifecycle stop/run | ✅ tools disappear on stop, restored on run |
| T8 | Source persisted | ✅ code.host.js + README |
| T9 | harmony_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 searchwork) 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_signaturefails with a clear hint; rundevecocli 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 layoutfull 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.
原始 README: https://github.com/frankq007/dsh-plugin-devecocli/blob/master/README.md ↗
同类插件
查看全部 →
k8e
k8e.sh — 开源 Agentic AI 沙箱矩阵

hol-guard
开源AI代理防病毒:运行时拦截风险工具、秘密访问、提示注入、恶意软件包、MCP服务器、插件和技能。

anolisa
ANOLISA(Agentic Nexus Operating Layer & Interface System Architecture):具备运行时、安全性、可观测性和 Tokenless 响应压缩能力的 Agentic OS,可降低 Token 使用量与成本。

mobius
首个自我演进的开源 Agent OS:连接你的团队、AI agent、设备与算力

deepseek-harness-desktop
DeepSeek Harness Tauri 桌面版 | Only 5mb installer, zero environment setup. Windows / macOS / Linux.

open-managed-agents
开源Claude管理代理API实现和自托管Claude标签式代理运行时。即插即用;在Cloudflare Workers/Durable Objects或Node.js上运行。Apache 2.0。