Repository navigation
fix(desktop): 运行配置只按插件声明生成,删除内置探测器与内容指纹的桥接 (#1856) - #2062
Merged
Merged
Conversation
…98 (#1856) - run_discovery.go:删除只有测试使用的 InspectRunConfigurations 与诊断类型;GenerateRunConfigurations 不再传缓存目录,返回 {generated, entryCount} - 测试改用合成的 provider run(dev.example.engine)验证生成不写工作区 - 删除 run.incompleteProjectScan* 词条 - 运行配置 Agent Note 改写为“生成层只来自插件声明”,归档指纹与探测质量两篇旧 Note,更新构建契约、Provider 提案、隐藏目录 Note、设计稿和功能矩阵
xiaoyumuxi
marked this pull request as ready for review
November 16, 2026 16:20
1 task done
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
Core 的
runConfig.generate原来内置 Cargo、Go、npm/pnpm/yarn/bun、Python、Make、just、Procfile、Compose 8 类探测器,按文件名自己生成 Run 配置,还为此遍历整个工作区算内容指纹、匹配工具链版本。这是 Core 对具体语言和工具的特判(#1856)。Run 入口已经有通用机制:构建插件用buildSystems[].run声明,用sync.watch声明过期输入(API-29)。Lithe-core-rust #77 删除了探测器、内容指纹和工具链需求:生成层只来自
providerRuns,只存在 Core 内存;inspect只报告staleProviderModel;generate不再接收cacheDirectory。本 PR 是桌面端接入:删掉跟着失效的桥接、测试夹具和文案,更新 Note、设计稿和功能矩阵。改动 / Changes
Core 桥接(
desktop/internal/core/run_discovery.go)RunConfigDiagnostic、RunConfigInspection和InspectRunConfigurations:只有测试调用,Core 也不再返回指纹相关的诊断。GenerateRunConfigurations(ctx, root, providerRuns):去掉cacheDirectory参数,请求只发{root, providerRuns},返回{generated, entryCount}。工作台(
desktop/internal/workbench/)app.go:Kernel接口的GenerateRunConfigurations同步去掉cacheDirectory。runconfig.go:refreshRunConfigurations调用改为GenerateRunConfigurations(ctx, root, snapshot),注释改为“生成已加载模型声明的运行入口”。行为不变:仍在构建模型加载后生成。runconfig_edit_test.go:注释“detected run”改为“provider run”。测试
core/run_discovery_test.go:原测试靠 Core 探测器识别package.json等文件,现改为TestGenerateRunConfigurationsNeverWritesTheWorkspace:用合成的 provider run(dev.example.engine)生成,断言生成 1 条,工作区里只有原来的app目录。core/run_config_test.go:两处调用去掉空的cacheDirectory参数。界面文案
run.incompleteProjectScanTitle、run.incompleteProjectScanMessage(shared/i18n/messages.json和中英 locale)。Core 不再报告incompleteProjectScan,桌面端也没有代码读这两个词条;重新生成后生成文件无变化。Agent Note
2026-10-29-run-configuration-detection-in-memory.md改写为“运行配置的生成层只来自插件声明,只存在内存里”:run的生态在“后果”里的清单。归档日期:2026-11-16和说明横幅):bug-fix/2026-09-22-run-panel-fingerprint-loading.md(内容指纹)feature/2026-09-20-run-configuration-discovery-quality.md(探测器的分类与消歧)2026-10-17-build-system-plugin-contract.md:加 2026-11-16 说明;删除“runConfig.generate还没有接入构建模型”一条,以及两条过时的 Windows 宿主限制(Viva 桌面端在两端都声明buildSystems和buildProviders)。proposed/.../2026-10-17-build-system-provider-api.md:加说明,“迁移现有探测器、改写成内置声明”的计划作废;相关 Note 链接改指当前的运行配置 Note。2026-11-16-plugin-declared-hidden-directories.md:Core 已没有“运行发现”扫描,从两处列表删除。设计稿与功能矩阵
docs/design/plugin-settings.html:“重新识别”弹窗不再提.lithe/run/generated.json,改为按构建插件声明的运行入口重新生成。shared/platform-feature-matrix/features/run-discovery.json:删除指纹扫描不完整的三句验证说明;“检测层”改为“生成层”;删除“非 provider 检测项的启动”缺口;Core 方法列表去掉InspectRunConfigurations;追加 2026-11-16 的变更说明。Core 固定版本
scripts/desktop/build-desktop-core.sh:PINNED_CORE_REVISION升到 Core [Feature] Windows 多会话终端与 Git 体验完善 #77 分支的66e98ecaf6bac483e2de1ac0f9f19fe8367a45cf([Feature] Windows 多会话终端与 Git 体验完善 #77 已合并 Core main,包含 [Feature] Windows 工作台 UI 视觉重构 #76 的build.modelTree;本 PR 也已合并桌面 main)。[Feature] Windows 多会话终端与 Git 体验完善 #77 合入后要改成它在 main 上的 commit 再合入本 PR。不在本 PR 范围内 / Out of scope
run的生态在 Run 列表里没有自动条目(用户已确认接受):npm/pnpm/yarn/bun、Python、Make、just、Procfile 没有插件;Cargo 插件 0.1.3 还没有声明run;Docker 插件没有buildSystems,Compose 这类基础设施还要等契约允许run声明类别。用户保存的配置不受影响。run;契约、schema 和能力版本都没有变。Cargo 和 Docker 插件是否补run、何时发版,由插件维护者决定。类型专属:fix
复现与根因
git log -S或git blame查):探测器和指纹是插件能声明run之前,Core 为 Run 列表自己做的识别;buildSystems[].run上线后两套机制并存,同一个 Go 项目还会出两条入口。检查项
TestGenerateRunConfigurationsNeverWritesTheWorkspace证明生成层只来自 provider run、不写工作区InspectRunConfigurations、RunConfigInspection、RunConfigDiagnostic、incompleteProjectScan、cacheDirectory在desktop/、scripts/、shared/中已无引用.agents/notes/implemented/记录(改写了运行配置 Note,见上)范围检查 / Scope checks
功能矩阵 / Feature matrix
shared/platform-feature-matrix/features/<id>.json:两端的实现状态和验证状态、证据路径、owner、验证动作都如实填写;没有运行验证的保持pending(run-discovery)./scripts/platform-feature-matrix/verify-platform-feature-matrix.sh;改了平台实现路径的,还运行了./scripts/platform-feature-matrix/verify-platform-feature-matrix-change.sh origin/main HEAD.artifacts/下生成的矩阵视图插件归属 / Plugin ownership
develop-lithe第三节“插件归属与宿主零依赖”的自查命令,结果为空dev.example.engine)shared/i18n/;插件的构建步骤、资源路径和补丁没有写进docs/ci-builds.md、Agent Note 或 SkillbuildSystems[].run的契约没变;已声明run的插件生成结果不变UI 验证 / UI evidence
N/A:Run 面板的布局、控件和文案都没变;删掉的两个词条在桌面端没有使用。
统一日志系统 / Structured logging
N/A:没有新增或改动日志事件和失败路径。
界面文案 / i18n
node scripts/i18n/verify-app-language-localization.mjs和node scripts/i18n/generate-i18n.mjs --check,没有放宽脚本或扩大豁免名单逻辑归属 / Logic placement
性能与内存 / Performance and memory
设置 / Settings
N/A:没有新增或修改设置。
插件契约 / Plugin contract
runConfig.*命令(rust-core-api.md),不需要登记插件协议更新记录scripts/desktop/build-desktop-core.sh的PINNED_CORE_REVISION已升到包含该改动的 Core commit([Feature] Windows 多会话终端与 Git 体验完善 #77 分支 66e98ec,合入后改成 main 上的 commit)sdk-e2e.mjs:没有改插件后端协议发行包与资源 / Bundle and resources
./scripts/desktop/verify/verify-runtime-bundle-immutability.sh(没有新增资源路径;Core 不再读写.lithe/run/generated.json和缓存目录)无用代码与重构 / Dead code and refactoring
InspectRunConfigurations及其类型、两个incompleteProjectScan词条)refactor标签的 Issue,没有在本 PR 顺手处理:无新发现验证 / Verification
scripts/desktop/desktop-go.sh test ./internal/... -count=1(Core 固定 66e98ec,合并 main 后重跑)scripts/desktop/desktop-go.sh vet ./internal/...(合并 main 后重跑)./scripts/platform-feature-matrix/verify-platform-feature-matrix.sh./scripts/platform-feature-matrix/verify-platform-feature-matrix-change.sh origin/main HEADnode scripts/i18n/verify-app-language-localization.mjs、node scripts/i18n/generate-i18n.mjs --check、node --test scripts/i18n/test-i18n.mjs./scripts/agent-notes/verify-agent-notes.sh./scripts/desktop/verify/verify-runtime-bundle-immutability.sh.agents/skills/write-stable-tests/scripts/verify-test-stability.sh --base origin/maindevelop-lithe第三节插件归属自查命令cargo fmt --check、cargo clippy、cargo testplugin_sdk_build在--all-features下需要环境变量,是既有情况)未能执行的检查和原因:
提交前确认 / Final checks
main创建(02f4d9e4e),之后已合并 origin/main(cdbd55597,含 feat(desktop): 工具和生态的隐藏目录改由插件声明,Core 固定到 main ac8825b (#1856) #2060、feat(desktop): Build 窗口参照 IDEA 按父子项目嵌套,树由 Core build.modelTree 排布 #2061);目标分支main.build/、target/、dist/、.artifacts/等产物,没有凭据、个人路径和未脱敏的日志或截图