@michengai/dsh-im-connect 0.1.76 → 1.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.
Files changed (52) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/CHANGELOG.zh-CN.md +21 -0
  3. package/README.md +6 -4
  4. package/README.zh-CN.md +6 -4
  5. package/client.js +692 -107
  6. package/lib/channels/weixin.d.ts.map +1 -1
  7. package/lib/channels/weixin.js +2 -0
  8. package/lib/channels/weixin.js.map +1 -1
  9. package/lib/client.js +724 -340
  10. package/lib/engine/assistant-text.d.ts +11 -0
  11. package/lib/engine/assistant-text.d.ts.map +1 -0
  12. package/lib/engine/assistant-text.js +12 -0
  13. package/lib/engine/assistant-text.js.map +1 -0
  14. package/lib/engine/choices.d.ts +2 -0
  15. package/lib/engine/choices.d.ts.map +1 -1
  16. package/lib/engine/choices.js +4 -2
  17. package/lib/engine/choices.js.map +1 -1
  18. package/lib/engine/deferred-delivery.d.ts +1 -1
  19. package/lib/engine/deferred-delivery.d.ts.map +1 -1
  20. package/lib/engine/deferred-delivery.js +3 -2
  21. package/lib/engine/deferred-delivery.js.map +1 -1
  22. package/lib/engine/delivery-history.d.ts +1 -1
  23. package/lib/engine/delivery-history.d.ts.map +1 -1
  24. package/lib/engine/delivery-history.js +2 -2
  25. package/lib/engine/delivery-history.js.map +1 -1
  26. package/lib/engine/file-delivery.js +1 -1
  27. package/lib/engine/file-delivery.js.map +1 -1
  28. package/lib/engine/gateway.d.ts.map +1 -1
  29. package/lib/engine/gateway.js +10 -8
  30. package/lib/engine/gateway.js.map +1 -1
  31. package/lib/engine/question.d.ts +1 -0
  32. package/lib/engine/question.d.ts.map +1 -1
  33. package/lib/engine/question.js +5 -1
  34. package/lib/engine/question.js.map +1 -1
  35. package/lib/engine/types.d.ts +2 -0
  36. package/lib/engine/types.d.ts.map +1 -1
  37. package/lib/plugin-updater.d.ts +3 -0
  38. package/lib/plugin-updater.d.ts.map +1 -1
  39. package/lib/plugin-updater.js +188 -3
  40. package/lib/plugin-updater.js.map +1 -1
  41. package/package.json +16 -16
  42. package/src/channels/weixin.ts +2 -0
  43. package/src/engine/assistant-text.ts +12 -0
  44. package/src/engine/choices.ts +11 -3
  45. package/src/engine/deferred-delivery.ts +3 -2
  46. package/src/engine/delivery-history.ts +2 -2
  47. package/src/engine/file-delivery.ts +1 -1
  48. package/src/engine/gateway.ts +10 -8
  49. package/src/engine/question.ts +5 -2
  50. package/src/engine/types.ts +2 -0
  51. package/src/plugin-update-ui.js +32 -13
  52. package/src/plugin-updater.ts +162 -3
package/CHANGELOG.md CHANGED
@@ -1,5 +1,26 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.0.0 - 2026-10-17
4
+
5
+ - Supported hosts now match the skills plugin: DeepSeek Harness `0.2.0-rc.1`, `0.2.0-rc.2`, `0.2.1-rc.1`, and `0.2.1-rc.2`. Hosts `0.2.1-alpha.1` through `0.2.1-alpha.5`, and anything before `0.2.0`, are refused by the version gate, so the plugin will not run; existing IM settings in the profile are not deleted. If you still use a `0.1.x` host, install plugin `0.1.78` instead of `@latest`. This is not “every release after `0.2.0`”: stable `0.2.0` and any prerelease outside this list are refused too.
6
+ - Widen channel binding and account settings dialogs to `720px`, aligning with Automation to prevent cramped form layouts.
7
+ - Add footer action to workspace select dropdown with a divider. Adding workspaces now strictly uses the host native system directory picker without manual path inputs, automatically creating and selecting the picked workspace. Hosts without native picker capabilities show "This Host cannot create workspaces" (upgrade to one of the supported host releases listed in Requirements, or add via the host sidebar).
8
+ - Top action buttons ("GitHub", "Issues", "Check for updates") now strictly match Skills Manager's host outline small button styles and icon layouts, removing custom size and color overrides from update button.
9
+
10
+ ## 0.1.78 - 2026-10-17
11
+
12
+ - Support DSH `0.2.1-alpha.4` and `0.2.1-alpha.5` while retaining all existing supported versions; pin development `@deepseek-ai/dsh*` dependencies to host `0.2.1-alpha.5`. Cordis stays at `4.0.5-alpha.2`.
13
+ - No production plugin API breaks. Declared host packages have no removed or renamed exports from `0.2.1-alpha.3` to `0.2.1-alpha.5`. Peer still includes `0.1.2-rc.1` and the `0.1.5` release candidates, so the older icon, slot, session-open, and file-read paths stay.
14
+
15
+ ## 0.1.77 - 2026-10-15
16
+
17
+ - Fix duplicated question option lists in native-button prompts for WeCom, Feishu/Lark, DingTalk, Telegram, Discord, and Slack. Keep option descriptions, multi-select checkmarks and submission buttons, ordinary menus, approvals, and text fallback intact.
18
+ - Place the multi-select submit action in the numbered option list, before the reply instruction, so number-only buttons still match the list.
19
+ - WeChat suppresses transition text in assistant messages that also contain tool calls, reducing reply-window consumption during long tasks. Text-only replies, approvals, questions, and result files keep their existing delivery behavior.
20
+ - Suppressed text is not counted as a successful delivery. A final reply explicitly rejected by the platform remains eligible for redelivery after a new message in the original chat; text recovered from history follows the same filtering rule.
21
+ - This does not remove WeChat server-side sending limits. Long reply fragments and necessary interactions may still exhaust the window; ambiguous failures and partial deliveries retain the conservative manual-retry policy.
22
+ - Empty assistant content no longer interrupts delivery or history recovery.
23
+
3
24
  ## 0.1.76 - 2026-10-15
4
25
 
5
26
  - Support DSH `0.2.1-alpha.3` while retaining all existing supported versions; pin development `@deepseek-ai/dsh*` dependencies to host `0.2.1-alpha.3` and Cordis to `4.0.5-alpha.2`.
@@ -4,6 +4,27 @@
4
4
 
5
5
  以下记录近期发布的版本。Git 标签与 GitHub Release 现已和这些条目同步;历史条目继续保留原始发布提交链接。
6
6
 
7
+ ## 1.0.0 - 2026-10-17
8
+
9
+ - 支持的宿主改为与技能插件相同的 DeepSeek Harness `0.2.0-rc.1`、`0.2.0-rc.2`、`0.2.1-rc.1`、`0.2.1-rc.2`。`0.2.1-alpha.1` 到 `0.2.1-alpha.5`,以及 `0.2.0` 之前的宿主,都会被版本门拒绝,插件不会运行;profile 里已有的 IM 配置不会被删除。仍在使用 `0.1.x` 的,请安装插件 `0.1.78`,不要装 `@latest`。这不是「`0.2.0` 以后全部接受」:正式版 `0.2.0` 和清单之外的预发布版同样会被拒绝。
10
+ - 绑定渠道与账号设置弹窗宽度对齐定时任务拓宽至 `720px`,解决宿主默认弹窗过窄拥挤的问题。
11
+ - 工作区下拉选择器支持底部分割线与「添加工作区…」footer 项;新增工作区彻底禁止手输路径,统一调起宿主原生系统文件选择器,选定后自动创建并选中;在未暴露原生选择器的旧宿主或环境上明确提示「当前 Host 无法新增工作区」(请升级到「环境要求」中列出的受支持宿主版本,或通过宿主侧栏新增)。
12
+ - 顶部「GitHub」、「问题反馈」和「检查更新」三个操作按钮完全对齐技能插件的宿主 outline 小按钮样式与图标排版,移除检查更新按钮多余的私有尺寸与字色覆盖。
13
+
14
+ ## 0.1.78 - 2026-10-17
15
+
16
+ - 支持 DSH `0.2.1-alpha.4` 和 `0.2.1-alpha.5`,继续兼容既有已支持版本;开发依赖中的 `@deepseek-ai/dsh*` 对齐宿主 `0.2.1-alpha.5`,Cordis 仍为 `4.0.5-alpha.2`。
17
+ - 本版无生产插件 API 破坏。`0.2.1-alpha.3` 到 `0.2.1-alpha.5` 的已声明宿主包没有导出删除或改名。peer 仍包含 `0.1.2-rc.1` 与 `0.1.5` 候选版,图标名、槽位、会话打开和文件读取的旧路径不能删除。
18
+
19
+ ## 0.1.77 - 2026-10-15
20
+
21
+ - 修复企业微信、飞书/Lark、钉钉、Telegram、Discord、Slack 原生按钮提问的选项列表重复;保留选项描述、多选勾选状态与提交按钮,普通菜单、审批和文字回退行为不变。
22
+ - 多选的「提交所选」排在编号选项列表中、回复说明之前,数字按钮仍能对上列表。
23
+ - 微信不再发送同一条助手消息中带工具调用的过渡文字,减少长任务对回复窗口的消耗;纯文本回复、审批、提问与成果文件保持原有投递方式。
24
+ - 主动过滤不冒充投递成功,最终答复被平台明确拒收时仍可等待原聊天新消息后补发;从历史读取的补发文字遵循同一过滤规则。
25
+ - 此调整不解除微信服务端的发送限制,长答复分片和必要交互仍可能耗尽窗口;网络异常或部分送达仍保持保守的手动重试策略。
26
+ - 空的助手内容不再打断投递或历史补发。
27
+
7
28
  ## 0.1.76 - 2026-10-15
8
29
 
9
30
  - 支持 DSH `0.2.1-alpha.3`,继续兼容既有已支持版本;开发依赖中的 `@deepseek-ai/dsh*` 对齐宿主 `0.2.1-alpha.3`,Cordis 对齐 `4.0.5-alpha.2`。
package/README.md CHANGED
@@ -93,7 +93,7 @@ The receive paths cover WeChat, WeCom, DingTalk, Feishu, Lark, QQ, Telegram, Dis
93
93
 
94
94
  WeChat, WeCom, DingTalk, Feishu, Lark, QQ, Telegram, Discord, and Slack accept ordinary files through Chat’s upload service for the current session. Send PDFs, documents or spreadsheets for the assistant to process. Format support follows web Chat’s models, tools and file capabilities; uploading does not guarantee that every format can be understood directly.
95
95
 
96
- - Requires the file-upload service in DSH `0.1.5-rc.1`, `0.1.5-rc.2`, `0.1.5-rc.3`, `0.1.7-rc.1`, `0.1.7-rc.2`, `0.2.0-rc.1`, `0.2.0-rc.2`, `0.2.1-alpha.2`, or `0.2.1-alpha.3`. On `0.1.2-rc.1`, file input asks you to upgrade; existing text and image support is unchanged.
96
+ - Requires the file-upload service on the supported hosts listed below: `0.2.0-rc.1`, `0.2.0-rc.2`, `0.2.1-rc.1`, and `0.2.1-rc.2`. Hosts before `0.2.0`, the `0.2.1` alphas, and stable `0.2.0` are refused by the version gate and the plugin will not run; saved account settings stay in the profile. If you still use a `0.1.x` host, install plugin `0.1.78` instead of `@latest`.
97
97
  - Up to 4 ordinary files per message, totaling 20 MiB. Channel download limits also apply.
98
98
  - Files become standard Chat attachments and are submitted with session-specific receipts, rather than local-path text.
99
99
  - Private admission and group mention rules remain in force. File captions such as `/new` or “allow” are content, not commands or approval responses.
@@ -105,7 +105,7 @@ WeChat, WeCom, DingTalk, Feishu, Lark, QQ, Telegram, Discord, and Slack can retu
105
105
 
106
106
  - Files successfully created or edited with Chat's supported file tools are sent after the reply. On hosts with `present`, explicitly presented files are also sent, including existing files.
107
107
  - File access follows Chat: files outside the workspace are allowed when the host can read them. The plugin does not extract arbitrary paths from reply text. Files created through shell commands need to be presented explicitly.
108
- - Newer hosts use Chat's complete-file download service and its configured size limit. DSH `0.1.2-rc.1` uses the host filesystem with a 32 MiB limit. Directories and symbolic links are not sent; channel-specific file limits still apply.
108
+ - Supported hosts use Chat's complete-file download service and its configured size limit. Directories and symbolic links are not sent; channel-specific file limits still apply.
109
109
  - A failed transfer produces a message naming the file and does not stop the remaining files. Switching away from the session or stopping the account prevents pending delivery from continuing to a different target.
110
110
  - Send `/export` as a standalone command to receive the current linked session’s Chat ZIP logs in this chat, without child sessions. The ZIP limit is 32 MiB; channel limits also apply. If the file is too large or cannot be sent, use `/export` in web Chat. Paths and other session IDs are not accepted.
111
111
 
@@ -143,6 +143,8 @@ Regular chat messages follow the actual task state. Commands continue to use tex
143
143
  - Slack: ✅ done, ❌ failed, 🤔 waiting, and 👀 processing are added as emoji reactions on the original message (requires `reactions:write`). Answers stream by editing one message; Slack has no bot typing indicator.
144
144
  - WeChat: typing is refreshed while processing and stopped when finished or waiting for confirmation. WeCom and QQ retain their existing reply behavior.
145
145
 
146
+ WeChat suppresses transition text in assistant messages that also contain `tool-call` blocks to reduce reply-window usage. Text-only replies, approvals, questions, and result files are unaffected by this filter. Suppressed text does not count as a successful delivery, and history-based redelivery uses the same rule. This does not remove platform limits: long reply fragments and necessary interactions may still exhaust the window. Ambiguous or partial deliveries are not blindly resent in full. See the [WeChat delivery handoff (Chinese)](docs/01-当前工作/I023-微信中间叙述投递过滤/00-迭代总览.md).
147
+
146
148
  Done means the turn completed normally and both text and files were delivered. Stopped or failed tasks and later queued messages are not marked done. Channel permissions and network conditions may prevent status updates without blocking chat. Text labels follow the web language setting.
147
149
 
148
150
  ## Connection diagnostics
@@ -199,7 +201,7 @@ For a desktop workbench, download [DSH Codex Desktop](https://github.com/Micheng
199
201
  ## Prerequisites
200
202
 
201
203
  - A working DeepSeek Harness Web installation with `dsh` available in PowerShell.
202
- - The current source supports DSH `0.1.2-rc.1`, `0.1.5-rc.1`, `0.1.5-rc.2`, `0.1.5-rc.3`, `0.1.7-rc.1`, `0.1.7-rc.2`, `0.2.0-rc.1`, `0.2.0-rc.2`, `0.2.1-alpha.2`, and `0.2.1-alpha.3`; `0.2.1-alpha.3` is recommended. The `0.1.6` and `0.1.7` preview builds are no longer supported; move to `0.2.0-rc.2` or `0.1.7-rc.2`. The older `0.1.2` and `0.1.5` builds stay available because they are published release candidates. On those two lines, grouping the channel list by workspace tree can show a single ungrouped list, and showing only archived sessions can be empty. DSH `0.1.0-rc.8` and `0.1.1-rc.2` lack the authentication and session-control interfaces this plugin requires; upgrade DSH first.
204
+ - The current source supports DSH `0.2.0-rc.1`, `0.2.0-rc.2`, `0.2.1-rc.1`, and `0.2.1-rc.2`; `0.2.1-rc.2` is recommended. `0.2.1-alpha.1` through `0.2.1-alpha.5`, stable `0.2.0`, and hosts before `0.2.0` are refused by the version gate: the plugin will not run, and existing IM settings in the profile are not deleted. If you still use a `0.1.x` host, install plugin `0.1.78` instead of `@latest`.
203
205
  - Examples use the `web` profile; replace it with the target profile.
204
206
  - Source installation and development require Node.js 22+. npm installation does not require running `npm install` in an arbitrary directory.
205
207
  - After install, restart `dsh web` and hard-refresh the browser before opening **Settings → IM Assistant**.
@@ -237,7 +239,7 @@ The settings title shows the installed version and a **Check for updates** butto
237
239
 
238
240
  ## Usage
239
241
 
240
- Open **Settings → IM Assistant**, select **Add account** under the target channel, then choose that account's workspace, model, permission, and private-access mode.
242
+ Open **Settings → IM Assistant**, select **Add account** under the target channel, then choose that account's workspace, model, permission, and private-access mode. To register a new workspace, click **Add workspace…** in the dropdown footer to invoke the system folder picker (manual path inputs are disallowed); hosts lacking native folder pickers show "This Host cannot create workspaces" (upgrade to one of the supported host releases listed in Requirements, or add via the host sidebar).
241
243
 
242
244
  | Goal | Action | Notes |
243
245
  | --- | --- | --- |
package/README.zh-CN.md CHANGED
@@ -95,7 +95,7 @@
95
95
 
96
96
  微信、企业微信、钉钉、飞书、Lark、QQ、Telegram、Discord、Slack 可接收普通文件,并通过 Chat 的上传服务交给当前会话。可以发送 PDF、文档、表格等文件,再让助手读取或处理;能否解析具体格式与网页 Chat 的模型、工具和文件能力一致,不承诺每种格式都能直接理解。
97
97
 
98
- - 需要 DSH `0.1.5-rc.1`、`0.1.5-rc.2`、`0.1.5-rc.3`、`0.1.7-rc.1`、`0.1.7-rc.2`、`0.2.0-rc.1`、`0.2.0-rc.2`、`0.2.1-alpha.2` 或 `0.2.1-alpha.3` 的文件上传服务;`0.1.2-rc.1` 明确提示升级,文字、图片等既有能力不变。
98
+ - 需要下列已支持宿主的文件上传服务:`0.2.0-rc.1`、`0.2.0-rc.2`、`0.2.1-rc.1`、`0.2.1-rc.2`。`0.2.0` 之前的宿主、`0.2.1` 的 alpha,以及正式版 `0.2.0` 会被版本门拒绝,插件不会运行;已保存的账号配置仍留在 profile 里。仍在使用 `0.1.x` 的,请安装插件 `0.1.78`,不要装 `@latest`。
99
99
  - 单条消息最多 4 个普通文件,累计最多 20 MiB,还受渠道下载限制约束。
100
100
  - 文件先保存为 Chat 标准附件,通过当前会话专属的凭据提交;不把本地路径文字当作文件输入。
101
101
  - 保留私聊准入与群聊提及规则;文件说明中的 `/new` 或“批准”属于普通内容,不执行命令或审批。
@@ -107,7 +107,7 @@
107
107
 
108
108
  - 使用 Chat 支持的文件工具成功新建或修改的文件,会在回复后发送;宿主支持 `present` 时,也会发送明确交付的文件,包括已有文件。
109
109
  - 文件访问范围与 Chat 一致,允许宿主可读取的工作区外文件。不从回复正文中猜测文件路径;通过脚本等方式生成的文件,需要助手明确 `present` 交付。
110
- - 新版宿主使用 Chat 完整文件下载服务及其配置的大小上限;DSH `0.1.2-rc.1` 使用宿主文件系统读取,上限为 32 MiB。目录和符号链接不发送,渠道自身的文件限制仍然适用。
110
+ - 已支持的宿主使用 Chat 完整文件下载服务及其配置的大小上限。目录和符号链接不发送,渠道自身的文件限制仍然适用。
111
111
  - 单个文件发送失败会明确提示文件名,并继续处理其他文件;切走会话或停止账号后,不会把尚未投递的文件转发到其他聊天。
112
112
  - 单独发送 `/export`,可将当前聊天绑定会话的 Chat ZIP 日志发回当前聊天(不含子会话)。ZIP 上限为 32 MiB,渠道自身限制仍适用;超限或发送失败时可在网页 Chat 使用 `/export` 下载。不接受路径或其他会话 ID 参数。
113
113
 
@@ -145,6 +145,8 @@ IM 消息发起的处理结束后,会在正文和文件投递完成后给出
145
145
  - Slack:用 ✅ 完成、❌ 失败、🤔 等待确认、👀 处理中作为消息表情回应(需要 `reactions:write`);回答通过编辑同一条消息逐步生成,Slack 没有机器人输入状态。
146
146
  - 微信:处理期间刷新输入状态,结束或等待确认时停止。企业微信、QQ 保持现有回复方式。
147
147
 
148
+ 微信默认不投递同一条助手消息中带 `tool-call` 的过渡文字,减少回复窗口消耗;纯文本回复、审批、提问和成果文件不受此过滤影响。过滤不算成功投递,补发读取历史时使用相同规则。该措施不会解除平台限额,长回复分片和必要交互仍可能占满窗口;送达未知或部分送达不会盲目整条重发。实现、验证与回滚见[微信投递交接](docs/01-当前工作/I023-微信中间叙述投递过滤/00-迭代总览.md)。
149
+
148
150
  “已完成”表示该回合正常结束且正文、文件均已投递;停止、失败和下一条排队消息不会误标完成。状态接口受渠道权限与网络影响,更新失败不阻塞聊天;文字标签跟随网页语言设置。
149
151
 
150
152
  ## 连接诊断
@@ -199,7 +201,7 @@ IM 消息发起的处理结束后,会在正文和文件投递完成后给出
199
201
  ## 前置条件
200
202
 
201
203
  - 已可正常运行 DeepSeek Harness Web,且可在 PowerShell 中使用 `dsh`。
202
- - 当前源码支持 DSH `0.1.2-rc.1`、`0.1.5-rc.1`、`0.1.5-rc.2`、`0.1.5-rc.3`、`0.1.7-rc.1`、`0.1.7-rc.2`、`0.2.0-rc.1`、`0.2.0-rc.2`、`0.2.1-alpha.2`、`0.2.1-alpha.3`,推荐 `0.2.1-alpha.3`。`0.1.6` 与 `0.1.7` 的预览版不再支持,请改用 `0.2.0-rc.2` 或 `0.1.7-rc.2`。更早的 `0.1.2` 和 `0.1.5` 是已经发布的候选版,所以继续可用。在这两版上,频道列表按工作区树查看时可能只有一个未分组,只看已归档时列表可能是空的。`0.1.0-rc.8`、`0.1.1-rc.2` 缺少本插件需要的认证与会话控制接口,请先升级 DSH。
204
+ - 当前源码支持 DSH `0.2.0-rc.1`、`0.2.0-rc.2`、`0.2.1-rc.1`、`0.2.1-rc.2`,推荐 `0.2.1-rc.2`。`0.2.1-alpha.1` 到 `0.2.1-alpha.5`、正式版 `0.2.0`,以及 `0.2.0` 之前的宿主都会被版本门拒绝:插件不会运行,profile 里已有的 IM 配置不会被删除。仍在使用 `0.1.x` 的,请安装插件 `0.1.78`,不要装 `@latest`。
203
205
  - 以下示例使用 `web` profile;请替换为实际目标 profile。
204
206
  - 从源码安装或二次开发需要 Node.js 22+;仅从 npm 安装无需在任意目录执行 `npm install`。
205
207
  - 安装后必须重启 `dsh web`,并在浏览器硬刷新,才能看到「设置 → IM助理」。
@@ -237,7 +239,7 @@ dsh --profile web --dump-config
237
239
 
238
240
  ## 使用
239
241
 
240
- 打开「设置 → IM助理」,在目标渠道点击「添加账号」,并为该账号选择工作区、模型、权限和私聊准入。
242
+ 打开「设置 → IM助理」,在目标渠道点击「添加账号」,并为该账号选择工作区、模型、权限和私聊准入。若需要新工作区,可展开工作区下拉列表点击底部的「添加工作区…」直接调起系统文件选择器(禁止手输路径);不支持原生目录选择器的宿主会提示「当前 Host 无法新增工作区」,请升级到「环境要求」中列出的受支持宿主版本,或直接在宿主侧栏添加工作区。
241
243
 
242
244
  | 目标 | 操作 | 说明 |
243
245
  | --- | --- | --- |