@xmanrui/dsh-im 4.34.1 → 4.35.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.
Files changed (33) hide show
  1. package/README.en.md +5 -1
  2. package/README.md +5 -1
  3. package/lib/client.js +306 -201
  4. package/lib/index.js +291 -290
  5. package/locale/en.json +1 -0
  6. package/locale/zh.json +1 -0
  7. package/package.json +1 -1
  8. package/plugin-src/client/bot-settings-tabs.js +114 -0
  9. package/plugin-src/client/delivery-settings.js +2 -16
  10. package/plugin-src/client/i18n.js +2 -0
  11. package/plugin-src/client/styles.js +8 -3
  12. package/plugin-src/host/channels/feishu/production.mjs +2 -1
  13. package/plugin-src/host/channels/qq/production.mjs +2 -1
  14. package/plugin-src/host/channels/shared/access-policy-production.mjs +13 -0
  15. package/plugin-src/host/delivery-adapter.mjs +2 -2
  16. package/plugin-src/host/delivery-service.mjs +13 -4
  17. package/plugin-src/host/index.mjs +1 -0
  18. package/plugin-src/host/modern-harness-api.mjs +2 -1
  19. package/src/channels/feishu/bridge.mjs +34 -18
  20. package/src/channels/feishu/feishu-cards.mjs +58 -6
  21. package/src/channels/feishu/feishu-channel.mjs +11 -3
  22. package/src/channels/feishu/feishu-runtime.mjs +19 -4
  23. package/src/channels/feishu/multi-bot-controller.mjs +1 -1
  24. package/src/channels/qq/qq-bridge.mjs +8 -8
  25. package/src/channels/qq/qq-mention.mjs +37 -0
  26. package/src/channels/qq/qq-runtime.mjs +11 -3
  27. package/src/channels/shared/bot-workspace-store.mjs +1 -0
  28. package/src/channels/shared/connection-error.mjs +10 -4
  29. package/src/channels/shared/harness-client.mjs +9 -3
  30. package/src/channels/shared/i18n-en/shared-a.mjs +4 -0
  31. package/src/channels/shared/message-failure.mjs +26 -4
  32. package/src/channels/shared/text-harness-bridge.mjs +2 -2
  33. package/src/channels/shared/workspace-command.mjs +28 -16
package/README.en.md CHANGED
@@ -38,7 +38,9 @@
38
38
  <a id="recognition"></a>
39
39
 
40
40
  > [!NOTE]
41
- > **DSH-IM has received official sponsorship from DeepSeek Harness** in the form of **RMB 1,000 in token credits**. Thank you to the DeepSeek Harness team for supporting this project!
41
+ > **DSH-IM has received official sponsorship from DeepSeek Harness in the form of RMB 2,000 in token credits**. Thank you to the DeepSeek Harness team for supporting this project!
42
+ >
43
+ > This project is independently developed and maintained by community developers.
42
44
 
43
45
  ## Introduction
44
46
 
@@ -73,6 +75,8 @@ The iMessage contribution is documented separately in [the iMessage channel
73
75
  notes](docs/imessage.md); it uses the native macOS Messages.app and requires no
74
76
  third-party gateway.
75
77
 
78
+ New Feishu and QQ bots connected through the QR flow allow all users to chat and execute built-in commands in both direct and group chats by default. Allowlists and command permissions remain configurable in each bot's access settings. Existing bots keep their saved access settings.
79
+
76
80
  Feishu group chats accept messages from other bots that explicitly mention the current bot by default, with no extra setting. Messages without that mention, mentions of only other members or everyone, self-sent messages, and bot DMs are still ignored, even in all-message mode. Group allowlists and command permissions still apply. The app needs the `im:message.group_at_msg.include_bot:readonly` tenant scope. New apps request it through the QR flow; existing or manually connected apps can use **Complete permissions** or `/repair` in a direct chat, scan the QR code, and complete any publication or approval required by Feishu. See the [Feishu message-event permissions](https://open.feishu.cn/document/server-docs/im-v1/message/events/receive).
77
81
 
78
82
  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.
package/README.md CHANGED
@@ -39,7 +39,9 @@
39
39
  <a id="recognition"></a>
40
40
 
41
41
  > [!NOTE]
42
- > **DSH-IM 已获得 DeepSeek Harness 官方**价值 **人民币 1,000 元的 Token 赞助**。感谢官方对本项目的肯定与支持!
42
+ > **DSH-IM 已获得 DeepSeek Harness 官方 Token 赞助,价值人民币 2,000 元**。感谢官方对本项目的支持!
43
+ >
44
+ > 本项目由社区开发者独立开发与维护。
43
45
 
44
46
  ## 简介
45
47
 
@@ -76,6 +78,8 @@ Matrix 加密目前仅供非敏感测试:默认 optional 模式尝试启动加
76
78
 
77
79
  其他 IM 平台可继续按同一渠道适配器结构接入。
78
80
 
81
+ 扫码新建的飞书和 QQ 机器人,默认允许所有用户在私聊和群聊中聊天及执行内置命令;可在机器人的访问设置中调整白名单和命令权限。已有机器人的访问设置保持不变。
82
+
79
83
  飞书群聊默认接收其他机器人明确 @ 当前机器人的消息,无需额外开关;未 @、仅 @ 其他成员或全体、机器人自身发送的消息和机器人私聊消息仍会忽略,即使群聊响应方式设为“全部”。消息仍受群聊白名单与命令权限约束。飞书应用需要租户权限 `im:message.group_at_msg.include_bot:readonly`(“获取群组中其他机器人和用户@当前机器人的消息”);扫码新建应用会默认申请,已有或手动绑定的应用可点击“补全权限”或私聊执行 `/repair`,扫码并完成飞书要求的发布审批后生效。详见[飞书接收消息权限说明](https://open.feishu.cn/document/server-docs/im-v1/message/events/receive)。
80
84
 
81
85
  支持图片输入的内置渠道均支持把 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`,以及卡片回调。