服务器插件
entari-plugin-server 属于官方插件,允许你在插件启动一个 ASGI 服务,并运行 Satori 服务器,以供 Entari 本体连接,并配合使用适配器。
安装
bash
pdm add entari-plugin-serverbash
uv add entari-plugin-serverbash
pip install entari-plugin-server适配器
entari-plugin-server 支持加载适配器,适配器用于将不同的协议转换为 Satori 协议,从而使 Entari 能够与更多的服务进行交互。
适配器需要单独安装,安装后即可在配置文件中使用。
若 direct_adapter 配置为 true,则表示 Entari 将直接使用适配器进行通信,而不经过 Satori 服务器。此时你不需要声明基础配置的 network 字段。
Satori适配器
安装:
bash
pdm add satori-python-adapter-satoribash
uv add satori-python-adapter-satoribash
pip install satori-python-adapter-satori路径($path): @satori
配置:
host: 对接的 Satori Server 的地址,默认为localhostport: 对接的 Satori Server 的端口,默认为5140path: 对接的 Satori Server 的路径,默认为""token: 对接的 Satori Server 的访问令牌,默认为空post_update: 是否接管资源上传接口,默认为False
OneBot V11适配器
安装:
bash
pdm add satori-python-adapter-onebot11bash
uv add satori-python-adapter-onebot11bash
pip install satori-python-adapter-onebot11路径($path): @onebot11.forward 或 @onebot11.reverse (正向或反向适配器)
配置(正向):
endpoint: 连接 OneBot V11协议端的路径access_token: OneBot V11协议的访问令牌, 默认为空
配置(反向):
prefix: 反向适配器于 Server 的路径前缀, 默认为/path: 反向适配器于 Server 的路径, 默认为onebot/v11endpoint: 反向适配器于 Server 的路径端点, 默认为ws(完整路径即为/onebot/v11/ws)access_token: 反向适配器的访问令牌, 默认为空
Console适配器
安装:
bash
pdm add satori-python-adapter-consolebash
uv add satori-python-adapter-consolebash
pip install satori-python-adapter-console路径($path): @console
配置:参考 ConsoleSetting
Lagrange适配器
安装:
bash
pdm add nekoboxbash
uv add nekoboxbash
pip install nekobox路径($path): nekobox.main
配置:
uin: 登录的QQ号sign_url: 签名服务器的URLprotocol: 使用的协议类型,默认为linux,可选值为linux,macos,windows,remotelog_level: 日志级别,默认为INFOuse_png: 登录二维码是否保存为PNG图片,默认为False