@xmanrui/dsh-im 4.36.1 → 4.38.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 +14 -2
- package/README.md +13 -1
- package/assets/logo-plugin-message-link-gradient.webp +0 -0
- package/lib/client.js +417 -189
- package/lib/index.js +317 -316
- package/package.json +2 -2
- package/plugin-src/client/bot-general-settings.js +120 -0
- package/plugin-src/client/channels/dingtalk/api.js +3 -1
- package/plugin-src/client/channels/feishu/api.js +6 -2
- package/plugin-src/client/channels/qq/api.js +3 -1
- package/plugin-src/client/channels/shared/token-api.js +3 -1
- package/plugin-src/client/channels/wecom/api.js +3 -1
- package/plugin-src/client/channels/wecom-app/api.js +3 -1
- package/plugin-src/client/channels/weixin/api.js +3 -1
- package/plugin-src/client/channels/whatsapp/api.js +3 -1
- package/plugin-src/client/delivery-settings.js +5 -1
- package/plugin-src/client/i18n.js +14 -0
- package/plugin-src/client/styles.js +19 -0
- package/plugin-src/host/channels/dingtalk/rpc.mjs +11 -0
- package/plugin-src/host/channels/email/rpc.mjs +1 -0
- package/plugin-src/host/channels/feishu/production.mjs +1 -0
- package/plugin-src/host/channels/feishu/rpc.mjs +31 -0
- package/plugin-src/host/channels/imessage/rpc.mjs +1 -0
- package/plugin-src/host/channels/matrix/rpc.mjs +10 -0
- package/plugin-src/host/channels/qq/rpc.mjs +11 -0
- package/plugin-src/host/channels/shared/rpc.mjs +9 -0
- package/plugin-src/host/channels/slack/rpc.mjs +10 -0
- package/plugin-src/host/channels/wecom/rpc.mjs +11 -0
- package/plugin-src/host/channels/wecom-app/rpc.mjs +10 -0
- package/plugin-src/host/channels/weixin/rpc.mjs +11 -0
- package/plugin-src/host/channels/whatsapp/rpc.mjs +11 -0
- package/scripts/verify-package.mjs +11 -6
- package/src/channels/dingtalk/dingtalk-bridge.mjs +31 -2
- package/src/channels/dingtalk/dingtalk-menu.mjs +1 -1
- package/src/channels/dingtalk/dingtalk-runtime.mjs +2 -1
- package/src/channels/discord/discord-runtime.mjs +3 -1
- package/src/channels/feishu/bridge.mjs +91 -15
- package/src/channels/feishu/feishu-cards.mjs +16 -11
- package/src/channels/feishu/feishu-runtime.mjs +10 -1
- package/src/channels/feishu/multi-bot-controller.mjs +18 -0
- package/src/channels/feishu/plugin-config-store.mjs +2 -1
- package/src/channels/feishu/slash-command-panel.mjs +1 -0
- package/src/channels/feishu/step-push-mode.mjs +21 -0
- package/src/channels/matrix/matrix-crypto.mjs +19 -5
- package/src/channels/qq/qq-bridge.mjs +40 -2
- package/src/channels/qq/qq-menu.mjs +2 -2
- package/src/channels/shared/bot-workspace-store.mjs +69 -1
- package/src/channels/shared/busy-message-dispatcher.mjs +94 -0
- package/src/channels/shared/clear-command.mjs +85 -0
- package/src/channels/shared/command-catalog.mjs +3 -0
- package/src/channels/shared/command-permission.mjs +2 -0
- package/src/channels/shared/control-command.mjs +20 -11
- package/src/channels/shared/harness-approval.mjs +102 -2
- package/src/channels/shared/i18n-en/feishu.mjs +6 -4
- package/src/channels/shared/i18n-en/qq.mjs +2 -1
- package/src/channels/shared/i18n-en/shared-b.mjs +27 -0
- package/src/channels/shared/i18n-en/shared-c.mjs +4 -0
- package/src/channels/shared/message-mode.mjs +19 -0
- package/src/channels/shared/text-harness-bridge.mjs +48 -5
- package/src/channels/wecom/wecom-bridge.mjs +26 -2
- package/src/channels/wecom/wecom-cards.mjs +1 -1
- package/src/channels/wecom-app/wecom-app-bridge.mjs +26 -2
- package/src/channels/weixin/weixin-bridge.mjs +22 -2
package/README.en.md
CHANGED
|
@@ -154,7 +154,7 @@ Use the proxy URL required by your network and restart the Host after changing i
|
|
|
154
154
|
| Reasoning effort | Explicitly choose an effort supported by the selected model, or follow the model default. Levels, descriptions, and defaults come from DSH. Switching models restores the new model's default effort. Each bot saves its own choice, which applies only to later new Sessions. |
|
|
155
155
|
| Agent Preset | Each bot can choose an Agent Preset on its settings card. When none is chosen, new Sessions follow the Host's `agent-presets.default`. A channel-level `config.agentPreset` is only the default for later new bots on that channel. Changing the preset never modifies or clears existing Sessions; if the current chat already has a Session, send `/new` and then a regular message to create one with the new selection. |
|
|
156
156
|
| Context enhancement | Open settings from a bot card to enable groups and DMs independently. Both switches default to off, including for existing bots after an upgrade. |
|
|
157
|
-
| Feishu command panel | Each Feishu bot decides, under **More settings → Command panel**, which commands the "/" list in the chat input offers and in what order. *Follow the default* keeps the shipped
|
|
157
|
+
| Feishu command panel | Each Feishu bot decides, under **More settings → Command panel**, which commands the "/" list in the chat input offers and in what order. *Follow the default* keeps the shipped 34-command manifest (updated with the plugin); *custom* is exactly the chosen commands in the chosen order. Hiding a command only removes it from the list — typing it by hand still works — and commands added outside this manifest are never removed. Once one bot is set up, **Save and copy to the other bots** writes the same panel to every other bot on the channel (their own panel settings are overwritten; offline bots pick it up when they start). The bot syncs the panel in the background after saving, so a change takes a moment with many commands. |
|
|
158
158
|
| Feishu topic on mention | On by default. Mentioning the bot in a group or a private chat opens a dedicated Feishu topic under that message, and both the question and the answer stay inside it. The topic is an independent conversation in the dsh session list, and later messages in the topic belong to the same conversation. A bare "@bot" (which opens the menu) opens no topic, and messages without a mention stay in the chat's own conversation. Turn it off from the bot card's "Group" settings to return to flat replies in groups and private chats alike. |
|
|
159
159
|
| Feishu task progress display | Each Feishu bot can hide progress or use Live process, Live process card, or step-by-step messages. Live process uses Feishu's native thinking-process surface for reasoning, tool calls, and results, then sends the final answer separately. It requires Feishu desktop 7.70, mobile 7.74, or newer. Feishu's native thinking process currently cannot be posted inside a topic, so turns in a topic use the Live process card instead and keep the process and the answer in the topic. |
|
|
160
160
|
| Feishu voice interaction | Configure each Feishu bot independently under **More settings → Voice** on its bot card (optional channel capability, off by default). When enabled, voice messages are transcoded with ffmpeg and transcribed by DashScope `qwen3-asr-flash`, then processed through the normal text pipeline (commands, Sessions, model calls, and file delivery behave identically); the same turn's answer is also synthesized with `qwen3-tts-flash` as a voice reply to the original message. If transcription fails, the bot falls back explicitly to the existing text/image/file-only notice. The DashScope key is managed in the plugin credential store by environment variable name (`secretRef`, default `DASHSCOPE_API_KEY`) and never enters bot configuration. The ASR model, TTS model, reply voice (official `qwen3-tts-flash` voices such as Cherry, Serena, Bella, Chelsie, Momo, Katerina), and ffmpeg path are per-bot settings. It requires a working local ffmpeg and a key that can reach DashScope. |
|
|
@@ -164,6 +164,17 @@ Channel prefixes are appended after DSH produces a title, preserving its complet
|
|
|
164
164
|
|
|
165
165
|
Logos are a dsh-im browser enhancement and require no changes to DSH. The adapter preserves original text nodes, clicks, menus, and dragging; copied titles, screen readers, and other surfaces retain the textual channel name. Unrecognized DSH page structures, unsupported browsers, or image-loading failures keep the text prefix. Unloading the plugin restores the original display.
|
|
166
166
|
|
|
167
|
+
### Queueing and steering
|
|
168
|
+
|
|
169
|
+
Open a bot's **More settings → General**, choose **New messages while a task is running**, and save. Each bot has its own setting, across all 13 chat channels.
|
|
170
|
+
|
|
171
|
+
- **Queue (default)**: process new messages after the current task finishes, with a queue receipt when they need to wait.
|
|
172
|
+
- **Steer**: add ordinary plain text to the current task for the Agent to read at its next step, with a submission receipt. There is no need to type `/steer` each time.
|
|
173
|
+
|
|
174
|
+
When idle, messages start a task normally. Images, files, voice messages, and quoted replies keep their existing handling. Group mention rules and permissions still apply; automatic steering requires `/steer` permission. Both modes retain `/steer <additional instruction>` for manual steering.
|
|
175
|
+
|
|
176
|
+
Saving takes effect for newly received messages immediately; already queued messages stay queued. AI Office has no ordinary chat follow-up input, so this setting does not apply to it.
|
|
177
|
+
|
|
167
178
|
### Proactive delivery
|
|
168
179
|
|
|
169
180
|
IM channels with proactive delivery support can send text through a stable `botId + targetId` pair. Bot settings support choosing a known conversation or entering a target manually, testing the current route before saving, and copying call parameters. HTTP POST, same-Host plugins, and Connection RPC share the same target configuration and delivery core.
|
|
@@ -193,7 +204,7 @@ Shells can embed the complete IM management panel through the optional `dshImCli
|
|
|
193
204
|
| Command | Description |
|
|
194
205
|
| --- | --- |
|
|
195
206
|
| `/help` | Show the commands and usage supported by the bot. |
|
|
196
|
-
| `/menu`, `/m` | Open the Feishu, DingTalk or Enterprise WeChat interactive menu. DingTalk arranges session, workspace, preset and model dropdowns in two columns; selections apply immediately and update the same card. WeCom requires Apply after selecting; open its menu explicitly with `/m` or `/menu`. Entering a direct chat does not open it automatically. Action buttons return their result without sending the menu again. Menus include new session, stop, compact, status and help buttons. |
|
|
207
|
+
| `/menu`, `/m` | Open the Feishu, DingTalk or Enterprise WeChat interactive menu. DingTalk arranges session, workspace, preset and model dropdowns in two columns; selections apply immediately and update the same card. WeCom requires Apply after selecting; open its menu explicitly with `/m` or `/menu`. Entering a direct chat does not open it automatically. Action buttons return their result without sending the menu again. Menus include new session, stop, compact, clear context, status and help buttons. |
|
|
197
208
|
| QQ `/menu`, `/m` | Open a button and numbered menu for session selection, workspace, mode/preset, model, new session, session list, stop, compact, steering, archived-session visibility, status and help. Lists support pagination; reply with a number when buttons are unavailable. Menus are scoped to the chat and actor and expire after 15 minutes or restart. Ordinary messages exit number selection; questions, approvals and batch input retain priority. |
|
|
198
209
|
| `/new` | Unbind the current chat so its next ordinary message starts a new Harness Session. |
|
|
199
210
|
| `/status` | Check the connection between the current bot and DeepSeek Harness. |
|
|
@@ -218,6 +229,7 @@ Shells can embed the complete IM management panel through the optional `dshImCli
|
|
|
218
229
|
| `/cancel` | Cancel batch input and discard its collected messages. |
|
|
219
230
|
| `/repair` | In a Feishu direct chat, incrementally repair the card callback and permissions required for media, group bot mentions, and the native Slash Command panel. |
|
|
220
231
|
| `/compact` | Immediately compact older context in the Session bound to the current chat. |
|
|
232
|
+
| `/clear` | Clear the model context in the Session bound to the current chat while retaining its Session binding and history; report explicitly when the current Host does not support the command. |
|
|
221
233
|
| `/workspace <workspace index or absolute path>`, `/ws <workspace index or absolute path>` | Switch the current bot's Harness workspace by `/workspacelist` index or absolute path. |
|
|
222
234
|
| `/workspacelist`, `/workspaces`, `/wsl` | List workspace absolute paths that still exist on the current Harness Host. |
|
|
223
235
|
| `/sessionlist [workspace number or absolute path]`, `/sessions [...]` | Equivalent aliases that list session IDs and titles in the selected workspace, including ungrouped sessions in the default IM directory; omit the argument to use the current workspace. |
|
package/README.md
CHANGED
|
@@ -166,6 +166,17 @@ dsh web
|
|
|
166
166
|
|
|
167
167
|
Logo 由 dsh-im 的浏览器适配显示,无需修改 DSH。适配保留原始文字节点和点击、菜单、拖拽操作;复制、读屏及其他界面仍保留文字渠道名。DSH 页面结构不匹配、浏览器不支持或图标加载失败时,自动保留文字前缀;插件卸载后恢复原始显示。
|
|
168
168
|
|
|
169
|
+
### 排队与插话
|
|
170
|
+
|
|
171
|
+
在机器人卡片中打开 **「更多设置 → 通用」**,选择 **「任务运行时的新消息处理方式」**,然后保存。每个机器人独立设置,覆盖全部 13 个聊天渠道。
|
|
172
|
+
|
|
173
|
+
- **排队(默认)**:当前任务结束后再处理新消息,需要等待时会回复排队提示。
|
|
174
|
+
- **插话**:任务运行期间,新的普通纯文字作为补充指令加入当前任务,Agent 在下一步读取,并回复提交提示。无需每次输入 `/steer`。
|
|
175
|
+
|
|
176
|
+
没有运行中的任务时正常开始新任务;图片、文件、语音和带引用的消息继续按原有方式处理。原有群聊提及规则和权限限制保留,自动插话需要具备 `/steer` 权限。两种模式均可使用 `/steer 补充内容` 手动插话。
|
|
177
|
+
|
|
178
|
+
保存后立即影响新收到的消息,已排队的消息不会转为插话。AI Office 当前没有普通聊天消息追加入口,此设置不适用。
|
|
179
|
+
|
|
169
180
|
### 主动投递
|
|
170
181
|
|
|
171
182
|
支持主动投递的 IM 渠道可以使用稳定的 `botId + targetId` 主动发送文字消息。机器人设置页支持从已聊会话选择或手工填写目标、保存前测试当前路由,以及复制调用参数;HTTP POST、同 Host 插件和 Connection RPC 共用同一目标配置与投递核心。
|
|
@@ -195,7 +206,7 @@ Logo 由 dsh-im 的浏览器适配显示,无需修改 DSH。适配保留原始
|
|
|
195
206
|
| 命令 | 作用 |
|
|
196
207
|
| --- | --- |
|
|
197
208
|
| `/help` | 显示机器人支持的命令和用法。 |
|
|
198
|
-
| `/menu`、`/m` | 飞书、钉钉和企业微信打开交互菜单。钉钉的会话、工作区、预设和模型按两列排列,选择后立即生效,并在原卡片更新结果。企微下拉选择后点击应用;菜单仅通过 `/m` 或 `/menu`
|
|
209
|
+
| `/menu`、`/m` | 飞书、钉钉和企业微信打开交互菜单。钉钉的会话、工作区、预设和模型按两列排列,选择后立即生效,并在原卡片更新结果。企微下拉选择后点击应用;菜单仅通过 `/m` 或 `/menu` 手动打开,进入单聊时不自动展示,按钮执行后仅反馈结果,不自动补发菜单。菜单还提供新会话、停止、压缩、清空上下文、状态与帮助等按钮。 |
|
|
199
210
|
| QQ `/menu`、`/m` | 打开按钮与数字菜单:会话选择、工作区、模式/预设、模型、新会话、会话列表、停止、压缩、补充指令、归档显示切换、状态和帮助。列表支持分页;按钮不可用时回复数字选择。菜单按聊天和操作者隔离,15 分钟或重启后失效;普通消息退出数字选择,审批、提问和批量输入保留原有优先级。 |
|
|
200
211
|
| `/new` | 解除当前聊天的会话绑定,让下一条普通消息开启全新 Harness 会话。 |
|
|
201
212
|
| `/status` | 检查当前机器人与 DeepSeek Harness 的连接状态。 |
|
|
@@ -220,6 +231,7 @@ Logo 由 dsh-im 的浏览器适配显示,无需修改 DSH。适配保留原始
|
|
|
220
231
|
| `/cancel` | 取消批量输入并丢弃已收集的消息。 |
|
|
221
232
|
| `/repair` | 在飞书私聊中增量修复卡片回调,并补全媒体、群聊机器人 @ 消息与原生 Slash Command 面板所需的权限。 |
|
|
222
233
|
| `/compact` | 立即压缩当前聊天绑定会话的较早上下文。 |
|
|
234
|
+
| `/clear` | 清空当前聊天绑定会话的模型上下文,同时保留 Session 绑定和历史记录;当前 Host 未注册该命令时会明确提示未支持。 |
|
|
223
235
|
| `/workspace <工作区序号或绝对路径>`、`/ws <工作区序号或绝对路径>` | 按 `/workspacelist` 序号或绝对路径切换当前机器人的 Harness 工作区。 |
|
|
224
236
|
| `/workspacelist`、`/workspaces`、`/wsl` | 列出当前 Harness Host 上仍然存在的工作区绝对路径。 |
|
|
225
237
|
| `/sessionlist [工作区序号或绝对路径]`、`/sessions [...]` | 两个等价命令;列出指定工作区的会话 ID 和标题,默认 IM 目录也包含其中的未分组会话;省略参数时使用当前工作区。 |
|
|
Binary file
|