Repository navigation
feat(plugins): 插件契约统一基线 0,契约与开发资料只在 Rust Core - #1826
Merged
xiaoyumuxi merged 3 commits intoNov 11, 2026
Merged
Conversation
- 桌面端插件宿主、市场、工具链、新建项目和测试按基线 0 适配:pluginAPIVersion、requires 和宿主能力表都只用 0,runtimeTooOld 并入 toolTooOld - 删除 shared/contracts/plugins 副本;测试通过新增的 internal/contractfixture 读取正在链接的 Core 检出里的契约 fixture - desktop-go.sh 导出 LITHE_PLUGIN_CONTRACT_DIR;PINNED_CORE_REVISION 指向 Core 的 feature/plugin-api-single-baseline - AGENTS.md 改为“插件契约只在 Rust Core”,PR 模板、develop-lithe 与 create-lithe-plugin Skill 同步;lithe-plugin-docs 和契约副本引用改指 Core shared/plugins - 新增 Note:插件契约从统一基线 0 开始、插件契约与开发资料只在 Rust Core;归档“按能力分版本”和“契约发布到 lithe-plugin-docs”两篇 - 平台功能矩阵的证据路径改到 Core 契约
…l' into feature/plugins-v2-baseline # Conflicts: # scripts/desktop/build-desktop-core.sh
xiaoyumuxi
marked this pull request as ready for review
November 11, 2026 12:37
xiaoyumuxi
merged commit Nov 11, 2026
1f9eee8
into
feature/1794-viva-workbench-shell
4 of 6 checks passed
32 of 61 tasks
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.
关联 Issue / Linked issue
shared/plugins/)PR 类型 / Type
改动说明 / What changes
背景 / Why
插件 API 过去每个能力各有 1–12 不等的版本,宿主、清单、SDK 和文档都要处理“某能力到第几版才有某字段”,而这些旧版本没有需要兼容的已发布插件。契约还同时存在三份:本仓库的
shared/contracts/plugins/、Core 的shared/plugins/contract/、lithe-plugin-docs,容易漂移。Core #17 把每个能力收敛到当前最完整的一版并从 0 重新编号(版本字段和协商保留,以后从 0 往上加),并把契约、开发指南、参考和三个 SDK 合并到 Core 的
shared/plugins/作为唯一来源。本 PR 让 Viva 桌面端按基线 0 适配,并删除本仓库的契约副本。改动 / Changes
桌面端按基线 0 适配
desktop/internal/pluginhost/pluginhost.go:宿主能力表的每个能力都只声明版本 0,pluginAPIVersion只接受 0。desktop/internal/core/plugin_session.go、pluginservice/backendlaunch.go、pluginservice/backends.go、pluginbackend/pluginbackend.go:后端协议版本按 0 协商。runtimeTooOld并入toolTooOld(Core 已不再区分),删除对应的 i18n 词条并重新生成desktop/internal/i18n/shared.generated.go。desktop/internal/core/project_generators.go、desktop/internal/workbench/new_project*.go、projectgen/run.go删除按生成器能力版本分叉的旧路径。core、marketplace、pluginservice、pluginweb、pluginhost、workbench下的插件相关测试把清单里的schemaVersion、pluginAPIVersion、requires改为 0。契约只在 Core
shared/contracts/plugins/(契约 README、schema、fixture 全部副本)。desktop/internal/contractfixture:测试从正在链接的 Core 检出读取契约 fixture。scripts/desktop/desktop-go.sh导出LITHE_PLUGIN_CONTRACT_DIR;scripts/desktop/build-desktop-core.sh的PINNED_CORE_REVISION升到 Core feat(database): add integrated database workspace #17 的7a71cd6。shared/contracts/rust-core-api.md、shared/contracts/vcs-provider-v1.md、shared/fixtures/plugins/*、shared/fixtures/vcs/model-v1.json、shared/fixtures/keymap/provider-negotiation-v1.json:按基线 0 改写版本号;删除只服务旧版本的language-support-v1.json用例和official-v1.json条目。shared/platform-feature-matrix/features/*.json:证据路径改指 Core 的契约。规则与文档
AGENTS.md新增“插件契约只在 Rust Core”一节:契约、SDK、插件开发文档只在 Coreshared/plugins/,改契约在同一个 Core PR 登记协议更新记录,桌面端经contractfixture读取;README.md、README.zh-CN.md、docs/ci-builds.md、docs/development/macos-plugin-api-plan.md、docs/development/windows-plugin-parity-plan.md同步。.github/pull_request_template.md的“插件契约”一组改为指向 Core PR、PINNED_CORE_REVISION和sdk-e2e.mjs。develop-lithe、create-lithe-pluginSkill:lithe-plugin-docs 与契约副本的引用改指 Coreshared/plugins/。2026-11-11-plugin-contract-single-source-in-core.md(决策与被否方案)和统一基线 0 的 Note;归档“按能力分版本”和“契约发布到 lithe-plugin-docs”两篇;其余引用旧路径的 Note 改指新位置。不在本 PR 范围内 / Out of scope
plugin-index.schema.jsonURL、按sdk-*-v*标签发布新版 SDK:由维护者执行。类型专属:feat
多平台对齐
platform-specific),理由:范围检查 / Scope checks
功能矩阵 / Feature matrix
shared/platform-feature-matrix/features/<id>.json:只改证据路径(契约移到 Core),实现与验证状态不变./scripts/platform-feature-matrix/verify-platform-feature-matrix.sh(255 项通过).artifacts/下生成的矩阵视图统一日志系统 / Structured logging
N/A:没有新增或改动生命周期里程碑、终态、降级或失败路径的日志。
界面文案 / i18n
runtimeTooOld一条词条,运行node scripts/i18n/generate-i18n.mjs并提交生成结果node scripts/i18n/generate-i18n.mjs --check(中英 11474/11474 完整);verify-app-language-localization.mjs的既有违规与本 PR 无关,见“未能执行的检查”逻辑归属 / Logic placement
性能与内存 / Performance and memory
N/A:不新增后台功能、子进程、缓存或依赖。
设置 / Settings
N/A:没有新增或修改设置项。
插件契约 / Plugin contract
shared/plugins/reference/protocol-changelog.md登记:feat(plugins)!: 插件 API 单一基线(版本归 0),插件契约、文档与 SDK 并入 Core Lithe-IDEA/Lithe-core-rust#17PINNED_CORE_REVISION已升到7a71cd6,桌面端测试经scripts/desktop/desktop-go.sh读到这份契约node shared/plugins/scripts/sdk-e2e.mjs:Node、Java、Rust 三个 SDK 示例后端全部跑通发行包与资源 / Bundle and resources
N/A:不新增运行时资源或下载、生成步骤。
无用代码与重构 / Dead code and refactoring
验证 / Verification
./scripts/desktop/desktop-go.sh testcore、pluginservice、marketplace、pluginweb、pluginhost、pluginbackend、projectgen(Core 按固定版本拉取7a71cd6;contractfixture 由这些包间接覆盖)./scripts/platform-feature-matrix/verify-platform-feature-matrix.shnode scripts/i18n/generate-i18n.mjs --check./scripts/agent-notes/verify-agent-notes.shcargo test --workspace、注释门禁、sdk-e2e.mjs、verify-docs.mjs未能执行的检查和原因:
settingswindow测试超时、workbench的 Agent 相关测试、internal/i18n的TestCatalogsAreComplete、node scripts/i18n/verify-app-language-localization.mjs的 632 条既有违规。提交前确认 / Final checks
preview创建:本 PR 基于 Epic(0.7.0): 基于 Viva 框架的跨平台方案的迁移(#1794) #1799 的feature/1794-viva-workbench-shell,因为基线 0 只适配 Viva 桌面端,旧客户端已在 Epic(0.7.0): 基于 Viva 框架的跨平台方案的迁移(#1794) #1799 删除