feat: 更新服务 — ZIP下载/备份/回滚/重启
UpdateService:
- 分支感知: 从 base_config 读取 branch, 拼接 archive/{branch}.zip
- 定时检查: 每6h 拉取 version.json 比对版本
- 更新前自动打包备份 (zip, 保留最新5个)
- 保护用户配置: base_config.yaml / plugins/*/config.yaml / data/
- 子进程 pip install 依赖
API:
- GET /api/updates — 更新状态
- POST /api/updates/check — 手动检查
- POST /api/updates/apply — 执行更新
回滚:
- python main.py --rollback — 恢复到最新备份
- 无备份时提示
重启:
- .restart_flag 信号文件 → 优雅退出 → systemd 拉起
Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -101,7 +101,7 @@ commands:
|
||||
permissions:
|
||||
- framework.command.test
|
||||
source: internal
|
||||
last_updated: 29386.77279457
|
||||
last_updated: 35916.559043798
|
||||
plugin_commands:
|
||||
example_plugin:
|
||||
echo: *id001
|
||||
|
||||
Reference in New Issue
Block a user