From d2938478f45bc29be5aadf937f29c0b2b18c1362 Mon Sep 17 00:00:00 2001 From: t8y2 <1156263951@qq.com> Date: Tue, 19 May 2026 14:52:24 +0800 Subject: [PATCH] fix(agent): defer driver version gate --- crates/dbx-web/src/routes/agents.rs | 6 ++---- src-tauri/src/commands/agents.rs | 6 ++---- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/crates/dbx-web/src/routes/agents.rs b/crates/dbx-web/src/routes/agents.rs index e4b4eb5396..5bf22ff889 100644 --- a/crates/dbx-web/src/routes/agents.rs +++ b/crates/dbx-web/src/routes/agents.rs @@ -8,8 +8,8 @@ use dbx_core::agent_manager::{ DEFAULT_JRE_KEY, }; use dbx_core::agent_service::{ - build_agent_list, download_temp_path, ensure_driver_app_version, fetch_registry, find_local_agent_jar, - github_url_to_r2_path, install_local_agent, invalidate_registry_cache, verify_and_replace_download, + build_agent_list, download_temp_path, fetch_registry, find_local_agent_jar, github_url_to_r2_path, + install_local_agent, invalidate_registry_cache, verify_and_replace_download, }; use futures::Stream; use serde::Deserialize; @@ -215,8 +215,6 @@ async fn install_agent_from_registry( } return Err(format!("Unknown driver type: {db_type}")); }; - ensure_driver_app_version(db_type, driver, env!("CARGO_PKG_VERSION"))?; - let jre_key = &driver.jre; let needs_jre = am.load_state().java_runtime.mode == JavaRuntimeMode::Managed && !am.is_jre_installed(jre_key); if needs_jre { diff --git a/src-tauri/src/commands/agents.rs b/src-tauri/src/commands/agents.rs index 9f8f4a4c5c..c3ec0a372b 100644 --- a/src-tauri/src/commands/agents.rs +++ b/src-tauri/src/commands/agents.rs @@ -6,8 +6,8 @@ use dbx_core::agent_manager::{ AgentDriverInfo, AgentManager, InstalledDriver, JavaRuntimeConfig, JavaRuntimeMode, DEFAULT_JRE_KEY, }; use dbx_core::agent_service::{ - build_agent_list, download_temp_path, ensure_driver_app_version, fetch_registry, find_local_agent_jar, - github_url_to_r2_path, install_local_agent, invalidate_registry_cache, verify_and_replace_download, + build_agent_list, download_temp_path, fetch_registry, find_local_agent_jar, github_url_to_r2_path, + install_local_agent, invalidate_registry_cache, verify_and_replace_download, }; use dbx_core::connection::AppState; @@ -49,7 +49,6 @@ pub async fn install_agent( } return Err(format!("Unknown driver type: {db_type}")); }; - ensure_driver_app_version(&db_type, driver, env!("CARGO_PKG_VERSION"))?; let jre_key = &driver.jre; let needs_jre = am.load_state().java_runtime.mode == JavaRuntimeMode::Managed && !am.is_jre_installed(jre_key); @@ -138,7 +137,6 @@ pub async fn upgrade_all_agents(app: tauri::AppHandle, state: State<'_, Arc