Add Batch Install Plugins from GitHub tool with: - One-click installation of plugins from GitHub repositories - Smart plugin discovery with metadata extraction and validation - Confirmation dialog with plugin list preview - Selective installation with keyword-based filtering - Smart fallback: auto-retry with localhost:8080 on connection failure - Enhanced debugging with frontend and backend logging - 120-second confirmation timeout for user convenience - Async httpx client for non-blocking I/O - Complete i18n support across 11 languages - Event emitter handling with fallback support - Timeout guards on frontend JavaScript execution - Filtered list consistency for confirmation and installation - Auto-exclusion of tool itself from batch operations - 6 regression tests with 100% pass rate Documentation includes: - English and Chinese READMEs with flow diagrams - Popular repository examples (iChristGit, Haervwe, Classic298, suurt8ll) - Mirrored docs for official documentation site - Plugin index entries in both languages - Comprehensive release notes (v1.0.0.md and v1.0.0_CN.md) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2.9 KiB
2.9 KiB
概述
从 GitHub 批量安装插件是一款全新的 OpenWebUI 工具,支持直接从 GitHub 仓库一键安装多个插件。此首个发布版本包含了全面的插件发现、过滤和安装功能,支持用户确认流程、广泛的多语言支持,以及针对容器部署的健壮调试能力。
主要功能
- 一键安装:通过单个命令安装仓库中的所有插件
- 智能插件发现:解析 Python 文件提取元数据并自动验证插件
- 多类型支持:在单个操作中支持 Pipe、Action、Filter 和 Tool 插件
- 确认对话框:安装前显示插件列表供用户审查和批准
- 选择性安装:通过基于关键词的过滤排除特定插件
- 智能降级:容器环境中主 URL 连接失败时自动重试 localhost:8080
- 增强调试:前端 JavaScript 和后端 Python 富日志输出,便于排查问题
- 延长超时:120 秒确认窗口,给用户充分的思考时间
- 异步架构:非阻塞 I/O 操作,性能更优
- 完整国际化:支持 11 种语言,包含适当的回退机制
- 自动更新:自动更新之前安装过的插件
- 自排除机制:自动排除工具自身,避免在批量操作中重复安装
技术亮点
- httpx 集成:现代化的异步 HTTP 客户端,请求更可靠且非阻塞
- 事件注入支持:正确处理 OpenWebUI 事件注入,提供回退支持
- 超时保护:前端执行周围包装了超时保护,防止进程挂起
- 过滤列表一致性:确认和安装使用同一份过滤列表
- 错误本地化:所有错误消息都是面向用户的,已正确本地化到各语言
- 部署弹性:智能 Base URL 解析处理域名、localhost 和容器化环境
支持的仓库
- 默认:Fu-Jie/openwebui-extensions(严格验证)
- 自定义:任意 GitHub 仓库中的 Python 插件文件
测试覆盖
包含全面的回归测试:
- 过滤安装列表一致性
- 缺少事件注入器时的处理
- 确认超时验证
- 完全失败场景
- 本地化完整性
- 连接错误调试日志和智能降级
所有 6 个测试均通过。
文档
- 英文 README,包含流程图和使用示例
- 中文 README (README_CN.md),完整翻译
- 官方文档站点的镜像文档
- 英文和中文的插件索引条目
兼容性
- OpenWebUI:0.2.x - 0.8.x
- Python:3.9+
- 依赖:httpx(异步 HTTP 客户端)、pydantic(类型验证)
发布说明
- 本首发 v1.0.0 版本包含完整的插件基础设施和智能部署处理能力。
- 该插件设计用于处理多种部署场景(域名、localhost、容器化),配置最少。