@michengai/dsh-im-connect 0.1.38 → 0.1.40

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
@@ -4,7 +4,20 @@
4
4
 
5
5
  The five most recent published versions are listed below. Git tags and GitHub Releases now mirror these entries; historical sections retain links to their original release commits.
6
6
 
7
- ## Unreleased
7
+ ## 0.1.40 - 2026-09-10
8
+
9
+ - Fix #12: retain previous channel sessions after `/new`, `/clear`, and workspace changes. Opening, renaming, and archiving historical sessions no longer change the current IM chat binding.
10
+ - Recover history indexes for recognizable IM IDs from persisted Host logs at startup while preserving archive state. Failed restoration never creates empty sessions, and unknown persistence state never removes indexes.
11
+ - Synchronize automatic and manual Host titles while protecting manual names and legacy names with unknown ownership. New sessions use the first message or attachment name as a fallback with Unicode-safe truncation.
12
+ - Keep channel entries when archiving or deletion fails; reliably deleted historical logs no longer retain invalid indexes because of stale archive markers. Align both READMEs and chat help.
13
+ - All 416 tests pass locally with real Host-package contract tests enabled (0 skipped). End-to-end verification of the DSH UI, mobile channels, and Archive Manager remains outstanding. Restart DSH and refresh the page after upgrading.
14
+
15
+ ## 0.1.39 - 2026-09-09
16
+
17
+ - Remove the unused legacy composer component while preserving the current host composer entry.
18
+
19
+ - Unified settings headings, descriptions, and action layouts; maintenance controls no longer squeeze titles or versions. The layout adapts to native DSH settings without Codex UI.
20
+ - Keep account lists and details side by side in equal-width columns with compact channel rows; fix box sizing that caused horizontal overflow in the native settings dialog.
8
21
 
9
22
  ## 0.1.38 - 2026-09-08
10
23
 
@@ -4,7 +4,20 @@
4
4
 
5
5
  以下记录最近发布的五个版本。Git 标签与 GitHub Release 现已和这些条目同步;历史条目继续保留原始发布提交链接。
6
6
 
7
- ## 未发布
7
+ ## 0.1.40 - 2026-09-10
8
+
9
+ - 修复 #12:`/new`、`/clear` 和工作区切换保留旧频道会话;打开、改名和归档历史会话不改变当前 IM 聊天绑定。
10
+ - 启动时从宿主持久化日志补回可识别 IM ID 的历史索引,保留归档状态;恢复失败不创建空会话,持久化状态未知时不删除索引。
11
+ - 同步宿主自动与手动标题,保护手动名称和来源未知的旧名称;新会话以首条消息或附件名兜底,安全截断 Unicode 文本。
12
+ - 归档或删除失败不再移除频道入口;已确认删除的历史日志不再因残留归档标记保留无效索引。同步中英文 README 与聊天帮助。
13
+ - 本机启用真实宿主包合同测试后 416 项全部通过(0 跳过);真实 DSH 界面、手机渠道和归档管理器端到端联调仍未验证。升级后请重启 DSH 并刷新页面。
14
+
15
+ ## 0.1.39 - 2026-09-09
16
+
17
+ - 移除未使用的旧输入框组件,保留当前宿主输入入口。
18
+
19
+ - 统一设置页标题、说明与操作布局,标题及版本不再被维护按钮挤压;适配原生 DSH 设置内容区,无需安装 Codex UI。
20
+ - 账号列表使用紧凑双行渠道条目,左右列表和详情保持等宽布局;修复原生设置弹窗中盒模型导致的横向溢出。
8
21
 
9
22
  ## 0.1.38 - 2026-09-08
10
23
 
package/README.en.md CHANGED
@@ -22,14 +22,14 @@
22
22
 
23
23
  ## Features
24
24
 
25
- - Connect DingTalk, Feishu, Lark, WeChat, WeCom, QQ, and Telegram from **Settings → IM Assistant**.
26
- - Add multiple accounts under the same channel. Each account has its own workspace, model, reasoning effort, permission, private-access mode, credentials, allowlist, and session state.
27
- - Each IM chat maps to an independent DSH session under the workspace **Channels** tab, never mixed into web **Tasks**.
28
- - Send work and read replies from the phone. When DSH needs input, handle tool approval or denial, single choice, multiple choice, and custom answers in the originating IM conversation.
29
- - Bind by QR code or credentials. Secrets go into DSH `ctx.credentials`, not `channels.json`.
30
- - Paste one sentence into DSH, Codex, or WorkBuddy and let that agent install the plugin locally.
31
- - Groups need no binding, only a mention. In DMs, QR scanners are auto-allowed only when the platform returns their identity; everyone else must be approved on the settings page.
32
- - After a successful bind, the configure dialog closes by itself and Settings stays open.
25
+ Send tasks to your local DSH through your usual messenger, even when you are away from the computer. Receive replies, answer questions, and handle tool approvals in the same chat.
26
+
27
+ - **Connect familiar platforms**: DingTalk, Feishu, Lark, WeChat, WeCom, QQ, and Telegram.
28
+ - **Configure accounts separately**: each account has its own workspace, model, reasoning effort, permissions, and private-access mode.
29
+ - **Handle task interactions on your phone**: send work, read replies, and answer single- or multiple-choice questions. Approved users can approve or deny tools in private chats.
30
+ - **Keep chat records separate**: each IM chat has its own session under **Channels** in the web workspace.
31
+ - **Connect by QR code or credentials**: use the platform-specific setup in **Settings → IM Assistant**, then control message reception per account.
32
+ - **Control access**: groups trigger through mentions and private chats follow each account’s access settings, as detailed below.
33
33
 
34
34
  ## Who can drive the assistant
35
35
 
@@ -114,13 +114,18 @@ After connecting, drive the local assistant from each IM:
114
114
 
115
115
  ## DSH product ecosystem
116
116
 
117
- This product can be installed independently or used through the desktop app or Web suite. They share the same DSH core but serve different ways of working:
117
+ For a ready-to-use workbench, download [DSH Codex Desktop](https://github.com/MichengAI/dsh-codex-desktop/releases). If you already use [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness), install any of these eight plugins individually. The desktop app includes all eight.
118
118
 
119
- | Product | Relationship to this product |
119
+ | Plugin | What you can do |
120
120
  | --- | --- |
121
- | [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) | The host runtime that provides models, sessions, tools, and the plugin system |
122
- | [DSH Codex Desktop](https://github.com/MichengAI/dsh-codex-desktop) | A ready-to-install desktop product with this product and the other five feature products built in |
123
- | Six feature products | [Codex UI](https://github.com/MichengAI/dsh-codex-ui) · [IM Connect](https://github.com/MichengAI/dsh-im-connect) · [Automation](https://github.com/MichengAI/dsh-automation) · [Skills Manager](https://github.com/MichengAI/dsh-skills-manager) · [Archive Manager](https://github.com/MichengAI/dsh-archive-manager) · [Agency Agents](https://github.com/MichengAI/dsh-agency-agents) |
121
+ | [Codex UI](https://github.com/MichengAI/dsh-codex-ui) | Organize projects and conversations, search tasks, and navigate chat turns |
122
+ | [IM Connect](https://github.com/MichengAI/dsh-im-connect) | Send tasks and receive replies through your usual messenger |
123
+ | [Automation](https://github.com/MichengAI/dsh-automation) | Schedule tasks and review each run |
124
+ | [Skills Manager](https://github.com/MichengAI/dsh-skills-manager) | Find, enable, create, and import local skills |
125
+ | [Archive Manager](https://github.com/MichengAI/dsh-archive-manager) | Search, restore, or clean up archived conversations |
126
+ | [Agency Agents](https://github.com/MichengAI/dsh-agency-agents) | Choose and summon specialists for your task |
127
+ | [BTW](https://github.com/MichengAI/dsh-btw) | Ask side questions without interrupting the main task |
128
+ | [Simplify](https://github.com/MichengAI/dsh-simplify) | Use /simplify to improve code within your Git changes |
124
129
 
125
130
  ## Prerequisites
126
131
 
@@ -131,40 +136,16 @@ This product can be installed independently or used through the desktop app or W
131
136
 
132
137
  ## Installation
133
138
 
134
- `dsh plugin add` forwards to `pnpm add` in the profile directory. Without a version and official registry, a local mirror or minimum-release-age policy can leave you on an older build.
135
-
136
- ### Ask another agent to install it
139
+ The installation commands below use the official npm registry.
137
140
 
138
- This plugin runs inside DeepSeek Harness Web. Copy one of the sentences below into DSH, Codex, or WorkBuddy and let that agent install it into your local `web` profile.
141
+ ### Ask an agent to install it (recommended)
139
142
 
140
- From npm:
143
+ Send the prompt below to any agent that can run terminal commands on your computer. Replace `web` with your actual profile. Once installed, use the plugin in DSH.
141
144
 
142
145
  ```text
143
- Install the latest DSH plugin @michengai/dsh-im-connect into my local web profile using the official npm registry: dsh plugin --profile web add @michengai/dsh-im-connect@latest --registry=https://registry.npmjs.org/. Then run dsh --profile web --dump-config, confirm im-connect is mounted, and remind me to restart DSH Web, hard-refresh the browser, and open Settings → IM Assistant.
144
- ```
145
-
146
- From source:
147
-
148
- ```text
149
- Install the DSH plugin from source at https://github.com/MichengAI/dsh-im-connect: clone it, run npm install and npm test, then run dsh plugin --profile web add . from that directory. Do not copy lib by itself. Then run dsh --profile web --dump-config, confirm im-connect is mounted, and remind me to restart DSH Web, hard-refresh the browser, and open Settings → IM Assistant.
150
- ```
151
-
152
- | Product | How to use it |
153
- | --- | --- |
154
- | DSH | Send one of the sentences above to the current session. |
155
- | Codex | Send one of the sentences above to Codex and let it install locally. |
156
- | WorkBuddy | Send one of the sentences above to WorkBuddy; for a source install you can also paste `https://github.com/MichengAI/dsh-im-connect`. |
157
-
158
- Codex and WorkBuddy only install the plugin. After that, open DSH Web and use **Settings → IM Assistant**.
159
-
160
- You can also run the same npm command yourself:
161
-
162
- ```powershell
163
- dsh plugin --profile web add @michengai/dsh-im-connect@latest --registry=https://registry.npmjs.org/
146
+ Install the DSH plugin @michengai/dsh-im-connect into my local web profile by running: dsh plugin --profile web add @michengai/dsh-im-connect@latest --registry=https://registry.npmjs.org/. Then run dsh --profile web --dump-config, confirm the configuration includes im-connect, and explain how to reload DSH and start using the plugin.
164
147
  ```
165
148
 
166
- If `dsh` is not on PATH, replace the leading `dsh` with `npx --yes @deepseek-ai/dsh`.
167
-
168
149
  ### Install the latest package from the official npm registry
169
150
 
170
151
  Run this from any PowerShell directory:
@@ -180,31 +161,13 @@ To pin a release, replace `@latest` with a version such as `@0.1.28`.
180
161
 
181
162
  The configuration output should contain `im-connect`. Restart DSH Web and hard-refresh the browser. Do not copy client files manually: `dsh plugin add` also applies `cordis.patch.yml`.
182
163
 
183
- ### Install from source
184
-
185
- Use this for debugging or unpublished changes. The cloned directory becomes the plugin source path:
186
-
187
- ```powershell
188
- [Console]::OutputEncoding = [System.Text.Encoding]::UTF8
189
- $OutputEncoding = [System.Text.Encoding]::UTF8
190
- Set-Location D:\Repository\deepseek-harness-plugin
191
- git clone https://github.com/MichengAI/dsh-im-connect.git
192
- Set-Location .\dsh-im-connect
193
- npm install
194
- npm test
195
- dsh plugin --profile web add .
196
- dsh --profile web --dump-config
197
- ```
198
-
199
- Restart DSH Web and hard-refresh the browser. `dsh plugin ... add .` reads the package metadata and `cordis.patch.yml`; do not install by copying `lib` directly.
200
-
201
164
  ## Updates
202
165
 
203
166
  The settings title shows the installed version and a **Check for updates** button. When a newer release is available, **Update automatically** runs only when the DSH CLI or Desktop update service is available; otherwise, the dialog provides a profile-specific manual command to copy and run.
204
167
 
205
168
  ## Usage
206
169
 
207
- Open **Settings → IM Assistant**, select **Add account** under the target channel, then choose that account's workspace, model, permission, and private-access mode. The full guide is [Usage guide](docs/02-产品与业务/04-使用说明.md).
170
+ Open **Settings → IM Assistant**, select **Add account** under the target channel, then choose that account's workspace, model, permission, and private-access mode.
208
171
 
209
172
  | Goal | Action | Notes |
210
173
  | --- | --- | --- |
@@ -213,7 +176,7 @@ Open **Settings → IM Assistant**, select **Add account** under the target chan
213
176
  | Pause receiving | Select the account and turn off **Receive messages** on the right | Credentials and settings stay; only new inbound messages for that account pause |
214
177
  | Send work from IM | WeChat / Feishu / Lark / QQ QR scanners can DM immediately; DingTalk / WeCom scanners and other users need approval. Groups only need a mention | Each chat has its own channel session |
215
178
  | Split input | End with `..` to continue, `!!` to flush now | Default merge window is about 5 seconds |
216
- | Start a new session | Send `/new` or `/clear` | Affects only the current IM chat |
179
+ | Start a new session | Send `/new` or `/clear` | Creates and switches the current IM session; previous sessions stay in the Channels list without affecting web tasks |
217
180
  | Status / help | Send `/status` or `/help` | Scoped to the current channel session |
218
181
  | Approve a stranger DM | Open **Settings → IM Assistant** and approve or deny the pending request | Affects DM access only |
219
182
  | Answer an interactive question | Reply with an option number or text; separate multiple choices with commas, or enter a custom answer | Multiple questions arrive in order; only the initiating user can answer in a group |
@@ -239,6 +202,24 @@ Keep the DSH backend listening on loopback. Remote access should use a controlle
239
202
 
240
203
  ## Secondary development
241
204
 
205
+ ### Install from source
206
+
207
+ Use this for debugging or unpublished changes. The cloned directory becomes the plugin source path:
208
+
209
+ ```powershell
210
+ [Console]::OutputEncoding = [System.Text.Encoding]::UTF8
211
+ $OutputEncoding = [System.Text.Encoding]::UTF8
212
+ Set-Location D:\Repository\deepseek-harness-plugin
213
+ git clone https://github.com/MichengAI/dsh-im-connect.git
214
+ Set-Location .\dsh-im-connect
215
+ npm install
216
+ npm test
217
+ dsh plugin --profile web add .
218
+ dsh --profile web --dump-config
219
+ ```
220
+
221
+ Restart DSH Web and hard-refresh the browser. `dsh plugin ... add .` reads the package metadata and `cordis.patch.yml`; do not install by copying `lib` directly.
222
+
242
223
  This repository develops in `src` and builds to `lib`:
243
224
 
244
225
  - [src\index.ts](src/index.ts): host entry, config, and lifecycle.
@@ -271,8 +252,8 @@ npm test
271
252
 
272
253
  `prepublishOnly` runs the tests before publishing.
273
254
 
274
- ## Documentation and license
255
+ ## License
275
256
 
276
- Project status, usage boundaries, architecture, and iteration records begin at the [documentation entry point](docs/00-交接入口/00-阅读导航.md). The detailed operational guide is [Usage guide](docs/02-产品与业务/04-使用说明.md). The default security posture is in [SECURITY.md](SECURITY.md).
257
+ Security guidance is in [SECURITY.md](SECURITY.md).
277
258
 
278
259
  Licensed under [Apache License 2.0](LICENSE).
package/README.md CHANGED
@@ -22,14 +22,14 @@
22
22
 
23
23
  ## 功能概览
24
24
 
25
- - 在「设置 → IM助理」里连接钉钉、飞书、Lark、微信、企业微信、QQ、Telegram。
26
- - 同一渠道可添加多个账号;每个账号独立选择工作区、模型、推理强度、权限和私聊准入,凭据、白名单与会话状态也按账号隔离。
27
- - 每个 IM 聊天对应一条独立 DSH 会话,出现在工作区「频道」,不会混进网页「任务」。
28
- - 手机里直接下任务、看回复;DSH 发起交互时,可在原 IM 会话完成工具批准 / 拒绝、单选、多选和自定义回答。
29
- - 支持扫码绑定或手动填凭据;敏感字段写入 DSH `ctx.credentials`,不会进 `channels.json`。
30
- - 可把一句话复制到 DSH、Codex 或 WorkBuddy,让对方代装到本机 DSH。
31
- - 群聊不用绑定,@ 即可对话;私聊中,平台能返回身份的扫码用户自动放行,其他人要在设置页批准。
32
- - 扫码成功后配置弹窗自动关闭,设置页保持打开。
25
+ 不在电脑前,也能通过常用聊天软件把任务交给本机 DSH,并在同一聊天里接收回复、回答问题和处理工具审批。
26
+
27
+ - **连接常用消息平台**:支持钉钉、飞书、Lark、微信、企业微信、QQ 和 Telegram。
28
+ - **多个账号分别配置**:同一平台可添加多个账号,各自选择工作区、模型、推理强度、权限和私聊准入。
29
+ - **手机上完成任务交互**:下任务、读回复、回答单选或多选问题;已批准用户可在私聊中批准或拒绝工具执行。
30
+ - **聊天记录互不混淆**:每个 IM 聊天对应独立会话,在网页工作区「频道」中回看。
31
+ - **按平台扫码或填写凭据**:在「设置 → IM助理」连接账号,管理消息接收开关。
32
+ - **控制谁能使用**:群聊通过 @ 触发,私聊按账号的准入设置处理,详见下表。
33
33
 
34
34
  ## 谁可以驱动助手
35
35
 
@@ -114,13 +114,18 @@
114
114
 
115
115
  ## DSH 产品生态
116
116
 
117
- 本产品既可以独立安装,也可以随桌面端或 Web 套件一起使用。它们共享同一个 DSH 核心,但面向不同的使用方式:
117
+ 想直接使用完整工作台,可下载 [DSH Codex Desktop](https://github.com/MichengAI/dsh-codex-desktop/releases);已有 [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) 环境,可按需独立安装以下 8 个自研插件。桌面端已随附这些插件。
118
118
 
119
- | 产品 | 与本产品的关系 |
119
+ | 插件 | 你可以用它做什么 |
120
120
  | --- | --- |
121
- | [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) | 本产品的运行宿主,提供模型、会话、工具和插件系统 |
122
- | [DSH Codex Desktop](https://github.com/MichengAI/dsh-codex-desktop) | 下载安装即用的桌面产品,已内置本产品和其他 5 个功能产品 |
123
- | 6 个功能产品 | [Codex UI](https://github.com/MichengAI/dsh-codex-ui) · [IM Connect](https://github.com/MichengAI/dsh-im-connect) · [Automation](https://github.com/MichengAI/dsh-automation) · [Skills Manager](https://github.com/MichengAI/dsh-skills-manager) · [Archive Manager](https://github.com/MichengAI/dsh-archive-manager) · [Agency Agents](https://github.com/MichengAI/dsh-agency-agents) |
121
+ | [Codex UI](https://github.com/MichengAI/dsh-codex-ui) | 整理项目与会话、搜索任务、跳转对话轮次 |
122
+ | [IM Connect](https://github.com/MichengAI/dsh-im-connect) | 从微信、飞书、钉钉等消息平台下任务、收回复 |
123
+ | [Automation](https://github.com/MichengAI/dsh-automation) | 按计划执行任务,查看每次运行的结果 |
124
+ | [Skills Manager](https://github.com/MichengAI/dsh-skills-manager) | 统一查找、启停、创建和导入本机技能 |
125
+ | [Archive Manager](https://github.com/MichengAI/dsh-archive-manager) | 搜索、恢复或清理已归档会话 |
126
+ | [Agency Agents](https://github.com/MichengAI/dsh-agency-agents) | 按任务选择并召唤专业角色 |
127
+ | [BTW](https://github.com/MichengAI/dsh-btw) | 在当前上下文中临时旁问,不打断主任务 |
128
+ | [Simplify](https://github.com/MichengAI/dsh-simplify) | 用 /simplify 整理 Git 改动范围内的代码 |
124
129
 
125
130
  ## 前置条件
126
131
 
@@ -131,40 +136,16 @@
131
136
 
132
137
  ## 安装
133
138
 
134
- `dsh plugin add` 会转发到 profile 目录里的 `pnpm add`。不写版本、不指定官方源时,本机镜像和最短发布间隔可能让你停在旧版。
135
-
136
- ### 交给其他 Agent 一句话安装
139
+ 以下安装命令使用官方 npm 源。
137
140
 
138
- 本插件运行在 DeepSeek Harness Web 里。把下面其中一句复制到 DSH、Codex 或 WorkBuddy,让它代你安装到本机 `web` profile。
141
+ ### 让 Agent 帮你安装(推荐)
139
142
 
140
- 从 npm 安装:
143
+ 把下面这段话发给任意能够执行本机终端命令的 Agent。将 `web` 替换为实际使用的 profile;安装完成后,在 DSH 中使用本插件。
141
144
 
142
145
  ```text
143
- 请把 DSH 插件 @michengai/dsh-im-connect 最新版装进本机 web profile,使用官方 npm 源执行:dsh plugin --profile web add @michengai/dsh-im-connect@latest --registry=https://registry.npmjs.org/。装完执行 dsh --profile web --dump-config,确认已挂载 im-connect,并提醒我重启 DSH Web 后硬刷新浏览器,打开「设置 → IM助理」。
144
- ```
145
-
146
- 从源码安装:
147
-
148
- ```text
149
- 请从 https://github.com/MichengAI/dsh-im-connect 安装 DSH 插件:克隆仓库,执行 npm install 和 npm test,再在该目录执行 dsh plugin --profile web add .。不要只复制 lib。然后执行 dsh --profile web --dump-config,确认已挂载 im-connect,并提醒我重启 DSH Web 后硬刷新浏览器,打开「设置 → IM助理」。
150
- ```
151
-
152
- | 产品 | 怎么用 |
153
- | --- | --- |
154
- | DSH | 把上面其中一句发给当前会话。 |
155
- | Codex | 把上面其中一句发给 Codex,让它在本机执行安装。 |
156
- | WorkBuddy | 把上面其中一句发给 WorkBuddy;源码安装也可同时粘贴仓库地址 `https://github.com/MichengAI/dsh-im-connect`。 |
157
-
158
- Codex 和 WorkBuddy 只负责代装;装好后仍要打开 DSH Web 使用「设置 → IM助理」。
159
-
160
- 也可以自己执行同一条 npm 命令:
161
-
162
- ```powershell
163
- dsh plugin --profile web add @michengai/dsh-im-connect@latest --registry=https://registry.npmjs.org/
146
+ 请将 DSH 插件 @michengai/dsh-im-connect 安装到本机 web profile,执行:dsh plugin --profile web add @michengai/dsh-im-connect@latest --registry=https://registry.npmjs.org/。安装后执行 dsh --profile web --dump-config,确认配置包含 im-connect,并告诉我如何重新加载 DSH 和开始使用。
164
147
  ```
165
148
 
166
- 未把 `dsh` 装进 PATH 时,把开头的 `dsh` 换成 `npx --yes @deepseek-ai/dsh`。
167
-
168
149
  ### 从官方 npm 安装最新版
169
150
 
170
151
  在任意 PowerShell 目录执行:
@@ -180,31 +161,13 @@ dsh --profile web --dump-config
180
161
 
181
162
  配置输出中应包含 `im-connect`。安装后重启 DSH Web 并在浏览器硬刷新。不要手工复制客户端文件,`dsh plugin add` 会同时应用 `cordis.patch.yml`。
182
163
 
183
- ### 从源码安装
184
-
185
- 适用于调试或使用未发布改动。克隆后的本地路径就是插件安装路径:
186
-
187
- ```powershell
188
- [Console]::OutputEncoding = [System.Text.Encoding]::UTF8
189
- $OutputEncoding = [System.Text.Encoding]::UTF8
190
- Set-Location D:\Repository\deepseek-harness-plugin
191
- git clone https://github.com/MichengAI/dsh-im-connect.git
192
- Set-Location .\dsh-im-connect
193
- npm install
194
- npm test
195
- dsh plugin --profile web add .
196
- dsh --profile web --dump-config
197
- ```
198
-
199
- 完成后重启 DSH Web 并硬刷新浏览器。`dsh plugin ... add .` 会读取当前目录的包信息和 `cordis.patch.yml`;不要改为直接复制 `lib` 目录。
200
-
201
164
  ## 在线更新
202
165
 
203
166
  设置标题会显示当前版本和“检查更新”按钮。发现新版后,只有检测到 DSH CLI 或 Desktop 更新服务时才可使用“自动更新”;其他环境会在弹窗中提供可复制、与当前 Profile 对应的手工更新命令。
204
167
 
205
168
  ## 使用
206
169
 
207
- 打开「设置 → IM助理」,在目标渠道点击「添加账号」,并为该账号选择工作区、模型、权限和私聊准入。详细步骤见 [使用说明](docs/02-产品与业务/04-使用说明.md)。
170
+ 打开「设置 → IM助理」,在目标渠道点击「添加账号」,并为该账号选择工作区、模型、权限和私聊准入。
208
171
 
209
172
  | 目标 | 操作 | 说明 |
210
173
  | --- | --- | --- |
@@ -213,7 +176,7 @@ dsh --profile web --dump-config
213
176
  | 暂停接收 | 选择账号,关闭右侧「接收消息」 | 凭据和账号配置保留,只暂停该账号接收新消息 |
214
177
  | 在 IM 里下任务 | 微信 / 飞书 / Lark / QQ 扫码用户可直接私聊;钉钉 / 企微扫码者和其他用户需先批准。群聊只需 @ | 每个聊天对应一条独立频道会话 |
215
178
  | 分段输入 | 结尾加 `..` 表示还有后续,`!!` 表示立即提交 | 默认约 5 秒合并窗口 |
216
- | 新开会话 | 发送 `/new` 或 `/clear` | 只影响当前 IM 聊天,不影响网页任务 |
179
+ | 新开会话 | 发送 `/new` 或 `/clear` | 新建并切换当前 IM 会话;旧会话保留在频道列表,不影响网页任务 |
217
180
  | 查看状态 / 帮助 | 发送 `/status` 或 `/help` | 只作用于当前频道会话 |
218
181
  | 批准陌生人私聊 | 打开「设置 → IM助理」,在待批准列表点「批准」或「拒绝」 | 只影响私聊准入,不影响群聊 |
219
182
  | 回答交互问题 | 直接回复选项序号或文字;多选用逗号分隔,也可以输入自定义答案 | 多个问题会按顺序发送;群聊只接受任务发起者回答 |
@@ -239,6 +202,24 @@ DSH 后端保持本机监听;远程访问使用受控 HTTPS 反向代理,并
239
202
 
240
203
  ## 二次开发
241
204
 
205
+ ### 从源码安装
206
+
207
+ 适用于调试或使用未发布改动。克隆后的本地路径就是插件安装路径:
208
+
209
+ ```powershell
210
+ [Console]::OutputEncoding = [System.Text.Encoding]::UTF8
211
+ $OutputEncoding = [System.Text.Encoding]::UTF8
212
+ Set-Location D:\Repository\deepseek-harness-plugin
213
+ git clone https://github.com/MichengAI/dsh-im-connect.git
214
+ Set-Location .\dsh-im-connect
215
+ npm install
216
+ npm test
217
+ dsh plugin --profile web add .
218
+ dsh --profile web --dump-config
219
+ ```
220
+
221
+ 完成后重启 DSH Web 并硬刷新浏览器。`dsh plugin ... add .` 会读取当前目录的包信息和 `cordis.patch.yml`;不要改为直接复制 `lib` 目录。
222
+
242
223
  本仓库用 `src` 开发,构建到 `lib`:
243
224
 
244
225
  - [src\index.ts](src/index.ts):Host 入口、配置和生命周期。
@@ -271,8 +252,8 @@ npm test
271
252
 
272
253
  `prepublishOnly` 会在发布前自动执行测试。
273
254
 
274
- ## 项目文档与许可证
255
+ ## 许可证
275
256
 
276
- 项目状态、使用边界、技术架构和迭代记录从[文档交接入口](docs/00-交接入口/00-阅读导航.md)开始。详细操作说明见 [使用说明](docs/02-产品与业务/04-使用说明.md)。默认安全姿态见 [SECURITY.md](SECURITY.md)。
257
+ 安全说明见 [SECURITY.md](SECURITY.md)。
277
258
 
278
259
  本项目采用 [Apache License 2.0](LICENSE)。