Title: feat(plugins)!: 插件 API 单一基线(版本归 0),插件契约、文档与 SDK 并入 Core by xiaoyumuxi · Pull Request #17 · Lithe-IDEA/Lithe-core-rust · GitHub
Open Graph Title: feat(plugins)!: 插件 API 单一基线(版本归 0),插件契约、文档与 SDK 并入 Core by xiaoyumuxi · Pull Request #17 · Lithe-IDEA/Lithe-core-rust
X Title: feat(plugins)!: 插件 API 单一基线(版本归 0),插件契约、文档与 SDK 并入 Core by xiaoyumuxi · Pull Request #17 · Lithe-IDEA/Lithe-core-rust
Description: 关联 桌面端适配:1lck/Lithe-IDEA#1826(升级 PINNED_CORE_REVISION 到本 PR 的 commit) Refs 1lck/Lithe-IDEA#1794 背景 插件 API 过去每个能力各有 1–12 不等的版本,宿主、清单、SDK 和文档都要处理“某能力到第几版才有某字段”。这些旧版本没有需要兼容的已发布插件,留着只会增加理解和实现成本。同时,契约在三个地方各有一份:Lithe-IDEA 的 shared/contracts/plugins/、Core 的 shared/plugins/contract/、lithe-plugin-docs 的副本,SDK 也不和协议在同一个仓库里验证。 本 PR 把每个能力收敛到当前最完整的那一版,并从 0 重新编号;版本字段和协商机制都保留,以后新增功能时从 0 往上加。插件契约、开发资料和 SDK 合并到本仓库的 shared/plugins/,作为唯一来源。 改动 1. 插件 API 单一基线(83f853d) SUPPORTED_PLUGIN_API_VERSIONS = [0];18 个能力在 capabilities.rs 中都只支持 [0],每个能力只保留最高、最完整的那一版行为。 清单 schemaVersion、市场索引 schemaVersion、原生 UI 文档 schemaVersion、litheBuildModel 等后端协议的 version、plugins.editorActions.decode 的 version、网页桥 window.lithe.version 全部为 0。 删除按能力版本分叉的旧代码路径、旧字段兼容和对应测试;serverProcess、executableResolution 不再是能力(requires 里出现时按 plugin.manifest.invalid 拒绝,fixture 已覆盖)。 契约 README、schema、fixture 同步为单一基线;invalid-manifests.json 现为 189 个拒绝用例。 2. 目录整理(ca610c2) shared/ 只保留 plugins/;Core 自己的接口契约、测试数据和日志事件目录移到 rust/contracts/、rust/fixtures/、rust/logging/。 删除 GitGraph 对照数据和依赖它的测试;scripts/rust-core/ 保留,它是 develop-lithe Skill 要求的 Core 注释门禁(模块文档、英文注释、unsafe 安全说明、导出项 Rustdoc)。 3. 并入 lithe-plugin-docs(本次新增提交) shared/plugins/README.md:插件开发入口(中英)。 shared/plugins/guides/:语言服务器、后端工作区、构建工具、原生构建流程、调试适配器、原生终端、插件日志等指南,按基线 0 重写,去掉版本对照表和 macOS/Windows 宿主现状说法。 shared/plugins/reference/:API 总表(api-catalog.md)、能力与版本(capabilities-and-versions.md)、协议更新记录(protocol-changelog.md,登记本 PR)、domains/ 下 15 个领域参考页。 shared/plugins/sdk/{node,java,rust}:三个官方后端 SDK 与示例,版本为 Node 0.5.0、Java 0.5.0、Rust 0.4.0;sdk/e2e/ 为 SDK 端到端场景,经 rust/lithe-core/Cargo.toml 的 plugin-sdk-e2e feature 编译。 5 个用 Node/Java 启动的示例清单补上 requiresTools(基线 0 要求列出启动用到的每个工具,否则 plugin.runtime.undeclared)。 e2e 改为按真实宿主流程启动后端:新增 sdk/e2e/runtime-tools.plugin.json(node、java 工具定义,代替运行时插件),共用的 host_launch_arguments 调 toolchains.instantiateLaunch 展开启动模板、探测版本,再用 toolchains.checkVersion 校验最低版本;替换了已删除的 plugins.declarative.checkRuntimeVersion 和 plan 里不再存在的 versionArguments。构建、原生构建、VCS 三个场景都用它。 shared/plugins/scripts/:verify-docs.mjs(schema $id、相对链接、拒绝指向 lithe-plugin-docs 的文件链接)及其测试,sdk-e2e.mjs(构建三个 SDK 的示例并跑端到端测试)。 .github/workflows/:plugins-verify.yml(文档检查与 SDK 测试)、plugins-release-{node,java,rust}-sdk.yml(按 sdk-*-v* 标签发布)。 契约 README:删除 “Windows mapping”“Current Windows availability” 两节和其他宿主平台现状句,改为与宿主无关的表述;vcs-provider-v1.md 状态块同样改写;修复失效锚点和指向 Lithe-IDEA 平台目录的死链;构建系统一节删掉早已不存在的 build-host-integration fixture,改为说明 hostIntegration 来源没有 fixture。 三个 SDK README 不再各自罗列桌面端没注册的宿主服务(和能力页的清单已经不一致),改为链接 capabilities-and-versions.md 的唯一清单。 根目录 README.md:说明目录分工与常用命令;.gitignore 忽略 SDK 构建产物。 合并 main 的 #16(Git 控制台折叠内部查询):它改的 shared/contracts/rust-core-api.md 和 shared/fixtures/git/execution-events-v1.json 已按本分支的新位置落到 rust/contracts/、rust/fixtures/。 cargo fmt:ca610c2 缩短 fixture 路径后,include_str! 等调用能放进一行,相关文件重新格式化(只有空白变化)。 不在本 PR 范围内 归档 lithe-plugin-docs 仓库并在其 README 指向本目录、Lithe Store CI 改用本仓库的 plugin-index.schema.json URL:对外可见,由维护者执行。 按 sdk-*-v* 打标签发布新版 SDK:合入后由维护者执行。 已发布插件按基线 0 适配:在各插件仓库进行。 验证 命令 平台 结果 cargo test --manifest-path rust/Cargo.toml --workspace macOS 通过 bash scripts/rust-core/verify-rust-core-comments.sh macOS 通过 cargo fmt --all -- --check macOS 通过 node shared/plugins/scripts/sdk-e2e.mjs macOS 9 个测试全部通过(Node 3、Java 2、Rust 2、原生构建 2) node shared/plugins/scripts/verify-docs.mjs、node --test shared/plugins/scripts/verify-docs.test.mjs macOS 通过(2/2) Markdown 相对链接锚点检查(GitHub 标题 slug 规则) macOS 0 个失效 Node、Java、Rust 三个 SDK 的单元测试 macOS 通过 Lithe-IDEA 桌面端插件包测试(固定到本 PR HEAD 7a71cd6) macOS 见 1lck/Lithe-IDEA#1826
Open Graph Description: 关联 桌面端适配:1lck/Lithe-IDEA#1826(升级 PINNED_CORE_REVISION 到本 PR 的 commit) Refs 1lck/Lithe-IDEA#1794 背景 插件 API 过去每个能力各有 1–12 不等的版本,宿主、清单、SDK 和文档都要处理“某能力到第几版才有某字段”。这些旧版本没有需要兼容的已发布插件,留着只会增加理解和实现成本。同时,契约...
X Description: 关联 桌面端适配:1lck/Lithe-IDEA#1826(升级 PINNED_CORE_REVISION 到本 PR 的 commit) Refs 1lck/Lithe-IDEA#1794 背景 插件 API 过去每个能力各有 1–12 不等的版本,宿主、清单、SDK 和文档都要处理“某能力到第几版才有某字段”。这些旧版本没有需要兼容的已发布插件,留着只会增加理解和实现成本。同时,契约...
Opengraph URL: https://github.com/Lithe-IDEA/Lithe-core-rust/pull/17
X: @github
Domain: github.com
IPv4 address: 140.82.112.4
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:4cb50faa-9ff2-669e-182c-4c8d7facf0d5 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | E1C6:17029F:1A8C57C:25724CA:6B072743 |
| html-safe-nonce | 8406ce005a31fa74ff5ffc51c8353d8afd53e692722d865e236a209fa878c910 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMUM2OjE3MDI5RjoxQThDNTdDOjI1NzI0Q0E6NkIwNzI3NDMiLCJ2aXNpdG9yX2lkIjoiNDg3OTkxNjc1MjMxMTg4NzY4MyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | cfe06cbdb74939d5ff3b9d6c079803ba016ca93e0aaa8c0e754d6c9ca562ac25 |
| hovercard-subject-tag | pull_request:5258852126 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/Lithe-IDEA/Lithe-core-rust/pull/17/files |
| twitter:image | https://avatars.githubusercontent.com/u/145102356?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/145102356?s=400&v=4 |
| og:image:alt | 关联 桌面端适配:1lck/Lithe-IDEA#1826(升级 PINNED_CORE_REVISION 到本 PR 的 commit) Refs 1lck/Lithe-IDEA#1794 背景 插件 API 过去每个能力各有 1–12 不等的版本,宿主、清单、SDK 和文档都要处理“某能力到第几版才有某字段”。这些旧版本没有需要兼容的已发布插件,留着只会增加理解和实现成本。同时,契约... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5a20fe9aa5e45c6df9328a5ec3f167a7805856126d8bf72d810541ca01962ef9 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/Lithe-IDEA/Lithe-core-rust git https://github.com/Lithe-IDEA/Lithe-core-rust.git |
| octolytics-dimension-user_id | 340144206 |
| octolytics-dimension-user_login | Lithe-IDEA |
| octolytics-dimension-repository_id | 1449354685 |
| octolytics-dimension-repository_nwo | Lithe-IDEA/Lithe-core-rust |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1449354685 |
| octolytics-dimension-repository_network_root_nwo | Lithe-IDEA/Lithe-core-rust |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 6ce961d9a663a99bc4bcab9fd6ac5cca54bd6fcc |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | no-cache |
Viewport: width=device-width