dsh-agent-plugins-market 0.13.0 → 0.14.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.
Files changed (169) hide show
  1. package/README.md +14 -13
  2. package/README.zh.md +14 -13
  3. package/client/client.js +4398 -2124
  4. package/client/client.js.map +1 -1
  5. package/lib/packages/market-bundle/src/application/ai-diagnose.js +77 -0
  6. package/lib/packages/market-bundle/src/application/ai-hook.js +105 -0
  7. package/lib/packages/market-bundle/src/application/ai-port.js +1 -0
  8. package/lib/packages/market-bundle/src/application/ai-preset.js +101 -0
  9. package/lib/packages/market-bundle/src/application/catalog.js +4 -4
  10. package/lib/packages/market-bundle/src/application/extension-inventory.js +60 -2
  11. package/lib/packages/market-bundle/src/application/instructions.js +32 -70
  12. package/lib/packages/market-bundle/src/application/output-styles-suites.js +25 -0
  13. package/lib/packages/market-bundle/src/application/project-readers.js +48 -0
  14. package/lib/packages/market-bundle/src/application/user-hooks-writer.js +68 -0
  15. package/lib/packages/market-bundle/src/index.js +92 -11
  16. package/lib/packages/market-bundle/src/platform/llm-draft.js +73 -0
  17. package/lib/packages/market-bundle/src/platform/settings-namespace.js +0 -8
  18. package/lib/packages/market-bundle/src/request-trust.js +64 -0
  19. package/lib/packages/market-bundle/src/route-errors.js +86 -0
  20. package/lib/packages/market-bundle/src/route-http.js +68 -0
  21. package/lib/packages/market-bundle/src/routes-ai.js +204 -0
  22. package/lib/packages/market-bundle/src/routes-extension-presets.js +5 -14
  23. package/lib/packages/market-bundle/src/routes-instructions.js +15 -56
  24. package/lib/packages/market-bundle/src/routes-output-styles.js +133 -0
  25. package/lib/packages/market-bundle/src/routes-resources.js +13 -46
  26. package/lib/packages/market-bundle/src/routes-tab-layout.js +69 -47
  27. package/lib/packages/market-bundle/src/routes-user-hooks.js +100 -0
  28. package/lib/packages/market-bundle/src/routes.js +21 -68
  29. package/lib/packages/market-bundle/src/session-extension.js +52 -16
  30. package/lib/packages/market-catalog/src/index.js +2 -2
  31. package/lib/packages/market-catalog/src/scanning/paths.js +37 -12
  32. package/lib/packages/market-catalog/src/scanning/scan-resolvers.js +5 -1
  33. package/lib/packages/market-catalog/src/scanning/skills-parse.js +20 -0
  34. package/lib/packages/market-catalog/src/scanning/suite-components.js +117 -2
  35. package/lib/packages/market-contracts/src/contracts/ai-draft.js +59 -0
  36. package/lib/packages/market-contracts/src/contracts/extension-presets.js +3 -1
  37. package/lib/packages/market-contracts/src/contracts/market.js +8 -2
  38. package/lib/packages/market-contracts/src/contracts/output-styles.js +68 -0
  39. package/lib/packages/market-contracts/src/contracts/refresh-cadence.js +84 -0
  40. package/lib/packages/market-contracts/src/contracts/tab-layout.js +97 -6
  41. package/lib/packages/market-contracts/src/contracts/user-hooks.js +39 -0
  42. package/lib/packages/market-contracts/src/index.js +1 -0
  43. package/lib/packages/market-contracts/src/ports/ports.js +2 -3
  44. package/lib/packages/market-contracts/src/redaction.js +72 -0
  45. package/lib/packages/market-lsp/src/application/lsp/lsp-status.js +31 -12
  46. package/lib/packages/market-lsp/src/application/lsp-service.js +16 -0
  47. package/lib/packages/market-lsp/src/runtime/lsp/lsp-mounts.js +111 -6
  48. package/lib/packages/market-mcp/src/application/mcp/mcp-status.js +50 -23
  49. package/lib/packages/market-mcp/src/application/mcp/proxy-hint.js +89 -0
  50. package/lib/packages/market-mcp/src/application/mcp-service.js +11 -12
  51. package/lib/packages/market-mcp/src/index.js +1 -0
  52. package/lib/packages/market-mcp/src/runtime/mcp/bridge/bridge.js +6 -2
  53. package/lib/packages/market-mcp/src/runtime/mcp/bridge/connection.js +62 -2
  54. package/lib/packages/market-mcp/src/runtime/mcp/mcp-connection-registry.js +23 -0
  55. package/lib/packages/market-mcp/src/runtime/mcp/mcp-mounts.js +14 -2
  56. package/lib/packages/market-runtime/src/application/command-resources.js +31 -0
  57. package/lib/packages/market-runtime/src/application/output-styles.js +195 -0
  58. package/lib/packages/market-runtime/src/application/panel-resources.js +95 -25
  59. package/lib/packages/market-runtime/src/application/state/output-style.js +113 -0
  60. package/lib/packages/market-runtime/src/application/state/tab-layout.js +51 -15
  61. package/lib/packages/market-runtime/src/index.js +8 -2
  62. package/lib/packages/market-runtime/src/runtime/agents/agent-role-router.js +29 -6
  63. package/lib/packages/market-runtime/src/runtime/agents/role-composition.js +12 -2
  64. package/lib/packages/market-runtime/src/runtime/agents/subagent-catalog.js +7 -18
  65. package/lib/packages/market-runtime/src/runtime/agents/subagent-seam.js +0 -12
  66. package/lib/packages/market-runtime/src/runtime/agents/teammate-role-runtime.js +7 -3
  67. package/lib/packages/market-runtime/src/runtime/agents/teammate-role-tool.js +16 -1
  68. package/lib/packages/market-runtime/src/runtime/core/lsp-call-observation.js +32 -0
  69. package/lib/packages/market-runtime/src/runtime/core/mount-lifecycle.js +16 -1
  70. package/lib/packages/market-runtime/src/runtime/core/reconciler.js +61 -1
  71. package/lib/packages/market-runtime/src/runtime/host/extension-runtime.js +246 -13
  72. package/lib/packages/market-runtime/src/runtime/host/extension-session-state.js +16 -4
  73. package/lib/packages/market-runtime/src/runtime/host/extension-tool-gates.js +20 -2
  74. package/lib/packages/market-runtime/src/runtime/host/inventory-retry.js +76 -0
  75. package/lib/packages/market-runtime/src/runtime/host/output-style-render.js +41 -0
  76. package/lib/packages/market-runtime/src/runtime/host/output-style-section.js +64 -0
  77. package/lib/packages/market-runtime/src/runtime/host/output-style-service.js +162 -0
  78. package/lib/packages/market-runtime/src/runtime/host/scoped-contributors.js +36 -8
  79. package/lib/packages/market-runtime/src/runtime/host/tab-layout-service.js +33 -10
  80. package/lib/packages/market-runtime/src/runtime/panels/user-commands.js +2 -1
  81. package/lib/packages/market-runtime/src/runtime/surfaces/commands-mounts.js +3 -3
  82. package/lib/packages/market-runtime/src/runtime/surfaces/extension-hooks.js +156 -26
  83. package/lib/packages/market-runtime/src/runtime/surfaces/hook-dry-run.js +0 -2
  84. package/lib/packages/market-runtime/src/runtime/surfaces/project-runtime.js +0 -29
  85. package/lib/packages/market-runtime/src/runtime/surfaces/prompt-frame.js +118 -0
  86. package/lib/packages/market-translation/src/index.js +4 -0
  87. package/lib/packages/market-translation/src/runtime/host/auxiliary-model-call.js +138 -0
  88. package/lib/packages/market-translation/src/runtime/host/llm-translator.js +10 -109
  89. package/lib/types/packages/market-bundle/src/application/ai-diagnose.d.ts +48 -0
  90. package/lib/types/packages/market-bundle/src/application/ai-hook.d.ts +52 -0
  91. package/lib/types/packages/market-bundle/src/application/ai-port.d.ts +24 -0
  92. package/lib/types/packages/market-bundle/src/application/ai-preset.d.ts +60 -0
  93. package/lib/types/packages/market-bundle/src/application/catalog.d.ts +2 -2
  94. package/lib/types/packages/market-bundle/src/application/extension-inventory.d.ts +6 -0
  95. package/lib/types/packages/market-bundle/src/application/instructions.d.ts +23 -26
  96. package/lib/types/packages/market-bundle/src/application/output-styles-suites.d.ts +24 -0
  97. package/lib/types/packages/market-bundle/src/application/project-readers.d.ts +47 -0
  98. package/lib/types/packages/market-bundle/src/application/user-hooks-writer.d.ts +10 -0
  99. package/lib/types/packages/market-bundle/src/index.d.ts +25 -41
  100. package/lib/types/packages/market-bundle/src/platform/llm-draft.d.ts +8 -0
  101. package/lib/types/packages/market-bundle/src/platform/settings-namespace.d.ts +0 -6
  102. package/lib/types/packages/market-bundle/src/request-trust.d.ts +33 -0
  103. package/lib/types/packages/market-bundle/src/route-errors.d.ts +54 -0
  104. package/lib/types/packages/market-bundle/src/route-http.d.ts +54 -0
  105. package/lib/types/packages/market-bundle/src/routes-ai.d.ts +46 -0
  106. package/lib/types/packages/market-bundle/src/routes-extension-presets.d.ts +0 -1
  107. package/lib/types/packages/market-bundle/src/routes-output-styles.d.ts +16 -0
  108. package/lib/types/packages/market-bundle/src/routes-tab-layout.d.ts +2 -0
  109. package/lib/types/packages/market-bundle/src/routes-user-hooks.d.ts +14 -0
  110. package/lib/types/packages/market-bundle/src/session-extension.d.ts +22 -2
  111. package/lib/types/packages/market-catalog/src/index.d.ts +2 -2
  112. package/lib/types/packages/market-catalog/src/scanning/paths.d.ts +19 -4
  113. package/lib/types/packages/market-catalog/src/scanning/skills-parse.d.ts +18 -0
  114. package/lib/types/packages/market-catalog/src/scanning/suite-components.d.ts +14 -1
  115. package/lib/types/packages/market-contracts/src/contracts/ai-draft.d.ts +140 -0
  116. package/lib/types/packages/market-contracts/src/contracts/extension-presets.d.ts +63 -2
  117. package/lib/types/packages/market-contracts/src/contracts/lsp-status.d.ts +23 -0
  118. package/lib/types/packages/market-contracts/src/contracts/lsp.d.ts +2 -0
  119. package/lib/types/packages/market-contracts/src/contracts/market.d.ts +7 -1
  120. package/lib/types/packages/market-contracts/src/contracts/mcp-status.d.ts +49 -1
  121. package/lib/types/packages/market-contracts/src/contracts/mcp.d.ts +8 -0
  122. package/lib/types/packages/market-contracts/src/contracts/output-styles.d.ts +98 -0
  123. package/lib/types/packages/market-contracts/src/contracts/refresh-cadence.d.ts +75 -0
  124. package/lib/types/packages/market-contracts/src/contracts/tab-layout.d.ts +77 -6
  125. package/lib/types/packages/market-contracts/src/contracts/user-hooks.d.ts +39 -0
  126. package/lib/types/packages/market-contracts/src/index.d.ts +2 -1
  127. package/lib/types/packages/market-contracts/src/model/types.d.ts +25 -0
  128. package/lib/types/packages/market-contracts/src/ports/ports.d.ts +27 -3
  129. package/lib/types/packages/market-contracts/src/ports/queries.d.ts +6 -3
  130. package/lib/types/packages/market-contracts/src/redaction.d.ts +30 -0
  131. package/lib/types/packages/market-lsp/src/application/lsp/lsp-status.d.ts +7 -7
  132. package/lib/types/packages/market-lsp/src/application/lsp-service.d.ts +12 -0
  133. package/lib/types/packages/market-lsp/src/runtime/lsp/lsp-mounts.d.ts +51 -0
  134. package/lib/types/packages/market-mcp/src/application/mcp/mcp-status.d.ts +4 -2
  135. package/lib/types/packages/market-mcp/src/application/mcp/proxy-hint.d.ts +32 -0
  136. package/lib/types/packages/market-mcp/src/application/mcp-service.d.ts +0 -6
  137. package/lib/types/packages/market-mcp/src/index.d.ts +1 -0
  138. package/lib/types/packages/market-mcp/src/runtime/mcp/bridge/connection.d.ts +2 -1
  139. package/lib/types/packages/market-mcp/src/runtime/mcp/mcp-connection-registry.d.ts +29 -0
  140. package/lib/types/packages/market-runtime/src/adapter-contracts.d.ts +12 -0
  141. package/lib/types/packages/market-runtime/src/application/command-resources.d.ts +19 -0
  142. package/lib/types/packages/market-runtime/src/application/output-styles.d.ts +73 -0
  143. package/lib/types/packages/market-runtime/src/application/panel-resources.d.ts +15 -12
  144. package/lib/types/packages/market-runtime/src/application/state/output-style.d.ts +57 -0
  145. package/lib/types/packages/market-runtime/src/application/state/tab-layout.d.ts +14 -4
  146. package/lib/types/packages/market-runtime/src/index.d.ts +12 -4
  147. package/lib/types/packages/market-runtime/src/runtime/agents/agent-role-router.d.ts +8 -1
  148. package/lib/types/packages/market-runtime/src/runtime/agents/subagent-seam.d.ts +0 -12
  149. package/lib/types/packages/market-runtime/src/runtime/agents/teammate-role-tool.d.ts +7 -0
  150. package/lib/types/packages/market-runtime/src/runtime/core/lsp-call-observation.d.ts +40 -0
  151. package/lib/types/packages/market-runtime/src/runtime/core/mount-lifecycle.d.ts +8 -0
  152. package/lib/types/packages/market-runtime/src/runtime/core/reconciler.d.ts +34 -1
  153. package/lib/types/packages/market-runtime/src/runtime/host/extension-runtime.d.ts +93 -1
  154. package/lib/types/packages/market-runtime/src/runtime/host/extension-session-state.d.ts +2 -0
  155. package/lib/types/packages/market-runtime/src/runtime/host/extension-tool-gates.d.ts +7 -0
  156. package/lib/types/packages/market-runtime/src/runtime/host/inventory-retry.d.ts +67 -0
  157. package/lib/types/packages/market-runtime/src/runtime/host/output-style-render.d.ts +7 -0
  158. package/lib/types/packages/market-runtime/src/runtime/host/output-style-section.d.ts +26 -0
  159. package/lib/types/packages/market-runtime/src/runtime/host/output-style-service.d.ts +94 -0
  160. package/lib/types/packages/market-runtime/src/runtime/host/scoped-contributors.d.ts +22 -0
  161. package/lib/types/packages/market-runtime/src/runtime/host/tab-layout-service.d.ts +11 -2
  162. package/lib/types/packages/market-runtime/src/runtime/surfaces/hook-dry-run.d.ts +0 -2
  163. package/lib/types/packages/market-runtime/src/runtime/surfaces/project-runtime.d.ts +0 -7
  164. package/lib/types/packages/market-runtime/src/runtime/surfaces/prompt-frame.d.ts +76 -0
  165. package/lib/types/packages/market-translation/src/index.d.ts +1 -0
  166. package/lib/types/packages/market-translation/src/runtime/host/auxiliary-model-call.d.ts +70 -0
  167. package/locale/en.json +1 -1
  168. package/locale/zh.json +1 -1
  169. package/package.json +71 -64
package/README.md CHANGED
@@ -67,7 +67,7 @@ Terminal alternative: `dsh plugin --profile <name> add dsh-agent-plugins-market`
67
67
  - **Ten suite layouts.** Claude Code, Codex, Cursor, Kimi Code, ZCode, Qoder CLI, GitHub Copilot CLI, Universal `.plugin/`, [agent-plugins](https://agent-plugins.org) and manifest-less skill collections.
68
68
  - **Sources and downloads.** Add a Git repository, a local directory or an archive, adopt a checkout you cloned yourself, and refresh on demand. Pick a global or China mainland mirror, and refresh every source on a 6-hour timer if you want.
69
69
  - **Runtime injection.** Enabled suites add skills to the catalog and slash menu, commands as `/name`, agent personas to the subagent catalog, MCP tools as `mcp__*`, hooks to lifecycle events, and language servers to the `lsp` tool. Installing the plugin is the whole LSP setup.
70
- - **One workspace.** Eight tabs cover the market, the instructions injected into a session, the resources you author, and the services that run. Every tab has search, filters and a grid or list view.
70
+ - **One workspace.** Nine tabs cover the market, the instructions injected into a session, the output style that shapes each answer, the resources you author, and the services that run. Every tab has search, filters and a grid or list view.
71
71
 
72
72
  ### Advanced
73
73
 
@@ -80,22 +80,23 @@ Terminal alternative: `dsh plugin --profile <name> add dsh-agent-plugins-market`
80
80
 
81
81
  ## Everyday use
82
82
 
83
- The workspace has eight tabs:
83
+ The workspace has nine tabs:
84
84
 
85
- | Tab | Use it to |
86
- | -------------- | ----------------------------------------------------------------------------------- |
87
- | Market | Add sources, preview suites, install or remove them, and switch them on or off. |
88
- | Instructions | See the AGENTS.md chain a session injects, and create, edit or delete those files. |
89
- | Skills | Browse skills and create or edit your own reusable instructions. |
90
- | Commands | Manage prompt templates invoked as `/name`. |
91
- | Agent personas | Save role instructions and model settings, then delegate to them. |
92
- | MCP services | Add a service or configure an installed one, its credentials and its authorization. |
93
- | LSP servers | Add and configure language servers, and read their runtime status. |
94
- | Hooks | Read each configured hook with its event, matcher and timeout. |
85
+ | Tab | Use it to |
86
+ | --------------- | ----------------------------------------------------------------------------------- |
87
+ | Market | Add sources, preview suites, install or remove them, and switch them on or off. |
88
+ | Skills | Browse skills and create or edit your own reusable instructions. |
89
+ | Experts | Save role instructions and model settings, then delegate to them. |
90
+ | Shortcuts | Manage prompt templates invoked as `/name`. |
91
+ | Connectors | Add a service or configure an installed one, its credentials and its authorization. |
92
+ | Language Engine | Add and configure language servers, and read their runtime status. |
93
+ | System prompt | See the AGENTS.md files injected into it, and create, edit or delete them. |
94
+ | Output styles | Choose the instruction block that shapes how the model answers. |
95
+ | Hooks | Read each configured hook with its event, matcher and timeout. |
95
96
 
96
97
  A **source** is where content comes from. A **suite** is an installable unit discovered there. Adding a source discovers its suites. Enabling a suite turns its runtime capabilities on.
97
98
 
98
- Your own content lives under `~/.agents/`: skills, commands and personas as Markdown, hooks in `hooks.json`, and the MCP and LSP services you add in `mcp.json` and `lsp.json`. The [instructions guide](https://sivan757.github.io/dsh-agent-plugins-market/docs/instructions/) explains the AGENTS.md chain the host injects and the page that edits it. Project-native resources stay in the project. See [storage and discovery](https://sivan757.github.io/dsh-agent-plugins-market/docs/resources/#storage-and-discovery).
99
+ Your own content lives under `~/.agents/`: skills, commands and personas as Markdown, hooks in `hooks.json`, and the MCP and LSP services you add in `mcp.json` and `lsp.json`. The [instructions guide](https://sivan757.github.io/dsh-agent-plugins-market/docs/instructions/) explains the AGENTS.md chain the host injects and the page that edits it, and the [output styles guide](https://sivan757.github.io/dsh-agent-plugins-market/docs/output-styles/) explains the block that shapes each answer. Project-native resources stay in the project. See [storage and discovery](https://sivan757.github.io/dsh-agent-plugins-market/docs/resources/#storage-and-discovery).
99
100
 
100
101
  ## Compatibility
101
102
 
package/README.zh.md CHANGED
@@ -67,7 +67,7 @@
67
67
  - **十种套件布局。** Claude Code、Codex、Cursor、Kimi Code、ZCode、Qoder CLI、GitHub Copilot CLI、通用 `.plugin/`、[agent-plugins](https://agent-plugins.org) 以及无清单的技能集合。
68
68
  - **来源与下载。** 添加 Git 仓库、本地目录或压缩包,也可以接管你自己克隆的检出目录并随时刷新。镜像线路可选全球或中国大陆;需要时还可以每 6 小时自动刷新全部来源。
69
69
  - **运行时注入。** 启用套件后,技能进入技能目录与斜杠菜单,命令成为 `/名称`,代理角色进入子代理目录,MCP 工具以 `mcp__*` 前缀出现,hooks 挂到宿主生命周期事件,语言服务器接入 `lsp` 工具;LSP 装上插件即完成配置。
70
- - **一个工作区。** 八个页签覆盖市场、注入会话的指令、你自己创作的内容与正在运行的服务,都支持搜索、筛选和卡片或列表视图。
70
+ - **一个工作区。** 九个页签覆盖市场、注入会话的指令、塑造每次回答的输出风格、你自己创作的内容与正在运行的服务,都支持搜索、筛选和卡片或列表视图。
71
71
 
72
72
  ### 进阶能力
73
73
 
@@ -80,22 +80,23 @@
80
80
 
81
81
  ## 日常使用
82
82
 
83
- 工作区包含八个页签:
83
+ 工作区包含九个页签:
84
84
 
85
- | 页签 | 可以做什么 |
86
- | -------- | ----------------------------------------------------------- |
87
- | 插件市场 | 添加来源、预览套件、安装或卸载,以及启用或停用。 |
88
- | 指令 | 查看会话注入的 AGENTS.md 链条,并创建、编辑或删除这些文件。 |
89
- | 技能 | 浏览技能,创建或编辑自己的可复用指令。 |
90
- | 命令 | 管理通过 `/名称` 调用的提示词模板。 |
91
- | 代理角色 | 保存角色指令与模型配置,然后委派给它们。 |
92
- | MCP 服务 | 新增服务,或配置已安装的服务及其凭据与授权。 |
93
- | LSP 服务 | 新增并配置语言服务器,查看运行状态。 |
94
- | Hooks | 查看已配置的 hook 及其事件、匹配条件与超时。 |
85
+ | 页签 | 可以做什么 |
86
+ | ---------- | ------------------------------------------------------- |
87
+ | 市场 | 添加来源、预览套件、安装或卸载,以及启用或停用。 |
88
+ | 技能 | 浏览技能,创建或编辑自己的可复用指令。 |
89
+ | 专家 | 保存角色指令与模型配置,然后委派给它们。 |
90
+ | 快捷指令 | 管理通过 `/名称` 调用的提示词模板。 |
91
+ | 连接器 | 新增服务,或配置已安装的服务及其凭据与授权。 |
92
+ | 语言引擎 | 新增并配置语言服务器,查看运行状态。 |
93
+ | 系统提示词 | 查看注入其中的 AGENTS.md 文件,并创建、编辑或删除它们。 |
94
+ | 输出风格 | 选择塑造模型回答方式的指令文本。 |
95
+ | 钩子 | 查看已配置的 hook 及其事件、匹配条件与超时。 |
95
96
 
96
97
  **来源(source)**表示内容来自哪里,**套件(suite)**是从中发现的可安装单元。添加来源用于发现套件,启用套件决定其运行时能力是否生效。
97
98
 
98
- 你自己创作的内容都放在 `~/.agents/` 下:技能、命令和角色是 Markdown 文件,hooks 放在 `hooks.json`,工作区里新增的 MCP 与 LSP 服务分别保存在 `mcp.json` 与 `lsp.json`。[指令指南](https://sivan757.github.io/dsh-agent-plugins-market/docs/zh/instructions/)说明宿主注入的 AGENTS.md 链条与编辑它的页面。项目原生资源继续保留在项目中。路径与优先级见[存储与发现](https://sivan757.github.io/dsh-agent-plugins-market/docs/zh/resources/#存储与发现)。
99
+ 你自己创作的内容都放在 `~/.agents/` 下:技能、命令和角色是 Markdown 文件,hooks 放在 `hooks.json`,工作区里新增的 MCP 与 LSP 服务分别保存在 `mcp.json` 与 `lsp.json`。[指令指南](https://sivan757.github.io/dsh-agent-plugins-market/docs/zh/instructions/)说明宿主注入的 AGENTS.md 链条与编辑它的页面,[输出风格指南](https://sivan757.github.io/dsh-agent-plugins-market/docs/zh/output-styles/)说明塑造每次回答的那段文本。项目原生资源继续保留在项目中。路径与优先级见[存储与发现](https://sivan757.github.io/dsh-agent-plugins-market/docs/zh/resources/#存储与发现)。
99
100
 
100
101
  ## 兼容性
101
102