dsh-agent-plugins-market 0.5.0 → 0.5.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.
Files changed (41) hide show
  1. package/README.md +4 -2
  2. package/README.zh.md +4 -2
  3. package/client/client.js +310 -17
  4. package/client/client.js.map +1 -1
  5. package/lib/application/catalog.js +101 -4
  6. package/lib/application/details.js +4 -1
  7. package/lib/catalog/native-project.js +73 -0
  8. package/lib/catalog/source-catalog.js +12 -3
  9. package/lib/contracts/market.js +4 -1
  10. package/lib/index.js +12 -5
  11. package/lib/model/state.js +19 -1
  12. package/lib/model/types.js +12 -1
  13. package/lib/routes.js +37 -0
  14. package/lib/runtime/commands-mounts.js +15 -6
  15. package/lib/runtime/hooks-mounts.js +3 -2
  16. package/lib/runtime/host-locale.js +54 -0
  17. package/lib/runtime/mcp-config.js +11 -4
  18. package/lib/runtime/mcp-mounts.js +33 -17
  19. package/lib/runtime/mcp-overrides.js +113 -0
  20. package/lib/runtime/mcp-status.js +8 -4
  21. package/lib/runtime/reconciler.js +7 -2
  22. package/lib/runtime/skills-provider.js +22 -13
  23. package/lib/types/application/catalog.d.ts +30 -2
  24. package/lib/types/application/details.d.ts +2 -2
  25. package/lib/types/application/queries.d.ts +5 -1
  26. package/lib/types/catalog/native-project.d.ts +17 -0
  27. package/lib/types/contracts/market.d.ts +26 -0
  28. package/lib/types/index.d.ts +4 -3
  29. package/lib/types/model/state.d.ts +1 -1
  30. package/lib/types/model/types.d.ts +13 -1
  31. package/lib/types/runtime/commands-mounts.d.ts +4 -2
  32. package/lib/types/runtime/host-locale.d.ts +13 -0
  33. package/lib/types/runtime/mcp-config.d.ts +5 -1
  34. package/lib/types/runtime/mcp-mounts.d.ts +12 -3
  35. package/lib/types/runtime/mcp-overrides.d.ts +37 -0
  36. package/lib/types/runtime/mcp-status.d.ts +2 -1
  37. package/lib/types/runtime/reconciler.d.ts +4 -1
  38. package/lib/types/runtime/skills-provider.d.ts +3 -1
  39. package/package.json +1 -1
  40. package/lib/context.js +0 -78
  41. package/lib/types/context.d.ts +0 -13
package/README.md CHANGED
@@ -66,8 +66,9 @@ Build artifacts (`lib/`, `client/`) are not committed; npm publishes them via `p
66
66
  - **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>`.
67
67
  - **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).
68
68
  - **Commands / subagents** — `commands/*.md` register as dsh slash commands; `agents/*.md` register as `agent-<name>` skills.
69
- - **Context** — the enabled-plugin catalog (user + project sections) is injected at session start; the `agent_plugins` tool queries it.
69
+ - **Model context** — skills flow through the host-native skill catalog and MCP tools register directly through `dsh-mcp-client`; suite inventory and source metadata remain available in the Web market page without adding a redundant model-facing inventory tool.
70
70
  - **Runtime discovery** — installed plugins are discovered from configured source ids under `~/.dsh/agent-plugins/.sources/<sourceId>/` (user dimension) and `<project>/.dsh/agent-plugins/.sources/<sourceId>/` (project dimension). Stale unmanaged user checkouts are ignored, while project checkouts remain state-authorized. Local sources read the working tree directly, including uncommitted changes.
71
+ - **Native project layouts (zero-copy migration)** — a repository's own `.claude/` and `.agents/` directories (skills, agents) are discovered in place as read-only `project-native` suites: no install, no copying, no state file. Repositories migrating from Claude Code or agent-plugins.org conventions work as-is; a project skill shadows an installed suite skill of the same name (project wins).
71
72
 
72
73
  ## Supported plugin layouts
73
74
 
@@ -171,8 +172,9 @@ Yes — MIT licensed, published on [npm](https://www.npmjs.com/package/dsh-agent
171
172
  ## Known limitations
172
173
 
173
174
  - Project-dimension MCP servers are not mounted (dsh has no per-session tool scope); the project dimension covers skills and context.
174
- - Skill discovery has no file watcher: catalog changes apply after a manager action or a host restart.
175
+ - Skill discovery has no file watcher: catalog changes apply after a manager action or a host restart (project-dimension snapshots are cached for 5 seconds on the skill-list hot path).
175
176
  - Claude Code hooks support the mapped bridge subset; LSP is counted and previewed but not executed.
177
+ - Native project layouts (`.claude/`, `.agents/`) inject skills and subagents; their `commands/*.md` are not registered as slash commands because the harness command registry is process-scoped, not session-cwd-scoped.
176
178
 
177
179
  ## Development
178
180
 
package/README.zh.md CHANGED
@@ -66,8 +66,9 @@ dsh plugin --profile <名字> add github:Sivan757/dsh-agent-plugins-market
66
66
  - **MCP 服务器**:启用套件的 `mcp.json` 每个合法 server 动态挂载 `dsh-mcp-client` 子插件,工具名 `mcp__<套件>__<server>__<工具>`;
67
67
  - **Hooks**:套件 `hooks/hooks.json` 挂载 `dsh-hooks-claude-code` 桥,映射到宿主拦截点(SessionStart、UserPromptSubmit、PreToolUse、PostToolUse、Stop、SubagentStart、SubagentStop);
68
68
  - **命令 / 子代理**:`commands/*.md` 注册为 dsh 斜杠命令;`agents/*.md` 注册为 `agent-<name>` 技能;
69
- - **上下文**:会话启动注入启用套件清单(用户级 + 项目级),`agent_plugins` 工具可查询。
69
+ - **模型上下文**:技能通过宿主原生 skill catalog 注入,MCP 工具通过 `dsh-mcp-client` 直接注册;套件清单与来源信息通过 Web 市场页查询,不注册冗余的模型侧 inventory 工具。
70
70
  - **运行时发现**——已安装套件只从已配置的源 ID 对应目录发现:`~/.dsh/agent-plugins/.sources/<源id>/`(用户维度)与 `<项目>/.dsh/agent-plugins/.sources/<源id>/`(项目维度)。用户维度的过期未登记 checkout 会被忽略,项目维度仍按 state 中的安装记录授权;本地源直接读取工作树(含未提交改动)。
71
+ - **项目原生布局(零拷贝迁移)**——项目自己的 `.claude/`、`.agents/` 目录(skills、agents)就地发现为只读「项目原生」套件:无需安装、无需拷贝、无状态文件。从 Claude Code 或 agent-plugins.org 约定迁移过来的仓库开箱即用;同名技能发生冲突时项目侧优先(覆盖已安装套件中的同名技能)。
71
72
 
72
73
  ## 兼容的套件布局
73
74
 
@@ -171,8 +172,9 @@ dsh plugin --profile <名字> add dsh-agent-plugins-market
171
172
  ## 已知限制
172
173
 
173
174
  - 项目维度 MCP server 不挂载(dsh 无按会话的 tool scope);项目维度覆盖技能 + 上下文。
174
- - 技能发现无文件监听:目录变化在管理动作或重启后生效。
175
+ - 技能发现无文件监听:目录变化在管理动作或重启后生效(项目维度快照在技能枚举热路径上有 5 秒缓存)。
175
176
  - Claude Code hooks 仅支持 bridge 映射的子集;LSP 只计数与预览,不执行。
177
+ - 项目原生布局(`.claude/`、`.agents/`)注入技能与子代理;其中 `commands/*.md` 不注册为斜杠命令——宿主命令注册表是进程级作用域,无法按会话 cwd 隔离。
176
178
 
177
179
  ## 开发
178
180