插件端确认兼容 2.0.0.0,已下调版本下限。 - #19
Open
opencode-agent[bot] wants to merge 1 commit into
Open
Conversation
将 MIN_CLASSISLAND_VERSION 从 2.1.1.0 下调到 2.0.0.0。依据 ClassIsland (HelloWRC/ClassIsland) 源码验证: - 插件 manifest.yml 声明 apiVersion: 2.0.0.0,正好满足 ClassIsland 2.0.0.0 起在 PluginService.InitializePlugins 中强制要求的 apiVersion >= 2.0.0.0,也满足 PluginMarketService 的市场显示过滤; - 插件用到的宿主 API(AppBase、IAppHost、IProfileService、 IComponentsService、IExactTimeService、ComponentSettings、 CommonDirectories、AddSettingsPage 等)在 2.0.0.0 标签均存在且未变化。 同步更新 OobeWizard 错误提示与 classisland 测试。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
已完成。按要求「不只是这个仓库」,我深入研究了 CI 端插件(
SECTL/ClassIsland-SecAgent-Plugin)对低宿主版本(ClassIsland 2.0.0.0)的兼容性,并参考了 ClassIsland 主仓库(HelloWRC/ClassIsland)的源码。插件端兼容性研究结论(参考 CI 源码)
结论:ClassIsland-SecAgent-Plugin 与 ClassIsland 2.0.0.0 完全兼容,2.0.0.0 就是真实下限。 依据如下:
插件清单声明的 API 版本恰好满足宿主要求
manifest.yml声明apiVersion: 2.0.0.0。git show 2.0.0.0:ClassIsland/Services/PluginService.cs)在InitializePlugins中强制apiVersion < new Version(2,0,0,0)的插件直接拒绝加载——2.0.0.0 恰好通过。PluginMarketService.cs)同样要求version >= Version.Parse("2.0.0.0"),该逻辑在 2.0.0.0 标签已存在。插件用到的全部宿主 API 在 2.0.0.0 都存在且未变化
Plugin.cs/SecAgentSettingsPage使用的 API:AppBase(AppVersion、AppStopping、Current.BuildType等)、IAppHost(Host/GetService/TryGetService)、IProfileService.CurrentProfilePath、IComponentsService.CurrentComponents/RefreshConfigs、IExactTimeService.GetCurrentLocalDateTime()、ComponentSettings、CommonDirectories.AppRootFolderPath、AddSettingsPage<T>、SettingsPageBase、[SettingsPageInfo]、XAML 命名空间http://classisland.tech/schemas/xaml/core——均在 tag2.0.0.0中存在。ClassIsland.PluginSdk 1.7.106.2-dev-v2(构建自 commit27e93bb)是2.0.0.0的祖先提交;两者之间仅 8 个提交改动 SDK 项目,且只涉及自动化服务内部实现、UI 动画控件与构建配置,没有触及插件的 API 面。csproj对 SDK 使用ExcludeAssets=runtime;native,运行时绑定到宿主的ClassIsland.Core/Shared程序集,不存在版本不匹配加载失败的问题。更低的 1.x 旧版不适用(符合预期):1.7.x 是 WPF/Material Design 的 v1 插件体系,本插件是 v2(Avalonia)体系,只能跑在 2.0.0.0+,用户要求的就是「2.0.0.0 以上」,与结论一致。
本仓库代码改动
src/classisland.tsMIN_CLASSISLAND_VERSION从2.1.1.0下调为2.0.0.0,并加注释说明兼容性依据src/renderer/src/components/OobeWizard.tsxsrc/classisland.test.ts1.9.0.0/1.9.0.9;新增断言确认2.0.4.0(报障用户版本)现被识别为兼容验证
npm run build:cli(tsc 全量编译)通过node --test dist/classisland.test.js:16/16 通过npm test:129 项,128 通过、1 跳过(原有 skip)、0 失败已提交到当前分支
opencode/issue9-20260901130835(commit9402ac9)。注:仓库中已存在一个未合并的 PR #15 做了类似的版本下调,本次 PR 在其基础上补充了插件端源码验证依据(classisland.ts注释、测试断言),可作为其替代/升级版。Closes #9
opencode session | github run