dsh-agent-plugins-market 0.6.0 → 0.6.2
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 +143 -169
- package/README.zh.md +136 -170
- package/client/client.js +8202 -684
- package/client/client.js.map +1 -1
- package/lib/application/catalog.js +236 -47
- package/lib/application/details.js +19 -10
- package/lib/application/panel-resources.js +95 -0
- package/lib/application/project-agent-roles.js +39 -0
- package/lib/catalog/codex-mcp.js +114 -0
- package/lib/catalog/component-files.js +151 -0
- package/lib/catalog/manifests.js +105 -44
- package/lib/catalog/native-project.js +44 -23
- package/lib/catalog/paths.js +6 -6
- package/lib/catalog/project-config.js +96 -0
- package/lib/catalog/project-hooks.js +108 -0
- package/lib/catalog/scan-pipeline.js +6 -1
- package/lib/catalog/scan-resolvers.js +70 -26
- package/lib/catalog/source-catalog.js +16 -3
- package/lib/catalog/suite-components.js +125 -0
- package/lib/catalog/surfaces.js +60 -46
- package/lib/catalog/validate.js +16 -11
- package/lib/contracts/market.js +16 -1
- package/lib/index.js +187 -35
- package/lib/model/layouts.js +49 -0
- package/lib/routes.js +106 -6
- package/lib/runtime/agent-role-router.js +226 -0
- package/lib/runtime/commands-mounts.js +27 -67
- package/lib/runtime/feedback-tool.js +181 -0
- package/lib/runtime/hooks-mounts.js +66 -13
- package/lib/runtime/host-locale.js +23 -7
- package/lib/runtime/legacy-root-migration.js +12 -0
- package/lib/runtime/lsp-direct-config.js +6 -3
- package/lib/runtime/lsp-mounts.js +38 -24
- package/lib/runtime/lsp-server-state.js +19 -0
- package/lib/runtime/lsp-status.js +3 -2
- package/lib/runtime/mcp-backend.js +6 -2
- package/lib/runtime/mcp-client/config.js +6 -0
- package/lib/runtime/mcp-client/connection.js +8 -2
- package/lib/runtime/mcp-client/tools.js +6 -3
- package/lib/runtime/mcp-config.js +26 -13
- package/lib/runtime/mcp-direct-config.js +56 -0
- package/lib/runtime/mcp-mounts.js +25 -9
- package/lib/runtime/mcp-overrides.js +11 -5
- package/lib/runtime/mcp-status.js +10 -7
- package/lib/runtime/model-catalog.js +48 -0
- package/lib/runtime/project-runtime.js +136 -0
- package/lib/runtime/reconciler.js +38 -28
- package/lib/runtime/server-config.js +75 -0
- package/lib/runtime/skills-provider.js +31 -77
- package/lib/runtime/storage-migration.js +169 -0
- package/lib/runtime/subagent-catalog.js +129 -0
- package/lib/runtime/user-commands.js +86 -0
- package/lib/runtime/user-panels.js +176 -0
- package/lib/runtime/user-store.js +142 -0
- package/lib/types/application/catalog.d.ts +39 -9
- package/lib/types/application/panel-resources.d.ts +13 -0
- package/lib/types/application/project-agent-roles.d.ts +3 -0
- package/lib/types/application/queries.d.ts +17 -1
- package/lib/types/catalog/codex-mcp.d.ts +4 -0
- package/lib/types/catalog/component-files.d.ts +17 -0
- package/lib/types/catalog/manifests.d.ts +14 -9
- package/lib/types/catalog/native-project.d.ts +2 -5
- package/lib/types/catalog/paths.d.ts +4 -4
- package/lib/types/catalog/project-config.d.ts +6 -0
- package/lib/types/catalog/project-hooks.d.ts +10 -0
- package/lib/types/catalog/scan-pipeline.d.ts +2 -0
- package/lib/types/catalog/scan-resolvers.d.ts +4 -3
- package/lib/types/catalog/source-catalog.d.ts +1 -1
- package/lib/types/catalog/suite-components.d.ts +5 -0
- package/lib/types/catalog/surfaces.d.ts +2 -2
- package/lib/types/catalog/validate.d.ts +2 -0
- package/lib/types/contracts/market.d.ts +60 -0
- package/lib/types/contracts/mcp-status.d.ts +5 -1
- package/lib/types/index.d.ts +2 -2
- package/lib/types/model/layouts.d.ts +102 -0
- package/lib/types/model/types.d.ts +51 -6
- package/lib/types/routes.d.ts +6 -1
- package/lib/types/runtime/agent-role-router.d.ts +95 -0
- package/lib/types/runtime/commands-mounts.d.ts +16 -7
- package/lib/types/runtime/feedback-tool.d.ts +49 -0
- package/lib/types/runtime/hooks-mounts.d.ts +4 -0
- package/lib/types/runtime/host-locale.d.ts +1 -1
- package/lib/types/runtime/legacy-root-migration.d.ts +2 -0
- package/lib/types/runtime/lsp-mounts.d.ts +4 -0
- package/lib/types/runtime/lsp-server-state.d.ts +3 -0
- package/lib/types/runtime/lsp-status.d.ts +1 -0
- package/lib/types/runtime/mcp-backend.d.ts +9 -1
- package/lib/types/runtime/mcp-client/config.d.ts +4 -3
- package/lib/types/runtime/mcp-client/tools.d.ts +3 -0
- package/lib/types/runtime/mcp-config.d.ts +11 -5
- package/lib/types/runtime/mcp-direct-config.d.ts +7 -0
- package/lib/types/runtime/mcp-mounts.d.ts +2 -1
- package/lib/types/runtime/mcp-overrides.d.ts +2 -0
- package/lib/types/runtime/mcp-status.d.ts +1 -1
- package/lib/types/runtime/model-catalog.d.ts +7 -0
- package/lib/types/runtime/project-runtime.d.ts +32 -0
- package/lib/types/runtime/reconciler.d.ts +2 -0
- package/lib/types/runtime/server-config.d.ts +10 -0
- package/lib/types/runtime/skills-provider.d.ts +1 -5
- package/lib/types/runtime/storage-migration.d.ts +15 -0
- package/lib/types/runtime/subagent-catalog.d.ts +52 -0
- package/lib/types/runtime/user-commands.d.ts +24 -0
- package/lib/types/runtime/user-panels.d.ts +91 -0
- package/lib/types/runtime/user-store.d.ts +51 -0
- package/package.json +10 -3
- package/schemas/README.md +69 -7
- package/schemas/agent-plugins/spec.md +48 -0
- package/schemas/claude-code/marketplace.schema.json +143 -0
- package/schemas/claude-code/plugin.schema.json +105 -0
- package/schemas/claude-code/spec.md +108 -0
- package/schemas/codex/marketplace.schema.json +78 -0
- package/schemas/codex/plugin.schema.json +77 -0
- package/schemas/codex/spec.md +91 -0
- package/schemas/cursor/marketplace.schema.json +82 -0
- package/schemas/cursor/plugin.schema.json +58 -0
- package/schemas/cursor/spec.md +92 -0
- package/schemas/github-copilot/marketplace.schema.json +107 -0
- package/schemas/github-copilot/plugin.schema.json +89 -0
- package/schemas/github-copilot/spec.md +105 -0
- package/schemas/kimi/marketplace.schema.json +38 -0
- package/schemas/kimi/plugin.schema.json +84 -0
- package/schemas/kimi/spec.md +94 -0
- package/schemas/qoder/marketplace.schema.json +115 -0
- package/schemas/qoder/plugin.schema.json +127 -0
- package/schemas/qoder/spec.md +111 -0
- package/schemas/skill-collection/spec.md +29 -0
- package/schemas/universal/marketplace.schema.json +98 -0
- package/schemas/universal/plugin.schema.json +49 -0
- package/schemas/universal/spec.md +53 -0
- package/schemas/zcode/marketplace.schema.json +161 -0
- package/schemas/zcode/plugin.schema.json +89 -0
- package/schemas/zcode/spec.md +102 -0
- package/lib/catalog/legacy-root-migration.js +0 -51
- package/lib/types/catalog/legacy-root-migration.d.ts +0 -14
package/README.zh.md
CHANGED
|
@@ -1,237 +1,203 @@
|
|
|
1
|
-
|
|
1
|
+
<img src="docs-site/public/favicon.svg" alt="" width="48" height="48" />
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
# dsh-agent-plugins-market
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
**[DeepSeek Harness(DSH)](https://github.com/deepseek-ai/deepseek-harness)的插件市场与 Agent 能力管理工作区。**
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
复用 Claude Code、Codex、Cursor、Kimi 等已识别布局中支持的内容及社区兼容布局,在 DSH Web 界面管理自己的技能、命令、代理角色、MCP 服务和 LSP 服务。支持的布局原地读取,无需转换清单或手动将文件复制到 DSH。各格式的具体限制见能力矩阵。
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
[English](README.md) | 简体中文 | [文档站](https://sivan757.github.io/dsh-agent-plugins-market/) | [npm](https://www.npmjs.com/package/dsh-agent-plugins-market)
|
|
10
10
|
|
|
11
|
-
](https://www.npmjs.com/package/dsh-agent-plugins-market) [](LICENSE)
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
[快速开始](#快速开始) · [日常使用](#日常使用) · [兼容性](#兼容性与运行边界) · [常见问题](#常见问题)
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+

|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
## 你可以用它做什么
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
- **复用生态套件。** 添加 Git 仓库、本地目录或压缩包作为来源,浏览、预览、安装和启用其中的套件,让支持的能力在 DSH 运行时生效。
|
|
20
|
+
- **建立自己的工具集。** 创建技能、可复用的斜杠命令和代理角色;随时编辑,也可以保留文件而暂时禁用。
|
|
21
|
+
- **沿用项目资源。** 直接发现项目 `.claude/`、`.agents/` 中的技能与代理,无需安装或复制文件。
|
|
22
|
+
- **集中管理服务。** 自行新增 MCP 服务和 LSP 服务,为已安装的服务配置凭据与授权,查看 MCP / LSP 状态,在同一工作区定位服务不可用的原因。
|
|
20
23
|
|
|
21
24
|
## 快速开始
|
|
22
25
|
|
|
23
|
-
|
|
26
|
+
需要 Node.js 22+、启用了技能服务的 DSH Web profile;使用 Git 来源还需要 Git。当前仓库声明的 DSH peer 包版本范围为 `^0.1.2-rc.1`,各项能力还取决于 profile 提供的宿主服务,详见[宿主要求](docs/guides/usage.zh.md#宿主要求)。
|
|
24
27
|
|
|
25
|
-
|
|
26
|
-
# 安装到某个 dsh profile(npm registry,推荐)
|
|
27
|
-
dsh plugin --profile <名字> add dsh-agent-plugins-market
|
|
28
|
+
将 `<name>` 替换为你的 profile 名称后安装:
|
|
28
29
|
|
|
29
|
-
|
|
30
|
-
|
|
30
|
+
```sh
|
|
31
|
+
dsh plugin --profile <name> add dsh-agent-plugins-market
|
|
31
32
|
```
|
|
32
33
|
|
|
33
|
-
重启
|
|
34
|
+
1. 重启 DSH,打开 **设置 → Agent Plugins 市场**。旧版外壳可能显示为顶层页面入口。
|
|
35
|
+
2. 在**插件市场**添加来源,例如 `https://github.com/anthropics/claude-plugins-official`。插件不预置来源。
|
|
36
|
+
3. 打开套件查看内容,确认后安装,并确保套件已启用。
|
|
37
|
+
4. 如果套件提供技能,先在**技能**页签查看,再在聊天中输入 `/` 查找允许手动调用的技能。如果提供 MCP,前往 **MCP 服务**检查状态,处理凭据或连接提示后再使用工具。
|
|
34
38
|
|
|
35
|
-
|
|
36
|
-
<summary><strong>更多安装方式</strong></summary>
|
|
39
|
+
GitHub 安装和 profile 配置方式见[使用指南](docs/guides/usage.zh.md#其他安装方式)。
|
|
37
40
|
|
|
38
|
-
|
|
41
|
+
## 日常使用
|
|
39
42
|
|
|
40
|
-
|
|
41
|
-
pnpm add github:Sivan757/dsh-agent-plugins-market
|
|
42
|
-
# 或
|
|
43
|
-
dsh plugin --profile <名字> add github:Sivan757/dsh-agent-plugins-market
|
|
44
|
-
```
|
|
43
|
+
MCP 详情将保留凭据的“重试连接”与需要确认的“重新授权”分开,详情内不再显示启用开关。
|
|
45
44
|
|
|
46
|
-
|
|
45
|
+
工作区包含六个页签:
|
|
47
46
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
47
|
+
| 页签 | 可以做什么 |
|
|
48
|
+
| -------- | ------------------------------------------------------------------------------------------ |
|
|
49
|
+
| 插件市场 | 添加来源、预览套件、安装 / 卸载、启用 / 禁用和刷新。 |
|
|
50
|
+
| 技能 | 浏览技能,创建或编辑自己的可复用指令。 |
|
|
51
|
+
| 命令 | 管理通过 `/名称` 调用的提示词模板;`$ARGUMENTS` 替换为命令后输入的文本。 |
|
|
52
|
+
| 代理角色 | 从 DSH 下拉选择供应商、模型和思考强度,管理角色指令与工具;通过 `subagents_run` 委派任务。 |
|
|
53
|
+
| MCP 服务 | 自行新增服务或配置已安装的服务及其凭据与授权,查看连接状态并重试失败的服务。 |
|
|
54
|
+
| LSP 服务 | 新增并配置语言服务器,查看运行状态。 |
|
|
55
55
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
</details>
|
|
59
|
-
|
|
60
|
-
## 功能特性
|
|
61
|
-
|
|
62
|
-
- **套件管理**——配置 git 仓库源(市场),浏览每个源的套件,支持安装、卸载、启用、禁用、刷新;源 ID 自动从仓库清单 JSON 解析,无需手填。
|
|
63
|
-
- **Web 市场页**——顶部源胶囊 + 搜索/操作、状态标签、两列卡片网格、套件详情弹窗(技能/MCP/hooks/命令/LSP 全部可预览)。新版外壳使用带中文/英文切换的设置页;没有 `settings.section` slot 的旧版外壳才启用受保护的顶层页面回退,不会重复渲染两份市场页。
|
|
64
|
-
- **运行时注入**
|
|
65
|
-
- **技能**:注册 `ctx.skills` SkillProvider(项目 rank 250 / 用户 rank 450),`${CLAUDE_PLUGIN_ROOT}` 自动替换,Claude Code 生态技能原样可用,出现在「/」斜杠菜单;
|
|
66
|
-
- **MCP 服务器**:启用套件的 `mcp.json` 每个合法 server 动态挂载 `dsh-mcp-client` 子插件,工具名 `mcp__<套件>__<server>__<工具>`;
|
|
67
|
-
- **MCP 凭据**:`${ENV_NAME}` 引用在子进程启动前通过可选的 DSH credentials service 解析;缺失引用会阻止启动并显示 `needs-credentials`。Web 详情页使用只写凭据操作,token 不会写入套件 state 或 override 文件;
|
|
68
|
-
- **Hooks**:套件 `hooks/hooks.json` 挂载 `dsh-hooks-claude-code` 桥,映射到宿主拦截点(SessionStart、UserPromptSubmit、PreToolUse、PostToolUse、Stop、SubagentStart、SubagentStop);
|
|
69
|
-
- **命令 / 子代理**:`commands/*.md` 注册为 dsh 斜杠命令;`agents/*.md` 注册为 `agent-<name>` 技能;
|
|
70
|
-
- **模型上下文**:技能通过宿主原生 skill catalog 注入,MCP 工具通过 `dsh-mcp-client` 直接注册;套件清单与来源信息通过 Web 市场页查询,不注册冗余的模型侧 inventory 工具。
|
|
71
|
-
- **运行时发现**——已安装套件只从已配置的源 ID 对应目录发现:`~/.dsh/agent-plugins/.sources/<源id>/`(用户维度)与 `<项目>/.dsh/agent-plugins/.sources/<源id>/`(项目维度)。用户维度的过期未登记 checkout 会被忽略,项目维度仍按 state 中的安装记录授权;本地源直接读取工作树(含未提交改动)。
|
|
72
|
-
- **项目原生布局(零拷贝迁移)**——项目自己的 `.claude/`、`.agents/` 目录(skills、agents)就地发现为只读「项目原生」套件:无需安装、无需拷贝、无状态文件。从 Claude Code 或 agent-plugins.org 约定迁移过来的仓库开箱即用;同名技能发生冲突时项目侧优先(覆盖已安装套件中的同名技能)。
|
|
73
|
-
|
|
74
|
-
## 兼容的套件布局
|
|
75
|
-
|
|
76
|
-
| 布局 | 清单文件 | 说明 |
|
|
77
|
-
| -------------------- | --------------------------------------------------------------------- | ---------------------------------------------- |
|
|
78
|
-
| agent-plugins.org v1 | `plugin.json` | 内置 1.0.0 JSON Schema 校验 + 规范 §4 路径约束 |
|
|
79
|
-
| Claude Code 市场 | `.claude-plugin/marketplace.json` + 套件 `.claude-plugin/plugin.json` | marketplace `plugins[].source` 相对路径 |
|
|
80
|
-
| 通用(universal) | `.plugin/plugin.json` | 多客户端共存仓库(如 vercel-plugin) |
|
|
81
|
-
| Cursor | `.cursor-plugin/plugin.json` | 声明式 skills 路径 |
|
|
82
|
-
| Kimi | `.kimi-plugin/plugin.json` | 内联 mcpServers |
|
|
83
|
-
| Codex | `.codex-plugin/plugin.json` | — |
|
|
84
|
-
| 技能集合(无清单) | 无(合成) | 扁平 `SKILL.md` 目录集合 |
|
|
85
|
-
|
|
86
|
-
一个仓库可同时携带多种清单(如 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,不可直接安装,可添加对应仓库为源后安装)。
|
|
87
|
-
|
|
88
|
-
## 配置市场源
|
|
89
|
-
|
|
90
|
-
源持久化在 `~/.dsh/agent-plugins/state.json`,也可用 cordis 配置预置(也是“持久种子”,启动时自动补齐缺失源):
|
|
91
|
-
|
|
92
|
-
```yaml
|
|
93
|
-
- id: dsh-agent-plugins-market
|
|
94
|
-
config:
|
|
95
|
-
sources:
|
|
96
|
-
- { id: agent-plugins, url: 'https://github.com/Sivan757/agent-plugins.git' }
|
|
97
|
-
- { id: mattpocock-skills, url: 'https://github.com/mattpocock/skills.git' }
|
|
98
|
-
- { id: claude-plugins-official, url: 'https://github.com/anthropics/claude-plugins-official' }
|
|
99
|
-
- { id: ui-ux-pro-max, url: 'https://github.com/nextlevelbuilder/ui-ux-pro-max-skill.git' }
|
|
100
|
-
- { id: my-local-plugin, url: '/Users/me/work/my-plugin', local: true }
|
|
101
|
-
- { id: packaged-plugin, url: 'https://example.com/plugin-0.1.zip', kind: archive, sha256: '<64 位十六进制摘要>' }
|
|
102
|
-
```
|
|
56
|
+
**来源(source)**表示内容来自哪里,**套件(suite)**是从中发现的可安装单元。添加来源用于发现套件;安装并启用套件决定其运行时能力是否生效。套件详情用于预览文件,MCP 凭据和覆盖配置在 **MCP 服务**中编辑。
|
|
103
57
|
|
|
104
|
-
|
|
58
|
+
自建技能、命令和角色以 Markdown 保存于 `~/.dsh/agent-plugins/user/`,项目原生资源继续保留在项目中。路径和优先级见[存储与发现](docs/guides/usage.zh.md#存储与发现)。
|
|
105
59
|
|
|
106
|
-
|
|
60
|
+
## 兼容性与运行边界
|
|
107
61
|
|
|
108
|
-
|
|
62
|
+
支持的**布局方言(layout dialect)**描述文件如何组织。[统一优先级表](#布局识别优先级)并列列出套件清单与 Marketplace 目录索引。
|
|
109
63
|
|
|
110
|
-
|
|
64
|
+
[`schemas/`](schemas/README.md) 中十种当前布局契约均有独立读取测试。[布局审计](docs/layout-coverage.zh.md)将它们对应到固定提交号的 README 仓库快照,并区分布局/组件兼容与完整原厂运行时等价。
|
|
111
65
|
|
|
112
|
-
|
|
113
|
-
- id: dsh-agent-plugins-market
|
|
114
|
-
config:
|
|
115
|
-
git:
|
|
116
|
-
proxy: 'http://127.0.0.1:7890' # 以 git http/https 代理注入
|
|
117
|
-
insteadOf: { 'https://github.com/': 'https://mirror.example/https://github.com/' }
|
|
118
|
-
timeoutMs: 300000 # 每次 git 调用超时(默认 120000)
|
|
119
|
-
cloneRetry: true # 失败自动重试一次(默认开)
|
|
120
|
-
fallbackTarball: false # github.com 克隆失败时回退为 codeload tarball 下载
|
|
121
|
-
allowHttpArchives: false # 允许明文 http 压缩包地址(内网镜像)
|
|
122
|
-
```
|
|
66
|
+
支持的**运行时能力(runtime surface)**描述 DSH 能使用什么:
|
|
123
67
|
|
|
124
|
-
|
|
68
|
+
| 能力 | 支持情况与条件 |
|
|
69
|
+
| ----- | -------------------------------------------------------------------------------------------------- |
|
|
70
|
+
| 技能 | 接入宿主技能目录,允许手动调用的技能出现在斜杠菜单;展开支持的根路径占位符。 |
|
|
71
|
+
| 命令 | 通过宿主命令服务注册斜杠命令。 |
|
|
72
|
+
| 代理 | 动态子代理目录与 `subagents_run`;需要宿主 agents、tools、LLM 和 subagents 服务。 |
|
|
73
|
+
| MCP | 默认使用内置桥接,支持 stdio、带 OAuth 的 Streamable HTTP 和旧式 SSE;也可切换宿主客户端兼容模式。 |
|
|
74
|
+
| Hooks | 运行 `dsh-hooks-claude-code` 桥接映射支持的 command-hook 子集。 |
|
|
75
|
+
| LSP | 宿主具备 LSP 包时实际挂载;Agent 调用还需要 profile 暴露 LSP 工具。 |
|
|
125
76
|
|
|
126
|
-
|
|
127
|
-
| --- | --- | --- | --- | --- |
|
|
128
|
-
| 来源 | **任意 git 市场仓库**(`.claude-plugin`、`.codex-plugin`、`.cursor-plugin`、`.kimi-plugin`、agent-plugins.org v1、无清单技能) | `~/.claude/skills` 目录、项目目录、`.skill` 包 | Claude Code 会话 + skills | 一份 Claude Code `hooks.json` 配置 |
|
|
129
|
-
| 技能注入 | ✅ + 「/」斜杠菜单 | ✅ 全局技能库 | ✅ | ❌ |
|
|
130
|
-
| MCP 服务器 | ✅ 动态挂载 `dsh-mcp-client` | ❌ | — | ❌ |
|
|
131
|
-
| Hooks | ✅ 经 `dsh-hooks-claude-code` 桥 | ❌ | — | ✅(直接) |
|
|
132
|
-
| 斜杠命令 / 子代理 | ✅ `commands/*.md`、`agents/*.md` | ❌ | — | ❌ |
|
|
133
|
-
| 市场界面 | ✅ Web GUI 完整市场页 | ✅ 设置页 | — | ❌ |
|
|
134
|
-
| 方向 | CC / Codex / Cursor 生态 → DSH | CC 技能 → DSH | CC ↔ DSH 会话同步 | 配置 → DSH |
|
|
77
|
+
代理角色直接发布到动态 `subagent-catalog`,采用与 DSH skills catalog 相同的逐 step 比对、条目持久化和完整替换机制。通过 `subagents_run(role, prompt)` 传入目录中的准确 ID,由工具解析角色的供应商、模型和 `reasoning_effort`,再应用角色指令及工具限制。角色不再生成 `agent-*` 或 `persona-*` 技能/命令条目。模型继承、目录刷新与 `market_agent` 迁移说明见[代理角色](docs/guides/agent-roles.zh.md)。
|
|
135
78
|
|
|
136
|
-
|
|
79
|
+
### 布局识别优先级
|
|
137
80
|
|
|
138
|
-
|
|
81
|
+
**同一个套件目录**同时存在多个清单时,按下表顺序选择第一个存在的文件来确定布局:
|
|
139
82
|
|
|
140
|
-
|
|
83
|
+
| 优先级 | 布局 | 套件清单 | Marketplace 目录索引 |
|
|
84
|
+
| --- | --- | --- | --- |
|
|
85
|
+
| 1 | agent-plugins.org v1 / 根兼容清单 | `plugin.json` | 无专属索引 |
|
|
86
|
+
| 2 | Universal 兼容布局 | `.plugin/plugin.json` | `.plugin/marketplace.json` |
|
|
87
|
+
| 3 | Claude Code | `.claude-plugin/plugin.json` | `.claude-plugin/marketplace.json` |
|
|
88
|
+
| 4 | Cursor | `.cursor-plugin/plugin.json` | `.cursor-plugin/marketplace.json` |
|
|
89
|
+
| 5 | Kimi Code | `kimi.plugin.json`,其次 `.kimi-plugin/plugin.json` | `.kimi-plugin/marketplace.json` |
|
|
90
|
+
| 6 | Codex | `.codex-plugin/plugin.json` | `.agents/plugins/marketplace.json`,其次 `.agents/plugins/api_marketplace.json` |
|
|
91
|
+
| 7 | ZCode | `.zcode-plugin/plugin.json` | 无专属索引 |
|
|
92
|
+
| 8 | Qoder CLI | `.qoder-plugin/plugin.json` | `.qoder-plugin/marketplace.json` |
|
|
93
|
+
| 9 | GitHub Copilot CLI | `.github/plugin/plugin.json` | `.github/plugin/marketplace.json` |
|
|
94
|
+
| 回退 | 技能集合 / 共享索引 | 无已知清单时按技能集合约定发现 | 根 `marketplace.json` |
|
|
141
95
|
|
|
142
|
-
|
|
96
|
+
- **先选择,再解析:**高优先级清单无效时给出诊断,不会自动重试低优先级清单。
|
|
97
|
+
- **根清单身份:**根 `plugin.json` 只有声明了受识别的 agent-plugins.org `$schema`,才按 v1 严格校验;否则按 Claude 兼容清单读取。
|
|
98
|
+
- **组件补充:**通常不合并多个清单。非 v1 根 `plugin.json` 缺失的组件声明可以从 `.claude-plugin/plugin.json` 补齐;根清单中的显式声明优先,marketplace 条目声明补充剩余缺项。
|
|
143
99
|
|
|
144
|
-
|
|
145
|
-
dsh plugin --profile <名字> add dsh-agent-plugins-market
|
|
146
|
-
```
|
|
100
|
+
**两列遵循同一布局优先级。** 索引查找跳过无专属索引的布局,同一布局的别名按表内顺序尝试。根 `marketplace.json` 是共享回退,既不是技能集合的清单,也不是 agent-plugins.org v1 的专属索引,不继承根 `plugin.json` 的优先级。
|
|
147
101
|
|
|
148
|
-
|
|
102
|
+
读取阶段收集所有存在的索引,套件扫描采用第一个能产出套件的索引,不会合并全部索引;无效或空索引允许继续尝试下一项。该优先级不意味着项目原生目录之间互斥。
|
|
149
103
|
|
|
150
|
-
|
|
104
|
+
顺序定义见 [`src/model/layouts.ts`](src/model/layouts.ts),选择与根清单补充逻辑见 [`src/catalog/manifests.ts`](src/catalog/manifests.ts)。
|
|
151
105
|
|
|
152
|
-
|
|
106
|
+
### 布局能力支持矩阵
|
|
153
107
|
|
|
154
|
-
|
|
108
|
+
按官方文档、本插件源码与「每个 schema 一个真实仓库」逐项核验(2026-09-08)。表中描述的是**本插件接入范围**:“通用”表示仅按本插件共用目录规则读取,不代表该平台定义了对应能力;“部分”须结合下方限制阅读。[兼容性报告](docs/compat-report.md)记录抽样仓库、提交号、schema 结论与扫描器输出。
|
|
155
109
|
|
|
156
|
-
|
|
110
|
+
| 布局 | Skills | Agents | Commands | MCP | Hooks | LSP |
|
|
111
|
+
| --- | --- | --- | --- | --- | --- | --- |
|
|
112
|
+
| [Claude Code](https://code.claude.com/docs/en/plugins-reference) | 声明 + 默认技能 | 声明 Markdown | 声明 Markdown | 文件 / 内联 | 命令事件子集 | 文件 / 内联 |
|
|
113
|
+
| [Codex](https://developers.openai.com/plugins/build/plugins) | 支持 | 通用 | 通用 | 部分:`.mcp.json` | 兼容事件子集 | 通用内联 |
|
|
114
|
+
| [Cursor](https://cursor.com/docs/reference/plugins) | 支持 | 部分:仅 `.md` | 部分:仅 `.md` | 部分:见下方限制 | 原生事件不支持 | 通用内联 |
|
|
115
|
+
| Kimi Code | 声明技能 + 启动技能 | 声明 Markdown | 声明命令 | 内联 | 内联命令事件 | 通用扩展,非原生 |
|
|
116
|
+
| [ZCode](https://zcode.z.ai/en/docs/plugin) `.zcode-plugin/` | 通用 | 通用 | 通用 | `.mcp.json` + 内联覆盖 | 通用 | 通用内联,非原生 |
|
|
117
|
+
| [Qoder CLI](https://docs.qoder.com/cli/plugins-reference) `.qoder-plugin/` | 通用 | 通用 | 通用 | 部分:优先 `.mcp.json` | 通用 | 通用内联,非原生 |
|
|
118
|
+
| [GitHub Copilot CLI](https://docs.github.com/en/copilot/reference/copilot-cli-reference/cli-plugin-reference) | 声明技能 | `.md` / `.agent.md` | 声明 Markdown | 文件 / 内联 | 映射命令事件 | 文件 / 内联 |
|
|
119
|
+
| Universal 兼容布局 `.plugin/` | 通用 | 通用 | 通用 | 通用 | Claude 格式子集 | 通用内联 |
|
|
120
|
+
| [agent-plugins.org v1](https://agent-plugins.org/specification) | 支持 | 通用,非标准 | 通用,非标准 | 标准 `mcp.json` | 通用,非标准 | 仅目录预览,非标准 |
|
|
121
|
+
| 无清单技能集合 | 支持 | 通用 | 通用 | 通用文件 | Claude 格式子集 | 仅目录预览 |
|
|
122
|
+
| 项目原生目录(见下文) | 支持 | 可移植 Markdown 角色 | 会话作用域命令 | JSON / Codex TOML | 已映射命令事件子集 | 诊断,不挂载 |
|
|
157
123
|
|
|
158
|
-
|
|
124
|
+
- **组件路径:**支持声明文件、目录树和数组,按 realpath 限制在套件内部。命令、代理和详情面板消费同一组资源。Cursor 命令还支持 `.mdc`、`.markdown`、`.txt`;Qoder 命令映射支持文件与内联内容。Claude/Codex 技能声明补充默认发现;无清单集合也支持平铺技能 Markdown 文件。
|
|
125
|
+
- **代理身份:**`reviewer.agent.md` 与 `reviewer.md` 在子代理目录中保留不同角色 ID,不再生成 `agent-*` 技能或命令别名。普通技能本身采用这些名称的不受影响。
|
|
126
|
+
- **MCP:**按方言解析声明文件、内联表和数组。支持 Cursor 无 schema 的 `mcp.json`;agent-plugins v1 保持严格 schema 校验。Claude/ZCode 声明叠加默认配置,Cursor 声明替换默认配置,Copilot/Universal 包含 `.github/mcp.json`,Kimi Code 使用内联声明。无效显式配置不会复活默认配置。Codex app 连接器不属于此适配器。
|
|
127
|
+
- **Hooks:**支持声明文件/目录及内联配置,包括 Kimi 数组和保留 argv 引用边界的 ZCode process hooks。受支持的 Copilot/Cursor 生命周期名称映射到已有 command-hook 桥。没有 DSH 对应点的事件(如 `afterFileEdit`)给出诊断,不伪造执行。
|
|
128
|
+
- **LSP:**用户套件支持声明文件、数组、内联表,以及 `.lsp.json` 和 Copilot/Universal 的 `lsp.json`、`.github/lsp.json`、`lsp-config/servers.json`。反向域名目录定义仍为预览。项目 LSP 保留宿主作用域限制。
|
|
129
|
+
- **规范边界:**agent-plugins.org v1 的可移植核心只有 skills 与 MCP,不能把通用 agents / commands / hooks 扫描称为标准能力。Universal 是本插件识别的兼容布局名称:[OpenHands SDK](https://docs.openhands.dev/sdk/guides/plugins)文档同样使用 `.plugin/plugin.json`,[Vercel 仓库](https://github.com/vercel/vercel-plugin/blob/main/.plugin/plugin.json)也在使用,但不存在跨厂商规范。
|
|
130
|
+
- **Kimi Code:**当前 schema 覆盖两种清单路径、启动技能、附加技能指令、系统提示、内联 hooks 和 catalog 别名。历史 `kimi-cli` 根 tools 协议是另一套系统,不能与当前 Kimi Code schema 混淆。
|
|
131
|
+
- **ZCode 边界:**已识别 `.zcode-plugin/plugin.json` 与根 `marketplace.json`,包含按名称索引的插件表。内联 MCP 按同名键覆盖 `.mcp.json`。尚未实现 marketplace 的 zip + `sha256` 分发契约。
|
|
132
|
+
- **Qoder 边界:**已识别 `.qoder-plugin/plugin.json` 与 `.qoder-plugin/marketplace.json`。MCP 优先读取 `.mcp.json`,无 schema 的 `mcp.json` 作为回退。
|
|
133
|
+
- **GitHub Copilot CLI:**`.plugin/plugin.json` 保留 Universal 身份。两种路径均消费声明组件及默认 MCP/LSP 文件。隔离测试在嵌套套件根也去除竞争清单,防止 Claude 回退冒充 Copilot 测试通过。
|
|
134
|
+
- **项目目录:**[Claude 项目技能](https://code.claude.com/docs/en/skills)与 [Codex 的 `.agents/skills`](https://developers.openai.com/codex/skills)有官方依据;`.agents/agents`、`.agents/commands` 是本插件的通用发现约定。
|
|
159
135
|
|
|
160
|
-
|
|
136
|
+
### 项目布局开关
|
|
161
137
|
|
|
162
|
-
|
|
138
|
+
插件设置卡提供**扫描项目 Agent 布局**(`dsh-agent-plugins-market.scanProjectLayouts`,默认 `true`)。关闭后立即移除本插件的项目原生候选;配置源与宿主自身的技能提供器独立运行。文件原位只读,不安装、不改写、不删除。
|
|
163
139
|
|
|
164
|
-
|
|
140
|
+
注册表读取 `.claude`、`.agents`、`.codex`、`.cursor`、`.kimi`、`.zcode`、`.qoder`、`.github` 下的技能。除 `.codex` 与 `.kimi` 外启用可移植 Markdown agents;两者的 TOML/YAML 格式需要独立适配器。角色执行按调用会话确定项目。项目 commands、受支持的 MCP 服务和已映射命令 hooks 注册在各 Agent 独立作用域,会话启动或目录变更通知时刷新,关闭总开关即撤销。
|
|
165
141
|
|
|
166
|
-
|
|
142
|
+
MCP 读取根 `.mcp.json`、`.cursor/mcp.json`,以及 `.qoder/settings.json`、`.qoder/settings.local.json` 的 `mcpServers` 表(本机配置覆盖同名项目配置)。ZCode 读取 `zcode.json`、`.zcode/config.json` 的 `mcp.servers`,原生表为空时回退到 `.agents/mcp.json`。Codex 通过 `smol-toml` 读取 `.codex/config.toml` 的 `[mcp_servers.*]`,保留 stdio/HTTP 配置、环境变量/请求头引用、启停、工具过滤和超时。不支持的服务字段会报诊断,宿主客户端模式会拒绝无法执行的策略。相对可执行路径从项目根解析。Claude/Qoder 设置 hooks 与明确启用的 ZCode 配置 hooks 使用桥支持的命令事件子集。校验后的 hooks 写入私有运行时临时文件,销毁时删除,项目原文件保持不变。项目 LSP 给出诊断且不挂载,修改宿主不属于本插件范围。见[架构决策与支持边界](docs/adr/2026-09-09-layout-registry.md)。
|
|
167
143
|
|
|
168
|
-
|
|
144
|
+
### 抽样验证
|
|
169
145
|
|
|
170
|
-
|
|
146
|
+
`schemas/` 中的每个 schema 都会对照一个真实仓库核验——取 GitHub 代码搜索为该布局返回的 star 最高候选(2026-09-08)——再用本插件自己的扫描器读取该 checkout。九个样本中有六个**被遮蔽(shadowed)**:仓库同时提供多种方言,优先级更高的清单胜出,因此能力面仍被发现,但抽样方言自身的身份未被采用。[兼容性报告](docs/compat-report.md)记录了提交号、schema 错误与扫描备注。
|
|
171
147
|
|
|
172
|
-
|
|
148
|
+
| 布局 | 抽样仓库 | 方言清单 | Schema | 扫描器 |
|
|
149
|
+
| --- | --- | --- | --- | --- |
|
|
150
|
+
| Claude Code | [grafana/mcp-grafana](https://github.com/grafana/mcp-grafana) | `.claude-plugin/plugin.json` | 通过 | 接入 |
|
|
151
|
+
| Codex | [saadeghi/daisyui](https://github.com/saadeghi/daisyui) | `.codex-plugin/plugin.json` | 通过 | 被遮蔽 |
|
|
152
|
+
| Cursor | [EveryInc/compound-engineering-plugin](https://github.com/EveryInc/compound-engineering-plugin) | `.cursor-plugin/plugin.json` + marketplace | 通过 | 被遮蔽 |
|
|
153
|
+
| Kimi | [obra/superpowers](https://github.com/obra/superpowers) | `.kimi-plugin/plugin.json` | 通过 | 被遮蔽 |
|
|
154
|
+
| Universal | [muratcankoylan/Agent-Skills-for-Context-Engineering](https://github.com/muratcankoylan/Agent-Skills-for-Context-Engineering) | `.plugin/plugin.json` | 通过 | 接入 |
|
|
155
|
+
| agent-plugins.org v1 | [saadeghi/daisyui](https://github.com/saadeghi/daisyui) | `plugin.json` | 通过 | 接入 |
|
|
156
|
+
| ZCode | [zenstory-ai/oh-story-claudecode](https://github.com/zenstory-ai/oh-story-claudecode) | `.zcode-plugin/plugin.json` + `marketplace.json` | 通过 | 被遮蔽 |
|
|
157
|
+
| Qoder CLI | [DietrichGebert/ponytail](https://github.com/DietrichGebert/ponytail) | `.qoder-plugin/plugin.json` | 通过 | 被遮蔽 |
|
|
158
|
+
| GitHub Copilot CLI | [headroomlabs-ai/headroom](https://github.com/headroomlabs-ai/headroom) | `.github/plugin/marketplace.json` | 通过 | 被遮蔽 |
|
|
173
159
|
|
|
174
|
-
|
|
160
|
+
**扫描器**列描述未修改的仓库:**接入**表示自身清单胜出,**被遮蔽**表示其它方言胜出,**未读取**表示无套件。它与单布局隔离测试分开判断。无清单集合使用真实 Universal 仓库技能、在测试中移除清单验证,补齐十种布局覆盖。快照位于 `tests/fixtures/real-layouts/`,保留提交号、文件哈希与许可证,详见[审计表](docs/layout-coverage.zh.md)。
|
|
175
161
|
|
|
176
|
-
|
|
162
|
+
核验依据包括 `src/catalog/manifests.ts`、`surfaces.ts`、`validate.ts`、`native-project.ts` 与 `src/runtime/hooks-mounts.ts`。[兼容性报告](docs/compat-report.md)补充「每个 schema 一个真实仓库」并由本插件扫描器实测。这是文档、源码与抽样核验,并非每个平台的端到端兼容认证。
|
|
177
163
|
|
|
178
|
-
|
|
164
|
+
能读取一种布局,并不保证复现原平台的全部行为。无效声明会被诊断并跳过。项目原生命令与受支持的 MCP 服务使用宿主的 Agent 作用域注册;项目 MCP 服务名包含会话身份,以避免应用级命名冲突。
|
|
179
165
|
|
|
180
|
-
|
|
166
|
+
启用第三方套件前请检查其内容:启用的服务和 hooks 可以执行程序。详见[运行时与安全边界](docs/guides/usage.zh.md#运行时与安全边界)。
|
|
181
167
|
|
|
182
|
-
##
|
|
168
|
+
## 常见问题
|
|
183
169
|
|
|
184
|
-
|
|
185
|
-
- 可选 peer:`@deepseek-ai/dsh-mcp-client`(MCP 注入)、`@deepseek-ai/dsh-hooks-claude-code`(hooks 桥),缺失时对应能力受控降级。
|
|
186
|
-
- Host credentials service 为可选能力:标准 DSH profile 会提供它,用于只写 token 配置和实时重挂载;缺失时 `${ENV_NAME}` 回退到启动环境,修改后需要重启 DSH。
|
|
187
|
-
- Web GUI ≥ 0.1.0-rc.6。
|
|
170
|
+
**安装后为什么找不到技能或工具?**
|
|
188
171
|
|
|
189
|
-
|
|
172
|
+
检查套件及对应能力是否启用。技能可能限制手动调用;MCP / LSP 面板显示用户服务故障。项目资源还需要开启项目扫描;不支持的原生字段与项目 LSP 声明进入扫描诊断,作用域挂载错误记录在宿主日志中。
|
|
190
173
|
|
|
191
|
-
|
|
192
|
-
- 变更类 HTTP 路由仅接受同源 POST,请求体上限 64 KiB。
|
|
193
|
-
- 便携包路径必须 `./` 开头且解析后留在套件根内(拒绝 symlink 逃逸);`${PLUGIN_ROOT}`/`${PLUGIN_DATA}` 展开。
|
|
194
|
-
- 第三方套件故障永远受控:坏清单、非法技能、逃逸路径、未知 MCP transport、缺失 MCP 凭据、挂载失败均为逐套件诊断。
|
|
195
|
-
- MCP 凭据值通过 Host credentials service 在内存中解析;状态和详情投影会脱敏敏感字段,凭据写入不会把字面 token 持久化到套件 state 或 override。
|
|
196
|
-
- 错误边界包裹整个市场区与详情弹窗:任何预览渲染异常降级为提示,不会崩掉界面。
|
|
174
|
+
**在哪里配置 MCP token?**
|
|
197
175
|
|
|
198
|
-
|
|
176
|
+
在 **MCP 服务**中打开对应服务。缺失环境变量引用时显示 `needs-credentials`。宿主管理的凭据只写不读;启动环境中的凭据需要修改环境后重启 DSH。
|
|
199
177
|
|
|
200
|
-
|
|
201
|
-
- 技能发现无文件监听:目录变化在管理动作或重启后生效(项目维度快照在技能枚举热路径上有 5 秒缓存)。
|
|
202
|
-
- Claude Code hooks 仅支持 bridge 映射的子集;LSP 只计数与预览,不执行。
|
|
203
|
-
- 项目原生布局(`.claude/`、`.agents/`)注入技能与子代理;其中 `commands/*.md` 不注册为斜杠命令——宿主命令注册表是进程级作用域,无法按会话 cwd 隔离。
|
|
178
|
+
**套件没有声明的服务怎么添加?**
|
|
204
179
|
|
|
205
|
-
|
|
180
|
+
在 **MCP 服务**或 **LSP 服务**中点击新增并填入声明。声明会先校验,保存到 `~/.dsh/agent-plugins/data/` 下,并与套件服务走同一套挂载生命周期。从宿主配置观察到的服务保持只读。
|
|
206
181
|
|
|
207
|
-
|
|
208
|
-
pnpm install
|
|
209
|
-
pnpm run test # vitest(fixture 套件 + 多范式解析)
|
|
210
|
-
pnpm run typecheck
|
|
211
|
-
pnpm run lint # 对重构源码与测试执行 ESLint
|
|
212
|
-
pnpm run format:check
|
|
213
|
-
pnpm run check:architecture
|
|
214
|
-
pnpm run check:refactor
|
|
215
|
-
pnpm run build # tsc 宿主 + tsdown 客户端 + 模块加载器包装
|
|
216
|
-
pnpm pack # 构建并打 tgz
|
|
217
|
-
```
|
|
182
|
+
**来源下载失败怎么办?**
|
|
218
183
|
|
|
219
|
-
|
|
184
|
+
可以使用本地目录、收编手动克隆的仓库,或配置代理与镜像,见[配置市场源](docs/guides/usage.zh.md#配置市场源)。
|
|
220
185
|
|
|
221
|
-
|
|
186
|
+
**本地修改什么时候生效?**
|
|
222
187
|
|
|
223
|
-
|
|
188
|
+
没有文件监听。本地来源的发现结果最多缓存 30 秒,刷新来源可立即使缓存失效。项目发现有独立的五秒缓存。已经打开的页面不会自动刷新。
|
|
224
189
|
|
|
225
|
-
|
|
190
|
+
**删除来源会删除文件吗?**
|
|
226
191
|
|
|
227
|
-
|
|
192
|
+
只有勾选确认框里的「同时删除市场目录」才会删除。它删除该源在 `~/.dsh/agent-plugins/.sources/<id>` 下的目录——包括你手动克隆后被收编的目录。指向 `.sources/` 之外的本地目录源永不删除。
|
|
228
193
|
|
|
229
|
-
|
|
230
|
-
- [@claude2dsh/plugin](https://www.npmjs.com/package/@claude2dsh/plugin) — 导入 Claude Code 会话与 skills 到 DSH,并同步回写
|
|
231
|
-
- [dsh-crew](https://github.com/ZSeven-W/dsh-crew) — 从 Claude Code / Codex 调度 DSH agent
|
|
232
|
-
- [deepseek-ai/deepseek-harness](https://github.com/deepseek-ai/deepseek-harness) — DeepSeek Harness 本体(官方)
|
|
233
|
-
- [awesome-deepseek-harness-plugins](https://github.com/imsai-sh/awesome-deepseek-harness-plugins) — 社区 DSH 插件目录
|
|
194
|
+
## 更多文档
|
|
234
195
|
|
|
235
|
-
|
|
196
|
+
- [使用指南](docs/guides/usage.zh.md):安装、来源配置、存储、宿主要求、MCP / LSP 和反馈设置。
|
|
197
|
+
- [插件规范](schemas/README.md):各布局的参考 schema 与依据,以及内置的 agent-plugins.org v1.0.0 契约。
|
|
198
|
+
- [兼容性报告](docs/compat-report.md):每个 schema 一个真实仓库,含提交号、schema 结论与扫描器输出。
|
|
199
|
+
- [贡献指南](CONTRIBUTING.md):开发环境、检查命令和 PR 流程。
|
|
200
|
+
- [安全政策](SECURITY.md) · [版本记录](CHANGELOG.md) · [MIT 许可](LICENSE)。
|
|
201
|
+
- [领域词汇](CONTEXT.md) · [架构设计](docs/adr/0001-catalog-centered-modular-refactor.md)。
|
|
236
202
|
|
|
237
|
-
|
|
203
|
+
已安装资源编辑、角色模型路由与目录迁移见[代理角色与存储](docs/guides/agent-roles.zh.md)。
|