@xmanrui/dsh-im 2.6.0 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.en.md +3 -3
- package/README.md +3 -3
- package/bin/dsh-im.mjs +1 -1
- package/lib/client.js +1409 -1409
- package/lib/index.js +8 -8
- package/package.json +2 -2
- package/plugin-src/client/channels/dingtalk/index.js +0 -17
- package/plugin-src/client/channels/dingtalk/styles.js +2 -2
- package/plugin-src/client/channels/feishu/index.js +0 -29
- package/plugin-src/client/channels/feishu/styles.js +2 -2
- package/plugin-src/client/channels/qq/index.js +0 -9
- package/plugin-src/client/channels/wecom/index.js +0 -9
- package/plugin-src/client/channels/weixin/index.js +0 -19
- package/plugin-src/client/channels/weixin/styles.js +2 -2
- package/plugin-src/client/index.js +4 -4
- package/scripts/verify-package.mjs +48 -11
- package/src/channels/feishu/bridge.mjs +5 -2
- package/src/channels/feishu/message-utils.mjs +1 -1
- package/src/channels/shared/connection-test.mjs +1 -1
- package/src/channels/shared/i18n-en/feishu.mjs +6 -6
- package/src/channels/shared/i18n-en/shared-c.mjs +2 -2
package/README.en.md
CHANGED
|
@@ -58,7 +58,7 @@ Connect IM bots to DeepSeek Harness by scanning a QR code, using an App Manifest
|
|
|
58
58
|
|
|
59
59
|
Other IM platforms can be added through the same channel-adapter structure.
|
|
60
60
|
|
|
61
|
-
All nine built-in channels can send JPEG, PNG, and WebP images, plus GIFs sent as image files, with optional captions to Harness. Each image is limited to 5 MB, and images in one message are limited to 20 MB in total. Downloading images or files from Feishu user messages requires the `im:message:readonly` tenant scope, shown on the confirmation page as **Read direct and group messages**; Feishu currently offers no narrower image-only scope for that download endpoint. Apps created through the built-in QR flow request it by default; for existing or manually connected apps, click **Complete permissions**
|
|
61
|
+
All nine built-in channels can send JPEG, PNG, and WebP images, plus GIFs sent as image files, with optional captions to Harness. Each image is limited to 5 MB, and images in one message are limited to 20 MB in total. Downloading images or files from Feishu user messages requires the `im:message:readonly` tenant scope, shown on the confirmation page as **Read direct and group messages**; Feishu currently offers no narrower image-only scope for that download endpoint. Apps created through the built-in QR flow request it by default; for existing or manually connected apps, click **Complete permissions** on the IM Bot settings page and scan the QR code to incrementally add that scope, `im:resource` for uploading bot-sent images or files, and the card callback.
|
|
62
62
|
|
|
63
63
|
### Result-file and image delivery
|
|
64
64
|
|
|
@@ -96,7 +96,7 @@ Install the published stable release from npm (recommended):
|
|
|
96
96
|
dsh plugin --profile web add -w @xmanrui/dsh-im
|
|
97
97
|
```
|
|
98
98
|
|
|
99
|
-
Restart `dsh web`, then open **Settings →
|
|
99
|
+
Restart `dsh web`, refresh the browser, then open **Settings → IM Bot**. The top-level IM Bot entry uses `order: 21` to follow **Agent Presets**, and the Plugins page no longer retains the old entry. Upgrading preserves existing bots, credentials, workspaces, Agent Presets, and Session bindings.
|
|
100
100
|
|
|
101
101
|
To try the latest code before it is published to npm, use the GitHub-source installer instead:
|
|
102
102
|
|
|
@@ -214,7 +214,7 @@ If the Slack desktop app has no native Slash Command registered with the same na
|
|
|
214
214
|
|
|
215
215
|
## Design
|
|
216
216
|
|
|
217
|
-
- Registers one **IM Bot** settings page containing nine IM channels and one AI Office Connector.
|
|
217
|
+
- Registers one top-level **IM Bot** settings page containing nine IM channels and one AI Office Connector.
|
|
218
218
|
- Maintains the Host, client, and runtime sources for all nine channels and the Office Connector in this repository without external standalone plugins.
|
|
219
219
|
- Follows the DeepSeek Harness language preference and switches the settings UI live between Chinese and English. Bot chat messages follow the Host's `language` config (Chinese by default; `en` switches them to English), with Chinese always as the fallback so untranslated text is sent verbatim.
|
|
220
220
|
- Uses logos for WeChat, Feishu, DingTalk, WeCom, QQ, Slack, Telegram, Discord, WhatsApp, and AI Office navigation without enable/disable switches.
|
package/README.md
CHANGED
|
@@ -61,7 +61,7 @@ Connect IM bots to DeepSeek Harness by scanning a QR code, using an App Manifest
|
|
|
61
61
|
|
|
62
62
|
其他 IM 平台可继续按同一渠道适配器结构接入。
|
|
63
63
|
|
|
64
|
-
九个内置渠道均支持把 JPEG、PNG、WebP 图片,以及以图片文件方式发送的 GIF,连同可选文字说明发送给 Harness;单张图片上限为 5 MB,单条消息中的图片总大小上限为 20 MB。飞书下载用户消息中的图片或文件需要租户权限 `im:message:readonly`,确认页将其显示为“获取单聊、群组消息”;飞书目前没有为该下载接口提供仅限图片的更窄权限。扫码新建的应用会默认申请;已有或手动绑定的应用可私聊机器人执行 `/repair
|
|
64
|
+
九个内置渠道均支持把 JPEG、PNG、WebP 图片,以及以图片文件方式发送的 GIF,连同可选文字说明发送给 Harness;单张图片上限为 5 MB,单条消息中的图片总大小上限为 20 MB。飞书下载用户消息中的图片或文件需要租户权限 `im:message:readonly`,确认页将其显示为“获取单聊、群组消息”;飞书目前没有为该下载接口提供仅限图片的更窄权限。扫码新建的应用会默认申请;已有或手动绑定的应用可私聊机器人执行 `/repair`,或在「IM机器人」设置页点击“补全权限”,扫码增量补全该权限、上传机器人图片或文件所需的 `im:resource`,以及卡片回调。
|
|
65
65
|
|
|
66
66
|
### 结果文件与图片回传
|
|
67
67
|
|
|
@@ -99,7 +99,7 @@ Heartbeat 成功响应必须是 JSON:`{"ok":true,"protocolVersion":"office-har
|
|
|
99
99
|
dsh plugin --profile web add -w @xmanrui/dsh-im
|
|
100
100
|
```
|
|
101
101
|
|
|
102
|
-
重启 `dsh web
|
|
102
|
+
重启 `dsh web`、刷新浏览器,然后打开「设置 → IM机器人」。IM机器人使用 `order: 21`,尽量排在一级设置菜单的「Agent 预设」之后;插件页面不再保留旧入口。从旧版升级不会改变已有机器人、凭据、工作区、Agent Preset 或会话绑定。
|
|
103
103
|
|
|
104
104
|
如需试用尚未发布到 npm 的最新代码,可以改用 GitHub 源安装器:
|
|
105
105
|
|
|
@@ -217,7 +217,7 @@ Slack 桌面端若未注册同名的原生 Slash Command,会拦截直接以 `/
|
|
|
217
217
|
|
|
218
218
|
## 设计
|
|
219
219
|
|
|
220
|
-
- Harness
|
|
220
|
+
- Harness 一级设置菜单中只注册一个「IM机器人」设置页,其中包含九个 IM 渠道和一个 AI Office Connector;
|
|
221
221
|
- 九个渠道及 Office Connector 的 Host、客户端与运行时源码都在本仓库维护,不依赖外部独立插件;
|
|
222
222
|
- 设置页跟随 DeepSeek Harness 的语言选择,在中文和 English 之间即时切换;机器人发出的聊天消息跟随 Host 的 `language` 配置(默认中文;设为 `en` 即为英文),中文始终为兜底,未收录的文案原样输出;
|
|
223
223
|
- 左侧使用 Logo 切换微信、飞书、钉钉、企业微信、QQ、Slack、Telegram、Discord、WhatsApp 和 AI Office,不使用启用/停用开关;
|
package/bin/dsh-im.mjs
CHANGED
|
@@ -82,7 +82,7 @@ try {
|
|
|
82
82
|
for (const packageName of legacy) {
|
|
83
83
|
runDsh(['plugin', '--profile', profile, 'remove', packageName]);
|
|
84
84
|
}
|
|
85
|
-
console.log('\nIM 机器人插件已安装。请重启 dsh web
|
|
85
|
+
console.log('\nIM 机器人插件已安装。请重启 dsh web、刷新浏览器,然后打开「设置 → IM机器人」。');
|
|
86
86
|
if (legacy.size > 0) {
|
|
87
87
|
console.log('已用 dsh-im 替换独立飞书/微信/钉钉插件;原有凭据和扫码绑定保持不变。');
|
|
88
88
|
}
|