dsh-web
zhu1090093659/dsh-webDeepSeek Harness(DSH)Web 插件聚合生态包 · 一切皆插件,创意工坊分发(dsh-market.com)
DeepSeek Harness (DSH) 微信通道全功能增强插件 —— 通用版:跨机器零改配置,装完即用。
把手机微信变成 DSH 的一个入口:微信发消息 → DSH 会话,DSH 回复/发图/发文件 → 微信;并在 DSH 设置中心提供完整的「微信通道」管理面板。
connection.rpc 通道(/dsh-weixin-plus),天然免疫 Electron / 浏览器模式下的安全拦截与鉴权错误;/dsh-weixin-plus-http/<action>(与 RPC 口分属不同前缀,互不抢占)。ilink-owner.lock):多宿主(GUI + 后台无头服务)同时运行时只允许一个消费消息,避免游标竞争与丢消息。connection / webServer 服务)weixin-agent-sdk@^0.3.0、qrcode@^1.5.4(peer:@deepseek-ai/cordis >= 4.0.0)1)在 profile 目录安装(~/.dsh/profiles/<你的 profile>):
npm i github:liushQAQ/dsh-weixin-plus
# 或使用 Release 附件:npm i ./dsh-weixin-plus-<version>.tgz
2)把包名加入 profile 的 bundle 列表(package.json):
{
"dependencies": { "dsh-weixin-plus": "github:liushQAQ/dsh-weixin-plus" },
"dsh": { "profile": { "bundles": ["...", "dsh-weixin-plus"] } }
}
插件自带 cordis.patch.yml(package.json 的 dsh.bundle.patch),加载器据此挂载入口 weixin-plus。
3)重启 DSH(或触发加载器热重载),设置中心会出现「微信通道」。
进阶/开发:也可以把仓库目录
link:进 profile,再用内容哈希文件名(p1.js → p2.js → …)做免重启热挂载 —— 宿主按 URL 缓存 ESM 模块,原地改内容不会生效,必须换文件名。
| 键 | 说明 |
|---|---|
cwd | agent 工作目录(缺省取已有工作区) |
provider / model | 覆盖默认 provider 路由与模型 |
inboxDir | 入站媒体归档目录(缺省 <DSH_HOME>/weixin-inbox) |
工作目录、模型、凭证位置全部走 DSH 运行时(~/.dsh)与上述配置,不含任何机器专有路径。
| 通道 | 路径 | 说明 |
|---|---|---|
| RPC | /dsh-weixin-plus | 客户端首选;connection.rpc.call |
| HTTP 回退 | /dsh-weixin-plus-http/<action> | POST/GET,action 如 status、qrcode、login、logout、cancel-scan |
LICENSE(MIT)与 files 发布白名单,npm pack 只含 6 个文件,不再夹带备份与临时产物。LICENSE 与 files 白名单。connection.rpc.handle() 内部会拿「读该服务的 ctx」去 owner.effect(() => owner.webServer.register(route))(官方 @deepseek-ai/dsh-client-connection 的 register 实现)。该 ctx 经 shadow 反解后落在父 ctx 上,其 inject 里没有 webServer ⇒ 抛 cannot get property "webServer" without inject,RPC 通道注册失败。{kind:'prefix', path:'/dsh-weixin-plus'} ⇒ webserver: duplicate prefix route,实例一换路由即丢。/dsh-weixin-plus-http;②RPC 通道改在 apply 体内直接注册,并用 ctx.extend({ webServer: ctx.get('webServer') }) 把 webServer 绑成自有属性后再读 .connection(与官方 dsh-mnemon 同款写法);③只注册带斜杠通道,重复注册幂等放过。POST/GET /dsh-weixin-plus/status 由 405/404 → 401(路由已注册、匿名需认证);POST /dsh-weixin-plus-http/status → 200 且返回真实状态(账号、connected、isPollingOwner)。peerDependencies。index.js:宿主端逻辑 —— iLink 轮询、会话挂载、单实例选举、Cordis RPC 与 WebServer 路由。client.js:客户端 React 前端,挂载在 settings.section(id: weixin)。cordis.patch.yml:bundle 装配声明(入口 weixin-plus)。