fix: 增加插件 V3t 运行时兼容门禁 (#6475)

* fix(plugin): enforce declared runtime compatibility

* chore(ci): record plugin runtime compatibility edges

---------

Co-authored-by: jxxghp <jxxghp@gmail.com>
This commit is contained in:
InfinityPacer
2026-08-27 07:06:16 +08:00
committed by GitHub
co-authored by jxxghp
parent 627775c090
commit 3b7f8c357d
8 changed files with 119 additions and 5 deletions
+3
View File
@@ -20,6 +20,7 @@ from app.application.plugin.source import (
PluginMarketCandidate,
normalize_package_generation,
)
from app.foundation.environment import is_free_threaded_runtime
PLUGIN_V3_GENERATIONS = ("v3", "v2", "v1")
PluginIndex: TypeAlias = Mapping[str, Mapping[str, Any]]
@@ -383,6 +384,8 @@ def _is_v3_compatible(
"""按宿主 V3、兼容 V2、基础索引顺序判断候选兼容性。"""
if plugin_info.get("v3") is False:
return False
if is_free_threaded_runtime() and plugin_info.get("v3t") is False:
return False
if package_generation in {"v3", "v2"}:
return True
return plugin_info.get("v3") is True or plugin_info.get("v2") is True