@xmanrui/dsh-im 5.0.3 → 5.1.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 +8 -0
- package/README.md +8 -0
- package/lib/client.js +654 -495
- package/lib/index.js +318 -294
- package/package.json +1 -1
- package/plugin-src/client/channels/feishu/group-settings.js +10 -9
- package/plugin-src/client/channels/feishu/index.js +3 -3
- package/plugin-src/client/global-settings.js +29 -24
- package/plugin-src/client/group-history-settings.js +72 -0
- package/plugin-src/client/i18n.js +19 -3
- package/plugin-src/client/styles.js +12 -4
- package/plugin-src/host/channels/feishu/production.mjs +2 -0
- package/plugin-src/host/channels/feishu/rpc.mjs +5 -4
- package/plugin-src/host/channels/qq/production.mjs +2 -0
- package/plugin-src/host/channels/shared/production.mjs +2 -0
- package/plugin-src/host/channels/slack/production.mjs +2 -0
- package/plugin-src/host/channels/whatsapp/production.mjs +2 -0
- package/plugin-src/host/group-history-rpc.mjs +22 -0
- package/plugin-src/host/group-history-runtime.mjs +21 -0
- package/plugin-src/host/inbound-ttl-rpc.mjs +6 -2
- package/plugin-src/host/index.mjs +4 -1
- package/src/channels/discord/discord-runtime.mjs +8 -0
- package/src/channels/feishu/bridge.mjs +23 -1
- package/src/channels/feishu/feishu-runtime.mjs +5 -0
- package/src/channels/feishu/multi-bot-controller.mjs +17 -3
- package/src/channels/feishu/plugin-controller.mjs +2 -0
- package/src/channels/feishu/repair-manager.mjs +2 -1
- package/src/channels/qq/qq-bridge.mjs +19 -0
- package/src/channels/qq/qq-runtime.mjs +4 -0
- package/src/channels/shared/group-history-access.mjs +133 -0
- package/src/channels/shared/group-history-store.mjs +383 -0
- package/src/channels/shared/group-history.mjs +56 -0
- package/src/channels/shared/harness-client.mjs +3 -0
- package/src/channels/shared/i18n-en/feishu.mjs +2 -2
- package/src/channels/shared/text-harness-bridge.mjs +1 -0
- package/src/channels/slack/manifest.mjs +2 -0
- package/src/channels/slack/slack-runtime.mjs +10 -2
- package/src/channels/telegram/telegram-runtime.mjs +7 -0
- package/src/channels/whatsapp/whatsapp-runtime.mjs +20 -0
package/README.en.md
CHANGED
|
@@ -89,6 +89,14 @@ Feishu group chats accept messages from other bots that explicitly mention the c
|
|
|
89
89
|
|
|
90
90
|
Built-in channels with image input support can send JPEG, PNG, and WebP images, plus GIFs sent as image files, with optional captions to Harness. By default, original images can be up to 30 MB each, with up to 20 images per message. Originals are saved in the Session workspace; model copies are resized or compressed to 5 MB each and 20 MB total. Images that still exceed the budget, or are rejected by a non-vision model, are delivered as workspace files. These four limits can be changed under General settings → Attachments → Image input for subsequent messages. Originals follow attachment retention settings. Higher model limits increase request size, latency and model cost, and remain subject to platform and Host limits. iMessage's MVP supports text DMs only. 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, `application:app_slash_command:read` / `write` for the native command panel, and the card callback.
|
|
91
91
|
|
|
92
|
+
### Shared group messages and files
|
|
93
|
+
|
|
94
|
+
WhatsApp, Feishu, Telegram, Discord, Slack, and QQ can automatically save received group messages and attachments, including messages without mentions when the platform permits delivery. Recording is enabled by default and does not itself trigger a model reply. Mention a bot in the group to search records, summarize discussions, or read files on demand.
|
|
95
|
+
|
|
96
|
+
Records are shared by group, independently of bots, AI Sessions, and workspaces. Retention defaults to a rolling **14 days**, configurable under **DSH Settings → IM Bots → gear icon, General settings → General**. Only received content is saved; full history is not backfilled. QQ archives are currently isolated by app, and Discord threads have separate archives.
|
|
97
|
+
|
|
98
|
+
See the [group history and shared files guide](docs/group-history.en.md) for all six platforms' permissions and setup steps, query examples, storage, file limits, and troubleshooting. Live tests passed for text and text-file attachments on WhatsApp, Feishu, and QQ. Telegram text passed, with files still untested; Discord and Slack await live group verification.
|
|
99
|
+
|
|
92
100
|
### Results after a reply timeout
|
|
93
101
|
|
|
94
102
|
Connected IM channels share deferred task tracking. After a model reply timeout, the plugin keeps checking the original task and delivers its final text to the original chat or thread. Checks resume after a plugin restart or reconnection. `/stop` only stops the matching turn submitted by that chat; changing the bound Session prevents old results from being delivered there. No new setting is required, and normal replies keep their existing flow.
|
package/README.md
CHANGED
|
@@ -92,6 +92,14 @@ Matrix 加密目前仅供非敏感测试:默认 optional 模式尝试启动加
|
|
|
92
92
|
|
|
93
93
|
支持图片输入的内置渠道均支持把 JPEG、PNG、WebP 图片,以及以图片文件方式发送的 GIF,连同可选文字说明发送给 Harness;默认每张原图最多接收 30 MB、每条消息最多 20 张;原图保存到会话工作区,模型副本自动缩放或压缩到单张 5 MB、总计 20 MB 以内,仍超限或模型不支持图片时按文件交给模型处理。这四项限制可在「通用设置 → 附件 → 图片输入」调整,对后续消息生效;原图沿用附件保留时长。调高模型输入上限会增加请求体积、处理耗时和模型成本,也仍受平台及宿主限制。iMessage 首版仅支持文本私聊,不包含在图片能力中。飞书下载用户消息中的图片或文件需要租户权限 `im:message:readonly`,确认页将其显示为“获取单聊、群组消息”;飞书目前没有为该下载接口提供仅限图片的更窄权限。扫码新建的应用会默认申请;已有或手动绑定的应用可私聊机器人执行 `/repair`,或在「IM机器人」设置页点击“补全权限”,扫码增量补全该权限、上传机器人图片或文件所需的 `im:resource`、原生命令面板所需的 `application:app_slash_command:read` / `write`,以及卡片回调。
|
|
94
94
|
|
|
95
|
+
### 群聊天记录与群文件
|
|
96
|
+
|
|
97
|
+
WhatsApp、飞书、Telegram、Discord、Slack、QQ 支持自动保存实际收到的群消息和附件,包括平台允许接收的未 @ 消息。采集默认开启,保存本身不触发模型回复;在群内 @ 机器人即可按需查询聊天记录、总结讨论或读取文件。
|
|
98
|
+
|
|
99
|
+
记录按群共享,独立于机器人、AI 会话和工作区,默认滚动保留 **14 天**。可在 **DSH 设置 → IM机器人 → 齿轮「通用设置」→ 通用** 修改保留天数。只保存实际接收的内容,不回填完整历史;QQ 当前按应用来源隔离,Discord 线程独立保存。
|
|
100
|
+
|
|
101
|
+
详见[群消息记录与群文件使用指南](docs/group-history.md):包含六渠道权限与设置步骤、查询示例、存储位置、文件限制和排查方法。WhatsApp、飞书、QQ 已完成文字及文本附件实测;Telegram 已完成文字实测,文件暂未验证;Discord、Slack 待真实群验收。
|
|
102
|
+
|
|
95
103
|
### 超时后的结果补发
|
|
96
104
|
|
|
97
105
|
已接入的 IM 渠道共用超时任务跟踪:收到“等待模型回复超时”后,插件会继续检查原任务,完成后向原聊天或线程补发最终文字;插件重启或连接恢复后也会继续检查。`/stop` 只停止当前聊天提交的对应回合,切换会话后不再向该聊天补发旧会话的结果。无需新增设置,正常回复流程保持原样。
|