@wenbin_wb/dsh-bridge 2.7.0 → 2.7.1

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,6 +4,15 @@
4
4
 
5
5
  ---
6
6
 
7
+ ## [v2.7.1] - 2026-08-25
8
+
9
+ ### 🛠️ Windows 一键升级与自建协议修复
10
+ - **🛠️ 修复 Windows 平台一键升级 `spawn EINVAL` 错误**:适配 Windows 下 `.cmd` 批处理文件派生子进程的执行环境;
11
+ - **🌐 修复自建隧道 WebSocket 诊断协议报错**:自动映射 `ws:`/`wss:` 协议进行端到端探测;
12
+ - **🛡️ 并发防抖与状态优化**:优化多端并发请求与状态重连。
13
+
14
+ ---
15
+
7
16
  ## [v2.7.0] - 2026-08-25
8
17
 
9
18
  ### 📊 运维监控看板、网络诊断与会话重命名
package/lib/index.js CHANGED
@@ -742,9 +742,9 @@ class BridgeService {
742
742
  const isWin = process.platform === 'win32';
743
743
 
744
744
  const tasks = [
745
- { cmd: isWin ? 'dsh.cmd' : 'dsh', fallbackCmd: 'dsh', args: ['plugin', '--profile', 'web', 'add', pkgSpec] },
746
- { cmd: isWin ? 'npx.cmd' : 'npx', fallbackCmd: 'npx', args: ['--yes', '@deepseek-ai/dsh', 'plugin', '--profile', 'web', 'add', pkgSpec] },
747
- { cmd: isWin ? 'npm.cmd' : 'npm', fallbackCmd: 'npm', args: ['install', pkgSpec] },
745
+ { cmd: 'dsh', args: ['plugin', '--profile', 'web', 'add', pkgSpec] },
746
+ { cmd: 'npx', args: ['--yes', '@deepseek-ai/dsh', 'plugin', '--profile', 'web', 'add', pkgSpec] },
747
+ { cmd: 'npm', args: ['install', pkgSpec] },
748
748
  ];
749
749
 
750
750
  let lastError = null;
@@ -752,32 +752,30 @@ class BridgeService {
752
752
  for (const task of tasks) {
753
753
  try {
754
754
  const res = await new Promise((resolve, reject) => {
755
- const runExecutable = (executable) => {
756
- const cp = spawn(executable, task.args, {
755
+ let cp;
756
+ try {
757
+ cp = spawn(task.cmd, task.args, {
757
758
  windowsHide: true,
758
- shell: false,
759
- timeout: 90000,
760
- });
761
- let stdout = '';
762
- let stderr = '';
763
- cp.stdout?.on('data', (d) => { stdout += d.toString(); });
764
- cp.stderr?.on('data', (d) => { stderr += d.toString(); });
765
- cp.on('error', (err) => {
766
- if (executable !== task.fallbackCmd) {
767
- runExecutable(task.fallbackCmd);
768
- } else {
769
- reject(err);
770
- }
771
- });
772
- cp.on('close', (code) => {
773
- if (code === 0) {
774
- resolve({ stdout, stderr });
775
- } else {
776
- reject(new Error(stderr || stdout || `进程退出码 ${code}`));
777
- }
759
+ shell: isWin ? true : false,
760
+ timeout: 120000,
778
761
  });
779
- };
780
- runExecutable(task.cmd);
762
+ } catch (spawnErr) {
763
+ return reject(spawnErr);
764
+ }
765
+ let stdout = '';
766
+ let stderr = '';
767
+ cp.stdout?.on('data', (d) => { stdout += d.toString(); });
768
+ cp.stderr?.on('data', (d) => { stderr += d.toString(); });
769
+ cp.on('error', (err) => {
770
+ reject(err);
771
+ });
772
+ cp.on('close', (code) => {
773
+ if (code === 0) {
774
+ resolve({ stdout, stderr });
775
+ } else {
776
+ reject(new Error(stderr || stdout || `进程退出码 ${code}`));
777
+ }
778
+ });
781
779
  });
782
780
 
783
781
  const output = res.stdout || res.stderr || '升级成功';
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@wenbin_wb/dsh-bridge",
3
- "version": "2.7.0",
3
+ "version": "2.7.1",
4
4
  "description": "手机扫码即可在移动端/公网继续用 DeepSeek Harness,人不在电脑前也能接着干。一键局域网二维码、Cloudflare 公网隧道、自建隧道与微信 / QQ / 飞书 / Telegram Bot(多工作区/会话持久化/媒体/卡片审批/流式输出),无需自己搭公网服务器。",
5
- "releaseNotes": "【v2.7.0 运维监控看板、网络诊断与会话重命名】\n• 📊 新增「宿主系统看板」:实时监控 CPU 核心、Uptime 运行时间与内存负载\n• 🔍 新增「网络连通性诊断」:一键探测本地端口、局域网、Cloudflare 与自建隧道服务器连通性\n• 🗄️ 新增「配置备份与恢复」:支持一键导出/导入全局配置与平台凭证\n• 🏷️ 新增「会话重命名指令」:IM 对话发送 `/rename <新标题>` 实时更新会话标题\n• 🔄 升级后支持一键重启 DSH 服务并自动探测重连刷新\n• 🎨 优化 Tab 栏无滚动条视觉排版与移动端触控体验",
5
+ "releaseNotes": "【v2.7.1 Windows 一键升级与自建协议修复】\n• 🛠️ 修复 Windows 平台下一键升级触发 `spawn EINVAL` 的问题\n• 🌐 修复自建隧道 WebSocket (ws/wss) 协议诊断报错的问题\n• 🛡️ 强化 Gateway 启动并发锁与会话恢复防抖",
6
6
  "type": "module",
7
7
  "main": "lib/index.js",
8
8
  "exports": {