Skip to content

DeepSeek Harness Tauri 桌面版 | Only 8mb installer, zero environment setup, preset plugins, Windows / macOS / Linux.

fix: cap preset plugin automatic removal by installed version

hairyfdd9ba1573e6a
diff --git a/src-tauri/resources/README.md b/src-tauri/resources/README.md
index 3a4c2cf1..8441d71d 100644
--- a/src-tauri/resources/README.md
+++ b/src-tauri/resources/README.md
@@ -69,6 +69,8 @@ that adds one entry to the JSON array:
| ------------- | -------- | ----------------------------------------------------------------------- |
| `id` | yes | Unique front-end key; must be a legal npm dependency name |
| `spec` | yes | Dependency form passed to `dsh plugin add` (npm name or `github:owner/repo`) |
+| `version` | no | Inclusive installed-plugin version cap for core-driven automatic removal; not an installation pin |
+| `dshSupportedVersion` | no | Highest supported core version; a newer core disables the preset in the UI and makes it eligible for automatic cleanup |
| `name` | yes | Display name |
| `description` | yes | Shown in the wizard; bilingual (`en. · 中文`) is encouraged |
| `repoUrl` | yes | Repository page, opened via the "open repo" button |
@@ -81,6 +83,20 @@ that adds one entry to the JSON array:
this repository — it is installed on the user's machine from `spec` at setup
time, so the PR only needs to add the JSON entry.
+### Core-driven automatic removal
+
+When the running core is newer than `dshSupportedVersion`, startup cleanup can
+remove the installed plugin. An optional `version` limits this cleanup to installed
+versions **less than or equal to** that cap, using semantic-version precedence.
+Higher installed versions are kept. If a cap is present but the installed version
+is unknown or invalid, or the cap itself is invalid, core-driven cleanup is skipped.
+Omitting `version` retains the previous uncapped cleanup behavior.
+
+`version` is metadata for automatic removal, **not** an installation pin: installation
+still uses `spec`. It does not change the core-based UI compatibility check or manual
+uninstall. The separate `deprecated-plugins.json` list is unaffected and continues
+to remove listed plugins independently of these version caps.
+
### Built-in (internal) plugins
Plugins that must ship *with* the installer and are treated as part of the app
diff --git a/src-tauri/resources/preset-plugins.json b/src-tauri/resources/preset-plugins.json
index cb6a2268..417bd157 100644
--- a/src-tauri/resources/preset-plugins.json
+++ b/src-tauri/resources/preset-plugins.json
@@ -3,15 +3,17 @@
{
"id": "dshmarket",
"spec": "dshmarket",
+ "version": "1.58.0",
"name": "DSH Market",
"description": "Visual plugin market inside DeepSeek Harness — browse, search, and one-click install community plugins.",
"repoUrl": "https://github.com/dsh-market/dsh-market",
"recommended": true,
- "dshSupportedVersion": "0.1.5-rc.2"
+ "dshSupportedVersion": "0.1.7"
},
{
"id": "dsh-better-sidebar",
"spec": "dsh-better-sidebar",
+ "version": "0.19.1",
"name": "DSH Better Sidebar",
"description": "A VSCode-like right sidebar (explorer / editor / terminal / git / browser), isolated per conversation session. Exposes a service for other plugins to register sidebar tabs and file viewers.",
"repoUrl": "https://github.com/omdsh-dev/DSH-better-sidebar",
@@ -21,6 +23,7 @@
{
"id": "dsh-rewind-plugin",
"spec": "dsh-rewind-plugin",
+ "version": "0.12.2",
"name": "DSH Rewind",
"description": "In-window conversation rewind that never forks a new session, with a lightweight workspace backup that restores files together with the rewind.",
"repoUrl": "https://github.com/SiriLee/dsh-rewind",
@@ -30,6 +33,7 @@
{
"id": "@xmanrui/dsh-im",
"spec": "@xmanrui/dsh-im",
+ "version": "4.25.0",
"name": "DSH IM",
"description": "Connect IM channels (WeChat, Feishu, DingTalk, WeCom, QQ, Slack, Telegram, Discord, WhatsApp, iMessage and more) plus a public AI Office to a local DeepSeek Harness, with bot management in the desktop sidebar.",
"repoUrl": "https://github.com/xmanrui/dsh-im",
diff --git a/src-tauri/src/service/plugin/install/single.rs b/src-tauri/src/service/plugin/install/single.rs
index 56e2fb29..dfd8a1d7 100644
--- a/src-tauri/src/service/plugin/install/single.rs
+++ b/src-tauri/src/service/plugin/install/single.rs
@@ -163,19 +163,34 @@ fn deprecated_installed_names(
deprecated_ids: &HashSet<String>,
unsupported_ids: &HashSet<String>,
installed: impl Fn(&str) -> bool,
+ installed_version: impl Fn(&str) -> Option<String>,
) -> Vec<String> {
let mut names: Vec<String> = presets
.iter()
.filter(|p| {
- // 内置插件由启动自愈强制安装:只有「核心已超越其 dshSupportedVersion」这种
- // 确定性退役才卸载;仅凭弃用清单卸载会与自愈互相拉扯。
- let targeted = if p.internal {
- unsupported_ids.contains(&p.id)
+ let name = installed_name(p);
+ if !installed(name) {
+ return false;
}
- else {
- deprecated_ids.contains(&p.id) || unsupported_ids.contains(&p.id)
+ if !p.internal && deprecated_ids.contains(&p.id) {
+ return true;
+ }
+ if !unsupported_ids.contains(&p.id) {
+ return false;
+ }
+ let Some(limit) = p.version.as_deref() else {
+ return true;
+ };
+ let Some(actual) = installed_version(name) else {
+ return false;
};
- targeted && installed(installed_name(p))
+ match (
+ semver::Version::parse(&actual),
+ semver::Version::parse(limit),
+ ) {
+ (Ok(actual), Ok(limit)) => !actual.cmp_precedence(&limit).is_gt(),
+ _ => false,
+ }
})
.map(|p| installed_name(p).to_string())
.collect();
@@ -203,25 +218,9 @@ fn deprecated_residue_present(app_handle: &AppHandle, name: &str) -> bool {
.is_ok()
}
-/// 启动时自动卸载弃用清单(`resources/deprecated-plugins.json`)登记的插件,
-/// 以及当前核心已高于其 `dshSupportedVersion` 的插件(预设与内置同等对待:内置
-/// 插件同样可能被核心吸收,从而在某个核心版本之后由官方自带)。
-///
-/// 弃用是发布侧决策:某个插件下架/被替换后,把它的 id 追加进弃用清单,桌面端
-/// 每次启动核对「已安装 → 自动卸载」,无需用户手动处理,也避免残留插件继续在
-/// profile 里加载破坏启动。清单是唯一依据:条目已从预设清单整体删除时(被并入
-/// 核心、从随包清单移除)同样按 id 卸载,这是升级残留的兜底。未安装(清单未引用
-/// 且 `node_modules` 无入口)的条目跳过,绝不误伤其它插件。
-///
-/// 启动阶段走离线精准卸载(`uninstall_recovery`):不依赖 node/pnpm/窗口,即使
-/// 插件产物已损坏也能移除,也不会触发服务停止或 pnpm 下载。最佳努力:任何失败
-/// 只记告警,不阻断启动(调用方仅打日志)。
pub(crate) async fn uninstall_deprecated_plugins(app_handle: &AppHandle) -> Result<(), String> {
let presets = load_presets(app_handle);
let core_version = core::active_version(app_handle);
- // 弃用清单之外,当前核心已高于 `dshSupportedVersion` 的插件同样自动卸载:
- // 这些插件只在旧核心上验证过,升级核心后留在 profile 里只会拖垮启动。内置条目
- // 也走这条判定——被核心吸收的插件属于确定性退役,自愈同样不再装回。
let deprecated_ids = load_deprecated_ids(app_handle);
let mut unsupported_ids: HashSet<String> = HashSet::new();
for preset in &presets {
@@ -229,9 +228,14 @@ pub(crate) async fn uninstall_deprecated_plugins(app_handle: &AppHandle) -> Resu
unsupported_ids.insert(preset.id.clone());
}
}
- let names = deprecated_installed_names(&presets, &deprecated_ids, &unsupported_ids, |name| {
- deprecated_residue_present(app_handle, name)
- });
+ let profile = profile_dir(app_handle);
+ let names = deprecated_installed_names(
+ &presets,
+ &deprecated_ids,
+ &unsupported_ids,
+ |name| deprecated_residue_present(app_handle, name),
+ |name| installed_package_version(&profile, name),
+ );
if names.is_empty() {
return Ok(());
}
@@ -429,7 +433,7 @@ mod tests {
ids: &HashSet<String>,
installed: impl Fn(&str) -> bool,
) -> Vec<String> {
- deprecated_installed_names(presets, ids, &HashSet::new(), installed)
+ deprecated_installed_names(presets, ids, &HashSet::new(), installed, |_| None)
}
/// 内置插件被核心吸收后同样退役:只靠 `dshSupportedVersion` 判定,弃用清单不参与。
@@ -438,8 +442,13 @@ mod tests {
let internal = preset("dsh-internal", "[email protected]", true);
let unsupported: HashSet<String> = ["dsh-internal"].into_iter().map(String::from).collect();
assert_eq!(
- deprecated_installed_names(&[internal], &HashSet::new(), &unsupported, |name| name
- == "dsh-internal"),
+ deprecated_installed_names(
+ &[internal],
+ &HashSet::new(),
+ &unsupported,
+ |name| name == "dsh-internal",
+ |_| None,
+ ),
vec!["dsh-internal".to_string()]
);
}
@@ -457,11 +466,109 @@ mod tests {
default_checked: false,
default_unchecked: false,
dsh_supported_version: None,
+ version: None,
win_only: false,
internal,
}
}
+ #[test]
+ fn unsupported_cleanup_respects_installed_version_cap() {
+ for (cap, actual, remove) in [
+ (Some("1.2.0"), Some("1.1.9"), true),
+ (Some("1.2.0"), Some("1.2.0"), true),
+ (Some("1.2.0"), Some("1.2.1"), false),
+ (Some("1.2.0"), Some("1.10.0"), false),
+ (Some("1.2.0"), Some("1.2.0-rc.2"), true),
+ (Some("1.2.0-rc.2"), Some("1.2.0-rc.10"), false),
+ (Some("1.2.0-rc.2"), Some("1.2.0"), false),
+ (Some("1.2.0"), Some("1.2.0+reinstalled"), true),
+ (Some("1.2.0+original"), Some("1.2.0+rebuilt"), true),
+ (Some("1.2.0"), None, false),
+ (Some("1.2.0"), Some("invalid"), false),
+ (Some("invalid"), Some("1.2.0"), false),
+ (Some(""), Some("1.2.0"), false),
+ (None, Some("9.0.0"), true),
+ (None, None, true),
+ ] {
+ let mut entry = preset("probe", "@scope/probe", false);
+ entry.package = Some("@scope/probe".into());
+ entry.version = cap.map(String::from);
+ entry.dsh_supported_version = Some("0.1.7".into());
+ for core in [
+ None,
+ Some("invalid"),
+ Some("0.1.6"),
+ Some("0.1.7"),
+ Some("0.1.8"),
+ ] {
+ let unsupported = if entry.unsupported_on(core) {
+ HashSet::from([entry.id.clone()])
+ } else {
+ HashSet::new()
+ };
+ let names = deprecated_installed_names(
+ &[entry.clone()],
+ &HashSet::new(),
+ &unsupported,
+ |name| name == "@scope/probe",
+ |name| {
+ assert_eq!(name, "@scope/probe");
+ actual.map(String::from)
+ },
+ );
+ let expected = if remove && core == Some("0.1.8") {
+ vec!["@scope/probe".to_string()]
+ } else {
+ Vec::new()
+ };
+ assert_eq!(
+ names, expected,
+ "core={core:?}, cap={cap:?}, actual={actual:?}"
+ );
+ }
+ }
+ }
+
+ #[test]
+ fn explicit_deprecation_still_removes_versions_above_cap() {
+ let mut entry = preset("probe", "probe", false);
+ entry.version = Some("1.2.0".into());
+ let ids = HashSet::from(["probe".to_string()]);
+ assert_eq!(
+ deprecated_installed_names(&[entry], &ids, &ids, |_| true, |_| Some("2.0.0".into()),),
+ vec!["probe".to_string()]
+ );
+ }
+
+ #[test]
+ fn unsupported_cleanup_reads_actual_scoped_package_version() {
+ let dir = probe_profile("cleanup-version", LOCK_CATALOG, Some("0.18.1"));
+ let package = dir.join("node_modules/@scope/probe");
+ std::fs::create_dir_all(&package).unwrap();
+ std::fs::write(
+ package.join("package.json"),
+ r#"{"name":"@scope/probe","version":"2.0.0"}"#,
+ )
+ .unwrap();
+ let mut entry = preset("probe", "@scope/probe", false);
+ entry.package = Some("@scope/probe".into());
+ entry.version = Some("1.2.0".into());
+ let unsupported = HashSet::from(["probe".to_string()]);
+ let names = deprecated_installed_names(
+ &[entry],
+ &HashSet::new(),
+ &unsupported,
+ |_| true,
+ |name| installed_package_version(&dir, name),
+ );
+ std::fs::remove_dir_all(&dir).unwrap();
+ assert!(
+ names.is_empty(),
+ "newer installed scoped package must be preserved"
+ );
+ }
+
#[test]
fn deprecated_installed_only_picks_marked_and_installed() {
// 三个弃用条目都在预设清单里声明(预设驱动的常规路径),逐个区分命中。
@@ -496,20 +603,15 @@ mod tests {
// 未登记弃用:即使已安装也不命中
let plain = preset("dsh-plain", "dsh-plain", false);
- assert!(
- deprecated_names(&[plain], &deprecated, |name| name == "dsh-plain")
- .is_empty()
- );
+ assert!(deprecated_names(&[plain], &deprecated, |name| name == "dsh-plain").is_empty());
// 内部插件即使登记弃用也不命中(内部插件由启动自愈强制安装)
let internal = preset("dsh-internal", "[email protected]", true);
- assert!(
- deprecated_names(&[internal], &deprecated, |name| matches!(
- name,
- "dsh-internal"
- ))
- .is_empty()
- );
+ assert!(deprecated_names(&[internal], &deprecated, |name| matches!(
+ name,
+ "dsh-internal"
+ ))
+ .is_empty());
}
#[test]
@@ -524,12 +626,9 @@ mod tests {
);
// 清单里根本没有弃用条目:即使同名包已安装也不命中
- assert!(deprecated_names(
- &[],
- &HashSet::new(),
- |name| name == "dsh-tauri-panel"
- )
- .is_empty());
+ assert!(
+ deprecated_names(&[], &HashSet::new(), |name| name == "dsh-tauri-panel").is_empty()
+ );
// 仍被预设声明(内部插件由自愈强制安装):不走兜底,避免与自愈互相拉扯
assert!(deprecated_names(
@@ -555,7 +654,8 @@ mod tests {
/// 造一个最小 profile:写入 `pnpm-lock.yaml` 与 `node_modules/dsh-probe/package.json`。
fn probe_profile(label: &str, lock: &str, installed: Option<&str>) -> std::path::PathBuf {
- let dir = std::env::temp_dir().join(format!("dsh-plugin-fp-{}-{label}", std::process::id()));
+ let dir =
+ std::env::temp_dir().join(format!("dsh-plugin-fp-{}-{label}", std::process::id()));
let _ = std::fs::remove_dir_all(&dir);
std::fs::create_dir_all(dir.join("node_modules").join("dsh-probe")).unwrap();
std::fs::write(dir.join("pnpm-lock.yaml"), lock).unwrap();
diff --git a/src-tauri/src/service/plugin/install/spec.rs b/src-tauri/src/service/plugin/install/spec.rs
index 1df61e54..31f26831 100644
--- a/src-tauri/src/service/plugin/install/spec.rs
+++ b/src-tauri/src/service/plugin/install/spec.rs
@@ -160,6 +160,7 @@ mod tests {
default_checked: false,
default_unchecked: false,
dsh_supported_version: None,
+ version: None,
win_only: false,
internal,
}
diff --git a/src-tauri/src/service/plugin/installed.rs b/src-tauri/src/service/plugin/installed.rs
index 5d670456..981f82c5 100644
--- a/src-tauri/src/service/plugin/installed.rs
+++ b/src-tauri/src/service/plugin/installed.rs
@@ -90,8 +90,6 @@ pub struct PreinstallPlugin {
/// 显式声明首次引导不默认勾选(仍可标「推荐」chip,但不预选)
pub default_unchecked: bool,
pub installed: bool,
- /// 当前核心已高于该预设声明的 `dshSupportedVersion`:界面置灰不可选,
- /// 且随启动自动卸载
pub unsupported: bool,
}
@@ -284,6 +282,7 @@ mod tests {
default_checked: true,
default_unchecked: false,
dsh_supported_version: None,
+ version: None,
win_only: false,
internal: false,
};
diff --git a/src-tauri/src/service/plugin/preset.rs b/src-tauri/src/service/plugin/preset.rs
index b3000367..f11b2fb2 100644
--- a/src-tauri/src/service/plugin/preset.rs
+++ b/src-tauri/src/service/plugin/preset.rs
@@ -27,6 +27,8 @@ pub struct PreinstallPluginInfo {
pub id: String,
/// 传给 `dsh plugin add` 的依赖形式(npm 包名或 git 依赖形式)
pub spec: String,
+ #[serde(default)]
+ pub version: Option<String>,
/// 内置插件:条目来自发布清单,或 debug 下仓库根 `packages/*` 中带有
/// 有效 `dsh` 对象的 workspace 包。内置插件固定从本地捆绑目录安装,启动时
/// 强制核对「已安装 + 路径指向当前捆绑目录」,因此不出现在首次引导清单里。
@@ -51,8 +53,6 @@ pub struct PreinstallPluginInfo {
/// 显式声明首次引导不默认勾选:仍可标「推荐」chip,但不预选(如 dsh-im)
#[serde(default)]
pub default_unchecked: bool,
- /// 该预设声明支持的最高核心版本;当前核心高于它时视为不再兼容:
- /// 界面置灰不可选,并随启动自动卸载。
#[serde(default)]
pub dsh_supported_version: Option<String>,
/// 仅 Windows 平台列出
@@ -209,6 +209,7 @@ fn discover_dev_internal_plugins_at(root: &Path) -> Vec<DevPluginCandidate> {
default_checked: false,
default_unchecked: false,
dsh_supported_version: None,
+ version: None,
win_only: false,
};
Some(DevPluginCandidate { info, directory })
@@ -258,8 +259,10 @@ fn merge_dev_internal_plugins_at(
if let Some(candidate) = by_id.remove(&plugin.id) {
// 上限是发布侧对核心的计划(清单声明),dev 候选不带该字段,覆盖时沿用静态条目。
let supported = plugin.dsh_supported_version.take();
+ let version = plugin.version.take();
*plugin = candidate.info;
plugin.dsh_supported_version = supported;
+ plugin.version = version;
}
}
internal.extend(by_id.into_values().map(|candidate| candidate.info));
@@ -609,25 +612,62 @@ mod tests {
assert!(!presets.iter().any(|p| p.id == "unknown-package"));
}
- /// 预设声明的支持上限:当前核心高于它时不再兼容,等于或低于时仍可用。
+ #[test]
+ fn preset_manifest_declares_core_and_automatic_removal_ceilings() {
+ let presets = load_presets_for_test();
+ let expected = [
+ ("dshmarket", "0.1.7", "1.58.0"),
+ ("dsh-better-sidebar", "0.1.5-rc.2", "0.19.1"),
+ ("dsh-rewind-plugin", "0.1.5-rc.2", "0.12.2"),
+ ("@xmanrui/dsh-im", "0.1.5-rc.2", "4.25.0"),
+ ];
+ assert_eq!(presets.len(), expected.len());
+ for (id, core_ceiling, removal_ceiling) in expected {
+ let preset = presets.iter().find(|p| p.id == id).expect(id);
+ assert_eq!(
+ preset.dsh_supported_version.as_deref(),
+ Some(core_ceiling),
+ "{id}"
+ );
+ assert_eq!(preset.version.as_deref(), Some(removal_ceiling), "{id}");
+ assert_eq!(preset.spec, id);
+ }
+ }
+
#[test]
fn preset_supported_version_marks_newer_cores_unsupported() {
let presets = load_presets_for_test();
- assert!(!presets.is_empty());
- assert!(
- presets
- .iter()
- .all(|p| p.dsh_supported_version.as_deref() == Some("0.1.5-rc.2")),
- "every preset entry declares the supported core ceiling"
- );
- let preset = &presets[0];
- assert!(!preset.unsupported_on(Some("0.1.5-rc.1")));
- assert!(!preset.unsupported_on(Some("0.1.5-rc.2")));
- assert!(preset.unsupported_on(Some("0.1.6-alpha.2")));
- assert!(preset.unsupported_on(Some("0.1.7-alpha.1")));
- // 任一侧缺失或不可解析时按兼容处理,避免把插件误标为不支持
- assert!(!preset.unsupported_on(None));
- assert!(!preset.unsupported_on(Some("not-a-version")));
+ for (id, equal, newer) in [
+ ("dshmarket", "0.1.7", "0.1.8-alpha.1"),
+ ("dsh-better-sidebar", "0.1.5-rc.2", "0.1.6-alpha.2"),
+ ("dsh-rewind-plugin", "0.1.5-rc.2", "0.1.7-alpha.1"),
+ ("@xmanrui/dsh-im", "0.1.5-rc.2", "0.1.7-alpha.1"),
+ ] {
+ let preset = presets.iter().find(|p| p.id == id).expect(id);
+ assert!(!preset.unsupported_on(Some("0.1.5-rc.1")), "{id}");
+ assert!(!preset.unsupported_on(Some(equal)), "{id}");
+ assert!(preset.unsupported_on(Some(newer)), "{id}");
+ assert!(!preset.unsupported_on(None), "{id}");
+ assert!(!preset.unsupported_on(Some("not-a-version")), "{id}");
+ }
+ }
+
+ #[test]
+ fn plugin_version_deserializes_as_optional_metadata_without_changing_spec() {
+ for (field, expected) in [
+ ("", None),
+ (r#", "version": null"#, None),
+ (r#", "version": "1.58.0""#, Some("1.58.0")),
+ (r#", "version": "invalid""#, Some("invalid")),
+ ] {
+ let raw = format!(
+ r#"[{{"id":"dshmarket","spec":"dshmarket","name":"Market","description":"","repoUrl":""{field}}}]"#
+ );
+ let plugins = parse_plugins(&raw, false).expect("preset manifest should parse");
+ assert_eq!(plugins.len(), 1);
+ assert_eq!(plugins[0].version.as_deref(), expected);
+ assert_eq!(plugins[0].spec, "dshmarket");
+ }
}
/// 内置条目默认不声明上限、对任何核心版本都兼容;通用上限机制仍在生效——
@@ -1093,6 +1133,7 @@ mod tests {
default_checked: false,
default_unchecked: false,
dsh_supported_version: None,
+ version: None,
win_only: false,
},
PreinstallPluginInfo {
@@ -1108,6 +1149,7 @@ mod tests {
default_checked: false,
default_unchecked: false,
dsh_supported_version: None,
+ version: None,
win_only: false,
},
];
@@ -1126,9 +1168,12 @@ mod tests {
/// 核心计划,与当前 checkout 是否存在该包源码无关。
#[cfg(debug_assertions)]
#[test]
- fn dev_merge_carries_static_supported_version_ceiling() {
+ fn dev_merge_carries_static_core_and_automatic_removal_ceilings() {
let root = temp_dev_root("merge-cap");
- write_dev_manifest(&root.join("dsh-tauri-running-changes"), "dsh-tauri-running-changes");
+ write_dev_manifest(
+ &root.join("dsh-tauri-running-changes"),
+ "dsh-tauri-running-changes",
+ );
let static_internal = vec![PreinstallPluginInfo {
id: "dsh-tauri-running-changes".into(),
spec: "dsh-tauri-running-changes".into(),
@@ -1142,6 +1187,7 @@ mod tests {
default_checked: false,
default_unchecked: false,
dsh_supported_version: Some("0.1.7-alpha.0".into()),
+ version: Some("1.2.3".into()),
win_only: false,
}];
@@ -1154,6 +1200,9 @@ mod tests {
renamed.dsh_supported_version.as_deref(),
Some("0.1.7-alpha.0")
);
+ assert_eq!(renamed.version.as_deref(), Some("1.2.3"));
+ assert_eq!(renamed.spec, "dsh-tauri-running-changes");
+ assert_eq!(renamed.description, "desc");
assert!(renamed.unsupported_on(Some("0.1.7-alpha.1")));
assert!(!renamed.unsupported_on(Some("0.1.6-alpha.2")));
// dev 覆盖语义不变:条目仍来自仓库源码
diff --git a/src-tauri/src/service/plugin/verify.rs b/src-tauri/src/service/plugin/verify.rs
index d4cb715d..021d7dbd 100644
--- a/src-tauri/src/service/plugin/verify.rs
+++ b/src-tauri/src/service/plugin/verify.rs
@@ -338,6 +338,7 @@ mod tests {
default_checked: false,
default_unchecked: false,
dsh_supported_version: None,
+ version: None,
win_only: false,
internal: false,
}
diff --git a/src-tauri/src/service/plugin/watch.rs b/src-tauri/src/service/plugin/watch.rs
index d1a75565..1dc61aa2 100644
--- a/src-tauri/src/service/plugin/watch.rs
+++ b/src-tauri/src/service/plugin/watch.rs
@@ -408,6 +408,7 @@ mod tests {
default_checked: false,
default_unchecked: false,
dsh_supported_version: None,
+ version: None,
win_only: false,
package: None,
internal: false,
@@ -494,6 +495,7 @@ mod tests {
default_checked: false,
default_unchecked: false,
dsh_supported_version: None,
+ version: None,
win_only: false,
package: None,
internal: true,
diff --git a/src/store/modules/preinstall/types.ts b/src/store/modules/preinstall/types.ts
index 9e23263c..a4f7dfe1 100644
--- a/src/store/modules/preinstall/types.ts
+++ b/src/store/modules/preinstall/types.ts
@@ -12,7 +12,6 @@ export interface PreinstallPlugin {
/** 显式声明首次引导不默认勾选(仍可标「推荐」chip,但不预选) */
defaultUnchecked: boolean
installed: boolean
- /** 当前核心已高于该预设声明的 `dshSupportedVersion`:置灰不可选,且随启动自动卸载 */
unsupported: boolean
}