mirror of
https://github.com/hansjone/dsh-im-ops.git
synced 2026-10-14 02:03:18 +08:00
Add DingTalk to unified IM plugin
This commit is contained in:
parent
c7b573a7aa
commit
af7e6a2296
14 changed files with 1809 additions and 578 deletions
34
README.md
34
README.md
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
## 中文
|
||||
|
||||
通过扫码把 IM 机器人接入 DeepSeek Harness。一个插件、一个设置入口,统一管理飞书和微信机器人。
|
||||
通过扫码把 IM 机器人接入 DeepSeek Harness。一个插件、一个设置入口,统一管理飞书、微信和钉钉机器人。
|
||||
|
||||
> GitHub 简介:通过扫码把IM机器人接入DeepSeek Harness(支持飞书、微信、钉钉等)。
|
||||
|
||||
|
|
@ -13,9 +13,10 @@
|
|||
## 当前内置渠道
|
||||
|
||||
- 飞书:扫码创建并绑定机器人,使用长连接收发消息;
|
||||
- 微信:扫码绑定微信机器人,使用腾讯 iLink 长轮询收发消息。
|
||||
- 微信:扫码绑定微信机器人,使用腾讯 iLink 长轮询收发消息;
|
||||
- 钉钉:扫码创建并授权机器人,使用钉钉 Stream 长连接收发消息。
|
||||
|
||||
钉钉等其他 IM 平台可继续按同一渠道适配器结构接入;当前可操作界面仅展示已实现的飞书和微信。
|
||||
其他 IM 平台可继续按同一渠道适配器结构接入。
|
||||
|
||||
## 安装
|
||||
|
||||
|
|
@ -23,14 +24,16 @@
|
|||
npx -y github:xmanrui/dsh-im install
|
||||
```
|
||||
|
||||
重启 `dsh web`,然后打开「设置 → 插件 → IM机器人」。安装器会用 `dsh-im` 替换 profile 中直接安装的 `dsh-feishu` 和 `dsh-weixin`,但不删除任何渠道数据;原有飞书凭据和微信扫码绑定会继续使用。
|
||||
重启 `dsh web`,然后打开「设置 → 插件 → IM机器人」。安装器会用 `dsh-im` 替换 profile 中直接安装的 `dsh-feishu`、`dsh-weixin` 和 `dsh-dingtalk`,但不删除任何渠道数据;原有渠道凭据和扫码绑定会继续使用。
|
||||
|
||||
钉钉接入时,用钉钉 App 扫描页面二维码,再在钉钉授权页点击「一键创建新机器人」。钉钉当前可能在该官方授权页显示 OpenClaw 品牌;扫码后的机器人连接、凭据和消息均由 DeepSeek Harness 管理。由于扫码结果不包含扫码人的 staff ID,首次私聊后还需要在本机页面批准该使用者,未批准消息不会进入 Harness。
|
||||
|
||||
## 设计
|
||||
|
||||
- Harness 中只注册一个「IM机器人」设置页;
|
||||
- 左侧使用飞书和微信 Logo 切换渠道,不使用启用/停用开关;
|
||||
- 两个渠道保持独立的 RPC、凭据、连接监督和会话映射;
|
||||
- 浏览器只获得二维码和脱敏状态,不获得 App Secret 或 `bot_token`。
|
||||
- 左侧使用渠道 Logo 切换微信、飞书和钉钉,不使用启用/停用开关;
|
||||
- 三个渠道保持独立的 RPC、凭据、连接监督和会话映射;
|
||||
- 浏览器只获得二维码和脱敏状态,不获得 App Secret、`bot_token`、钉钉 `client_secret` 或原始 staff ID。
|
||||
|
||||
## 本地开发
|
||||
|
||||
|
|
@ -40,13 +43,13 @@ npm run check
|
|||
node bin/dsh-im.mjs install --source .
|
||||
```
|
||||
|
||||
`npm run check` 运行单元测试、构建 Host/Client 产物,并验证发布包不包含凭据或独立飞书/微信设置页注册。
|
||||
`npm run check` 运行单元测试、构建 Host/Client 产物,并验证发布包不包含凭据或独立渠道设置页注册。
|
||||
|
||||
---
|
||||
|
||||
## English
|
||||
|
||||
Connect IM bots to DeepSeek Harness by scanning a QR code. One plugin and one settings entry provide unified management for Feishu and WeChat bots.
|
||||
Connect IM bots to DeepSeek Harness by scanning a QR code. One plugin and one settings entry provide unified management for Feishu, WeChat, and DingTalk bots.
|
||||
|
||||
> GitHub description: Connect IM bots to DeepSeek Harness by scanning a QR code (supports Feishu, WeChat, DingTalk, and more).
|
||||
|
||||
|
|
@ -58,8 +61,9 @@ Connect IM bots to DeepSeek Harness by scanning a QR code. One plugin and one se
|
|||
|
||||
- Feishu: create and bind a bot by scanning a QR code, then send and receive messages over a persistent connection.
|
||||
- WeChat: bind a WeChat bot by scanning a QR code, then send and receive messages through Tencent iLink long polling.
|
||||
- DingTalk: create and authorize a bot by scanning a QR code, then send and receive messages through DingTalk Stream.
|
||||
|
||||
Other IM platforms such as DingTalk can be added through the same channel-adapter structure. The current interface only exposes the implemented Feishu and WeChat channels.
|
||||
Other IM platforms can be added through the same channel-adapter structure.
|
||||
|
||||
## Installation
|
||||
|
||||
|
|
@ -67,14 +71,16 @@ Other IM platforms such as DingTalk can be added through the same channel-adapte
|
|||
npx -y github:xmanrui/dsh-im install
|
||||
```
|
||||
|
||||
Restart `dsh web`, then open **Settings → Plugins → IM Bot**. The installer replaces directly installed `dsh-feishu` and `dsh-weixin` entries in the profile with `dsh-im` without deleting channel data. Existing Feishu credentials and WeChat QR bindings continue to work.
|
||||
Restart `dsh web`, then open **Settings → Plugins → IM Bot**. The installer replaces directly installed `dsh-feishu`, `dsh-weixin`, and `dsh-dingtalk` entries in the profile with `dsh-im` without deleting channel data.
|
||||
|
||||
For DingTalk, scan the QR code with the DingTalk app and choose **Create a new bot** on the authorization page. That DingTalk-hosted page may currently display OpenClaw branding; the resulting connection, credentials, and messages are managed by DeepSeek Harness. Because the scan result does not identify the scanning user, send the bot a direct message and approve that sender locally before the message can enter Harness.
|
||||
|
||||
## Design
|
||||
|
||||
- Registers a single **IM Bot** settings page in Harness.
|
||||
- Uses Feishu and WeChat logos for channel navigation without enable/disable switches.
|
||||
- Uses channel logos for WeChat, Feishu, and DingTalk navigation without enable/disable switches.
|
||||
- Keeps RPC endpoints, credentials, connection supervision, and session mappings isolated by channel.
|
||||
- Sends only QR codes and redacted status data to the browser, never App Secrets or `bot_token` values.
|
||||
- Sends only QR codes and redacted status data to the browser, never App Secrets, `bot_token`, DingTalk `client_secret`, or raw staff IDs.
|
||||
|
||||
## Local development
|
||||
|
||||
|
|
@ -84,4 +90,4 @@ npm run check
|
|||
node bin/dsh-im.mjs install --source .
|
||||
```
|
||||
|
||||
`npm run check` runs unit tests, builds the Host and Client artifacts, and verifies that the published package contains neither credentials nor standalone Feishu or WeChat settings-page registrations.
|
||||
`npm run check` runs unit tests, builds the Host and Client artifacts, and verifies that the published package contains neither credentials nor standalone channel settings-page registrations.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue