# deepseek-plugin — 在 dsh 里直接浏览 deepseek-plugin.org

[English](./README.md)

一个 [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness)（dsh）插件，把 [deepseek-plugin.org](https://deepseek-plugin.org) 插件市场接进你的 Agent —— 8,000+ 社区插件目录、AI 百科详情页、Star 排名、可直接执行的安装命令，全部在对话里完成。

插件同时提供两个半边：

- **Agent 工具** — 搜索 / 读百科 / 打开页面，任何对话里都能让 Agent 调用
- **Web 界面** — dsh web 设置面板里的「插件目录」专区：关键词搜索、分类筛选、按 Star 排序的结果列表（一键复制安装命令）、内置百科阅读器、以及"在浏览器打开"直达本站详情页

## 安装

```bash
dsh plugin --profile web add deepseek-plugin
```

重启 dsh 生效（`Ctrl + C` 停止，再 `dsh web` 启动）。打开 Web UI 的 **设置 → 插件目录** 即可看到界面。

## 工具

| 工具 | 作用 |
|---|---|
| `search_plugins` | 按关键词（可选分类）搜索插件目录，返回简介、Star 数、`dsh plugin add` 安装命令 |
| `read_plugin_page` | 读取插件详情页完整内容（llms.txt markdown：元数据 + 安装命令 + AI 百科） |
| `open_plugin_page` | 用系统默认浏览器打开插件详情页（或带搜索词的目录页） |

## 对话示例

- "找一下有没有微信通知类的 dsh 插件" → Agent 调 `search_plugins`，列出候选和安装命令
- "open-design 这个插件具体能干什么？" → `read_plugin_page` 拉 AI 百科全文，不用开浏览器
- "帮我打开这个插件的详情页看看 README" → `open_plugin_page` 在浏览器打开本站详情页

## 配置（可选）

在 `cordis.yml` 里覆盖：

```yaml
- id: deepseek-plugin
  name: 'deepseek-plugin'
  config:
    siteOrigin: 'https://deepseek-plugin.org'  # 自部署镜像时改这里
    lang: 'zh'                                 # 默认语言（'en' | 'zh'）
```

## 说明

- 只读插件：不写 profile、不写文件；唯一副作用是按你的要求打开浏览器标签页。
- SSH / 无桌面环境下 `open_plugin_page` 仍会返回纯 URL，可手动打开。
- 依赖 dsh 的 `tools` 服务（`inject: ['tools']`）；卸载时所有注册自动清理。

## 开发

```bash
npm install
npm run check   # 类型检查 + 构建
```

源码在 deepseek-plugin.org 仓库的 [plugins/deepseek-plugin](https://github.com/junbaor/deepseek-plugin.org/tree/main/plugins/deepseek-plugin) 目录。

## 许可

MIT
