dsh-mcp-connector 0.2.69 → 0.2.70
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 +8 -0
- package/README.en.md +1 -1
- package/README.md +1 -1
- package/docs/STDIO-SUPPORT.md +2 -0
- package/lib/stdio-startup-guard.js +26 -4
- package/package.json +4 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,14 @@
|
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
|
|
7
|
+
## [0.2.70] - 2026-10-08
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
|
|
11
|
+
- Windows 启动恢复保护采用 cross-spawn 解析 PATH/PATHEXT 与 npm .cmd shim,修复 npx 连接手动成功但重启失败的问题(#130)。
|
|
12
|
+
- 命令缺失时返回不含命令、参数或凭据的 ENOENT 与 PATH 检查提示。
|
|
13
|
+
- 新增 Windows 真实 .cmd 子进程回归,覆盖带空格路径与特殊字符参数。
|
|
14
|
+
|
|
7
15
|
## [0.2.69] - 2026-10-08
|
|
8
16
|
|
|
9
17
|
### Changed
|
package/README.en.md
CHANGED
|
@@ -202,7 +202,7 @@ npm run dev:ui
|
|
|
202
202
|
|
|
203
203
|
Every Registry merge regenerates `catalog-stats.json`; an hourly workflow in this repository synchronizes the Chinese and English product copy plus a local stats snapshot. The static npm README updates with package releases, while the live badges above read the Registry directly and therefore stay current without another npm release.
|
|
204
204
|
|
|
205
|
-
The current public version is [`dsh-mcp-connector@0.2.
|
|
205
|
+
The current public version is [`dsh-mcp-connector@0.2.70`](https://www.npmjs.com/package/dsh-mcp-connector), with [GitHub Release v0.2.70](https://github.com/duhu2000/dsh-mcp-connector/releases/tag/v0.2.70).
|
|
206
206
|
|
|
207
207
|
See [CHANGELOG.md](CHANGELOG.md) for version history and [docs/DESKTOP-E2E.md](docs/DESKTOP-E2E.md) for the Desktop release checklist.
|
|
208
208
|
|
package/README.md
CHANGED
|
@@ -197,7 +197,7 @@ npm run dev:ui
|
|
|
197
197
|
|
|
198
198
|
公共 Registry 每次合并后会生成 `catalog-stats.json`;本仓库的定时工作流每小时同步中英文介绍和统计快照。npm 页面中的静态正文随版本发布更新,上方动态统计徽标则直接读取 Registry,可在不发布新 npm 版本时保持实时数量一致。
|
|
199
199
|
|
|
200
|
-
当前公开版本为 [`dsh-mcp-connector@0.2.
|
|
200
|
+
当前公开版本为 [`dsh-mcp-connector@0.2.70`](https://www.npmjs.com/package/dsh-mcp-connector),对应 [GitHub Release v0.2.70](https://github.com/duhu2000/dsh-mcp-connector/releases/tag/v0.2.70)。
|
|
201
201
|
|
|
202
202
|
版本能力与变更记录见 [CHANGELOG.md](CHANGELOG.md)。
|
|
203
203
|
Desktop 发版回归见 [docs/DESKTOP-E2E.md](docs/DESKTOP-E2E.md)。
|
package/docs/STDIO-SUPPORT.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# stdio 传输支持 —— 设计文档 & 开发实现
|
|
2
2
|
|
|
3
|
+
> **Windows 命令兼容(0.2.70)**:启动恢复保护使用 cross-spawn 解析 PATH/PATHEXT 中的命令,支持 npx 等 .cmd shim;通常无需将已有配置改成 cmd /c。uvx 需要先安装并位于 DSH 进程的 PATH 中。命令不存在时显示 ENOENT 与 PATH 检查提示,不输出参数或凭据。
|
|
4
|
+
|
|
3
5
|
> 目标:补齐 stdio(本地进程)传输方式,达到与 WorkBuddy / TraeWork / Qwen Code 三家大厂传输方式全覆盖。
|
|
4
6
|
> 结论:**低成本补齐**——`@deepseek-ai/dsh-mcp-client` 已原生支持 stdio,我们只需在 schema + provisioning 两层「开闸透传」。
|
|
5
7
|
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
// Derived from the proven legacy stdio adapter: transparent unless --legacy
|
|
3
3
|
// is explicitly requested for a known initialize-era server.
|
|
4
4
|
import { spawn } from 'node:child_process';
|
|
5
|
+
import spawnServer from 'cross-spawn';
|
|
5
6
|
import { createInterface } from 'node:readline';
|
|
6
7
|
|
|
7
8
|
const argv = process.argv.slice(2);
|
|
@@ -58,17 +59,37 @@ function stop(reason, code = 0) {
|
|
|
58
59
|
}
|
|
59
60
|
|
|
60
61
|
function launch() {
|
|
61
|
-
|
|
62
|
+
let launchFailed = false;
|
|
63
|
+
let protocolSeen = false;
|
|
64
|
+
let startupStderr = '';
|
|
65
|
+
const flushStderr = () => {
|
|
66
|
+
if (!launchFailed && startupStderr) process.stderr.write(startupStderr);
|
|
67
|
+
startupStderr = '';
|
|
68
|
+
};
|
|
69
|
+
child = spawnServer(command, args, {
|
|
62
70
|
cwd: process.cwd(), env: process.env,
|
|
63
|
-
stdio: ['pipe', 'pipe', '
|
|
71
|
+
stdio: ['pipe', 'pipe', 'pipe'], windowsHide: true,
|
|
64
72
|
detached: process.platform !== 'win32',
|
|
65
73
|
});
|
|
66
|
-
child.on('
|
|
74
|
+
child.stderr.on('data', (data) => {
|
|
75
|
+
if (launchFailed) return;
|
|
76
|
+
if (protocolSeen) process.stderr.write(data);
|
|
77
|
+
else startupStderr = (startupStderr + data.toString()).slice(-65536);
|
|
78
|
+
});
|
|
79
|
+
child.on('error', (error) => {
|
|
80
|
+
launchFailed = true;
|
|
81
|
+
startupStderr = '';
|
|
82
|
+
stop(error.code === 'ENOENT'
|
|
83
|
+
? 'Server launch failed (ENOENT): check the executable and PATH on the DSH host'
|
|
84
|
+
: 'Server launch failed', 1);
|
|
85
|
+
});
|
|
67
86
|
child.stdin.on('error', () => stop('Server input closed', 1));
|
|
68
87
|
const output = createInterface({ input: child.stdout, crlfDelay: Infinity });
|
|
69
88
|
output.on('line', (line) => {
|
|
70
89
|
try {
|
|
71
90
|
const message = JSON.parse(line);
|
|
91
|
+
protocolSeen = true;
|
|
92
|
+
flushStderr();
|
|
72
93
|
if (Object.hasOwn(message, 'id') && !message.method) {
|
|
73
94
|
const request = pending.get(message.id);
|
|
74
95
|
if (request) {
|
|
@@ -84,6 +105,7 @@ function launch() {
|
|
|
84
105
|
if (!stopping) process.stdout.write(`${line}\n`);
|
|
85
106
|
});
|
|
86
107
|
child.on('close', (code) => {
|
|
108
|
+
flushStderr();
|
|
87
109
|
clearPending();
|
|
88
110
|
clearTimeout(closeTimer);
|
|
89
111
|
// A parent may exit on EOF while descendants remain in its process group.
|
|
@@ -113,4 +135,4 @@ input.on('line', (line) => {
|
|
|
113
135
|
pending.set(message.id, { method: message.method, timer });
|
|
114
136
|
}
|
|
115
137
|
child.stdin.write(`${line}\n`);
|
|
116
|
-
});
|
|
138
|
+
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-mcp-connector",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.70",
|
|
4
4
|
"description": "DeepSeek Harness MCP Connector: connect servers, search tools across active connections, and troubleshoot discovery. Includes a continuously updated catalog; supports OAuth 2.0 PKCE, API keys, Streamable HTTP/stdio, and mcpServers JSON import.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -151,6 +151,9 @@
|
|
|
151
151
|
"react-dom": "^18.2.0",
|
|
152
152
|
"zod": ">=4.1.8 <5"
|
|
153
153
|
},
|
|
154
|
+
"dependencies": {
|
|
155
|
+
"cross-spawn": "^7.0.6"
|
|
156
|
+
},
|
|
154
157
|
"devDependencies": {
|
|
155
158
|
"@deepseek-ai/cordis": "^4.0.1",
|
|
156
159
|
"@deepseek-ai/dsh-storage": "^0.1.0-rc.7",
|