dsh-mcp-skills 0.2.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.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Lrxc
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,86 @@
1
+ # dsh-mcp-skills
2
+
3
+ 一个 [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) 插件,在网页设置面板中新增两个管理页面:
4
+
5
+ - **Skills** — 浏览、导入、删除、开关用户自有技能(存放于 `$DSH_HOME/skills`)。
6
+ - **MCP** — 管理 MCP 服务器配置(stdio / Streamable HTTP),支持增删改与连接测试。启用的服务器写入当前 profile 的 `cordis.patch.yml`,重启后自动连接,工具注册为 `mcp__<server>__<tool>`。
7
+
8
+ ## 截图
9
+
10
+ **Skills 页面**
11
+
12
+ ![Skills 页面](images/skills.png)
13
+
14
+ **MCP 页面**
15
+
16
+ ![MCP 页面](images/mcp.png)
17
+
18
+ ## 安装
19
+
20
+ 要求:已安装带 web profile 的 dsh,且 `PATH` 中有 `pnpm`。
21
+
22
+ 从 npm 安装:
23
+
24
+ ```
25
+ dsh plugin --profile web add dsh-mcp-skills
26
+ ```
27
+
28
+ 从 GitHub 安装:
29
+
30
+ ```sh
31
+ dsh plugin --profile web add https://github.com/Lrxc/dsh-manage-hub.git
32
+ ```
33
+
34
+ 或从本地目录:
35
+
36
+ ```sh
37
+ git clone https://github.com/Lrxc/dsh-manage-hub.git
38
+ dsh plugin --profile web add file:./dsh-manage-hub
39
+ ```
40
+
41
+ 重启:
42
+
43
+ ```sh
44
+ dsh --profile web
45
+ ```
46
+
47
+ ## 行为说明
48
+
49
+ - MCP 服务器保存在 `$DSH_HOME/mcp-servers.yaml`;启用的服务器会被写入当前 profile 的 `cordis.patch.yml`,重启 dsh 后自动连接。插件只增删自己生成的 `mcp-*` 行,不改动该文件的其他内容:注释、锚点与 `!!js` 表达式都会原样保留,写入是原子的,并会保留一份 `.bak` 备份。
50
+ - 若 profile 的 `cordis.patch.yml` 存在语法错误,插件会拒绝改写并报错,而不是覆盖它。
51
+ - 连接测试 15 秒超时,超时会关闭连接并回收子进程。测试与真实挂载使用同一套环境清洗规则:`*_KEY` / `*_PASSWORD` / `*_SECRET` / `*_TOKEN` 与 `DSH_*` 变量不会传给 MCP 子进程,需要凭据时请在服务器的环境变量里显式配置。
52
+ - 技能存放在 `$DSH_HOME/skills`。zip 导入支持单个技能(根目录 `SKILL.md` 或 `<name>/SKILL.md`)或多个技能目录,`template/` 会被跳过,已存在的技能不会被覆盖(导入结果会显示跳过数量)。
53
+ - 「测试」按钮使用宿主安装自带的 MCP SDK(列为可选 peer 依赖,不随本包重复安装)。若宿主未提供该 SDK,只有这一个按钮会提示不可用,技能管理与其余 MCP 功能不受影响。
54
+
55
+ ## 卸载
56
+
57
+ ```sh
58
+ dsh plugin --profile web remove dsh-mcp-skills
59
+ ```
60
+
61
+ 如不再需要,删除 profile `cordis.patch.yml` 中生成的 `mcp-*` 行及 `$DSH_HOME/mcp-servers.yaml`。
62
+
63
+
64
+
65
+ ## 开发
66
+
67
+ 发布到npm
68
+
69
+ ```shell
70
+ # 1. 补 package.json 元数据 + 新增 LICENSE 文件
71
+ # 2. 确认包名可用
72
+ npm view dsh-mcp-skills version
73
+ # 3. 检查 tarball(务必含 cordis.patch.yml)
74
+ npm pack --dry-run
75
+ # 4. 发布(稳定版,不要 prerelease)
76
+ npm publish
77
+ # 5. 安装并重启
78
+ dsh plugin --profile web add dsh-mcp-skills
79
+ dsh web
80
+ ```
81
+
82
+
83
+
84
+ ## License
85
+
86
+ MIT
@@ -0,0 +1,6 @@
1
+ # dsh bundle layer: mount the mcp-skills host plugin (lib/index.js via the
2
+ # package root export). The browser half is a dsh.client row discovered by the
3
+ # same entry name and served to the web UI automatically.
4
+ - insert:
5
+ - id: mcp-skills
6
+ name: 'dsh-mcp-skills'
package/images/mcp.png ADDED
Binary file
Binary file