Repository navigation
feat(plugins): 命令安装器支持固定 URL 归档下载(commandInstallers 1) - #133
Merged
Merged
Conversation
API-23 的 commandInstallers 升到能力版本 1,新增 download 安装方式: 插件按平台声明固定 HTTPS URL、可选镜像、完整 SHA-256、zip/tar.gz 格式和 stripPrefix,宿主下载、校验、解压后在 managed 目标的 commandDirectory 下查找命令。 - 新增 archives.rs,managedRuntimes 与 commandInstallers 共用归档声明校验。 - requirements/plan 接受宿主平台;下载计划给出所选归档、cacheKey 和命令目录。 - 更新 manifest schema、契约 README、fixture、能力版本表与协议更新记录。
xiaoyumuxi
marked this pull request as ready for review
November 20, 2026 14:18
This was referenced Nov 20, 2026
xiaoyumuxi
added a commit
that referenced
this pull request
Nov 20, 2026
* fix(toolchain): 外部安装的多入口链接保留布局里的文件名 rustup 把 ~/.cargo/bin/cargo、rust-analyzer 链接到自身,按启动时的名字决定运行哪个工具。 Core 校验外部安装后返回规范路径,把 cargo 解析成 rustup,版本探针运行的是 rustup, cargo 因此永远找不到。 布局文件链接到另一个文件名时,返回规范主目录下的布局路径;链接目标的类型、可执行位和 不越出主目录、不进入工作区的检查不变。同名链接(版本管理器别名等)仍返回规范路径。 顺带把已合入的 #112、#127、#128、#130、#133 从协议更新记录的“待合入”移到时间线。 * docs(plugins): 协议更新记录登记 #135
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
无独立 Issue。用于 Rust Support 插件(API-23)按需下载 CodeLLDB:调试器不打进插件包,第一次调试缺命令时由宿主提示安装,体验与 Go 插件安装 dlv 一致。
类型
commandInstallers能力版本 1,新增固定 URL 归档下载安装改动说明
清单与校验(
plugin-manifest)archives.rs:managedRuntimes依赖和命令下载共用的归档声明校验(HTTPS 无凭据/片段的 URL、最多 8 个唯一镜像、完整 SHA-256 并转小写、zip/tar.gz、stripPrefix布局路径、平台 os/arch)。managed_runtimes.rs改为调用这套共用逻辑,行为不变。commandInstallers[].download:version加 1–6 个平台归档(每个平台最多一个),与tool、minimumVersion、arguments互斥;只能用managed目标,不带arguments、environment,commandDirectory相对解压根目录;mayUseNetwork必须为true;清单requires.commandInstallers必须 ≥ 1。capabilities.rs:commandInstallers支持[0, 1]。Core API(
plugins.commandInstallers.requirements/plan)platform: {os, arch};不支持的平台返回plugin.commandInstaller.platformInvalid。download: null | {version};带platform时没有该平台归档的下载安装不列出。platform、不接受installDirectory;没有该平台归档返回plugin.commandInstaller.unavailable。计划的arguments、environment、directoryProbes为空、commandDirectory为null,新增download:选中归档的installer、version、os、arch、url、sha256、archive、stripPrefix、mirrors、cacheKey、commandDirectory。cacheKey是规范 JSON(不含镜像)的 SHA-256,改地址、摘要、格式、版本或布局都会换新目录。工具安装的计划download为null。契约与文档
plugin-manifest.schema.json:commandInstallers条目改为 tool / download 二选一,新增归档$defs。platformInvalid、unavailable;宿主:downloadFailed、checksumMismatch、archiveInvalid,failed只指工具安装失败)。command-installer-download.plugin.json;command-installer-plans.json共 28 个用例;invalid-manifests.json新增 22 个非法清单。rust-core-api.md、协议更新记录(commandInstallers1 条目和首次出现表)。本 PR 不新增或修改插件宿主方法(
lithe/host/*)、宿主通知或 SDK 版本,所以没有“原计划编号 | 方法 | 用途”表;改动属于 API-23 的清单声明和 Core API 请求参数。桌面端实现下载、校验、解压和界面在 Lithe-IDEA 的后续 Draft PR。验证
cargo test --workspace(rust/):19 组全部通过(含lithe-core876 项)。cargo test -p lithe-plugin-manifest、lithe-core的declarative_plugins定向测试通过。cargo fmt --all --check、cargo clippy --workspace --all-targets -- -D warnings通过。node shared/plugins/scripts/verify-docs.mjs通过;新 fixture 用 ajv 对 schema 校验通过。extension/adapter/codelldb,zip 保留可执行位)。sdk-e2e.mjs。范围检查