dsh
OpenPetsHQ/openpets将 DeepSeek Harness 的生命周期状态、错误与审批请求,桥接到本地运行的 OpenPets 桌面伙伴。
基于飞书官方 WebSocket 长连接的 DSH 双向聊天桥:消息路由到所选工作区的最新会话并自动回复,可在设置页切换机器人凭证与工作区。
Feishu (Lark) bot bridge for DeepSeek Harness: send a message to your Feishu bot and your DSH agent answers; the agent can also push messages back to Feishu.
设置 → 飞书, paste the two values from Feishu Open Platform → your app → 凭证与基础信息, click 保存并重新连接, and the long connection comes up immediately. No config files to edit by hand.im.message.receive_v1) and are delegated to a subagent of the bound workspace's latest session; the text reply is sent back to the same chat automatically.feishu_send_message tool, so any session can push a message to the last chat that contacted DSH (or a given chat_id).pbbp2), automatic ack, ping keep-alive, fragment merging (sum/seq), and reconnect with backoff, all in-process; stopping or updating the plugin tears everything down cleanly.# from npm (once published) or from this repo:
dsh plugin --profile web add dsh-feishu-chat
# or directly from GitHub:
dsh plugin --profile web add github:Qing45/dsh-feishu-chat
Then restart dsh web and open 设置 → 飞书:
⚠️ This plugin is community third-party code — installing it runs it with your own permissions. Check the source before installing. Credentials stay local in
$DSH_HOME/feishu-bot/config.jsonand are never committed or uploaded.
| Piece | File | Role |
|---|---|---|
| Host entry | lib/index.js | Cordis plugin (export const name + export function apply), wires config, router, WS client, tool and HTTP routes |
| Feishu API | lib/feishu.js | node:https helpers: tenant token, send message, WS endpoint |
| WS client | lib/ws.js | in-process long connection: protobuf pbbp2.Frame, auto-ack, ping, fragment merge, reconnect |
| Router | lib/router.js | inbound message → resolve parent agent (initiator → live agent → resume) → subagent → reply |
| Config | lib/config.js | $DSH_HOME/feishu-bot/config.json persistence |
| Routes | lib/routes.js | HTTP routes for the settings UI (same-origin writes only) |
| Client | client/client.js | window.__ModuleLoader__.load bundle registering the 设置 → 飞书 section |
The package is a standard DSH bundle: package.json declares dsh.bundle.patch (layer insertion) and dsh.client (web bundle), and cordis.patch.yml inserts the plugin row into the profile tree.
The profile's own patch layer ($DSH_HOME/profiles/<profile>/cordis.patch.yml) is hot-reloaded:
pnpm --dir "$DSH_HOME/profiles/web" add /path/to/dsh-feishu-chat
Then append to cordis.patch.yml:
- insert:
- id: feishu-bot
name: 'dsh-feishu-chat'
Refresh the browser — the settings section appears without restarting the harness.
rejectUnauthorized: false) so the long connection works behind corporate MITM proxies / broken certificate stores; review this trade-off for your environment.feishu_send_message; chat_id defaults to the most recent chat that contacted DSH.MIT