dsh-armory 0.0.0-stage → 1.9.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 dsh-mcp-manager-ui contributors
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.en.md ADDED
@@ -0,0 +1,190 @@
1
+ # dsh-armory — Armory
2
+
3
+ [中文](README.md) | English
4
+
5
+ > **The all-in-one control board for DeepSeek Harness**: MCP servers · Skills · Experts · tool-usage ledger · three markets (WorkBuddy connectors ×316 / curated built-ins ×47 / SkillHub skills ×190k+ / WorkBuddy experts ×429), with browsing, search and one-click install.
6
+ > This project is a fork of [Imzl-zl/dsh-mcp-manager-ui](https://github.com/Imzl-zl/dsh-mcp-manager-ui) (MIT),
7
+ > upgraded from a pure MCP panel into a **five-in-one board: MCP + Skills + Experts + Markets + Tool Tailor**.
8
+
9
+ <p align="center">
10
+ <a href="https://github.com/2026heshao/dsh-armory/stargazers"><img src="https://img.shields.io/github/stars/2026heshao/dsh-armory?style=social" alt="stars"></a>
11
+ <a href="https://github.com/2026heshao/dsh-armory/releases"><img src="https://img.shields.io/github/v/release/2026heshao/dsh-armory?label=release" alt="release"></a>
12
+ <a href="https://www.npmjs.com/package/dsh-armory"><img src="https://img.shields.io/npm/dt/dsh-armory?label=npm%20downloads" alt="npm downloads"></a>
13
+ <a href="./LICENSE"><img src="https://img.shields.io/badge/license-MIT-green" alt="license"></a>
14
+ <img src="https://img.shields.io/badge/DSH-%3E%3D0.1.5--rc.1-blue" alt="DSH">
15
+ <a href="https://github.com/topics/dsh-plugin"><img src="https://img.shields.io/badge/topic-dsh--plugin-8b5cf6" alt="topic: dsh-plugin"></a>
16
+ </p>
17
+
18
+ ## Install in one line
19
+
20
+ ```sh
21
+ # npm (recommended: no build-approval step, ready to use)
22
+ dsh plugin --profile web add dsh-armory
23
+
24
+ # GitHub
25
+ dsh plugin --profile web add github:2026heshao/dsh-armory
26
+ ```
27
+
28
+ Restart DSH, then open **Skills · MCP · Experts** from the global panel list at the top of the sidebar (or the floating button bottom-right). Desktop users on the `desktop` profile: swap `--profile web` for `--profile desktop`. You can also search `armory` and one-click install inside [dsh-market](https://github.com/dsh-market/dsh-market#readme).
29
+
30
+ ## What it solves
31
+
32
+ | Pain point | How this plugin helps |
33
+ |---|---|
34
+ | MCP config means hand-editing YAML with no feedback on whether it connects | Visual panel: status, tool schemas, enable/disable, reconnect — global & per-project scopes, project changes apply to live sessions instantly |
35
+ | Installing skills means hunting for `SKILL.md` repos everywhere | **Direct markets**: SkillHub (190k+ skills), WorkBuddy connectors (316), 47 first-party-verified built-ins — search, filter, one-click install with per-file sha256 verification |
36
+ | Every MCP's tool descriptions eat context tokens; zero-use tools sit there for free | **Tool Tailor**: scans local session logs for call counts / errors / latency per tool; prune dead tools with one click |
37
+ | Migrating from Claude/Cursor/VS Code means copying config by hand | Detects local configs from 11 clients and imports them with a preview |
38
+
39
+
40
+ A **unified board** for DeepSeek Harness (Web and desktop): five top-level tabs — **MCP**, **Skill**, **Expert**, **Tool Tailor** and **Market** — reachable from the global panel list at the top of the sidebar or the floating button. The panel floats above the session — **it never interrupts an ongoing conversation**.
41
+
42
+ | Tab | Manages |
43
+ |---|---|
44
+ | **MCP** | MCP servers: connection status, tool list, enable/disable, import, market install |
45
+ | **Skill** | Skills: enable/disable of `SKILL.md` folders, source directories, session audit scan |
46
+ | **Expert** | WorkBuddy expert directory (429 experts / 15 industries): browse, search, and "summon" one into a new session as an independent agent preset |
47
+ | **Tool Tailor** | Per-tool call counts, error rates, latency and context-token cost from local session logs; prune dead tools |
48
+ | **Market** | Three sub-tabs: WorkBuddy connectors (316), curated built-ins (47), SkillHub skills (190k+) — browse, search, one-click install |
49
+
50
+ > The Skill panel reads DSH's custom skill directory (default `~/.agents/skills`): each skill is a folder with a `SKILL.md`,
51
+ > whose frontmatter declares the invocation policy (`disable-model-invocation` / `user-invocable`).
52
+ > User-invocable skills automatically appear in the `/` command menu of the chat box.
53
+
54
+ ## Screenshots
55
+
56
+ ### Global panel
57
+
58
+ ![MCP management panel](docs/images/mcp-manager-overview.png)
59
+
60
+ ### Project scope (`.dsh/mcp.json`)
61
+
62
+ ![Project MCP](docs/images/mcp-manager-workspace.png)
63
+
64
+ ### Connection details and adding a server
65
+
66
+ ![MCP connection details](docs/images/mcp-manager-detail.png)
67
+
68
+ ![Add MCP](docs/images/mcp-manager-add.png)
69
+
70
+ ## Features (MCP board)
71
+
72
+ - Inspect every MCP server's status, transport, connection parameters, and tool list; expand a tool to see its full input JSON Schema (required/optional, types, enums, defaults, raw JSON)
73
+ - Filter by transport (HTTP/stdio) and status, search by name/command/URL
74
+ - Enable, disable, reconnect, add, edit, remove; reveal masked credentials temporarily with the eye button and copy with one click
75
+ - **Global + project scopes**: global servers live in the Web profile and are available to every project; project servers live in that project's `.dsh/mcp.json` and are visible only to its sessions. A project can also hide any global MCP
76
+ - **Two entry points, one panel**: the draggable floating button (position remembered) and the official sidebar entry share the same state; the "Entry" control in the panel header can keep just one of them (never neither)
77
+ - **MCP market**: 47 services across 10 categories, each verified against first-party sources. Search-first, with category and "keyless only" filters, sorting, and one-click install from the card. Already-configured entries are detected and skipped, never overwritten
78
+ - **WB Market (direct installs)**: a third board tab with two markets in one place —
79
+ - **Connectors (MCP)**: reads the official WorkBuddy distribution ZIP (`static.workbuddy.cn`, the same source the WorkBuddy desktop app uses) on demand — 316 connectors, 242 installable (mostly streamable-http), while 74 CLI-based or WorkBuddy-token-dependent ones are honestly labeled "view only" with the reason. Installing = merging the connector's `mcpServers` into your MCP config through the same pipeline as "Import JSON" (admission, duplicate skip, entry-id reservation), in either global or project scope. The ZIP is ETag-cached under `~/.dsh/wb-market/` and decompressed with Node's built-in zlib — **zero new runtime dependencies**
80
+ - **Skills (SkillHub)**: reads the public SkillHub API (`api.skillhub.cn`, 190k+ skills) with keyword search, four sort orders, and pagination; details include publisher verification and security-scan status. Installing = downloading file-by-file, verifying each against the manifest's sha256, and writing into `~/.agents/skills/` (the same discovery scope as the official skill subsystem) — effective immediately. Installed skills show an "installed" badge, support one-click uninstall, and reinstalling updates them
81
+ - Skills belong to their respective authors. Both upstreams are third-party interfaces whose fields may change; the panel carries a persistent note saying so
82
+ - **Experts (direct, 1.9.0)** — a dedicated board tab (the sidebar entry is renamed **Skills · MCP · Experts**):
83
+ - **Directory**: reads the official WorkBuddy expert center distribution (`expert_center.json`, 429 experts / 15 industries, ETag-cached under `~/.dsh/wb-market/experts/`) with category filter, keyword search, and a detail dialog (persona, bundled skills, sample prompts) before you summon
84
+ - **Summoning** = appending one independent **agent preset** row to the profile patch (a `@deepseek-ai/dsh-agent-preset` entry that mirrors the built-in `standard` preset, with only the persona prefix swapped for the expert's full persona). New sessions then offer **WorkBuddy Expert · …** and that expert takes over the session, while the standard tools / planning / compaction / delegation stay intact. Multiple experts coexist; writes go through the existing patch pipeline (file lock + version check + atomic write), preserving other rows, comments and `!!js` expressions
85
+ - **Bundled skills**: tick to install them too — a full local WorkBuddy cache (`~/.workbuddy/plugins/cache/experts/`) is copied wholesale into `~/.agents/skills/` (prefixed `wbexpert__`, discovered by the skill registry immediately); without a cache it falls back to the CDN's single `SKILL.md` and labels the source honestly
86
+ - **Dismissing** removes that preset and its skill directory (hot-reloaded, no restart); team-type experts (expert team) are read-only for now
87
+ - Import MCP configuration from other clients installed on this machine: Claude Code, Codex (`config.toml`), OpenCode (including `.jsonc`), pi, Claude Desktop, Cursor, Windsurf, VS Code, Gemini CLI, Roo Code, and the cross-tool shared config. Everything is previewed before writing, with "merge" and "replace" modes
88
+ - Follows the DSH dark/light theme and adapts to narrow/mobile widths
89
+ - Update notice and **one-click upgrade**: a dismissible banner when a newer release exists (at most one check per day; disable with `DSH_ARMORY_DISABLE_UPDATE_CHECK`). Nothing happens until you press Upgrade — it **never auto-updates**; the upgrade itself is executed by DSH's official pluginManager, which handles version checks and rollback. Local dev copies installed via `link:` / `file:` / `github:` get no button (it would replace your link with an npm package)
90
+ - **What changed, said once**: after the version changes, the first time you open the panel a small card lists what's new; confirming it never shows it again, and it uses no network and sends nothing
91
+
92
+ ## Install (details)
93
+
94
+ ```sh
95
+ # npm (recommended)
96
+ dsh plugin --profile web add dsh-armory
97
+
98
+ # GitHub
99
+ dsh plugin --profile web add github:2026heshao/dsh-armory
100
+ ```
101
+
102
+ Then **restart DSH** (restart the desktop app, or `dsh web` for the browser GUI; desktop users: swap `--profile web` for `--profile desktop`). To upgrade: npm installs can click the in-panel upgrade banner; GitHub installs re-add with a new tag:
103
+
104
+ ```sh
105
+ dsh plugin --profile web update dsh-armory
106
+ ```
107
+
108
+ To uninstall (your configured MCP entries stay in place):
109
+
110
+ ```sh
111
+ dsh plugin --profile web remove dsh-armory
112
+ ```
113
+
114
+ Details, local development installs, and troubleshooting: [docs/installation.md](docs/installation.md) (Chinese).
115
+
116
+ > Do not add `dsh-armory` to the profile's `cordis.patch.yml`, an agent preset, or an extra `--patch` file by hand — the plugin command already does that, and duplicating it fails loudly on purpose.
117
+
118
+ ## Usage
119
+
120
+ ### Opening the panel
121
+
122
+ Two entry points, one panel:
123
+
124
+ - **Floating button (bottom-right)**: draggable, position remembered;
125
+ - **Sidebar entry "Skills · MCP · Experts"**: above "Settings" when expanded, icon-only in the 56px rail.
126
+
127
+ The panel floats above the session; closing it ("Close" or Esc) does not affect the conversation.
128
+
129
+ ### Global vs project
130
+
131
+ Tabs switch between "Global" and each project:
132
+
133
+ | Tab | Stored in | Visible to | When changes take effect |
134
+ |---|---|---|---|
135
+ | Global | The Web profile's `cordis.patch.yml` | every project | DSH hot-reloads, usually immediately |
136
+ | A project | That project's `.dsh/mcp.json` | only that project's sessions | as soon as it is written |
137
+
138
+ `serverName` is scoped: different projects, and global vs project, **may reuse the same name** with independent connections; duplicates inside one scope are rejected.
139
+
140
+ ### Adding a server
141
+
142
+ Three ways, all from the panel toolbar:
143
+
144
+ 1. **Add MCP**: fill in `command`/`args`/`env`/`cwd` (stdio) or `url`/`headers` (HTTP), with presets for common servers.
145
+ 2. **Import JSON**: paste another client's configuration, preview, then write. "Merge (update by name)" and "replace" modes; field mapping and limits in [docs/json-import.md](docs/json-import.md) (Chinese).
146
+ 3. **Built-in MCP**: tick the servers you want (Exa, Tavily, Firecrawl, Chrome DevTools, Playwright). The first three work without a key and need no local dependencies; the last two are local tools requiring Node.js and a browser.
147
+
148
+ ### Tools and credentials
149
+
150
+ The detail pane lists the tools a server currently registers; expand one for its full input schema. Credential fields are masked by default — the eye button asks the Host for the **effective runtime value** and shows it temporarily, with one-click copy. If you do not actually edit a field, saving keeps the original reference instead of writing secrets back into the configuration file.
151
+
152
+ ## FAQ
153
+
154
+ **The panel says a server is "disabled", but the model reports `unknown tool "mcp__xxx__..."`.**
155
+ That server is disabled, so it registers no tools. Enable it in the panel.
156
+
157
+ **How do I upgrade? Why did the panel not notify me?**
158
+ GitHub tag-pinned installs never cross versions — re-add with the new tag (`github:2026heshao/dsh-armory#v1.9.0`). The banner only queries this repo's GitHub Releases, at most once a day, is dismissible, and never acts on its own.
159
+
160
+ **Will editing touch my other configuration?**
161
+ No. Global edits only rewrite the entries declared by `@deepseek-ai/dsh-mcp-client` that this plugin manages, preserving other plugin rows, comments, and `!!js` expressions.
162
+
163
+ **Does uninstalling remove my configured MCPs?**
164
+ No. Uninstalling the plugin leaves existing `@deepseek-ai/dsh-mcp-client` rows in the profile untouched.
165
+
166
+ ## Compatibility
167
+
168
+ | Item | Verified |
169
+ |---|---|
170
+ | DeepSeek Harness | `0.1.5-rc.1` and above (verified through `0.2.0-rc.2`) |
171
+ | Node.js | whatever runtime DSH ships/supports |
172
+ | Platform | Windows; Linux/macOS share the same DSH Web contracts |
173
+
174
+ ## Documentation
175
+
176
+ - [Installation and upgrades](docs/installation.md) (Chinese)
177
+ - [JSON import](docs/json-import.md) (Chinese)
178
+ - [Design and limits](docs/design.md) (Chinese)
179
+ - [MCP market design](docs/mcp-market-design.md) (Chinese)
180
+ - [Official DeepSeek Harness plugin publishing guide](https://github.com/deepseek-ai/deepseek-harness/blob/master/docs/user/develop/basic/publish.md)
181
+
182
+ ## Links
183
+
184
+ - [LINUX DO](https://linux.do/)
185
+ - [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness)
186
+ - [GitHub `dsh-plugin` topic](https://github.com/topics/dsh-plugin)
187
+
188
+ ## License
189
+
190
+ MIT
package/README.md CHANGED
@@ -1,3 +1,221 @@
1
- # Temporary Holding Version
1
+ # dsh-armory — 军械库 / Armory
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ 中文 | [English](README.en.md)
4
+
5
+ > **DeepSeek Harness 的一体化管理看板**:MCP 服务器 · 技能 · 专家 · 工具使用账本 · 三大市场(WorkBuddy 连接器 316 个 / 内置精选 47 个 / SkillHub 技能 19 万+ / WorkBuddy 专家 429 位),浏览、搜索、一键安装、一键召唤。
6
+ > 本项目 fork 并改写自 [Imzl-zl/dsh-mcp-manager-ui](https://github.com/Imzl-zl/dsh-mcp-manager-ui)(MIT,原项目仅 MCP 管理),现仓库为 [2026heshao/dsh-armory](https://github.com/2026heshao/dsh-armory),
7
+ > 从纯 MCP 管理面板升级为 **MCP + 技能 + 专家 + 市场 + 工具账本** 五合一看板。
8
+
9
+ <p align="center">
10
+ <a href="https://github.com/2026heshao/dsh-armory/stargazers"><img src="https://img.shields.io/github/stars/2026heshao/dsh-armory?style=social" alt="stars"></a>
11
+ <a href="https://github.com/2026heshao/dsh-armory/releases"><img src="https://img.shields.io/github/v/release/2026heshao/dsh-armory?label=release" alt="release"></a>
12
+ <a href="https://www.npmjs.com/package/dsh-armory"><img src="https://img.shields.io/npm/dt/dsh-armory?label=npm%20downloads" alt="npm downloads"></a>
13
+ <a href="./LICENSE"><img src="https://img.shields.io/badge/license-MIT-green" alt="license"></a>
14
+ <img src="https://img.shields.io/badge/DSH-%3E%3D0.1.5--rc.1-blue" alt="DSH">
15
+ <a href="https://github.com/topics/dsh-plugin"><img src="https://img.shields.io/badge/topic-dsh--plugin-8b5cf6" alt="topic: dsh-plugin"></a>
16
+ </p>
17
+
18
+ ## 一键安装
19
+
20
+ ```sh
21
+ # npm(推荐:免构建授权,装完即用)
22
+ dsh plugin --profile web add dsh-armory
23
+
24
+ # GitHub
25
+ dsh plugin --profile web add github:2026heshao/dsh-armory
26
+ ```
27
+
28
+ 装完**重启 DSH**,侧栏顶部「全局面板」里点 **技能 · MCP · 专家**(或右下角悬浮按钮)。桌面端装在 `desktop` profile 时把 `--profile web` 换成 `--profile desktop`。也可以在装了 [dsh-market](https://github.com/dsh-market/dsh-market#readme) 的 DSH 里搜 `armory` 一键安装。
29
+
30
+ ## 它解决什么
31
+
32
+ | 痛点 | 本插件的做法 |
33
+ |---|---|
34
+ | MCP 配置要手改 YAML,改完不知道连没连上 | 可视化面板:状态、工具 Schema、启停、重连,全局与项目双作用域,项目级改完即对存活会话生效 |
35
+ | 装技能要去各处翻 `SKILL.md` 仓库 | **市场直连**:SkillHub 19 万+ 技能、WorkBuddy 316 个连接器、47 个一手核实的内置服务,搜索/筛选/一键安装,逐文件 sha256 校验 |
36
+ | 每个 MCP 的工具描述都在吃上下文 token,零调用的工具白白占位 | **工具裁缝**:扫描本机会话日志统计每个工具的调用/错误/延迟,死工具清单一键禁用 |
37
+ | 从 Claude/Cursor/VS Code 迁移要逐条抄配置 | 自动检出 11 种客户端的本机配置,预览后一键导入 |
38
+
39
+ ## 界面预览
40
+
41
+ ### 全局管理面板
42
+
43
+ ![MCP 管理面板](docs/images/mcp-manager-overview.png)
44
+
45
+ ### 项目作用域(`.dsh/mcp.json`)
46
+
47
+ ![项目 MCP](docs/images/mcp-manager-workspace.png)
48
+
49
+ ### 连接详情与新增
50
+
51
+ ![MCP 连接详情](docs/images/mcp-manager-detail.png)
52
+
53
+ ![新增 MCP](docs/images/mcp-manager-add.png)
54
+
55
+ ## 功能
56
+
57
+ - 查看每个 MCP 的状态、传输方式、连接参数与工具列表;展开工具可看完整输入 JSON Schema(必填/可选、类型、枚举、默认值与原始 JSON)
58
+ - 按传输方式(HTTP/stdio)与状态筛选,按名称/命令/URL 搜索
59
+ - 启用、禁用、重连、添加、编辑、移除;需要时用眼睛临时揭示被掩码的凭据并一键复制
60
+ - **全局 + 项目双作用域**:全局写 Web profile,一次注册所有项目可用;项目写该项目 `.dsh/mcp.json`,只该项目会话可见;项目里还能「屏蔽」某个全局 MCP
61
+ - **两个入口,同一个面板**:右下角悬浮按钮(可拖拽、记忆位置)与官方侧栏入口(展开态在「设置」上方显示「MCP」,收起成 56px 轨道时只剩图标)共享同一开关状态;面板右上角「入口」可以把两者只留一个(不能都关)
62
+ - **MCP 市场**:47 个逐条一手核实过的服务,分 10 类(搜索、开发工具、安全与逆向、数据库与数据、AI 与知识、浏览器自动化、云与基础设施、效率协作、文件与本地、通讯)。搜索为主操作,配分类与「只要免密钥」筛选、排序、卡片直接安装;每条如实标注免费额度与需要准备什么(密钥 / 连接信息 / 装完还得改的参数)。已配置的只识别并跳过,不覆盖
63
+ - 导入本机其他客户端的 MCP 配置:自动检测 Claude Code、Codex(`config.toml`)、OpenCode(含 `.jsonc`)、pi、Claude Desktop、Cursor、Windsurf、VS Code、Gemini CLI、Roo Code 与跨工具的共享配置,逐个列出,点一条即导入;也能粘贴 Claude/Cursor/Cline/Roo 的 `mcpServers` 或 VS Code 的 `servers` JSON。写入前预览,支持「合并(同名更新)」与「替换」
64
+ - 跟随 DSH 深色/浅色主题,适配窄屏与移动宽度
65
+ - 更新提示与**一键升级**:有新版时在面板顶部显示可关闭的提示条(每天最多查一次,可用 `DSH_ARMORY_DISABLE_UPDATE_CHECK` 关闭)。点了「升级」才动,**不会自动升级**;升级由 DSH 官方的 pluginManager 执行,装完提示重启宿主生效。用 `link:` / `file:` / `github:` 装的本地开发副本不给按钮(那会把链接换成 npm 包)
66
+ - **升级后主动说一次变了什么**:版本变了后第一次打开面板弹一张小卡片,列出本次更新内容,并指路新功能在哪(例如「入口」开关在面板右上角);确认一次后不再提示,不联网、不发任何数据
67
+ - **工具裁缝**(1.7.0 新增):扫描本机会话日志(只解析 `tool/call` / `tool/result` 两类事件,不读消息正文),统计每个工具近 7/30/90 天的调用次数、错误率与最后使用时间;同时按当前注册表估算每个工具 Schema 每轮请求占用的上下文 token。窗口内零调用的 MCP 工具自动进「死工具清单」,行内可一键禁用/启用对应服务器(复用官方写链,随时可恢复)。全程只读,多帧 zstd 日志逐帧解析、个别帧损坏跳过不中断
68
+ - **WB 市场(直连安装,1.8.0 新增)**:看板第四个分类,两个市场一处浏览——
69
+ - **连接器(MCP)**:直读 WorkBuddy 官方分发 ZIP(`static.workbuddy.cn`,与 WorkBuddy 桌面端同一数据源),316 个连接器按需解析;可安装的 242 个(streamable-http 为主),CLI 型 / 需 WorkBuddy token 注入的 74 个如实标注「仅展示」并给出原因。安装 = 把该连接器的 `mcpServers` 合并写入 MCP 配置,与「导入 JSON」同一链路(准入、同名跳过、entry id 预留一致),全局与项目作用域都可选;ZIP 按 ETag 缓存在 `~/.dsh/wb-market/`,解压用 Node 内置 zlib,**零新增运行时依赖**
70
+ - **技能(SkillHub)**:直读 SkillHub 公开 API(`api.skillhub.cn`,19 万+ 技能),支持搜索(`keyword`)、排序(下载/安装/星标/评分)、分页;详情含发布方认证与安全扫描状态。安装 = 逐文件下载并按清单 sha256 校验后写入 `~/.agents/skills/`(与官方 skill 子系统同一发现范围),装完即刻生效;已装的显示「已安装」,可一键卸载、重装即更新
71
+ - 技能版权归原作者所有;两个均为第三方接口,字段可能随上游改版变化(面板顶部有常驻说明)
72
+ - **专家直连(1.9.0 新增,体验对齐 WorkBuddy 专家中心)**:看板独立分类「专家」(侧栏入口同步更名「技能 · MCP · 专家」)——
73
+ - **目录**:直读 WorkBuddy 专家中心官方分发(`expert_center.json`,429 位专家 / 15 个行业分类,ETag 缓存在 `~/.dsh/wb-market/experts/`),分类筛选 + 关键词搜索 + 详情弹层(召唤前看人设正文、捆绑技能、试试这样问)
74
+ - **召唤** = 往 profile 补丁写入一条**独立 Agent 预设**(`@deepseek-ai/dsh-agent-preset` 行,plugins 复刻内置 standard 预设、仅 persona 的 prefix 换成专家人设全文)——新建会话时选择「WorkBuddy 专家 · …」即专家接管该会话,标准工具/规划/压缩/委派原样保留;多个专家可共存,写入走既有 patch 写链(文件锁 + 版本校验 + 原子写),其余条目、注释与 `!!js` 表达式原样保留
75
+ - **捆绑技能**:召唤时可勾选一并安装——本机 WorkBuddy 缓存(`~/.workbuddy/plugins/cache/experts/`)有完整技能树就整目录复制到 `~/.agents/skills/`(`wbexpert__` 前缀,即刻被技能注册表发现);无缓存时按 CDN 的 SKILL.md 单文件兜底并如实标注来源
76
+ - **送还** = 摘除该召唤预设与对应技能目录(热加载,无需重启);团队型(expert team)暂只读展示
77
+
78
+ ## 安装
79
+
80
+ ```sh
81
+ # 从 npm 安装(推荐)
82
+ dsh plugin --profile web add dsh-armory
83
+
84
+ # 从 GitHub 安装
85
+ dsh plugin --profile web add github:2026heshao/dsh-armory
86
+ ```
87
+
88
+ 装完**重启 DSH**(桌面端重启应用,Web 端重启 `dsh web`;桌面端把 `--profile web` 换成 `--profile desktop`)。升级:npm 安装可在面板「一键升级」提示条上直接点,GitHub 安装换新版 tag 重新 `add`。卸载(不会删除 profile 里已有的 MCP 条目):
89
+
90
+ ```sh
91
+ dsh plugin --profile web remove dsh-armory
92
+ ```
93
+
94
+ 细节、本地开发安装与故障排查见 [安装与升级](docs/installation.md)。
95
+
96
+ > 不要把 `dsh-armory` 手工插进 profile 的 `cordis.patch.yml`、Agent preset 或额外的 `--patch` 文件——插件命令已经完成这件事,重复装配会明确报错。
97
+
98
+ ## 使用
99
+
100
+ ### 打开面板
101
+
102
+ 两个入口,同一个面板:
103
+
104
+ - **右下角悬浮按钮**:可拖拽移动,位置会被记住;
105
+ - **侧栏「技能 · MCP · 专家」**:展开态在「设置」上方,侧栏收起成 56px 轨道时只剩图标。
106
+
107
+ 面板浮在会话之上,关掉它(右上角「关闭」或 Esc)不会影响会话。
108
+
109
+ 两个入口都能单独关掉:面板右上角「入口」里选 `悬浮按钮 + 侧栏入口`(默认)/ `仅悬浮按钮` / `仅侧栏入口`。**不能两个都关**——面板只能从这两个入口打开,所以这是一个三选一,而不是两个独立的开关。选择存在浏览器本地(localStorage),换浏览器或清缓存要重选一次。
110
+
111
+ ### 全局 vs 项目
112
+
113
+ 顶部标签页在「全局」与各项目之间切换:
114
+
115
+ | 标签页 | 存哪 | 谁可见 | 改动何时生效 |
116
+ |---|---|---|---|
117
+ | 全局 | Web profile 的 `cordis.patch.yml` | 所有项目 | DSH 热加载,通常立即生效 |
118
+ | 某项目 | 该项目 `.dsh/mcp.json` | 只该项目会话 | 写盘即生效(见下) |
119
+
120
+ `serverName` 按作用域判重:不同项目之间、全局与项目之间**可以同名**,各自独立连接;同一作用域内不能重名。
121
+
122
+ ### 常用操作
123
+
124
+ 在列表行或详情页里:
125
+
126
+ - **开关**:启用 / 禁用(全局写 profile 补丁的 `disabled`,项目写 `.dsh/mcp.json`);
127
+ - **重连**:全局条目重载 loader 条目;项目连接会拆掉旧连接、按当前配置重建并重新投射给存活会话(`mcp-client` 的重连预算耗尽后必须靠它恢复);
128
+ - **编辑 / 移除**:移除只影响当前作用域;
129
+ - **屏蔽**(项目页里对全局 MCP):写 `exclude`,该项目的新会话不再看到它——全局实例仍在跑,所以不影响其他项目。
130
+
131
+ ### 添加 MCP
132
+
133
+ 三条路,都从面板顶部工具栏进:
134
+
135
+ 1. **添加 MCP**:表单填 `command`/`args`/`env`/`cwd`(stdio)或 `url`/`headers`(HTTP),可设调用超时、启动失败策略与重连策略;常用服务器有预设模板可一键套用。
136
+ 2. **导入 JSON**:粘贴其他客户端的配置,先预览再写入。支持「合并(同名更新)」与「替换」,字段映射与限制见 [JSON 导入](docs/json-import.md)。
137
+ 3. **内置 MCP**:勾选未配置的项一次装好(Exa、Tavily、Firecrawl、Chrome DevTools、Playwright)。前三项有免密额度、不需要本地依赖;后两项是本地工具,需要 Node.js 与浏览器。已配置的项只识别并跳过,不会覆盖。
138
+
139
+ ### 看工具与敏感值
140
+
141
+ 详情页列出该 MCP 当前注册的工具;展开可看完整输入 Schema。凭据类字段默认掩码,点眼睛图标会向 Host 读取**有效运行值**(已解析过的环境变量)并临时显示,再点一次恢复;已显示的值可一键复制。编辑时若没实际改动输入,保存仍保留原来的引用写法,不会把密钥写回配置文件。
142
+
143
+ ## 配置生效时机(重要)
144
+
145
+ | 作用域 | 修改后何时生效 |
146
+ |---|---|
147
+ | 全局 | DSH 热加载,通常立即生效(含运行中的会话) |
148
+ | 项目 | **写盘即生效**:新增立刻挂上存活会话、删除立刻撤掉工具、改动就地重载连接(工具名不变) |
149
+
150
+ 项目 MCP 由本项目所有会话共用一份连接,配置写在 `.dsh/mcp.json`。面板保存的那一刻就会对齐到正在运行的会话,**不需要重开会话,也不需要重启 Host**;手工编辑该文件则在**下一次会话挂载**时被采纳。
151
+
152
+ > **连接跟配置走,不跟会话走**:最后一个会话结束不会拆掉连接,它只进入空闲等待,下一次会话直接复用——这样"要用的时候"它已经就绪(这也是宿主自己的契约:工具必须在首轮之前出现)。两个旋钮写在 server 条目里:`idleTimeoutMs`(空闲保留多久,默认 5 分钟,`0` = 永不回收)与 `readyTimeoutMs`(挂载时等就绪的总预算,默认 5s,`0` = 不等)。字段速查与边界见 [设计与限制](docs/design.md#项目级专有字段dshmcpjson-里每个-server-可写)。
153
+ >
154
+ > **状态怎么看**:项目行把两件独立的事分开说,不合成一个状态。
155
+ > - **连接在不在**:`已连接 · 当前无会话使用(连接保留,下次直接用)` / `已连接 · N 个会话在用` / `连接中…` / `连接失败` / `尚未建立连接(新会话自动挂载)`。
156
+ > - **几个会话在用**:见上一行的 `N 个会话在用`;不再出现「待会话挂载」那种把两者压成一句、容易被读成"还没连上"的写法。
157
+ >
158
+ > **重连是必需出口**:mcp-client 的自动重连有次数上限,耗尽后它会注销工具并停止,只能靠重载配置或重启宿主恢复(它的 README 明写)。项目 MCP 又不是常驻服务,所以面板的「重连」按钮会拆掉旧连接、按当前配置重建,并重新投射给存活会话。
159
+
160
+ ## 常见问题
161
+
162
+ **面板里显示「已禁用」,但模型调用报 `unknown tool "mcp__xxx__..."`**
163
+ 那个 MCP 被禁用了,所以它没有注册任何工具。在面板里点「启用」即可(全局会写 profile 补丁并热加载,项目写 `.dsh/mcp.json`、写盘即生效)。
164
+
165
+ **那一行显示「挂载失败」「连接失败」或「作用域隔离失败」,怎么区分?**
166
+ 三类是不同的事,详情页会给出具体原因:**挂载失败** = **会话挂载阶段**(`agent/created` 监听器)就没挂上(变量求值为空、`failOnStartupError` 下启动失败、工具注册被拒);**连接失败** = `mcp-client` 连不上或重连耗尽(原因取自它的日志);**作用域隔离失败** = 连接正常但工具不在共享作用域层(宿主里出现了两份 `@deepseek-ai/dsh-scope`)。排查与原理见 [设计与限制](docs/design.md#连接状态语义)。
167
+
168
+ **项目行那些状态文案分别是什么意思?**
169
+ 它们把两件独立的事分开说:**连接在不在** —— `已连接 · 当前无会话使用(连接保留,下次直接用)`(最后一个会话结束了,连接按空闲策略留着)/ `已连接 · N 个会话在用 · M 工具` / `连接中…` / `连接失败` / `尚未建立连接(新会话自动挂载)`;**几个会话在用** —— 就是那句里的 `N 个会话在用`。旧版本的「待会话挂载」正是把这两件事压成一句,所以容易被读成"还没连上"。
170
+
171
+ **怎么升级?为什么面板没提示?**
172
+ 从 npm 装的直接 `dsh plugin --profile web update dsh-armory` 就会升小版本,也可以直接点面板提示条上的「升级」(同一件事,免去敲命令)。面板的提示条只查 GitHub Releases、每天最多一次、可关闭、不会自己动;固定 tag 安装的用户不会自动跨版本,需要用新 tag 重新 `add`(见 [安装与升级](docs/installation.md))。
173
+
174
+ **改动会不会碰到我的其他配置?**
175
+ 不会。全局改动只动 profile 补丁里由 `@deepseek-ai/dsh-mcp-client` 声明、且由本插件管理的条目,保留其他插件条目、注释与 `!!js` 表达式;导入「替换」也只替换这一部分,不会删除其他 bundle 或 Agent preset 自带的 MCP。
176
+
177
+ **卸载后我配置的 MCP 会消失吗?**
178
+ 卸载插件不会删除 profile 里已有的 `@deepseek-ai/dsh-mcp-client` 条目;项目的 `.dsh/mcp.json` 也留在原处(它本来就是普通 JSON 文件)。
179
+
180
+ ## 兼容性
181
+
182
+ | 项目 | 已验证 |
183
+ |---|---|
184
+ | DeepSeek Harness | `0.1.5-rc.1` 及以上(已验证至 `0.2.0-rc.2`) |
185
+ | Node.js | DSH 自带/支持的运行时 |
186
+ | 平台 | Windows;Linux/macOS 使用同一 DSH Web 契约 |
187
+
188
+ 只支持 0.1.5 起(更早的版本缺少「按注册作用域判 `serverName` 唯一性」与「setup 传入 agent」两个能力),不为旧版本保留降级分支。原因与依赖细节见 [设计与限制](docs/design.md#兼容性与依赖细节)。
189
+
190
+ ## 开发
191
+
192
+ ```sh
193
+ npm install --no-save yaml@2 # 测试唯一的裸依赖(node:test 内置)
194
+ npm test # 专家市场写链 33 断言(与 CI / 发版门槛同一条)
195
+ npm run test:e2e # 可选:用宿主补丁算法验证专家预设进入组合树
196
+ dsh --profile web --dump-config # 看 profile 的有效配置
197
+ dsh web # 起 Web 做真实操作验证
198
+ ```
199
+
200
+ `npm test` 跑的是 `test/expert-manual.mjs`:真网拉 WorkBuddy 专家目录(ETag 命中后走磁盘缓存)与 senior-developer 人设,再对 `lib/expert-market.js` 的 patch 写链做 33 条断言——含 1.9.1 修复的回归用例(召唤预设必须写成顶层 `- insert:` 指令、旧版顶层裸条目要能被迁移)。本机存在 `~/.dsh/profiles/desktop/cordis.patch.yml` 时会追加一组真实 profile 往返断言,没有则记 `SKIP`。
201
+
202
+ CI(push 到 main / PR,见 `.github/workflows/ci.yml`)与发版门槛(推 tag,见 `.github/workflows/release.yml`)跑的是**逐字相同**的命令(装 `yaml@2` → `node ./test/run-expert-manual.mjs`),两处口径不许分叉;发版流程见 [安装与升级](docs/installation.md#发布流程维护者)。
203
+
204
+ > 本机若没有 `yaml`,`npm test` 会以 `ERR_MODULE_NOT_FOUND` 退出——`test/loader.mjs` 会先试标准解析,失败才回退开发机的 profile 副本(`~/.dsh/profiles/desktop/node_modules`),所以干净环境必须先装依赖。
205
+
206
+ ## 文档
207
+
208
+ - [安装与升级](docs/installation.md)
209
+ - [JSON 导入](docs/json-import.md)
210
+ - [设计与限制](docs/design.md)(共享连接模型、连接状态语义、已知限制、依赖细节)
211
+ - [DeepSeek Harness 官方插件发布指南](https://github.com/deepseek-ai/deepseek-harness/blob/master/docs/user/develop/basic/publish.md)
212
+
213
+ ## 相关链接
214
+
215
+ - [LINUX DO](https://linux.do/)(友链)
216
+ - [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness)
217
+ - [GitHub `dsh-plugin` 主题](https://github.com/topics/dsh-plugin)
218
+
219
+ ## License
220
+
221
+ MIT
@@ -0,0 +1,3 @@
1
+ - insert:
2
+ - id: dsh-armory
3
+ name: dsh-armory