dsh-agent-plugins-market 0.4.3

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.
Files changed (46) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +171 -0
  3. package/README.zh.md +171 -0
  4. package/client/client.js +954 -0
  5. package/client/client.js.map +1 -0
  6. package/cordis.patch.yml +4 -0
  7. package/lib/commands-mounts.js +169 -0
  8. package/lib/context.js +80 -0
  9. package/lib/discovery/manifests.js +214 -0
  10. package/lib/discovery/surfaces.js +232 -0
  11. package/lib/discovery.js +234 -0
  12. package/lib/git.js +52 -0
  13. package/lib/hooks-mounts.js +95 -0
  14. package/lib/index.js +73 -0
  15. package/lib/manager.js +490 -0
  16. package/lib/mcp-config.js +100 -0
  17. package/lib/mcp-mounts.js +88 -0
  18. package/lib/paths.js +85 -0
  19. package/lib/routes.js +208 -0
  20. package/lib/skills-parse.js +114 -0
  21. package/lib/skills-provider.js +170 -0
  22. package/lib/state.js +64 -0
  23. package/lib/types/commands-mounts.d.ts +29 -0
  24. package/lib/types/context.d.ts +13 -0
  25. package/lib/types/discovery/manifests.d.ts +55 -0
  26. package/lib/types/discovery/surfaces.d.ts +15 -0
  27. package/lib/types/discovery.d.ts +16 -0
  28. package/lib/types/git.d.ts +8 -0
  29. package/lib/types/hooks-mounts.d.ts +19 -0
  30. package/lib/types/index.d.ts +27 -0
  31. package/lib/types/manager.d.ts +87 -0
  32. package/lib/types/mcp-config.d.ts +28 -0
  33. package/lib/types/mcp-mounts.d.ts +31 -0
  34. package/lib/types/paths.d.ts +29 -0
  35. package/lib/types/routes.d.ts +11 -0
  36. package/lib/types/skills-parse.d.ts +22 -0
  37. package/lib/types/skills-provider.d.ts +16 -0
  38. package/lib/types/state.d.ts +6 -0
  39. package/lib/types/types.d.ts +165 -0
  40. package/lib/types/validate.d.ts +34 -0
  41. package/lib/types.js +10 -0
  42. package/lib/validate.js +199 -0
  43. package/package.json +114 -0
  44. package/schemas/1.0.0/mcp.schema.json +120 -0
  45. package/schemas/1.0.0/plugin.schema.json +65 -0
  46. package/schemas/README.md +14 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 dsh-agent-plugins 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.md ADDED
@@ -0,0 +1,171 @@
1
+ # dsh-agent-plugins-market — Claude Code plugin marketplaces for DeepSeek Harness
2
+
3
+ English | [简体中文](README.zh.md)
4
+
5
+ > **Bring the Claude Code / Codex / Cursor plugin-marketplace ecosystem into DeepSeek Harness (DSH): install and inject agent plugins — skills, MCP servers, hooks and slash commands — from git marketplace repos, with a market page right inside the Web GUI.**
6
+
7
+ ![npm](https://img.shields.io/npm/v/dsh-agent-plugins-market) ![npm downloads](https://img.shields.io/npm/dm/dsh-agent-plugins-market) ![License](https://img.shields.io/github/license/Sivan757/dsh-agent-plugins-market) ![GitHub stars](https://img.shields.io/github/stars/Sivan757/dsh-agent-plugins-market)
8
+
9
+ ![Agent Plugins Market screenshot](docs/screenshot.png)
10
+
11
+ ![Suite detail (skills / MCP / commands preview)](docs/screenshot-detail.png)
12
+
13
+ ## What problem does it solve?
14
+
15
+ DeepSeek Harness is a powerful agent harness — but its plugin ecosystem doesn't yet have the breadth of the **Claude Code plugin marketplace** world. There are hundreds of ready-made plugin marketplaces on GitHub (Claude Code `.claude-plugin/marketplace.json`, Codex `.codex-plugin`, Cursor, Kimi, agent-plugins.org v1.0.0 portable suites) full of skills, MCP servers, hooks and slash commands.
16
+
17
+ `dsh-agent-plugins-market` is the bridge: **add any git marketplace repo as a source, install its suites, and their skills / MCP servers / hooks / commands are injected into your DSH sessions at runtime** — no manual file copying, no conversion needed. Claude Code-authored skills work verbatim (`${CLAUDE_PLUGIN_ROOT}` is substituted automatically).
18
+
19
+ ## What it does
20
+
21
+ - **Plugin / suite management**: configure git repository sources (markets), browse every discoverable plugin, install / uninstall / enable / disable / refresh per source or per plugin. Source ids are derived automatically from the repository manifest JSON — no manual input.
22
+ - **Runtime discovery**: installed plugins are discovered from `~/.dsh/agent-plugins/.sources/<sourceId>/` (user dimension) and `<project>/.dsh/agent-plugins/.sources/<sourceId>/` (project dimension). Local sources read the working tree directly, including uncommitted changes.
23
+ - **Runtime injection**:
24
+ - **Skills** — a `ctx.skills` SkillProvider (project rank 250 / user rank 450); `${CLAUDE_PLUGIN_ROOT}` is substituted so Claude Code-authored skills work verbatim, and appear in the `/` slash menu.
25
+ - **MCP servers** — every valid `mcp.json` server of an enabled plugin mounts a live `dsh-mcp-client` child; tools appear as `mcp__<plugin>__<server>__<tool>`.
26
+ - **Hooks** — a plugin's `hooks/hooks.json` mounts the `dsh-hooks-claude-code` bridge on the harness interception points (SessionStart, UserPromptSubmit, PreToolUse, PostToolUse, Stop, SubagentStart, SubagentStop).
27
+ - **Commands / subagents** — `commands/*.md` register as dsh slash commands; `agents/*.md` register as `agent-<name>` skills.
28
+ - **Context** — the enabled-plugin catalog (user + project sections) is injected at session start; the `agent_plugins` tool queries it.
29
+ - **Market page in the Web GUI**: source pills + search/actions, status tabs, a two-column card grid, and a plugin detail modal with previews for skills / MCP / hooks / commands / LSP.
30
+
31
+ ## Supported plugin layouts
32
+
33
+ | Layout | Manifest | Notes |
34
+ | --- | --- | --- |
35
+ | agent-plugins.org v1 | `plugin.json` | vendored 1.0.0 JSON Schema validation + spec §4 path rules |
36
+ | Claude Code market | `.claude-plugin/marketplace.json` + `.claude-plugin/plugin.json` | marketplace `plugins[].source` relative paths |
37
+ | Universal | `.plugin/plugin.json` | multi-client repos (e.g. vercel-plugin) |
38
+ | Cursor | `.cursor-plugin/plugin.json` | declared skills paths |
39
+ | Kimi | `.kimi-plugin/plugin.json` | inline mcpServers |
40
+ | Codex | `.codex-plugin/plugin.json` | — |
41
+ | Skill collection (manifest-less) | none (synthetic) | flat `SKILL.md` directory collections |
42
+
43
+ One repo may carry several dialects at once (vercel/vercel-plugin ships all of them); the suite identity comes from the highest-precedence manifest while surfaces are scanned from the directories. `mcp.json` is validated strictly against the agent-plugins.org schema; `.mcp.json` is parsed leniently — top-level server-map shorthand, `type: http` / `local` / omitted `type` (stdio by `command`) normalization, `${CLAUDE_PLUGIN_ROOT}` / `${CLAUDE_PLUGIN_DATA}` / `${NAME:-default}` placeholders, and unknown transports are tolerated per server. The marketplace manifest is authoritative for the suite set; manifest-less marketplace entries that carry skills and manifest-bearing container dirs not listed there are supplemented. Remote URL entries show as "remote reference" cards (metadata + source URL, not directly installable; add the repo as a source to install).
44
+
45
+ ## Install
46
+
47
+ ```sh
48
+ # inside a dsh profile
49
+ pnpm add dsh-agent-plugins-market
50
+
51
+ # or via the dsh CLI
52
+ dsh plugin --profile <name> add dsh-agent-plugins-market
53
+ ```
54
+
55
+ Add the package to the profile's `dsh.profile.bundles` (the package's `cordis.patch.yml` inserts the plugin row):
56
+
57
+ ```jsonc
58
+ // ~/.dsh/profiles/<profile>/package.json
59
+ {
60
+ "dependencies": { "dsh-agent-plugins-market": "^0.4.0" },
61
+ "dsh": { "profile": { "bundles": ["@deepseek-ai/dsh-base", "@deepseek-ai/dsh-web-app", "dsh-agent-plugins-market"] } }
62
+ }
63
+ ```
64
+
65
+ Restart dsh and open **Settings → Agent Plugins Market**.
66
+
67
+ ## Configure marketplace sources
68
+
69
+ Sources persist in `~/.dsh/agent-plugins/state.json`; cordis config seeds them (and re-adds missing ids on every boot):
70
+
71
+ ```yaml
72
+ - id: dsh-agent-plugins-market
73
+ config:
74
+ sources:
75
+ - { id: agent-plugins, url: 'https://github.com/Sivan757/agent-plugins.git' }
76
+ - { id: mattpocock-skills, url: 'https://github.com/mattpocock/skills.git' }
77
+ - { id: claude-plugins-official, url: 'https://github.com/anthropics/claude-plugins-official' }
78
+ - { id: ui-ux-pro-max, url: 'https://github.com/nextlevelbuilder/ui-ux-pro-max-skill.git' }
79
+ - { id: jeecg-skills, url: '/Users/me/work/jeecg-plugin', local: true }
80
+ ```
81
+
82
+ A `local: true` source reads the directory in place (live working tree; never deleted on removal).
83
+
84
+ ## How is this different from other DSH ↔ Claude Code bridges?
85
+
86
+ | Capability | **dsh-agent-plugins-market** | [dsh-skills](https://github.com/CocoSgt/dsh-skills) | [@claude2dsh/plugin](https://www.npmjs.com/package/@claude2dsh/plugin) | [@deepseek-ai/dsh-hooks-claude-code](https://github.com/deepseek-ai/deepseek-harness) |
87
+ | --- | --- | --- | --- | --- |
88
+ | Source | **any git marketplace repo** (`.claude-plugin`, `.codex-plugin`, `.cursor-plugin`, `.kimi-plugin`, agent-plugins.org v1, manifest-less skills) | `~/.claude/skills` dirs, project dirs, `.skill` packages | Claude Code sessions + skills | a Claude Code `hooks.json` config |
89
+ | Skills injection | ✅ + `/` slash menu | ✅ global skill library | ✅ | ❌ |
90
+ | MCP servers | ✅ live `dsh-mcp-client` mounts | ❌ | — | ❌ |
91
+ | Hooks | ✅ via `dsh-hooks-claude-code` bridge | ❌ | — | ✅ (direct) |
92
+ | Slash commands / subagents | ✅ `commands/*.md`, `agents/*.md` | ❌ | — | ❌ |
93
+ | Market UI | ✅ full market page in the Web GUI | ✅ settings page | — | ❌ |
94
+ | Direction | CC / Codex / Cursor ecosystem → DSH | CC skills → DSH | CC ↔ DSH session sync | config → DSH |
95
+
96
+ Want the opposite direction (dispatch work **from** Claude Code / Codex **to** DSH agents)? See [dsh-crew](https://github.com/ZSeven-W/dsh-crew).
97
+
98
+ ## FAQ
99
+
100
+ ### How do I install Claude Code plugins / skills inside DeepSeek Harness?
101
+
102
+ 1. Install `dsh-agent-plugins-market` into your DSH profile (see [Install](#install)).
103
+ 2. Open **Settings → Agent Plugins Market**, add the marketplace repo as a source (e.g. `https://github.com/anthropics/claude-plugins-official` or `https://github.com/mattpocock/skills.git`).
104
+ 3. Click a suite card → **Install** → restart the profile.
105
+ 4. The suite's skills appear in the `/` slash menu; MCP tools appear as `mcp__<suite>__<server>__<tool>`; slash commands and `/agent-*` subagents register automatically.
106
+
107
+ ### Does it support Claude Code marketplaces (`.claude-plugin/marketplace.json`)?
108
+
109
+ Yes. Claude Code market layout is supported natively (see the layout table above): the marketplace manifest is authoritative for the suite set, `plugins[].source` relative paths are resolved, and manifest-less entries carrying skills are supplemented automatically.
110
+
111
+ ### Can it inject MCP servers from a plugin suite?
112
+
113
+ Yes. Every valid `mcp.json` server of an enabled suite mounts a live `dsh-mcp-client` child, so MCP tools are callable by the DSH agent. `mcp.json` is validated strictly; `.mcp.json` is parsed leniently with placeholder support (`${CLAUDE_PLUGIN_ROOT}`, `${CLAUDE_PLUGIN_DATA}`, `${NAME:-default}`).
114
+
115
+ ### What about Claude Code hooks?
116
+
117
+ A suite's `hooks/hooks.json` is mounted through the official `@deepseek-ai/dsh-hooks-claude-code` bridge onto the harness interception points (SessionStart, UserPromptSubmit, PreToolUse, PostToolUse, Stop, SubagentStart, SubagentStop). Only the mapped command-hook subset runs — see the bridge's README for the exact mapping.
118
+
119
+ ### Do I need to convert or copy files manually?
120
+
121
+ No. Suites are cloned into `~/.dsh/agent-plugins/.sources/<sourceId>/` and injected at runtime. No manual copying, no conversion, no editing of Claude Code settings files.
122
+
123
+ ### Is it safe to install third-party suites?
124
+
125
+ The plugin never executes third-party code at install time: git sources clone through `execFile` (no shell), and third-party failures (broken manifests, invalid skills, escaping paths, unknown MCP transports, mount failures) are contained as per-plugin diagnostics. The DSH Community Market in DSH Desktop follows its own fail-closed review process for npm installs; this plugin installs *from git sources* on demand. As with any third-party code, review a suite before enabling it.
126
+
127
+ ## Requirements
128
+
129
+ - `ctx.skills` (dsh-skill) is required.
130
+ - Optional peers: `@deepseek-ai/dsh-mcp-client` (MCP injection), `@deepseek-ai/dsh-hooks-claude-code` (hooks bridge); missing capabilities degrade gracefully.
131
+ - Web GUI ≥ 0.1.0-rc.6.
132
+
133
+ ## Security model
134
+
135
+ - Git sources clone through `git` via `execFile` (no shell), depth 1, `--ff-only` pulls, 120s timeouts; local sources are read in place and never deleted.
136
+ - Mutating HTTP routes accept same-origin POSTs only; bodies capped at 64 KiB.
137
+ - Portable paths must start with `./` and resolve inside the plugin root (symlink escapes rejected); `${PLUGIN_ROOT}` / `${PLUGIN_DATA}` expand.
138
+ - Third-party failures are always contained: broken manifests, invalid skills, escaping paths, unknown MCP transports, and mount failures are per-plugin diagnostics.
139
+ - An error boundary wraps the whole market section and the detail modal: any preview render failure degrades to a notice instead of crashing the UI.
140
+
141
+ ## Development
142
+
143
+ ```sh
144
+ pnpm install
145
+ pnpm run test # vitest over fixture suites + multi-dialect parsing
146
+ pnpm run typecheck
147
+ pnpm run build # tsc host + tsdown client + module-loader banner
148
+ pnpm pack
149
+ ```
150
+
151
+ ## Known limitations
152
+
153
+ - Project-dimension MCP servers are not mounted (dsh has no per-session tool scope); the project dimension covers skills and context.
154
+ - Skill discovery has no file watcher: catalog changes apply after a manager action or a host restart.
155
+ - Claude Code hooks support the mapped bridge subset; LSP is counted and previewed but not executed.
156
+
157
+ ## Vendored assets
158
+
159
+ The `schemas/1.0.0/` JSON Schemas are vendored from [agentplugins/agent-plugins-spec](https://github.com/agentplugins/agent-plugins-spec) (spec 1.0.0 working draft); the spec forbids fetching schemas at load time.
160
+
161
+ ## Related projects
162
+
163
+ - [dsh-skills](https://github.com/CocoSgt/dsh-skills) — centralize `~/.claude/skills` and `.skill` packages into a global DSH skill library
164
+ - [@claude2dsh/plugin](https://www.npmjs.com/package/@claude2dsh/plugin) — import Claude Code sessions & skills into DSH, sync sessions back
165
+ - [dsh-crew](https://github.com/ZSeven-W/dsh-crew) — dispatch work from Claude Code / Codex to DSH agents
166
+ - [deepseek-ai/deepseek-harness](https://github.com/deepseek-ai/deepseek-harness) — the DeepSeek Harness itself (official)
167
+ - [awesome-deepseek-harness-plugins](https://github.com/imsai-sh/awesome-deepseek-harness-plugins) — community DSH plugin directory
168
+
169
+ ---
170
+
171
+ **If this plugin helps you, please give it a ⭐ on GitHub — it helps more people find the Claude Code ecosystem inside DeepSeek Harness.**
package/README.zh.md ADDED
@@ -0,0 +1,171 @@
1
+ # dsh-agent-plugins-market — 在 DeepSeek Harness 里使用 Claude Code 插件市场
2
+
3
+ [English](README.md) | 简体中文
4
+
5
+ > **把 Claude Code / Codex / Cursor 的插件市场生态带进 DeepSeek Harness(DSH):从 git 市场仓库安装并注入 Agent 插件——技能(skills)、MCP 服务器、hooks、斜杠命令——并自带 Web 界面市场页。**
6
+
7
+ ![npm](https://img.shields.io/npm/v/dsh-agent-plugins-market) ![npm downloads](https://img.shields.io/npm/dm/dsh-agent-plugins-market) ![License](https://img.shields.io/github/license/Sivan757/dsh-agent-plugins-market) ![GitHub stars](https://img.shields.io/github/stars/Sivan757/dsh-agent-plugins-market)
8
+
9
+ ![Agent Plugins 市场截图](docs/screenshot.png)
10
+
11
+ ![套件详情(技能 / MCP / 命令预览)](docs/screenshot-detail.png)
12
+
13
+ ## 它解决什么问题?
14
+
15
+ DeepSeek Harness 是很强的 Agent 底座,但它的插件生态还没有 Claude Code 插件市场那么丰富。GitHub 上有成百上千现成的插件市场仓库(Claude Code 的 `.claude-plugin/marketplace.json`、Codex 的 `.codex-plugin`、Cursor、Kimi、agent-plugins.org v1.0.0 便携包),里面装满了技能、MCP 服务器、hooks 和斜杠命令。
16
+
17
+ `dsh-agent-plugins-market` 就是那座桥:**把任意 git 市场仓库添加为源,安装其中的套件,它们的技能 / MCP / hooks / 命令就会在运行时注入到你的 DSH 会话**——无需手工拷贝文件,无需格式转换。Claude Code 生态的技能可以原样使用(`${CLAUDE_PLUGIN_ROOT}` 自动替换)。
18
+
19
+ ## 它能做什么
20
+
21
+ - **套件管理**:配置 git 仓库源(市场),浏览每个源的套件,支持安装、卸载、启用、禁用、刷新;源 ID 自动从仓库清单 JSON 解析,无需手填。
22
+ - **运行时发现**:已安装套件从 `~/.dsh/agent-plugins/.sources/<源id>/`(用户维度)与 `<项目>/.dsh/agent-plugins/.sources/<源id>/`(项目维度)发现;本地源直接读取工作树(含未提交改动)。
23
+ - **运行时注入**:
24
+ - **技能**:注册 `ctx.skills` SkillProvider(项目 rank 250 / 用户 rank 450),`${CLAUDE_PLUGIN_ROOT}` 自动替换,Claude Code 生态技能原样可用,出现在「/」斜杠菜单;
25
+ - **MCP 服务器**:启用套件的 `mcp.json` 每个合法 server 动态挂载 `dsh-mcp-client` 子插件,工具名 `mcp__<套件>__<server>__<工具>`;
26
+ - **Hooks**:套件 `hooks/hooks.json` 挂载 `dsh-hooks-claude-code` 桥,映射到宿主拦截点(SessionStart、UserPromptSubmit、PreToolUse、PostToolUse、Stop、SubagentStart、SubagentStop);
27
+ - **命令 / 子代理**:`commands/*.md` 注册为 dsh 斜杠命令;`agents/*.md` 注册为 `agent-<name>` 技能;
28
+ - **上下文**:会话启动注入启用套件清单(用户级 + 项目级),`agent_plugins` 工具可查询。
29
+ - **Web 市场页**:设置面板内的市场页——顶部源胶囊 + 搜索/操作、状态标签、两列卡片网格、套件详情弹窗(技能/MCP/hooks/命令/LSP 全部可预览)。
30
+
31
+ ## 兼容的套件布局
32
+
33
+ | 布局 | 清单文件 | 说明 |
34
+ | --- | --- | --- |
35
+ | agent-plugins.org v1 | `plugin.json` | 内置 1.0.0 JSON Schema 校验 + 规范 §4 路径约束 |
36
+ | Claude Code 市场 | `.claude-plugin/marketplace.json` + 套件 `.claude-plugin/plugin.json` | marketplace `plugins[].source` 相对路径 |
37
+ | 通用(universal) | `.plugin/plugin.json` | 多客户端共存仓库(如 vercel-plugin) |
38
+ | Cursor | `.cursor-plugin/plugin.json` | 声明式 skills 路径 |
39
+ | Kimi | `.kimi-plugin/plugin.json` | 内联 mcpServers |
40
+ | Codex | `.codex-plugin/plugin.json` | — |
41
+ | 技能集合(无清单) | 无(合成) | 扁平 `SKILL.md` 目录集合 |
42
+
43
+ 一个仓库可同时携带多种清单(如 vercel/vercel-plugin 全部都有);套件身份取优先级最高的清单,内容面(skills/commands/agents/hooks/mcp)按目录扫描。`mcp.json` 严格按 agent-plugins.org schema 校验;`.mcp.json` 宽容解析——支持顶层 server map 简写、`type: http`/`local`/省略 type(按 command 判 stdio)归一化、`${CLAUDE_PLUGIN_ROOT}` / `${CLAUDE_PLUGIN_DATA}` / `${NAME:-default}` 占位符,未知 transport 逐 server 容错。marketplace 清单权威决定套件集合;无清单但含技能的市场条目与容器内未列出的清单插件也会被补全。远程 URL 引用条目以「远程引用」卡片展示(元信息 + 源 URL,不可直接安装,可添加对应仓库为源后安装)。
44
+
45
+ ## 安装
46
+
47
+ ```sh
48
+ # 在某个 dsh profile 中
49
+ pnpm add dsh-agent-plugins-market
50
+
51
+ # 或通过 dsh CLI
52
+ dsh plugin --profile <名字> add dsh-agent-plugins-market
53
+ ```
54
+
55
+ 把本包加入 profile 的 `dsh.profile.bundles`(包内 `cordis.patch.yml` 自动插入插件行):
56
+
57
+ ```jsonc
58
+ // ~/.dsh/profiles/<profile>/package.json
59
+ {
60
+ "dependencies": { "dsh-agent-plugins-market": "^0.4.0" },
61
+ "dsh": { "profile": { "bundles": ["@deepseek-ai/dsh-base", "@deepseek-ai/dsh-web-app", "dsh-agent-plugins-market"] } }
62
+ }
63
+ ```
64
+
65
+ 重启 dsh,在 设置 → Agent Plugins 市场 中管理。
66
+
67
+ ## 配置市场源
68
+
69
+ 源持久化在 `~/.dsh/agent-plugins/state.json`,也可用 cordis 配置预置(也是"持久种子",启动时自动补齐缺失源):
70
+
71
+ ```yaml
72
+ - id: dsh-agent-plugins-market
73
+ config:
74
+ sources:
75
+ - { id: agent-plugins, url: 'https://github.com/Sivan757/agent-plugins.git' }
76
+ - { id: mattpocock-skills, url: 'https://github.com/mattpocock/skills.git' }
77
+ - { id: claude-plugins-official, url: 'https://github.com/anthropics/claude-plugins-official' }
78
+ - { id: ui-ux-pro-max, url: 'https://github.com/nextlevelbuilder/ui-ux-pro-max-skill.git' }
79
+ - { id: jeecg-skills, url: '/Users/me/work/jeecg-plugin', local: true }
80
+ ```
81
+
82
+ `local: true` 的源直接读取本地目录(实时反映工作树,移除源时不会删除目录)。
83
+
84
+ ## 与其他 DSH ↔ Claude Code 桥接项目的区别
85
+
86
+ | 能力 | **dsh-agent-plugins-market** | [dsh-skills](https://github.com/CocoSgt/dsh-skills) | [@claude2dsh/plugin](https://www.npmjs.com/package/@claude2dsh/plugin) | [@deepseek-ai/dsh-hooks-claude-code](https://github.com/deepseek-ai/deepseek-harness) |
87
+ | --- | --- | --- | --- | --- |
88
+ | 来源 | **任意 git 市场仓库**(`.claude-plugin`、`.codex-plugin`、`.cursor-plugin`、`.kimi-plugin`、agent-plugins.org v1、无清单技能) | `~/.claude/skills` 目录、项目目录、`.skill` 包 | Claude Code 会话 + skills | 一份 Claude Code `hooks.json` 配置 |
89
+ | 技能注入 | ✅ + 「/」斜杠菜单 | ✅ 全局技能库 | ✅ | ❌ |
90
+ | MCP 服务器 | ✅ 动态挂载 `dsh-mcp-client` | ❌ | — | ❌ |
91
+ | Hooks | ✅ 经 `dsh-hooks-claude-code` 桥 | ❌ | — | ✅(直接) |
92
+ | 斜杠命令 / 子代理 | ✅ `commands/*.md`、`agents/*.md` | ❌ | — | ❌ |
93
+ | 市场界面 | ✅ Web GUI 完整市场页 | ✅ 设置页 | — | ❌ |
94
+ | 方向 | CC / Codex / Cursor 生态 → DSH | CC 技能 → DSH | CC ↔ DSH 会话同步 | 配置 → DSH |
95
+
96
+ 想要反方向(**从** Claude Code / Codex **向** DSH agent 派活)?见 [dsh-crew](https://github.com/ZSeven-W/dsh-crew)。
97
+
98
+ ## 常见问题(FAQ)
99
+
100
+ ### 如何在 DeepSeek Harness 里安装 Claude Code 插件 / 技能?
101
+
102
+ 1. 把 `dsh-agent-plugins-market` 装进 DSH profile(见[安装](#安装));
103
+ 2. 打开 **设置 → Agent Plugins 市场**,把市场仓库添加为源(例如 `https://github.com/anthropics/claude-plugins-official` 或 `https://github.com/mattpocock/skills.git`);
104
+ 3. 点击套件卡片 → **安装** → 重启 profile;
105
+ 4. 套件的技能出现在「/」斜杠菜单;MCP 工具以 `mcp__<套件>__<server>__<工具>` 出现;斜杠命令与 `/agent-*` 子代理自动注册。
106
+
107
+ ### 支持 Claude Code 市场(`.claude-plugin/marketplace.json`)吗?
108
+
109
+ 支持。Claude Code 市场布局原生支持(见上方布局表):marketplace 清单权威决定套件集合,`plugins[].source` 相对路径正确解析,含技能的无清单条目自动补全。
110
+
111
+ ### 能从套件注入 MCP 服务器吗?
112
+
113
+ 可以。启用套件的每个合法 `mcp.json` server 都会挂载一个活的 `dsh-mcp-client` 子插件,DSH agent 可直接调用其工具。`mcp.json` 严格校验;`.mcp.json` 宽容解析并支持占位符(`${CLAUDE_PLUGIN_ROOT}`、`${CLAUDE_PLUGIN_DATA}`、`${NAME:-default}`)。
114
+
115
+ ### Claude Code hooks 呢?
116
+
117
+ 套件的 `hooks/hooks.json` 会通过官方 `@deepseek-ai/dsh-hooks-claude-code` 桥挂载到宿主拦截点(SessionStart、UserPromptSubmit、PreToolUse、PostToolUse、Stop、SubagentStart、SubagentStop)。仅支持该桥映射的命令 hooks 子集,具体映射见桥的 README。
118
+
119
+ ### 需要手工转换或拷贝文件吗?
120
+
121
+ 不需要。套件被克隆到 `~/.dsh/agent-plugins/.sources/<源id>/` 并运行时注入,无需手工拷贝、转换或修改任何 Claude 配置文件。
122
+
123
+ ### 安装第三方套件安全吗?
124
+
125
+ 安装阶段绝不执行第三方代码:git 源经 `execFile` 克隆(无 shell);第三方故障(坏清单、非法技能、路径逃逸、未知 MCP transport、挂载失败)都作为逐套件诊断受控处理。与任何第三方代码一样,启用前请自行审阅套件内容。
126
+
127
+ ## 环境要求
128
+
129
+ - 必需 `ctx.skills`(dsh-skill)。
130
+ - 可选 peer:`@deepseek-ai/dsh-mcp-client`(MCP 注入)、`@deepseek-ai/dsh-hooks-claude-code`(hooks 桥),缺失时对应能力受控降级。
131
+ - Web GUI ≥ 0.1.0-rc.6。
132
+
133
+ ## 安全模型
134
+
135
+ - git 源经 `execFile` 克隆(无 shell),`--depth 1`,`--ff-only`,120s 超时;本地源原地读取、移除不删除。
136
+ - 变更类 HTTP 路由仅接受同源 POST,请求体上限 64 KiB。
137
+ - 便携包路径必须 `./` 开头且解析后留在套件根内(拒绝 symlink 逃逸);`${PLUGIN_ROOT}`/`${PLUGIN_DATA}` 展开。
138
+ - 第三方套件故障永远受控:坏清单、非法技能、逃逸路径、未知 MCP transport、挂载失败均为逐套件诊断。
139
+ - 错误边界包裹整个市场区与详情弹窗:任何预览渲染异常降级为提示,不会崩掉界面。
140
+
141
+ ## 开发
142
+
143
+ ```sh
144
+ pnpm install
145
+ pnpm run test # vitest(fixture 套件 + 多范式解析)
146
+ pnpm run typecheck
147
+ pnpm run build # tsc 宿主 + tsdown 客户端 + 模块加载器包装
148
+ pnpm pack # 构建并打 tgz
149
+ ```
150
+
151
+ ## 已知限制
152
+
153
+ - 项目维度 MCP server 不挂载(dsh 无按会话的 tool scope);项目维度覆盖技能 + 上下文。
154
+ - 技能发现无文件监听:目录变化在管理动作或重启后生效。
155
+ - Claude Code hooks 仅支持 bridge 映射的子集;LSP 只计数与预览,不执行。
156
+
157
+ ## Vendored 资产
158
+
159
+ `schemas/1.0.0/` 下的 JSON Schema vendored 自 [agentplugins/agent-plugins-spec](https://github.com/agentplugins/agent-plugins-spec)(spec 1.0.0 working draft);规范要求加载时不得联网取 schema。
160
+
161
+ ## 相关项目
162
+
163
+ - [dsh-skills](https://github.com/CocoSgt/dsh-skills) — 把 `~/.claude/skills` 和 `.skill` 包汇成 DSH 全局技能库
164
+ - [@claude2dsh/plugin](https://www.npmjs.com/package/@claude2dsh/plugin) — 导入 Claude Code 会话与 skills 到 DSH,并同步回写
165
+ - [dsh-crew](https://github.com/ZSeven-W/dsh-crew) — 从 Claude Code / Codex 调度 DSH agent
166
+ - [deepseek-ai/deepseek-harness](https://github.com/deepseek-ai/deepseek-harness) — DeepSeek Harness 本体(官方)
167
+ - [awesome-deepseek-harness-plugins](https://github.com/imsai-sh/awesome-deepseek-harness-plugins) — 社区 DSH 插件目录
168
+
169
+ ---
170
+
171
+ **如果这个插件对你有帮助,请在 GitHub 上点个 ⭐——这能让更多人在 DeepSeek Harness 里发现 Claude Code 插件生态。**