From 8c939a02e1cb3ebe436b94d3e9c40affcd160f71 Mon Sep 17 00:00:00 2001 From: t8y2 <1156263951@qq.com> Date: Fri, 11 Sep 2026 20:13:49 +0800 Subject: [PATCH] fix(plugins): complete runtime wiring and trust release store key --- crates/dbx-core/src/connection.rs | 5 +++-- crates/dbx-core/src/plugins/marketplace.rs | 2 +- src-tauri/src/lib.rs | 1 + 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/crates/dbx-core/src/connection.rs b/crates/dbx-core/src/connection.rs index b3c7ab7e85..c16a3e6e8b 100644 --- a/crates/dbx-core/src/connection.rs +++ b/crates/dbx-core/src/connection.rs @@ -1347,6 +1347,7 @@ impl AppState { app_version: impl Into, ) -> Self { let data_dir = storage.data_dir().to_path_buf(); + let app_version = app_version.into(); Self { connections: Arc::new(RwLock::new(ConnectionPoolRegistry::new())), task_supervisor: TaskSupervisor::new(), @@ -1359,8 +1360,8 @@ impl AppState { proxy_tunnels: ProxyTunnelManager::new(), http_tunnels: HttpTunnelManager::new(), storage, - plugins: PluginRegistry::new(plugin_dir.clone()), - plugin_host: PluginHost::new(PluginRegistry::new(plugin_dir)), + plugins: PluginRegistry::new_with_app_version(plugin_dir.clone(), app_version.clone()), + plugin_host: PluginHost::new(PluginRegistry::new_with_app_version(plugin_dir, app_version.clone())), agent_manager: crate::agent_manager::AgentManager::new_with_base_dir_and_app_version( agent_dir, app_version, diff --git a/crates/dbx-core/src/plugins/marketplace.rs b/crates/dbx-core/src/plugins/marketplace.rs index 7bfb7ec7ec..a457a1e599 100644 --- a/crates/dbx-core/src/plugins/marketplace.rs +++ b/crates/dbx-core/src/plugins/marketplace.rs @@ -30,7 +30,7 @@ const OFFICIAL_CATALOG_URL: &str = "https://raw.githubusercontent.com/t8y2/dbx-s const ADDITIONAL_OFFICIAL_TRUSTED_KEYS_JSON: Option<&str> = option_env!("DBX_PLUGIN_MARKETPLACE_TRUSTED_KEYS_JSON"); const BUILTIN_OFFICIAL_TRUSTED_KEYS: &[(&str, &str)] = &[ ("dbx-store-preview-2026", "VRb0VscZfWwuFa7LYfeD/wEOJeyNP8wPGND9br8Icmk="), - ("dbx-store-release-2026", "9Ew1pCeGfTzg2Ltiqw7siiQlLsR+HK1MGqwsSVSC8ng"), + ("dbx-store-release-2026", "9Ew1pCeGfTzg2Ltiqw7siiQlLsR+HK1MGqwsSVSC8ng="), ]; #[derive(Debug, Clone, Copy, Serialize, Deserialize, PartialEq, Eq)] diff --git a/src-tauri/src/lib.rs b/src-tauri/src/lib.rs index 09ca554f53..e8d94383fc 100644 --- a/src-tauri/src/lib.rs +++ b/src-tauri/src/lib.rs @@ -1604,6 +1604,7 @@ pub fn run() { })); let state = Arc::new(state); app.manage(state.clone()); + commands::plugins::install_plugin_event_bridge(app.handle(), state.clone()); let mcp_http_server = Arc::new(commands::mcp_http_server::McpHttpServerState::new(data_dir.clone())); app.manage(mcp_http_server.clone()); let mcp_http_state = state.clone();