Repository navigation
feat(run): 插件声明的运行配置类型,运行配置可允许多个实例 - #2148
Merged
Merged
Conversation
- 运行/调试配置对话框的“+”菜单在内置类型之后列出插件为构建系统声明的类型 (buildSystems[].runConfigurationTypes,API-29),表单显示插件字段和插件翻译 - 插件类型保存到 .lithe/run/plugin/<插件 ID>.toml 或本机层,运行时由 Core build.runConfigurationPlan 计划命令,宿主启动进程;未检测到构建系统时拒绝启动, 插件类型没有调试器,调试启动被拒绝 - 名称行新增“允许多个实例”:不勾选时再次运行会重启,勾选时打开新的 Run 标签;调试仍只有一个 - Core 固定到 661ef0f;补测试、无头截图、Agent Note 和功能矩阵
xiaoyumuxi
marked this pull request as ready for review
November 18, 2026 08:28
This was referenced Nov 18, 2026
xiaoyumuxi
added a commit
to Lithe-IDEA/Lithe-core-rust
that referenced
this pull request
Nov 18, 2026
- api-catalog.md:API-29 中英两行不再写桌面端未声明 runConfigurationTypes,改为自 #2148 起声明、插件类型不能调试。 - capabilities-and-versions.md:runConfigurationTypes 0 的桌面端列由“未声明”改为 ✅¹,脚注 ¹ 加一条插件类型不能调试。 - domains/build-systems.md:中英“宿主支持”说明写明对话框列出、编辑、保存和运行插件类型的方式。
This was referenced Nov 18, 2026
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
PR 类型 / Type
改动说明 / What changes
背景 / Why
#2100 已经让运行/调试配置对话框支持 sh、PowerShell、cmd 和可执行文件这四类内置运行。Go 等语言的“构建/测试”这类运行方式不该由宿主内置,而应该由插件通过 API 声明自己的运行配置类型。Core #94(已合入,661ef0f)为此加了插件契约
buildSystems[].runConfigurationTypes(API-29),并给所有运行配置加了通用开关allowMultipleInstances。本 PR 在桌面端接上这两项:对话框列出并编辑插件声明的类型,由宿主启动它们;每条运行配置都可以决定再次运行时是重启,还是再开一个实例。改动 / Changes
插件声明的运行类型
宿主声明能力
runConfigurationTypes(pluginhost.Declared()),声明了该能力的插件可以安装。打开对话框时,在后台读取运行配置类型(
runconfig_types.go):pluginsettings.ReadTranslations改为导出,和插件设置共用;pluginservice.ToolchainPlugin新增安装目录Directory。语言文件读不出或内容不合法时,记operation rejected,不中断。“+”菜单在四类内置运行之后列出插件声明的类型,显示插件写的名称和说明。插件被停用或卸载时,该类型标为不可用。
编辑器的说明:
field:<id>。运行的流程:
build.runConfigurationPlan计划命令;buildStateDirectory,不写安装包);buildprocess启动进程,输出进 Run 窗口。启动前步骤和保存未保存的文档,与内置运行一样。
标题栏:
refusalNotReady)。refusalNotSupported)。Core 客户端(
internal/core):PlanRunConfiguration、RunTypeKey、RunTypePlugins、RunTypeLocalization等类型;RunConfigurationTypes增加runTypePlugins请求,并返回语言文件报告;RunTypeReference()取出{pluginID, buildSystemID, type}。图标:插件包里的图片图标暂按执行类别(application / task)显示宿主图标,见“不在本 PR 范围内”。
允许多个实例
errRunRunning)。desktop.runConfig.fieldAllowMultipleInstances和allowMultipleInstancesHelp,生成结果已提交。其他
scripts/desktop/build-desktop-core.sh的PINNED_CORE_REVISION改为 Core main 的 661ef0f(fix(windows): update configuration to resolve startup failure #94)。2026-11-18-builtin-process-runs-and-run-file-formats.md新增几节:shared/i18n,不从包目录推导可写路径;run-plugin-declared-types;run-concurrent-executions补上“允许多个实例”的行为和测试。docs/assets/plugin-declared-runs/(6 张和 README);docs/assets/builtin-process-runs/整组重新生成,因为表单名称行多了“允许多个实例”,README 补了一句说明。测试
runconfig_types_test.go,用测试里内联的合成插件dev.lithe.test.run-types(构建系统 Fixture Runs,标记文件build.runtypes)。运行的是测试二进制本身,控制台打印收到的参数:TestPluginDeclaredRunKindIsCreatedSavedAndRun:+ 菜单列出类型 → 新建 → 中文翻译 → 必填校验 → 保存到.lithe/run/plugin/dev.lithe.test.run-types.toml→ 运行,确认参数按模板拼出;TestPluginDeclaredRunStartsSeveralInstances:勾选多实例后,连续运行两次,两个实例同时在跑;TestPluginDeclaredRunWithoutItsBuildSystemDoesNotStart:没检测到构建系统时,拒绝启动,调试也拒绝。runconfig_types_visual_test.go的TestVisualPluginDeclaredRuns(无头截图)。不在本 PR 范围内 / Out of scope
api-catalog.md的 API-29 行仍写着“Lithe 桌面端未声明runConfigurationTypes”:本 PR 合入后,在 Core 里更新这一行。icon为图片):暂按执行类别显示宿主图标。split_arguments对反斜杠的处理问题:另行处理。类型专属:feat
多平台对齐
pending。范围检查 / Scope checks
功能矩阵 / Feature matrix
shared/platform-feature-matrix/features/run-plugin-declared-types.json,更新run-concurrent-executions.json。两端实现状态是implemented,验证状态是pending;证据路径、owner 和验证动作都已填写。验证动作只写“声明了运行配置类型的插件”,不点名具体插件。verify-platform-feature-matrix.sh(validated 205)和verify-platform-feature-matrix-change.sh origin/main HEAD(passed)。.artifacts/下的矩阵视图。插件归属 / Plugin ownership
develop-lithe第三节的自查命令,结果为空。dev.lithe.test.run-types,没有读取任何真实插件的包、仓库或清单,也没有“缺少插件就跳过”的测试。shared/i18n/;宿主只新增“允许多个实例”两条宿主自己的词条。runConfigurationTypes。现有构建系统插件走的路径没有变化,buildprovider、pluginhost、pluginservice的测试都已通过。UI 验证 / UI evidence
LITHE_VISUAL_OUTPUT_DIR=… scripts/desktop/desktop-go.sh test -tags 'vivahead lithevisual' ./internal/workbench -run '^(TestVisualPluginDeclaredRuns|TestVisualBuiltInProcessRuns)$' -count=1docs/assets/plugin-declared-runs/和docs/assets/builtin-process-runs/,嵌在下面。插件声明的类型(新功能,没有改动前):
内置运行表单的名称行:
统一日志系统 / Structured logging
app.action.performed(run.configuration.new);backgroundFailedIn(operationrun_config_types);operationRejectedIn(reasonlocalization_unreadable/invalid_localization);界面文案 / i18n
shared/i18n/补了中英词条,运行了generate-i18n.mjs并提交生成结果;Viva 代码通过internal/i18n读取。verify-app-language-localization.mjs和generate-i18n.mjs --check,都通过,没有放宽脚本。逻辑归属 / Logic placement
性能与内存 / Performance and memory
设置 / Settings
.lithe/run/…或本机层),由 Core 读写。打开对话框不写文件,点“应用/确定”才写。插件契约 / Plugin contract
runConfigurationTypes0 与执行它的代码在 Core fix(windows): update configuration to resolve startup failure #94 中一起提交,该 PR 已登记插件协议更新记录:feat(run-config): 插件声明运行配置类型(runConfigurationTypes 0),所有运行配置加“允许多个实例” Lithe-IDEA/Lithe-core-rust#94PINNED_CORE_REVISION已改为 661ef0f(Core main,含 fix(windows): update configuration to resolve startup failure #94),桌面端测试读的就是这份契约。sdk-e2e.mjs:没有改插件后端协议,插件通过清单声明类型,不走后端调用。runConfigurationTypes(清单能力,不是宿主方法)build.runConfigurationPlan(Core 命令,不是宿主方法)发行包与资源 / Bundle and resources
buildStateDirectory),不从包目录推导可写路径。已运行verify-runtime-bundle-immutability.sh,通过。docs/ci-builds.md:没有新增下载、解压、生成或缓存资源。无用代码与重构 / Dead code and refactoring
runConfigTypeIcon仍用于内置类型。验证 / Verification
scripts/desktop/desktop-go.sh vet ./...,以及带vivahead lithevisual标签的 workbench vetgofmt -l ./internal ./cmdscripts/desktop/desktop-go.sh test -count=1,覆盖./internal/workbench/、./internal/core/、./internal/pluginhost/、./internal/pluginservice/、./internal/pluginsettings/、./internal/buildprovider/(变基到 c47ae04 之后)scripts/desktop/desktop-go.sh test ./...(变基前)test-stability-macos.sh --package ./internal/workbench --filter 'TestPluginDeclaredRun|TestRunConfig|TestBuiltInRun|TestRunConfiguration'TestVisualPluginDeclaredRuns、TestVisualBuiltInProcessRunsnode scripts/i18n/verify-app-language-localization.mjs、node scripts/i18n/generate-i18n.mjs --checkverify-platform-feature-matrix.sh、verify-platform-feature-matrix-change.sh origin/main HEAD./scripts/agent-notes/verify-agent-notes.sh./scripts/desktop/verify/verify-runtime-bundle-immutability.sh未能执行的检查和原因:
提交前确认 / Final checks
main(9f4d5fb)创建,已变基到最新main(c47ae04),目标分支是main。