@aiwayds/dsh-mcp-adapter 0.3.0 → 0.4.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/README.md +13 -1
- package/README.zh.md +13 -1
- package/package.json +1 -1
- package/scripts/smoke-boot.mjs +14 -3
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@ English | [简体中文](README.zh.md)
|
|
|
4
4
|
|
|
5
5
|
Token-efficient MCP adapter for [DeepSeek Harness (dsh)](https://github.com/deepseek-ai/deepseek-harness) — a **prompt-side shim** inspired by [pi-mcp-adapter](https://github.com/nicobailon/pi-mcp-adapter).
|
|
6
6
|
|
|
7
|
-
**Requires dsh >= 0.1.2-
|
|
7
|
+
**Requires dsh >= 0.1.2-rc.1** — this plugin targets the dsh RC/stable line only (CI and releases resolve the newest of the `latest`/`next` dist-tags at runtime). **The alpha line is no longer supported.**
|
|
8
8
|
|
|
9
9
|
## The problem
|
|
10
10
|
|
|
@@ -54,6 +54,18 @@ Or directly from git:
|
|
|
54
54
|
dsh plugin --profile <name> add github:fan56/dsh-mcp-adapter
|
|
55
55
|
```
|
|
56
56
|
|
|
57
|
+
## Uninstall
|
|
58
|
+
|
|
59
|
+
```
|
|
60
|
+
dsh plugin --profile <name> remove @aiwayds/dsh-mcp-adapter
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
The host reconciles the profile automatically: the `dsh.profile.bundles` entry is spliced out and the package's patch layer drops.
|
|
64
|
+
|
|
65
|
+
One thing deliberately **stays**: the `mcp-adapter:` section in `~/.dsh/settings.yaml` — the stable server ids (`1..99`) and the disabled gates. It is never pruned by design: if you reinstall the plugin, every server keeps the same id it had before.
|
|
66
|
+
|
|
67
|
+
To purge that state too, delete the `mcp-adapter:` section from `settings.yaml` yourself; ids will be re-allocated from scratch on reinstall.
|
|
68
|
+
|
|
57
69
|
## Config
|
|
58
70
|
|
|
59
71
|
| key | default | meaning |
|
package/README.zh.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
面向 [DeepSeek Harness (dsh)](https://github.com/deepseek-ai/deepseek-harness) 的省 token MCP 适配器——一个受 [pi-mcp-adapter](https://github.com/nicobailon/pi-mcp-adapter) 启发的 **prompt-side shim**(提示词侧垫片)。
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
**要求 dsh >= 0.1.2-rc.1** — 本插件只跟随 dsh RC/stable 线(CI 与发版在运行时解析 latest/next 中更新的 dist-tag)。**不再支持 alpha 线。**
|
|
8
8
|
|
|
9
9
|
## 问题
|
|
10
10
|
|
|
@@ -46,6 +46,18 @@
|
|
|
46
46
|
dsh plugin --profile <name> add @aiwayds/dsh-mcp-adapter
|
|
47
47
|
```
|
|
48
48
|
|
|
49
|
+
## 卸载
|
|
50
|
+
|
|
51
|
+
```
|
|
52
|
+
dsh plugin --profile <name> remove @aiwayds/dsh-mcp-adapter
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
宿主会自动完成清理:`dsh.profile.bundles` 里对应的条目被拼接移除,插件的 patch 层随之失效。
|
|
56
|
+
|
|
57
|
+
有一份状态被刻意**保留**:`~/.dsh/settings.yaml` 里的 `mcp-adapter:` 小节——stable server id(1..99)和 disabled 门闩。它按设计永不回收:重装本插件后,每个 server 仍沿用之前的 id。
|
|
58
|
+
|
|
59
|
+
连这份状态也想清掉的话,请自行删除 `settings.yaml` 里的 `mcp-adapter:` 小节;重装时 id 会重新分配。
|
|
60
|
+
|
|
49
61
|
## 配置
|
|
50
62
|
|
|
51
63
|
| 键 | 默认值 | 含义 |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aiwayds/dsh-mcp-adapter",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.1",
|
|
4
4
|
"description": "dsh plugin: token-efficient prompt-side shim for the official MCP client — folds mcp__* tool schemas out of every assembled prompt and exposes two constant meta-tools (mcp_list / mcp_call) instead",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"dsh",
|
package/scripts/smoke-boot.mjs
CHANGED
|
@@ -11,9 +11,11 @@
|
|
|
11
11
|
// 5. a real boot under a timeout must load the plugin tree without a
|
|
12
12
|
// loader error (a healthy boot is silent and survives to the kill
|
|
13
13
|
// signal; a broken plugin dies within ~1s with the loader error)
|
|
14
|
+
// 6. `dsh plugin --profile smoke remove <pkg>` must reconcile the profile
|
|
15
|
+
// back to stock — the post-removal dump no longer contains the entry
|
|
14
16
|
//
|
|
15
|
-
// Exit 0 = mounted
|
|
16
|
-
// removed on success.
|
|
17
|
+
// Exit 0 = mounted, boots clean, and removal restores the stock tree. Temp
|
|
18
|
+
// dir is kept and printed on failure, removed on success.
|
|
17
19
|
//
|
|
18
20
|
// dsh-mcp-adapter note: with no MCP servers configured the meta-tools mount
|
|
19
21
|
// but nothing folds (idle); the smoke proves the plugin LOADS and APPLIES —
|
|
@@ -104,5 +106,14 @@ if (boot.signal !== 'SIGKILL' && boot.status !== 0) {
|
|
|
104
106
|
fail(`dsh exited early with code ${boot.status} and no loader error — unexpected`, output)
|
|
105
107
|
}
|
|
106
108
|
|
|
107
|
-
|
|
109
|
+
// Phase 3 — uninstall leg: removal must reconcile the profile tree back to stock.
|
|
110
|
+
const remove = spawnSync('dsh', ['plugin', '--profile', 'smoke', 'remove', ownName], { cwd: profile, encoding: 'utf8', env: dshEnv })
|
|
111
|
+
if (remove.status !== 0 || remove.error) fail('dsh plugin remove failed', `${remove.stdout}\n${remove.stderr}`)
|
|
112
|
+
const dumpAfter = spawnSync('dsh', ['--profile', 'smoke', '--dump-config'], { cwd: profile, encoding: 'utf8', env: dshEnv })
|
|
113
|
+
if (dumpAfter.status !== 0 || dumpAfter.error) fail('dsh --dump-config failed after removal', `${dumpAfter.stdout}\n${dumpAfter.stderr}`)
|
|
114
|
+
if (dumpAfter.stdout.includes('dsh-mcp-adapter')) {
|
|
115
|
+
fail('the composed tree still contains the plugin entry after removal', dumpAfter.stdout)
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
console.log(`smoke-boot: PASS — ${ownName} composed into the scratch profile tree and booted clean in real dsh (${boot.signal === 'SIGKILL' ? `survived ${bootSeconds}s boot window` : `exited ${boot.status}`}); removal restored the stock tree`)
|
|
108
119
|
rmSync(work, { recursive: true, force: true })
|