DeepSeek Harness 插件

stlin256/DSH-Harmony#dsh-harmony

分类 远程与移动端 收录于 2026-11-10

DSH Harmony 鸿蒙原生客户端的插件端:通过宿主令牌交换完成原生登录(可选 Pocket ID Passkey),提供会话列表与实时更新、任务概览、按设备设置的通知等级和网页会话定位;以预构建 tarball 发布,无需独立 relay 或常驻网关进程。

安装

# Release 预构建包

dsh plugin --profile web add "https://github.com/stlin256/DSH-Harmony/releases/download/plugin-v0.4.0/dsh-harmony-plugin-0.4.0.tgz"

# GitHub 源码(首次需按提示配置 allowBuilds 构建授权后重试)

dsh plugin --profile web add github:stlin256/DSH-Harmony#path:/plugins/dsh-harmony

装任何插件都等于在你的机器上跑第三方代码,权限和你本人一样大——能读你的文件、用你的凭据、访问网络,工具审批管不到它。GitHub 来源的插件还会在安装时执行构建脚本——pnpm 默认拦截,所以安装可能停在 ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED 或 ERR_PNPM_IGNORED_BUILDS;dsh 会打印出需要添加的确切键名,把它加进该 profile 的 pnpm-workspace.yaml 的 allowBuilds 下,重跑一次即可装上。放行构建本身就是一次信任判断:请只安装可信来源,并尽量锁定 commit(github:owner/repo#sha)。

README

简体中文 · English

一个插件即可为 Harness 增加 DSH Harmony 原生登录、会话接口、实时通道、任务概览、分级通知队列和网页会话定位。无需独立 relay 或常驻网关进程。Node.js 24.9+;需使用提供 connection.requestRejection、connection.authorizeIndex、connection.authenticatedUrl 的新版 Harness。

安装

首选从 DSH Harmony Releases 下载与 App 对应的 dsh-harmony-plugin-0.4.0.tgz。在 Harness 打开 插件 → Add plugin,粘贴 Release 中该文件的直接下载地址,确认安装并启用 @dsh-harmony/plugin,然后重启或重连 Harness。也可以把 App 引导页的安装提示词直接发送给 DSH。

不要直接把当前 monorepo 的 plugins/dsh-harmony/ 子目录当作 Git 安装源:仓库内的轻量源码通过相对路径复用 gateway,只有发布打包步骤会生成包含全部生产依赖的可安装产物。

开发时从仓库根目录运行 node scripts/package-plugin.mjs,生成 .artifacts/dsh-harmony-plugin-0.4.0.tgz。脚本会打包全部生产依赖,并在仓库外的临时目录验证 Host 入口、浏览器入口、bundle patch、本地化元数据和内嵌资源。

发布包声明以下 bundle patch:

- insert:
    - id: dsh-harmony
      name: '@dsh-harmony/plugin'

App 默认选择“原生登录”。填写 Harness Web 地址和启动 URL 中 token= 后的访问密钥;已有有效登录时不必再次填写密钥。原生登录直接调用 Harness 的正式令牌交换与签名 Cookie 验证,兼容 HTTP 和 HTTPS、局域网和公网。配置监听地址、受信任主机和公网 TLS 时遵循 Harness 自身的网络配置;插件不代替路由或端口映射。

Pocket ID Passkey 是可选的另一种登录方式,要求 HTTPS。其部署工具、适配器及说明位于仓库 deploy/ 和 docs/OIDC-DEPLOYMENT.md。浏览器与 App 共用现有 Pocket ID 登录,不需要再注册独立的插件 Passkey。

数据默认保存在 $DSH_HOME/harmony.sqlite(未设置 DSH_HOME 时为 ~/.dsh/harmony.sqlite)。插件保存启用后观测到的任务名、状态和待确认路由,不保存消息正文。通知等级由每台设备设置;推送构建还需配置 Huawei Push Kit 和 HUAWEI_SERVICE_ACCOUNT。应用商店构建不需要 Push Kit 服务帐号。

The single plugin provides native Harness login, session APIs, live updates, task overview, notification levels and web session handoff. No separate relay or gateway daemon is required. Install the versioned tarball from DSH Harmony Releases through Harness's plugin manager, or send the app onboarding prompt to DSH. The published package declares its bundle patch, display metadata and production dependency closure.

Native login is the default. Enter the Harness Web origin and the access key from its startup URL's token query parameter. It reuses Harness's official token exchange and signed-cookie validation over HTTP or HTTPS. Configure network binding and trusted hosts using the standard Harness deployment settings. Optional Pocket ID login requires HTTPS and the OIDC adapter documented in the repository. The community HAP uses the Huawei Push Kit service account; the AppGallery HAP excludes Push Kit.

内容来自项目 README(GitHub)↗

链接

同类插件

查看整个分类 →

社区评论

评论公开保存在 GitHub Discussions。加载评论会连接 GitHub 和 Giscus;发表内容需要 GitHub 账号。