Metadata-Version: 2.4
Name: ErisPulse-AdapterConfig
Version: 1.0.0
Summary: ErisPulse Dashboard adapter configuration module
Author: ErisPulse
License: MIT
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: ErisPulse>=2.0.0

# ErisPulse-AdapterConfig

[ErisPulse](https://github.com/ErisPulse/ErisPulse) Dashboard 的适配器配置扩展模块，提供可视化的适配器配置界面，支持快速配置各类适配器参数。

## 功能

- 在 Dashboard 中以可视化表单管理适配器配置
- 自动发现已注册的适配器并匹配对应 Schema
- 支持多账号适配器的账号管理（添加/删除/切换）
- 保存配置后一键重启适配器使配置生效
- 支持 flat / multi_account 两种配置结构
- 中英双语界面

## 支持的适配器

| Schema Key | 适配器 | 类型 |
|---|---|---|
| yunhu | 云湖 | 多账号 |
| yunhu_user | 云湖（用户） | 多账号 |
| telegram | Telegram | flat |
| onebot | OneBot v11 | 多账号 |
| onebot12 | OneBot v12 | 多账号 |
| mail | 邮件 | 多账号 |
| kook | Kook | flat |
| matrix | Matrix | flat |
| qqbot | QQ 机器人 | flat |
| ideaura | 花枫咖啡馆 | 多账号 |
| sandbox | 沙箱 | flat |

## 安装

```bash
pip install ErisPulse-AdapterConfig
```

无任何主动功能，仅为 Dashboard 模块提供view 和 API。

## 使用

安装后模块通过 entry-point 自动注册，无需手动配置。启动 ErisPulse 后在 Dashboard 侧边栏的「工具」分组中即可看到「适配器配置」页面。

## API

模块注册了以下 HTTP 接口（需 Dashboard Token 认证）：

| 方法 | 路径 | 说明 |
|---|---|---|
| GET | `/AdapterConfig/api/schema` | 获取所有适配器列表及 Schema |
| GET | `/AdapterConfig/api/config/{platform}` | 获取指定适配器当前配置 |
| PUT | `/AdapterConfig/api/config/{platform}` | 保存指定适配器配置 |
| POST | `/AdapterConfig/api/restart/{platform}` | 重启指定适配器 |

## 项目结构

```
AdapterConfig/
├── __init__.py          # 模块入口
├── Core.py              # 主逻辑：路由注册、Dashboard 视图注册
├── schemas.py           # 适配器 Schema 定义及匹配逻辑
└── templates/
    ├── view.html        # 页面模板
    ├── view.js          # 前端交互逻辑
    └── view.css         # 样式
```

## License

MIT
