dsh-agent-plugins-market 0.4.6 → 0.5.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.
Files changed (62) hide show
  1. package/README.md +16 -10
  2. package/README.zh.md +16 -10
  3. package/client/client.js +540 -417
  4. package/client/client.js.map +1 -1
  5. package/lib/application/catalog.js +447 -0
  6. package/lib/application/details.js +136 -0
  7. package/lib/application/queries.js +1 -0
  8. package/lib/{discovery → catalog}/manifests.js +20 -12
  9. package/lib/{paths.js → catalog/paths.js} +5 -1
  10. package/lib/{skills-parse.js → catalog/skills-parse.js} +7 -4
  11. package/lib/catalog/source-catalog.js +38 -0
  12. package/lib/{discovery.js → catalog/suite-scanner.js} +28 -86
  13. package/lib/{discovery → catalog}/surfaces.js +9 -11
  14. package/lib/{validate.js → catalog/validate.js} +3 -3
  15. package/lib/context.js +11 -13
  16. package/lib/contracts/market.js +27 -0
  17. package/lib/contracts/mcp-status.js +2 -0
  18. package/lib/index.js +32 -49
  19. package/lib/{state.js → model/state.js} +2 -2
  20. package/lib/routes.js +21 -21
  21. package/lib/{commands-mounts.js → runtime/commands-mounts.js} +10 -11
  22. package/lib/{hooks-mounts.js → runtime/hooks-mounts.js} +1 -1
  23. package/lib/{mcp-config.js → runtime/mcp-config.js} +7 -4
  24. package/lib/{mcp-status.js → runtime/mcp-status.js} +8 -41
  25. package/lib/runtime/reconciler.js +46 -0
  26. package/lib/{skills-provider.js → runtime/skills-provider.js} +26 -23
  27. package/lib/runtime/tool-registry-observer.js +35 -0
  28. package/lib/types/application/catalog.d.ts +113 -0
  29. package/lib/types/application/details.d.ts +12 -0
  30. package/lib/types/application/queries.d.ts +33 -0
  31. package/lib/types/{discovery → catalog}/manifests.d.ts +1 -1
  32. package/lib/types/catalog/source-catalog.d.ts +3 -0
  33. package/lib/types/catalog/suite-scanner.d.ts +9 -0
  34. package/lib/types/{discovery → catalog}/surfaces.d.ts +1 -1
  35. package/lib/types/{validate.d.ts → catalog/validate.d.ts} +1 -1
  36. package/lib/types/context.d.ts +2 -2
  37. package/lib/types/contracts/market.d.ts +153 -0
  38. package/lib/types/contracts/mcp-status.d.ts +38 -0
  39. package/lib/types/index.d.ts +1 -1
  40. package/lib/types/{types.d.ts → model/types.d.ts} +2 -42
  41. package/lib/types/routes.d.ts +2 -2
  42. package/lib/types/{commands-mounts.d.ts → runtime/commands-mounts.d.ts} +1 -1
  43. package/lib/types/{hooks-mounts.d.ts → runtime/hooks-mounts.d.ts} +1 -1
  44. package/lib/types/{mcp-config.d.ts → runtime/mcp-config.d.ts} +1 -1
  45. package/lib/types/{mcp-mounts.d.ts → runtime/mcp-mounts.d.ts} +1 -1
  46. package/lib/types/runtime/mcp-status.d.ts +13 -0
  47. package/lib/types/runtime/reconciler.d.ts +33 -0
  48. package/lib/types/{skills-provider.d.ts → runtime/skills-provider.d.ts} +3 -3
  49. package/lib/types/runtime/tool-registry-observer.d.ts +14 -0
  50. package/package.json +34 -19
  51. package/schemas/README.md +2 -5
  52. package/lib/manager.js +0 -581
  53. package/lib/types/discovery.d.ts +0 -19
  54. package/lib/types/manager.d.ts +0 -124
  55. package/lib/types/mcp-status.d.ts +0 -51
  56. /package/lib/{git.js → catalog/git.js} +0 -0
  57. /package/lib/{types.js → model/types.js} +0 -0
  58. /package/lib/{mcp-mounts.js → runtime/mcp-mounts.js} +0 -0
  59. /package/lib/types/{git.d.ts → catalog/git.d.ts} +0 -0
  60. /package/lib/types/{paths.d.ts → catalog/paths.d.ts} +0 -0
  61. /package/lib/types/{skills-parse.d.ts → catalog/skills-parse.d.ts} +0 -0
  62. /package/lib/types/{state.d.ts → model/state.d.ts} +0 -0
package/README.md CHANGED
@@ -53,7 +53,7 @@ dsh plugin --profile <name> add github:Sivan757/dsh-agent-plugins-market
53
53
  }
54
54
  ```
55
55
 
56
- The built entry point (`lib/`, `client/`) is committed to the repository, so GitHub installs work without a `prepare` step.
56
+ Build artifacts (`lib/`, `client/`) are not committed; npm publishes them via `prepack`, and GitHub installs build them automatically through the `prepare` script (requires Node + pnpm toolchain on the installing machine).
57
57
 
58
58
  </details>
59
59
 
@@ -71,15 +71,15 @@ The built entry point (`lib/`, `client/`) is committed to the repository, so Git
71
71
 
72
72
  ## Supported plugin layouts
73
73
 
74
- | Layout | Manifest | Notes |
75
- | --- | --- | --- |
76
- | agent-plugins.org v1 | `plugin.json` | vendored 1.0.0 JSON Schema validation + spec §4 path rules |
77
- | Claude Code market | `.claude-plugin/marketplace.json` + `.claude-plugin/plugin.json` | marketplace `plugins[].source` relative paths |
78
- | Universal | `.plugin/plugin.json` | multi-client repos (e.g. vercel-plugin) |
79
- | Cursor | `.cursor-plugin/plugin.json` | declared skills paths |
80
- | Kimi | `.kimi-plugin/plugin.json` | inline mcpServers |
81
- | Codex | `.codex-plugin/plugin.json` | — |
82
- | Skill collection (manifest-less) | none (synthetic) | flat `SKILL.md` directory collections |
74
+ | Layout | Manifest | Notes |
75
+ | -------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------- |
76
+ | agent-plugins.org v1 | `plugin.json` | vendored 1.0.0 JSON Schema validation + spec §4 path rules |
77
+ | Claude Code market | `.claude-plugin/marketplace.json` + `.claude-plugin/plugin.json` | marketplace `plugins[].source` relative paths |
78
+ | Universal | `.plugin/plugin.json` | multi-client repos (e.g. vercel-plugin) |
79
+ | Cursor | `.cursor-plugin/plugin.json` | declared skills paths |
80
+ | Kimi | `.kimi-plugin/plugin.json` | inline mcpServers |
81
+ | Codex | `.codex-plugin/plugin.json` | — |
82
+ | Skill collection (manifest-less) | none (synthetic) | flat `SKILL.md` directory collections |
83
83
 
84
84
  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).
85
85
 
@@ -180,10 +180,16 @@ Yes — MIT licensed, published on [npm](https://www.npmjs.com/package/dsh-agent
180
180
  pnpm install
181
181
  pnpm run test # vitest over fixture suites + multi-dialect parsing
182
182
  pnpm run typecheck
183
+ pnpm run lint # ESLint over the refactored source and tests
184
+ pnpm run format:check
185
+ pnpm run check:architecture
186
+ pnpm run check:refactor
183
187
  pnpm run build # tsc host + tsdown client + module-loader banner
184
188
  pnpm pack
185
189
  ```
186
190
 
191
+ The internal modularization decision and staged migration are documented in [`docs/design/engineering-refactor-plan.md`](docs/design/engineering-refactor-plan.md) and [`docs/adr/0001-catalog-centered-modular-refactor.md`](docs/adr/0001-catalog-centered-modular-refactor.md).
192
+
187
193
  The docs website lives in [`docs-site/`](docs-site/) (Astro, deployed to GitHub Pages).
188
194
 
189
195
  ## Vendored assets
package/README.zh.md CHANGED
@@ -53,7 +53,7 @@ dsh plugin --profile <名字> add github:Sivan757/dsh-agent-plugins-market
53
53
  }
54
54
  ```
55
55
 
56
- 构建产物(`lib/`、`client/`)已提交到仓库,GitHub 安装无需 `prepare` 步骤。
56
+ 构建产物(`lib/`、`client/`)不再提交进仓库;npm 通过 `prepack` 发布,GitHub 安装时由 `prepare` 脚本自动构建(安装机需具备 Node + pnpm 工具链)。
57
57
 
58
58
  </details>
59
59
 
@@ -71,15 +71,15 @@ dsh plugin --profile <名字> add github:Sivan757/dsh-agent-plugins-market
71
71
 
72
72
  ## 兼容的套件布局
73
73
 
74
- | 布局 | 清单文件 | 说明 |
75
- | --- | --- | --- |
76
- | agent-plugins.org v1 | `plugin.json` | 内置 1.0.0 JSON Schema 校验 + 规范 §4 路径约束 |
77
- | Claude Code 市场 | `.claude-plugin/marketplace.json` + 套件 `.claude-plugin/plugin.json` | marketplace `plugins[].source` 相对路径 |
78
- | 通用(universal) | `.plugin/plugin.json` | 多客户端共存仓库(如 vercel-plugin) |
79
- | Cursor | `.cursor-plugin/plugin.json` | 声明式 skills 路径 |
80
- | Kimi | `.kimi-plugin/plugin.json` | 内联 mcpServers |
81
- | Codex | `.codex-plugin/plugin.json` | — |
82
- | 技能集合(无清单) | 无(合成) | 扁平 `SKILL.md` 目录集合 |
74
+ | 布局 | 清单文件 | 说明 |
75
+ | -------------------- | --------------------------------------------------------------------- | ---------------------------------------------- |
76
+ | agent-plugins.org v1 | `plugin.json` | 内置 1.0.0 JSON Schema 校验 + 规范 §4 路径约束 |
77
+ | Claude Code 市场 | `.claude-plugin/marketplace.json` + 套件 `.claude-plugin/plugin.json` | marketplace `plugins[].source` 相对路径 |
78
+ | 通用(universal) | `.plugin/plugin.json` | 多客户端共存仓库(如 vercel-plugin) |
79
+ | Cursor | `.cursor-plugin/plugin.json` | 声明式 skills 路径 |
80
+ | Kimi | `.kimi-plugin/plugin.json` | 内联 mcpServers |
81
+ | Codex | `.codex-plugin/plugin.json` | — |
82
+ | 技能集合(无清单) | 无(合成) | 扁平 `SKILL.md` 目录集合 |
83
83
 
84
84
  一个仓库可同时携带多种清单(如 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,不可直接安装,可添加对应仓库为源后安装)。
85
85
 
@@ -180,10 +180,16 @@ dsh plugin --profile <名字> add dsh-agent-plugins-market
180
180
  pnpm install
181
181
  pnpm run test # vitest(fixture 套件 + 多范式解析)
182
182
  pnpm run typecheck
183
+ pnpm run lint # 对重构源码与测试执行 ESLint
184
+ pnpm run format:check
185
+ pnpm run check:architecture
186
+ pnpm run check:refactor
183
187
  pnpm run build # tsc 宿主 + tsdown 客户端 + 模块加载器包装
184
188
  pnpm pack # 构建并打 tgz
185
189
  ```
186
190
 
191
+ 内部模块化决策与分阶段迁移计划见 [`docs/design/engineering-refactor-plan.md`](docs/design/engineering-refactor-plan.md) 和 [`docs/adr/0001-catalog-centered-modular-refactor.md`](docs/adr/0001-catalog-centered-modular-refactor.md)。
192
+
187
193
  文档站位于 [`docs-site/`](docs-site/)(Astro,部署到 GitHub Pages)。
188
194
 
189
195
  ## Vendored 资产