新增: 应用内版本更新与自动升级全链路
后端 update.rs: app_check_update(拉 latest.json+ed25519 签名校验) / app_download_install_update / prefs 读写 / mark_checked / mark_notified 五命令, lib.rs 注册;tauri.conf updater 段(endpoints=app.1216.top/download/devflow/latest.json + pubkey + createUpdaterArtifacts) + tauri-plugin-updater 依赖 + capabilities 权限。 前端 UpdateBadge.vue(顶栏徽章+下拉) / useUpdateCheck.ts(检查/下载/安装状态机) / AboutPanel.vue(设置页关于面板) + AppLayout 接线 + SettingsNav/searchIndex 索引 + i18n zh/en settings 键。 运维 scripts/publish-release.ps1(发版) + swap-install.ps1(换装校验) + 设计文档 版本更新与自动升级-设计-2026-10-09.md。 验收: cargo check -p devflow EXIT 0 + vue-tsc EXIT 0 + build EXIT 0。
This commit is contained in:
@@ -42,6 +42,8 @@ pub fn run() {
|
||||
.plugin(tauri_plugin_window_state::Builder::default().build())
|
||||
// P1 bg 化:系统通知插件(Rust 侧 notify.rs 条件发送:主窗可见聚焦不发 + 同类节流 + 失败静默)
|
||||
.plugin(tauri_plugin_notification::init())
|
||||
// B2 应用内升级:tauri-plugin-updater(内建 ed25519 签名校验;端点/pubkey 见 tauri.conf.json plugins.updater)
|
||||
.plugin(tauri_plugin_updater::Builder::new().build())
|
||||
// Phase3 单实例:二次启动不新开进程,唤起已有实例主窗口(防多实例抢 MCP 18765 端口)
|
||||
.plugin(tauri_plugin_single_instance::init(|app, _args, _cwd| {
|
||||
tray::show_main(app);
|
||||
@@ -545,6 +547,8 @@ pub fn run() {
|
||||
commands::ai::audit::record::list_task_conversations,
|
||||
// AC-5 按工具失败率统计(诊断 IPC,聚合 ai_tool_executions 覆盖全量/时间范围)
|
||||
commands::ai::audit::record::tool_failure_stats,
|
||||
// D2a 外置工具结果读回(审计面板遇句柄按 path 读原文全文)
|
||||
commands::ai::audit::record::ai_read_offloaded_result,
|
||||
// 知识库
|
||||
commands::knowledge::knowledge_list,
|
||||
commands::knowledge::knowledge_get,
|
||||
@@ -567,6 +571,16 @@ pub fn run() {
|
||||
commands::settings::settings_get_all,
|
||||
commands::settings::settings_delete,
|
||||
commands::settings::get_data_dir,
|
||||
// 应用版本号(编译期注入,关于页/更新检查消费)
|
||||
commands::settings::app_get_version,
|
||||
// B2 应用内升级:检查更新 + 自动检查偏好 KV
|
||||
commands::update::app_check_update,
|
||||
commands::update::app_update_get_prefs,
|
||||
commands::update::app_update_set_prefs,
|
||||
commands::update::app_update_mark_checked,
|
||||
commands::update::app_update_mark_notified,
|
||||
// B3 应用内升级:下载安装(进度事件 + 成功重启)
|
||||
commands::update::app_download_install_update,
|
||||
// 审批超时配置(默认 15 分钟,0=禁用;Settings 页可改)
|
||||
commands::settings::ai_get_approval_timeout,
|
||||
commands::settings::ai_set_approval_timeout,
|
||||
|
||||
Reference in New Issue
Block a user