# DSH Tools Plugins [English](README.md) | 中文 [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness)(`dsh`)工具集成插件组合包,为 Agent 增加实用工具能力。安装到 profile 后即可扩展工具目录。 ## 包含的插件 | 插件 | 工具 | 分类 | | --- | --- | --- | | **prompt-enhancer** | `optimize_prompt` | 工具集成 / Agent 增强 | `optimize_prompt` 会将简短或模糊的指令改写为结构化 Prompt(角色、任务、约束、输出格式),默认使用 profile 配置的 LLM。 ## 安装 ```sh dsh plugin --profile web add github:lizhi00001/dsh-tools-plugins ``` 本地开发安装: ```sh dsh plugin --profile web add /path/to/dsh-tools-plugins ``` 安装后需重启 `dsh`。 ### Git 安装与构建脚本 本包以 TypeScript 源码发布,通过 `prepare` 脚本在安装时构建。若 pnpm 阻止 lifecycle 脚本,请在 profile 的 `pnpm-workspace.yaml` 中添加: ```yaml allowBuilds: dsh-tools-plugins: true ``` 然后重新执行 `add`。 ## 使用 安装后在 Web UI 中对 Agent 说: ```text 请用 optimize_prompt 优化这句话:「帮我写周报」 ``` Agent 也可以在检测到模糊指令时自动调用该工具。 ## 配置 可在 profile 的 `cordis.patch.yml` 中覆盖插件配置: ```yaml - id: dsh-prompt-enhancer config: provider: deepseek model: deepseek-chat maxTokens: 1200 ``` 省略 `provider` 和 `model` 时将使用 profile 默认模型。 ## 插件生态收录 要在 [DSH 插件生态](https://github.com/topics/dsh-plugin) 中被发现: 1. `package.json` 中声明 `dsh.bundle.patch`(必需)。 2. 为 GitHub 仓库添加 **`dsh-plugin`** 话题。 3. 可选的展示元数据位于 `package.json` 的 `dsh.market` 字段。 ## 开发 需要 Node `^22.19 || >=24` 和 pnpm。 ```sh pnpm install pnpm run build pnpm run typecheck ``` 本地测试: ```sh dsh plugin --profile web add . dsh --profile web --dump-config ``` ## 许可证 MIT — 见 [LICENSE](LICENSE)。