@michengai/dsh-im-connect 1.0.14 → 1.0.15

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/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.0.15 - 2026-10-24
4
+
5
+ - Support DeepSeek Harness `0.2.1-rc.3` while retaining all existing supported versions.
6
+
3
7
  ## 1.0.14 - 2026-10-23
4
8
 
5
9
  - Deliver outbound images on Feishu / Lark as real image messages: upload through `im/v1/images` with `image_type=message`, then send with `msg_type=image` so pictures render inline instead of arriving as file attachments (PR #47).
@@ -4,6 +4,10 @@
4
4
 
5
5
  以下记录近期发布的版本。Git 标签与 GitHub Release 现已和这些条目同步;历史条目继续保留原始发布提交链接。
6
6
 
7
+ ## 1.0.15 - 2026-10-24
8
+
9
+ - 支持 DeepSeek Harness `0.2.1-rc.3`,继续兼容此前已支持的宿主版本。
10
+
7
11
  ## 1.0.14 - 2026-10-23
8
12
 
9
13
  - 飞书 / Lark 回传图片时改用图片消息:先调 `im/v1/images` 上传(`image_type=message`),再以 `msg_type=image` 发送,聊天中直接内联预览,不再以文件形式出现(PR #47)。
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 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`.
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`, `0.2.1-rc.2`, and `0.2.1-rc.3`. 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.
@@ -201,7 +201,7 @@ For a desktop workbench, download [DSH Codex Desktop](https://github.com/Micheng
201
201
  ## Prerequisites
202
202
 
203
203
  - A working DeepSeek Harness Web installation with `dsh` available in PowerShell.
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`.
204
+ - The current source supports DSH `0.2.0-rc.1`, `0.2.0-rc.2`, `0.2.1-rc.1`, `0.2.1-rc.2`, and `0.2.1-rc.3`; `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`.
205
205
  - Examples use the `web` profile; replace it with the target profile.
206
206
  - Source installation and development require Node.js 22+. npm installation does not require running `npm install` in an arbitrary directory.
207
207
  - After install, restart `dsh web` and hard-refresh the browser before opening **Settings → IM Assistant**.
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
- - 需要下列已支持宿主的文件上传服务:`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`。
98
+ - 需要下列已支持宿主的文件上传服务:`0.2.0-rc.1`、`0.2.0-rc.2`、`0.2.1-rc.1`、`0.2.1-rc.2`、`0.2.1-rc.3`。`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` 或“批准”属于普通内容,不执行命令或审批。
@@ -201,7 +201,7 @@ IM 消息发起的处理结束后,会在正文和文件投递完成后给出
201
201
  ## 前置条件
202
202
 
203
203
  - 已可正常运行 DeepSeek Harness Web,且可在 PowerShell 中使用 `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`。
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.3`,推荐 `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`。
205
205
  - 以下示例使用 `web` profile;请替换为实际目标 profile。
206
206
  - 从源码安装或二次开发需要 Node.js 22+;仅从 npm 安装无需在任意目录执行 `npm install`。
207
207
  - 安装后必须重启 `dsh web`,并在浏览器硬刷新,才能看到「设置 → IM助理」。
package/client.js CHANGED
@@ -679,8 +679,8 @@ window.__ModuleLoader__.load({
679
679
  .ima-title-row{display:flex;align-items:center;gap:8px 12px;min-width:0;flex-wrap:wrap}
680
680
  .ima-title-links{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
681
681
  .ima-title-links>span[data-mpi-check]{display:inline-flex;align-items:center}
682
- [data-ima-nav-icon="assistant"]>svg{display:none!important}
683
- .ima-nav-icon-assistant{display:inline-block;flex:none;width:16px;height:16px;background:currentColor;-webkit-mask:var(--ima-nav-icon-mask) center/contain no-repeat;mask:var(--ima-nav-icon-mask) center/contain no-repeat}
682
+ [data-ima-nav-icon]>svg{display:none!important}
683
+ [data-ima-nav-icon]::before{content:'';flex:none;width:16px;height:16px;background:currentColor;-webkit-mask:var(--ima-nav-icon-mask) center/contain no-repeat;mask:var(--ima-nav-icon-mask) center/contain no-repeat;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-position:center;mask-position:center;-webkit-mask-size:16px 16px;mask-size:16px 16px}
684
684
  .ima-btn{display:inline-flex;align-items:center;justify-content:center;gap:4px;height:32px;padding:0 12px;border:0.5px solid var(--dsw-alias-border-l3,#555);border-radius:var(--dsw-radius-sm,8px);background:transparent;color:var(--dsw-alias-label-primary,#eee);font:inherit;font-size:13px;line-height:20px;cursor:pointer;user-select:none;box-sizing:border-box;text-decoration:none;transition:border-color 120ms ease,color 120ms ease,background 120ms ease}
685
685
  .ima-btn:not(.is-primary):not(.ima-btn-danger){color:var(--dsw-alias-label-primary,#eee)!important}
686
686
  .ima-btn:hover:not(:disabled):not(.ima-btn-danger){border-color:var(--dsw-alias-border-l3,#666)!important;color:var(--dsw-alias-label-primary,#fff)!important;background:var(--dsw-alias-interactive-bg-hover,rgba(255,255,255,.06))!important}
@@ -3916,7 +3916,6 @@ window.__ModuleLoader__.load({
3916
3916
  };
3917
3917
 
3918
3918
  const NAV_ICON_MARKER = "data-ima-nav-icon";
3919
- const NAV_ICON_CLASS = "ima-nav-icon-assistant";
3920
3919
  const NAV_ROW_SELECTOR = '[role="dialog"] nav button';
3921
3920
 
3922
3921
  function isOwnNavRow(rowText, wantedLabel) {
@@ -3927,27 +3926,23 @@ window.__ModuleLoader__.load({
3927
3926
  }
3928
3927
 
3929
3928
  function applySettingsNavIcon(button, wantedLabel) {
3930
- if (!isOwnNavRow(button.textContent, wantedLabel())) return false;
3931
- if (!button.querySelector(":scope > svg")) return false;
3932
- if (button.getAttribute(NAV_ICON_MARKER) === "assistant" && button.querySelector(`.${NAV_ICON_CLASS}`)) return false;
3933
- button.setAttribute(NAV_ICON_MARKER, "assistant");
3934
- let icon = button.querySelector(`.${NAV_ICON_CLASS}`);
3935
- if (!icon) {
3936
- // 不改宿主 svg 内容:皮肤的内容级识别/隐藏规则只作用于 svg 子节点,
3937
- // 这里用独立的 mask 图标,避免与其互相覆盖。
3938
- icon = document.createElement("span");
3939
- icon.className = NAV_ICON_CLASS;
3940
- icon.setAttribute("aria-hidden", "true");
3941
- icon.setAttribute("style", `--ima-nav-icon-mask:${settingsNavIconMask()}`);
3942
- button.prepend(icon);
3929
+ const isOwn = isOwnNavRow(button.textContent, wantedLabel());
3930
+ if (isOwn) {
3931
+ button.style.setProperty("--ima-nav-icon-mask", settingsNavIconMask());
3932
+ if (button.getAttribute(NAV_ICON_MARKER) === "") return false;
3933
+ button.setAttribute(NAV_ICON_MARKER, "");
3934
+ return true;
3943
3935
  }
3944
- return true;
3936
+ if (button.hasAttribute(NAV_ICON_MARKER)) {
3937
+ button.removeAttribute(NAV_ICON_MARKER);
3938
+ return true;
3939
+ }
3940
+ return false;
3945
3941
  }
3946
3942
 
3947
3943
  function restoreSettingsNavIcon(button) {
3944
+ if (!button.hasAttribute(NAV_ICON_MARKER)) return false;
3948
3945
  button.removeAttribute(NAV_ICON_MARKER);
3949
- const icon = button.querySelector(`.${NAV_ICON_CLASS}`);
3950
- if (icon) icon.remove();
3951
3946
  return true;
3952
3947
  }
3953
3948
 
package/lib/client.js CHANGED
@@ -1081,8 +1081,8 @@ function observePluginUpdate(options) {
1081
1081
  .ima-title-row{display:flex;align-items:center;gap:8px 12px;min-width:0;flex-wrap:wrap}
1082
1082
  .ima-title-links{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
1083
1083
  .ima-title-links>span[data-mpi-check]{display:inline-flex;align-items:center}
1084
- [data-ima-nav-icon="assistant"]>svg{display:none!important}
1085
- .ima-nav-icon-assistant{display:inline-block;flex:none;width:16px;height:16px;background:currentColor;-webkit-mask:var(--ima-nav-icon-mask) center/contain no-repeat;mask:var(--ima-nav-icon-mask) center/contain no-repeat}
1084
+ [data-ima-nav-icon]>svg{display:none!important}
1085
+ [data-ima-nav-icon]::before{content:'';flex:none;width:16px;height:16px;background:currentColor;-webkit-mask:var(--ima-nav-icon-mask) center/contain no-repeat;mask:var(--ima-nav-icon-mask) center/contain no-repeat;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-position:center;mask-position:center;-webkit-mask-size:16px 16px;mask-size:16px 16px}
1086
1086
  .ima-btn{display:inline-flex;align-items:center;justify-content:center;gap:4px;height:32px;padding:0 12px;border:0.5px solid var(--dsw-alias-border-l3,#555);border-radius:var(--dsw-radius-sm,8px);background:transparent;color:var(--dsw-alias-label-primary,#eee);font:inherit;font-size:13px;line-height:20px;cursor:pointer;user-select:none;box-sizing:border-box;text-decoration:none;transition:border-color 120ms ease,color 120ms ease,background 120ms ease}
1087
1087
  .ima-btn:not(.is-primary):not(.ima-btn-danger){color:var(--dsw-alias-label-primary,#eee)!important}
1088
1088
  .ima-btn:hover:not(:disabled):not(.ima-btn-danger){border-color:var(--dsw-alias-border-l3,#666)!important;color:var(--dsw-alias-label-primary,#fff)!important;background:var(--dsw-alias-interactive-bg-hover,rgba(255,255,255,.06))!important}
@@ -4318,7 +4318,6 @@ function observePluginUpdate(options) {
4318
4318
  };
4319
4319
 
4320
4320
  const NAV_ICON_MARKER = "data-ima-nav-icon";
4321
- const NAV_ICON_CLASS = "ima-nav-icon-assistant";
4322
4321
  const NAV_ROW_SELECTOR = '[role="dialog"] nav button';
4323
4322
 
4324
4323
  function isOwnNavRow(rowText, wantedLabel) {
@@ -4329,27 +4328,23 @@ function observePluginUpdate(options) {
4329
4328
  }
4330
4329
 
4331
4330
  function applySettingsNavIcon(button, wantedLabel) {
4332
- if (!isOwnNavRow(button.textContent, wantedLabel())) return false;
4333
- if (!button.querySelector(":scope > svg")) return false;
4334
- if (button.getAttribute(NAV_ICON_MARKER) === "assistant" && button.querySelector(`.${NAV_ICON_CLASS}`)) return false;
4335
- button.setAttribute(NAV_ICON_MARKER, "assistant");
4336
- let icon = button.querySelector(`.${NAV_ICON_CLASS}`);
4337
- if (!icon) {
4338
- // 不改宿主 svg 内容:皮肤的内容级识别/隐藏规则只作用于 svg 子节点,
4339
- // 这里用独立的 mask 图标,避免与其互相覆盖。
4340
- icon = document.createElement("span");
4341
- icon.className = NAV_ICON_CLASS;
4342
- icon.setAttribute("aria-hidden", "true");
4343
- icon.setAttribute("style", `--ima-nav-icon-mask:${settingsNavIconMask()}`);
4344
- button.prepend(icon);
4331
+ const isOwn = isOwnNavRow(button.textContent, wantedLabel());
4332
+ if (isOwn) {
4333
+ button.style.setProperty("--ima-nav-icon-mask", settingsNavIconMask());
4334
+ if (button.getAttribute(NAV_ICON_MARKER) === "") return false;
4335
+ button.setAttribute(NAV_ICON_MARKER, "");
4336
+ return true;
4345
4337
  }
4346
- return true;
4338
+ if (button.hasAttribute(NAV_ICON_MARKER)) {
4339
+ button.removeAttribute(NAV_ICON_MARKER);
4340
+ return true;
4341
+ }
4342
+ return false;
4347
4343
  }
4348
4344
 
4349
4345
  function restoreSettingsNavIcon(button) {
4346
+ if (!button.hasAttribute(NAV_ICON_MARKER)) return false;
4350
4347
  button.removeAttribute(NAV_ICON_MARKER);
4351
- const icon = button.querySelector(`.${NAV_ICON_CLASS}`);
4352
- if (icon) icon.remove();
4353
4348
  return true;
4354
4349
  }
4355
4350
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@michengai/dsh-im-connect",
3
- "version": "1.0.14",
3
+ "version": "1.0.15",
4
4
  "description": "DSH IM Connect — 将主流即时通讯平台接入本机 DeepSeek Harness · Connect major messaging platforms to local DeepSeek Harness agents",
5
5
  "type": "module",
6
6
  "packageManager": "pnpm@11.22.0",
@@ -56,12 +56,12 @@
56
56
  },
57
57
  "peerDependencies": {
58
58
  "@deepseek-ai/cordis": "^4.0.2",
59
- "@deepseek-ai/dsh-agent": "0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-rc.1 || 0.2.1-rc.2",
60
- "@deepseek-ai/dsh-client-locale": "0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-rc.1 || 0.2.1-rc.2",
61
- "@deepseek-ai/dsh-client-ui-primitives": "0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-rc.1 || 0.2.1-rc.2",
62
- "@deepseek-ai/dsh-client-ui-settings": "0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-rc.1 || 0.2.1-rc.2",
63
- "@deepseek-ai/dsh-client-ui-slots": "0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-rc.1 || 0.2.1-rc.2",
64
- "@deepseek-ai/dsh-host-webserver": "0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-rc.1 || 0.2.1-rc.2",
59
+ "@deepseek-ai/dsh-agent": "0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-rc.1 || 0.2.1-rc.2 || 0.2.1-rc.3",
60
+ "@deepseek-ai/dsh-client-locale": "0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-rc.1 || 0.2.1-rc.2 || 0.2.1-rc.3",
61
+ "@deepseek-ai/dsh-client-ui-primitives": "0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-rc.1 || 0.2.1-rc.2 || 0.2.1-rc.3",
62
+ "@deepseek-ai/dsh-client-ui-settings": "0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-rc.1 || 0.2.1-rc.2 || 0.2.1-rc.3",
63
+ "@deepseek-ai/dsh-client-ui-slots": "0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-rc.1 || 0.2.1-rc.2 || 0.2.1-rc.3",
64
+ "@deepseek-ai/dsh-host-webserver": "0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-rc.1 || 0.2.1-rc.2 || 0.2.1-rc.3",
65
65
  "@deepseek-ai/schemastery": "^3.18.2",
66
66
  "react": "^18.2.0"
67
67
  },