Repository navigation
feat(plugins): add managed runtime preparation and isolated resolver sessions - #96
Merged
Merged
Conversation
This was referenced Nov 18, 2026
1lck
marked this pull request as ready for review
November 18, 2026 11:12
xiaoyumuxi
added a commit
that referenced
this pull request
Nov 18, 2026
* feat(run-config): 插件声明启动前任务(beforeLaunchTasks 0),启动前可添加插件任务 对标 IntelliJ IDEA 运行配置“启动前”的“添加新任务”(如 Go 插件的“运行 Go 命令”), 由插件注入任务种类,Core 不含任何插件特判(1lck/Lithe-IDEA#2100)。 - 契约:buildSystems[].beforeLaunchTasks(最多 16 个),声明方式同 runConfigurationTypes, 但不能写 execution,arguments 不能用 ${userArguments};任务 ID 与类型 ID 各自唯一; requires.beforeLaunchTasks 0;语言文件新增 beforeLaunchTasks 一节;新 fixture before-launch-tasks/。 - 运行配置:beforeLaunch 步骤新增 {task: {pluginID, buildSystemID, type, values}}, 在拥有该列表的配置的工作目录里运行;步骤对象不允许其他键。 - 命令:新增 runConfig.checkBeforeLaunchTask(校验“添加新任务”表单值)和 build.beforeLaunchTaskPlan(把任务步骤展开成 argv 计划);runConfig.beforeLaunch、 updateOptions、saveEditorChanges 新增 runTypePlugins;拒绝码新增 taskNotDeclared、 invalidTaskValues;确认指纹覆盖任务、值和工作目录。 - 编辑器:beforeLaunch 字段新增 tasks(任务种类与表单),字段值里的任务步骤为 {task, name, summary, values},插件已卸载的为 {task, name, summary, missing: true}。 - 修复:runConfigurationTypes 的必填 arguments 字段留空以前不会被拒绝。 - 文档:rust-core-api、run-configuration-v2 schema、契约 README 与两份 schema、 能力表、API 总表、build-systems 领域页、协议更新记录(同时把已合入的 #96 managedRuntimes 从“待合入”移进时间线和首次出现表)。没有新增宿主方法或通知。 * feat(run-config): 新增 runConfig.beforeLaunchField,给不用 editorForm 的编辑器读取启动前列表 构建运行的编辑器不走 runConfig.editorForm,以前由宿主自己算可选配置,也看不到插件任务。 新命令按已保存配置返回 beforeLaunch 字段的 candidates、tasks 和当前生效的 value, 编辑后的值照旧交给 runConfig.updateOptions。未知配置返回 invalid_request。
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
Refs 1lck/Lithe-IDEA#2057
用户已确认方案 B:先检查已有合格运行时,仅补齐缺失部分,运行时缓存独立于插件版本。本 PR 提供通用 Core 契约;宿主下载/生命周期与具体工具的资格检查分别由配套宿主、插件 PR 接入。
改动说明
managedRuntimes: 0、runtimes.install和固定 HTTPS/SHA-256 归档声明。解析后端必须自带启动所需程序,保证空环境也可预检。plugins.managedRuntimes.plan选择精确平台归档并生成不含插件版本的缓存身份。plugins.managedRuntimes.decodeResolution验证完整依赖分区、绝对路径与结果形状;具体兼容性由插件负责。runtimes映射,不改变项目工具链。functionRelayEnabled。准备会话设为 false 后,既不能被其他插件选为 provider,也不能向其他插件发起调用;宿主仍可直接调用其解析函数。普通会话默认行为不变。Lithe Review
范围:
main (c146247) ← lithe-support/managed-plugin-runtimes。结论: 未发现需要阻塞合并的问题。已修复临时准备会话可能与已安装版本同名 provider 混用的隔离缺口,并补充同插件 ID 的回归。
验证
-D warnings:通过。发布顺序
先合入此 Core 契约,再发布声明 managedRuntimes 能力的宿主,最后发布要求该能力的插件。旧宿主会因缺少能力拒绝新声明;未声明该能力的旧插件行为保持兼容。