deveco-harness
v0.1.2
Published
OpenCode plugin for DevEco and HarmonyOS development workflows
Maintainers
Readme
DEVECO-HARNESS
面向 DevEco 与 HarmonyOS 开发工作流的 OpenCode 插件。
功能概览
- Agents:覆盖 DevEco Code 风格的
build与plan,并支持通过deveco-harness.jsonc自定义 Agent。 - Tools:兼容 DevEco Code 工具名(
build_project、start_app、hdc_log、switch_cwd、arkts_check、plan_write)。 - Skills:迁移自 DevEco Code 的 Skills(
arkts-error-fixes、arkts-grammar-standards、arkts-runtime-fix、arkui-knowledge、deveco-create-project),通过 OpenCodeskills.paths注入。
安装
通过 DevEco CLI 安装(推荐)
deveco plugin deveco-harness全局安装:
deveco plugin deveco-harness --global本地开发
先构建本包:
bun install
bun run build然后在 OpenCode 配置中添加插件:
{
"plugin": ["file:///absolute/path/to/deveco-harness"]
}在本工作区(Windows)的本地插件路径示例:
{
"plugin": ["file:///c:/DiskF/gitcode/oc_omo/deveco-harness"]
}配置
在以下任一位置创建 deveco-harness.jsonc:
~/.config/opencode/deveco-harness.jsonc<project>/deveco-harness.jsonc<project>/.opencode/deveco-harness.jsonc
完整配置项见 deveco-harness.example.jsonc。
架构
遵循 oh-my-openagent 使用的 OpenCode 插件架构:
src/index.ts默认导出PluginModule。src/create-plugin-module.ts构建server()插件并返回 hooks。confighook 覆盖 OpenCode 的build/planAgent,并注入 skill 路径。toolhook 暴露 DevEco CLI 工具。
