@xmanrui/dsh-im 5.9.0 → 5.10.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/PROACTIVE_DELIVERY.en.md +33 -9
  2. package/PROACTIVE_DELIVERY.md +33 -9
  3. package/README.en.md +6 -3
  4. package/README.md +7 -4
  5. package/lib/client.js +582 -130
  6. package/lib/index.js +325 -325
  7. package/package.json +1 -1
  8. package/plugin-src/client/delivery-settings.js +2 -0
  9. package/plugin-src/client/delivery-sync-settings.js +269 -0
  10. package/plugin-src/client/global-settings.js +45 -7
  11. package/plugin-src/client/i18n-ru.js +27 -0
  12. package/plugin-src/client/i18n.js +27 -0
  13. package/plugin-src/client/index.js +17 -1
  14. package/plugin-src/client/model-setting.js +6 -3
  15. package/plugin-src/client/styles.js +16 -0
  16. package/plugin-src/host/channels/feishu/production.mjs +11 -27
  17. package/plugin-src/host/channels/shared/workspace-rpc.mjs +1 -0
  18. package/plugin-src/host/delivery-adapter.mjs +35 -20
  19. package/plugin-src/host/delivery-service.mjs +100 -1
  20. package/plugin-src/host/delivery-suggestions.mjs +28 -0
  21. package/plugin-src/host/delivery-sync-rpc.mjs +100 -0
  22. package/plugin-src/host/host-language-rpc.mjs +16 -2
  23. package/plugin-src/host/host-language.mjs +29 -0
  24. package/plugin-src/host/inbound-ttl-rpc.mjs +1 -1
  25. package/plugin-src/host/index.mjs +23 -1
  26. package/plugin-src/host/session-sync-coordinator.mjs +288 -121
  27. package/plugin-src/host/session-sync-targets.mjs +71 -0
  28. package/plugin-src/host/sidebar-settings.mjs +1 -2
  29. package/plugin-src/host/update-rpc.mjs +1 -1
  30. package/plugin-src/management-rpc.mjs +25 -3
  31. package/scripts/verify-lan-management.mjs +58 -5
  32. package/scripts/verify-package.mjs +14 -5
  33. package/src/channels/email/email-runtime.mjs +27 -8
  34. package/src/channels/feishu/bridge.mjs +250 -3
  35. package/src/channels/qq/qq-bridge.mjs +9 -0
  36. package/src/channels/qq/state-store.mjs +42 -0
  37. package/src/channels/shared/action-card.mjs +83 -7
  38. package/src/channels/shared/bot-workspace-store.mjs +100 -8
  39. package/src/channels/shared/delivery-sync-settings-store.mjs +86 -0
  40. package/src/channels/shared/delivery-sync-settings.mjs +122 -0
  41. package/src/channels/shared/harness-client.mjs +148 -90
  42. package/src/channels/shared/i18n-en/diagnostics.mjs +7 -1
  43. package/src/channels/shared/i18n-en/feishu.mjs +3 -0
  44. package/src/channels/shared/i18n-en/shared-b.mjs +6 -0
  45. package/src/channels/shared/i18n-ru/diagnostics.mjs +11 -0
  46. package/src/channels/shared/i18n-ru/feishu.mjs +2 -0
  47. package/src/channels/shared/i18n-ru/shared-b.mjs +5 -0
  48. package/src/channels/shared/interface-language-store.mjs +49 -10
  49. package/src/channels/shared/interface-language.mjs +19 -1
  50. package/src/channels/shared/model-setting.mjs +6 -3
  51. package/src/channels/shared/workspace-session.mjs +13 -1
  52. package/src/channels/telegram/telegram-api.mjs +19 -1
@@ -78,18 +78,42 @@ Assume the Feishu bot has already received a message in the alert group:
78
78
 
79
79
  If the group Chat ID is edited later, callers can continue using the same `botId + release-alerts` pair.
80
80
 
81
- ## Two-way sync for direct-message Sessions
81
+ ## Two-way sync for any Session conversation
82
82
 
83
- A saved direct-message target has an opt-in **Two-way Session sync** switch. When enabled:
83
+ Session sync needs no delivery target in advance: the address comes from the Session's current chat binding, that is, the conversation key this Session has in a connected chat (a direct message, a group, a Slack thread, a Telegram forum topic, a Discord channel). **General settings → Delivery** is the only place where the sync is switched on; the delivery-targets page is only for manual delivery and for the candidate range of synced approvals and questions.
84
84
 
85
- 1. User text submitted from DSH Web/CLI to the DM's current Session is sent to the DM with a `[来自 DSH]` prefix.
86
- 2. After that turn completes successfully, the final assistant text merged in step order is sent once more with a `[DSH 助手]` prefix.
87
- 3. Ordinary IM prompts and `/steer` continue through the existing reply path. They are neither duplicated nor forwarded to another target.
88
- 4. Scheduled tasks (`schedule`, `deliveryMode: host`) also sync their final assistant text after successful completion in the bound Session. Internal reminder framing is not echoed as a `[来自 DSH]` message.
85
+ 1. Ordinary prompts and `/steer` inside that chat keep using the normal reply path. They are neither duplicated nor forwarded to another target.
86
+ 2. After a successful turn from another source, only the **final answer** is sent to the chat — the text after the last tool call, not every step joined together and not the talk that precedes the tools: a turn submitted in the DSH Web GUI, a scheduled task (`schedule`, `deliveryMode: host`), an answered-question receipt, or a turn started by an internal notice such as `subagent-settled`.
87
+ 3. Whether the Web input itself is mirrored into the chat and whether model answers are delivered is decided by **General settings → Delivery**; the two prefix icons apply to the mirrored input and to the answer respectively.
88
+ 4. Only text the reader submitted in the DSH Web GUI is mirrored: the context snapshot the Host injects, schedule reminders, and internal notices are never echoed, and only the model answer is delivered. When the input mirror cannot be sent, that turn's answer is withheld too.
89
+ 5. A channel that renders the answer itself — the Feishu process card — owns that delivery: the card carries the final answer, and plain text follows only when the card did not confirm it. One answer therefore reaches the chat once, never as a card and a copy of the same text. With both switches off, the card stops together with the text, because both read the same switches.
90
+ 6. The address is read from the current binding before every delivery, so it follows `/session` changes and `/new` automatically; a Session with no binding is not delivered and raises no error, but the miss is logged with the Session, the channel and the conversation key — never the message body — so an empty chat stays diagnosable.
89
91
 
90
- The setting stores the private conversation target, never a `sessionId`, so it follows `/session` changes automatically. After `/new` or a workspace change, its status becomes **Waiting for this DM to establish a new Session** and recovers as soon as that DM creates one; the switch does not need to be toggled again.
92
+ A service injection never decides where the turn came from: the context snapshot the Host prepends, a schedule reminder or an internal notice is only "one message of this turn", never proof that a service started it. The answer is delivered as a service turn only when no message of the turn came from the reader (the Web GUI or this chat); as soon as one message came from this chat, the chat answers for itself and the sync delivers nothing at all.
91
93
 
92
- Enabling requires one uniquely known DM that already has a current Session for this bot. Groups, Slack Threads, Telegram Topics, Discord server channels, and targets that cannot be confirmed as DMs are unavailable. A channel with an explicit remote `harnessBaseUrl` is also unsupported. The first version mirrors current-Host text only—no images, files, cards, tool progress, approvals, or history. Changing the target type or native route disables sync; renaming the target does not.
94
+ The **Two-way Session sync** switch on a delivery target now only affects the candidate range of synced approvals and questions; it is no longer a precondition for Session sync. That candidate range stays private-chat only: mirrored text follows any route the channel persisted (a group, a Slack thread, a Telegram forum topic, a Discord channel), but a question or an approval is offered in a private chat only, because in a group any member could answer it. The first version mirrors current-Host text only—no images, files, cards, tool progress, approvals, or history. A channel with an explicit remote `harnessBaseUrl` is still unsupported.
95
+
96
+ ## Delivery settings
97
+
98
+ **General settings → Delivery** stores plugin-wide settings rather than per-bot ones, in `<dshHome>/integrations/dsh-im/delivery-sync-settings.json`:
99
+
100
+ ```json
101
+ {
102
+ "version": 1,
103
+ "deliverySync": {
104
+ "mirrorUserInput": false,
105
+ "deliverModelAnswers": false,
106
+ "inputIcon": "",
107
+ "modelIcon": ""
108
+ }
109
+ }
110
+ ```
111
+
112
+ - `mirrorUserInput`: mirror user text submitted in the Web GUI into the chat the Session is bound to; off by default. While it is off nothing is echoed, but the model answer is still delivered.
113
+ - `deliverModelAnswers`: deliver model answers of turns that did not start in this chat; off by default, like the input mirror. Both switches are off in a fresh install, and an unreadable document is treated as both off: the coordinator logs a warning and delivers nothing rather than starting to mirror on its own.
114
+ - `inputIcon` / `modelIcon`: prefix icons for the mirrored input and for the model answer. Trimmed, at most 32 characters, no line breaks or control characters; an invalid value becomes the empty string, and an empty icon means no prefix. A non-empty icon renders as "icon, blank line, text".
115
+
116
+ The settings page reads and writes this document through `settings.delivery-sync.get` / `settings.delivery-sync.set` (`set` applies only the fields it carries, and all four are optional). `settings.language.set` switches the message language between "same as the DSH interface" and `zh`/`en`/`ru`: the explicit choice outranks the DSH interface language, and the plugin `language` option still outranks both.
93
117
 
94
118
  ## Native fields for all nine channels
95
119
 
@@ -192,7 +216,7 @@ await ctx.dshIm.send(botId, targetId, '# Daily report\n\n**Checks complete**', {
192
216
 
193
217
  Channels apply their own message limits and splitting. Feishu proactive cards retain their existing unsplit behavior and do not automatically resend as text after rejection or an uncertain result. Other newly added fallback paths only handle local formatting errors or definite format rejection; they do not resend accepted chunks or retry ambiguous network outcomes. Older Hosts may ignore `format`; load the updated plugin on the Host.
194
218
 
195
- Session sync requests Markdown for final assistant answers and retains the existing default text behavior for user echoes. Feishu keeps its dedicated mirror cards and existing plain-text fallback when the mirror cannot confirm the final answer. This does not expand the supported sync targets.
219
+ Session sync requests Markdown for the final assistant answer and plain text for mirrored Web input. Both follow the Session binding through the ordinary delivery path and no longer use Feishu's dedicated mirror cards, so Feishu receives that same text.
196
220
 
197
221
  A same-Host plugin may also list the saved targets for one bot:
198
222
 
@@ -78,18 +78,42 @@
78
78
 
79
79
  以后即使编辑并更换群 Chat ID,调用方仍可继续使用同一组 `botId + release-alerts`。
80
80
 
81
- ## 私聊会话双向同步
81
+ ## 会话双向同步
82
82
 
83
- 已保存的私聊目标可以在目标行开启「会话双向同步」,默认关闭。开启后:
83
+ 会话同步不需要预先创建投递目标:地址取自 Session 当前的聊天绑定,也就是这个 Session 在某个已接入聊天里的会话键(私聊、群聊、Slack Thread、Telegram Topic、Discord 频道等)。是否同步由「通用设置 → 投递」决定,这是唯一的开关位置;「投递目标」页只服务于手动投递,以及同步审批和同步提问的候选范围。
84
84
 
85
- 1. DSH Web/CLI 向该私聊当前绑定的 Session 提交的用户文字,会以 `[来自 DSH]` 开头发送到私聊。
86
- 2. 该 Turn 成功完成后,按 step 合并的最终助手文字会以 `[DSH 助手]` 开头再发送一次。
87
- 3. IM 用户自己的普通提问和 `/steer` 仍走原回复链,不会被同步逻辑重复发送或转发给其他目标。
88
- 4. 定时任务(`schedule`、`deliveryMode: host`)在绑定 Session 中成功完成后,也会同步最终助手文字;内部提醒提示不会以 `[来自 DSH]` 消息回显到私聊。
85
+ 1. 在该聊天里的普通提问和 `/steer` 仍走原回复链,不会被同步逻辑重复发送或转发到其他目标。
86
+ 2. 其他来源的 Turn 成功完成后,只投递**最终回答**——最后一次工具调用之后的文字,而不是各 step 拼接的全文,也不是工具调用之前的寒暄:Web GUI 中提交的 Turn、定时任务(`schedule`、`deliveryMode: host`)、待答问题回执,以及 `subagent-settled` 等内部通知发起的 Turn。
87
+ 3. 是否把 Web 中输入的文字本身也镜像到聊天、是否投递模型回答,由「通用设置 → 投递」决定;两个前缀图标分别作用于镜像的输入与模型回答。
88
+ 4. 只有读者自己在 Web GUI 里提交的文字才会被镜像:Host 注入的上下文快照、定时提醒和内部通知都不会回显,只投递模型回答。镜像发送失败时,该 Turn 的回答也不再投递。
89
+ 5. 渠道自己渲染回答时(飞书过程卡片),卡片就是这次投递:最终回答写在卡片里,只有卡片没能确认,才补发一条纯文字。同一条回答因此只会到达聊天一次,不会既在卡片里又以文字重发一遍。两个全局开关关闭时,卡片与文字一起停发,因为两者读的是同一份开关。
90
+ 6. 地址在每次投递前从当前绑定读取,因此自动跟随 `/session` 切换与 `/new`;没有绑定的 Session 不会投递,也不会报错,但会写一条不含消息正文的日志(Session、渠道与会话 Key),方便排查为什么聊天没有收到内容。
89
91
 
90
- 开关只保存私聊目标,不保存 `sessionId`,因此会自动跟随 `/session` 切换。执行 `/new` 或切换工作区后,状态暂时显示「等待该私聊建立新会话」;该私聊下一次建立 Session 后自动恢复,无需重新开关。
92
+ 服务注入不会决定 Turn 的来源:Host 在每个 Turn 前注入的上下文快照、定时提醒与内部通知只是「这是本 Turn 的一条消息」,不会把 Turn 判成服务发起的。只有整个 Turn 都没有一条来自读者(Web 或本聊天)的消息时,才按服务发起的 Turn 投递回答;只要其中一条消息来自本聊天,该 Turn 就由聊天自己回答,同步逻辑完全不投递。
91
93
 
92
- 开启要求目标来自该机器人已经聊过、已有当前 Session 的唯一私聊。群聊、Slack Thread、Telegram Topic、Discord 服务器频道和其他无法确认是私聊的目标显示为不可用。显式配置了远程 `harnessBaseUrl` 的渠道也不支持;首版仅同步当前 Host 的文字,不同步图片、文件、卡片、工具过程、审批或历史消息。修改目标类型或平台路由会自动关闭同步,改名不会。
94
+ 投递目标行上原有的「会话双向同步」开关现在只影响同步审批与同步提问的候选范围,不再是会话同步的前提;这个候选范围仍然只限私聊:镜像文字可以跟随渠道持久化的任意路由(群聊、Slack Thread、Telegram Topic、Discord 频道),但同步审批与同步提问只在私聊中提出,因为在群里任何成员都能替读者作答。首版仅同步当前 Host 的文字,不同步图片、文件、卡片、工具过程、审批或历史消息。显式配置了远程 `harnessBaseUrl` 的渠道也不支持。
95
+
96
+ ## 投递设置
97
+
98
+ 「通用设置 → 投递」保存的是全局设置,不属于单个机器人,写入 `<dshHome>/integrations/dsh-im/delivery-sync-settings.json`:
99
+
100
+ ```json
101
+ {
102
+ "version": 1,
103
+ "deliverySync": {
104
+ "mirrorUserInput": false,
105
+ "deliverModelAnswers": false,
106
+ "inputIcon": "",
107
+ "modelIcon": ""
108
+ }
109
+ }
110
+ ```
111
+
112
+ - `mirrorUserInput`:把在 Web GUI 中提交的用户文字镜像到该 Session 绑定的聊天;默认关闭。关闭时不发送输入,模型回答照常投递。
113
+ - `deliverModelAnswers`:投递「非本聊天发起」的 Turn 的模型回答;默认关闭,与输入镜像一致。全新安装两项都是关闭的;设置文件无法读取时同样按两项关闭处理——协调器只记录一条警告,不会自行开始镜像。
114
+ - `inputIcon` / `modelIcon`:镜像输入与模型回答的前缀图标。去除首尾空白,最长 32 个字符,不允许多行或控制字符;无效值按空字符串处理,空字符串表示不加前缀。非空时消息格式为「图标 + 空行 + 文字」。
115
+
116
+ 同机设置页通过 `settings.delivery-sync.get` / `settings.delivery-sync.set` 读写这份设置(`set` 只应用传入的字段,四个字段都可选)。消息语言通过 `settings.language.set` 在「跟随 DSH 界面语言」与 `zh`/`en`/`ru` 之间切换:显式选择优先于 DSH 界面语言,插件 `language` 选项仍然优先于两者。
93
117
 
94
118
  ## 九渠道手动填写字段
95
119
 
@@ -192,7 +216,7 @@ await ctx.dshIm.send(botId, targetId, '# 每日报告\n\n**检查完成**', {
192
216
 
193
217
  长消息按渠道限制分段。飞书主动卡片保留原有不自动分段的行为,平台拒绝或结果未知时不自动改发文本。其他新增回退仅针对本地格式处理错误或明确的格式拒绝,不重发已成功的分段,不因网络结果未知而改格式重试。旧 Host 可能忽略 `format`,需要加载更新后的插件。
194
218
 
195
- 会话同步的最终助手回答请求 Markdown,用户回显继续使用原有默认文字行为。飞书继续使用专用镜像卡片,无法确认最终答案可见时仍走现有纯文本兜底。同步目标范围不变。
219
+ 会话同步的最终助手回答请求 Markdown,镜像的 Web 输入使用纯文本,两者都按 Session 绑定地址走普通投递路径,不再经由飞书专用的镜像卡片:飞书收到的就是同一份文本。
196
220
 
197
221
  同 Host 插件也可以列出某个机器人的已保存目标:
198
222
 
package/README.en.md CHANGED
@@ -274,9 +274,10 @@ const info = await dshIm.describeConversation(sessionId);
274
274
 
275
275
  - Read-only: no network access, session creation, blocking reply, or thrown error; unknown Sessions return `null`.
276
276
  - Data comes from the plugin's state files (`sessions`) and bot configuration; no new core fields are required.
277
- - `chatType` is `group`, `thread`, or `dm`; a `direct:dm:<id>` key supplies `<id>` as `senderId`.
277
+ - `chatType` is `group`, `thread`, or `dm`. Without an author record, `senderId` is derived from the key only where the key names the user: Matrix `direct:dm:<userId>`, `p2p:<id>` (Feishu, Weixin, WeCom app, DingTalk), QQ `c2c:<openid>`, and `direct:<id>` on Telegram and WeCom. On Slack, Discord, WhatsApp, iMessage and others `direct:<id>` names the DM channel, so it is reported as `chatId` and `senderId` stays `null`.
278
278
  - The first lookup logs one line per Session; later lookups do not repeat it.
279
- - The bridge remembers the last inbound author's id, name, username, and bot flag in the bot state, without storing message text.
279
+ - The bridge remembers the last inbound author's id and bot flag in the bot state, without storing message text. The display name and username are stored only when context enhancement is enabled for that chat kind (or the channel already exposes a speaker name, as Matrix does); otherwise they are `null`.
280
+ - Links inserted from conversation keys into numeric chat/topic fields are **Telegram-only**; QQ and other channels must use their native route fields and must not be treated as Telegram links.
280
281
 
281
282
  ### The two binding events
282
283
 
@@ -421,7 +422,9 @@ To additionally restrict IM management to local access, set the following in the
421
422
  rpcAuthority: loopback
422
423
  ```
423
424
 
424
- `rpcAuthority` defaults to `trusted-host`; explicitly selecting `loopback` additionally requires loopback Host and Origin values. Update and inbound TTL management always remain loopback-only.
425
+ `rpcAuthority` defaults to `trusted-host` for channel management, general settings (group history retention, attachment retention and cleanup, and image limits), and plugin updates. LAN and NAS/Docker requests that pass DSH authentication and Host/Origin checks can use these APIs. Explicitly selecting `loopback` additionally requires a loopback Host and, when present, a loopback Origin.
426
+
427
+ For management HTTP 401 errors, sign in again using a valid launch link. HTTP 403 means access was denied: check DSH trusted hosts, the proxy's Host/Origin handling, and the plugin's `rpcAuthority` setting. When accessing a remote NAS, do not change the browser address to localhost on your own computer. API access does not make every installation eligible for button updates: source/link installations and unsupported runtimes retain their existing restrictions. Installation confirmation, version checks, concurrency locks, and manual restart requirements are unchanged.
425
428
 
426
429
  After building the plugin, run `node scripts/verify-lan-management.mjs /path/to/built/deepseek-harness` for the LAN management HTTP integration check. It starts the original DSH CLI with an isolated temporary profile and no bot credentials, checks default access, authentication, Host/Origin checks, and explicit `loopback` restrictions, then stops the server and removes the temporary directory. Requests carry LAN Host/Origin values over loopback TCP; a browser on a second device requires separate verification. The original `0.1.5-alpha.1` CLI rejects `--host 0.0.0.0`, so that browser check needs a Harness environment that supports LAN access.
427
430
 
package/README.md CHANGED
@@ -276,10 +276,11 @@ const info = await dshIm.describeConversation(sessionId);
276
276
 
277
277
  - 只读:不访问网络、不创建会话、不阻塞回复,也不抛错;未知会话返回 `null`。
278
278
  - 数据全部来自插件自己的状态文件(`sessions` 映射)与机器人配置,不要求内核新增字段。
279
- - `chatType` 为 `group`、`thread` 或 `dm`;`direct:dm:<id>` 形式的键会把 `<id>` 填进 `senderId`。
279
+ - `chatType` 为 `group`、`thread` 或 `dm`。没有作者记录时,只有当键本身标识用户时才从键推出 `senderId`:Matrix `direct:dm:<userId>`、`p2p:<id>`(飞书、微信、企业微信自建应用、钉钉)、QQ `c2c:<openid>`,以及 Telegram 和企业微信的 `direct:<id>`。Slack、Discord、WhatsApp、iMessage 等渠道的 `direct:<id>` 标识的是私聊频道,因此放进 `chatId`,`senderId` 保持 `null`。
280
280
  - 每个会话首次反查写一行日志 `[dsh-im] describeConversation session=… chat=… sender=…`,之后不再重复。
281
- - 发言人会被记住:桥接在把消息交给会话之前,把 `senderId`、显示名、`username` 与「是否机器人」写进机器人状态文件(`authors`),每条新消息覆盖前一条,只保留身份、不保留文本;因此重启后仍然可读。
282
- - 私聊的 `senderId` 还可以从键 `direct:dm:<id>` 推出,即使作者记录缺失也有值;群聊作者在第一条入站消息之前为 `null`。
281
+ - 发言人会被记住:桥接在把消息交给会话之前,把 `senderId` 与「是否机器人」写进机器人状态文件(`authors`);显示名和 `username` 只有在该聊天类型启用了上下文增强(或渠道本身提供发言人名称,如 Matrix)时才记录,否则为 `null`,每条新消息覆盖前一条,只保留身份、不保留文本;因此重启后仍然可读。
282
+ - 上述渠道的私聊 `senderId` 即使作者记录缺失也能从键推出;群聊作者在第一条入站消息之前为 `null`。
283
+ - 由对话键插入数字聊天/话题字段的链接是 **Telegram 专用**;QQ 和其他渠道必须使用各自的原生 route 字段,不能把它们当作 Telegram 链接。
283
284
 
284
285
  同一个反查还有一个同步版本,供在同步上下文里组装的场景使用(例如系统提示词的渲染):
285
286
 
@@ -435,7 +436,9 @@ dsh web --trusted-host dsh.example.com
435
436
  rpcAuthority: loopback
436
437
  ```
437
438
 
438
- `rpcAuthority` 默认为 `trusted-host`;显式设置 `loopback` 会额外要求回环 Host 和 Origin。更新与入站 TTL 管理始终仅允许回环访问。
439
+ `rpcAuthority` 默认为 `trusted-host`,统一适用于渠道管理、通用设置(群记录保留、附件保留与清理、图片限制)和插件更新。通过 DSH 认证与 Host/Origin 校验的局域网或 NAS/Docker 访问可直接使用这些接口;显式设置 `loopback` 会额外要求回环 Host,以及存在时的回环 Origin。
440
+
441
+ 管理请求返回 401 时,请通过有效启动链接重新登录;403 表示访问被拒,应检查 DSH 可信地址、代理的 Host/Origin 和插件的 `rpcAuthority` 配置。远程访问 NAS 时,不要将浏览器地址改为自己电脑的 localhost。接口可访问不代表当前安装方式允许按钮更新:源码/链接安装、不支持的执行环境等仍沿用现有限制;确认安装、版本校验、并发锁和手动重启流程不变。
439
442
 
440
443
  局域网管理的 HTTP 集成测试可在构建插件后运行 `node scripts/verify-lan-management.mjs /path/to/built/deepseek-harness`。脚本启动原版 DSH CLI,使用独立临时 profile 和空机器人配置,检查默认访问、登录认证、Host/Origin 检查以及显式 `loopback` 策略,结束后停止服务并清理临时目录。测试通过回环 TCP 发送局域网 Host/Origin,不替代跨设备浏览器验收;原版 `0.1.5-alpha.1` CLI 本身拒绝 `--host 0.0.0.0`,跨设备测试需使用支持局域网访问的 Harness 环境。
441
444