Repository navigation
fix(desktop): 跟进 Core #28 拆分 crate,修正 Core 旧路径并删除 hostIntegration 死代码 - #1887
Merged
Merged
Conversation
- PINNED_CORE_REVISION 临时固定 Core #28 的 HEAD d235401;#28 合入后改成合并 commit。 - 文档、Skill、Agent Note、功能矩阵和资源清单中 302 处 Core 路径改到拆出的 crate, 改写后的路径都在 d235401 中存在;固定修订链接、已迁出行和历史说明保持不变。 - builds.go 删除对 source:"hostIntegration" 的判断及只为它读取的字段,Core 已拒绝这种清单。 - 删除已不存在的 mcp-registry-metadata 资源条目、MCP Registry 与 git_path_roundtrip 说明。 - 引用已迁入插件的 Java/Maven 文件的笔记补“已迁出”行;日志笔记改为 runtime::helper_failures 注入三个 sink;构建系统与 Java 语言服务器笔记注明 hostIntegration 只是保留字段。 - Windows Claude npm shim 笔记归档:Core #18 已删除 agent-host。
This was referenced Nov 13, 2026
xiaoyumuxi
marked this pull request as ready for review
November 14, 2026 03:00
This was referenced Nov 14, 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
d235401:从 lithe-core 再拆出 34 个 crate,workspace 共 46 个;本 PR 跟进它的路径和契约变化)c0201c1,preview 已固定到它;[Windows][Epic] W1-W3 核心工作流补全 #28 已合入它)PR 类型 / Type
改动说明 / What changes
背景 / Why
Core #28 把 lithe-core 里的领域代码拆成 34 个独立 crate(git、lsp-engine、lsp-client、debug、build、plugin-manifest、plugin-rpc、diagnostics、workspace 等),12 个大文件也拆成了主题子模块。命令名、JSON、错误码和 C 头文件都没有变。唯一的契约变化是:构建系统
model、test.results、dependencies里写source: "hostIntegration"时,现在按未知来源以plugin.manifest.invalid拒绝。这一条已记入 Core 的 protocol-changelog。本仓库的 AGENTS.md、Skill、Agent Note、文档、资源清单和功能矩阵里有约 300 处 Core 路径,在 #28 之后都指向不存在的文件。桌面端
builds.go里还有一段判断hostIntegration来源的死代码。本 PR 把 pin 升到 #28 的 HEAD,并一次改完这些引用。无用户可观察缺陷。改动动机是让文档、证据路径和代码与 Core 的新目录一致。
改动 / Changes
Core 固定修订
scripts/desktop/build-desktop-core.sh:PINNED_CORE_REVISION从c0201c1([Windows][W1] 文档安全与多文件编辑状态 #29)升到d235401fa2d6a492f27beb45e0679be846d1b0a5,即 [Windows][Epic] W1-W3 核心工作流补全 #28 当前的 HEAD。注释补上 [Windows][Epic] W1-W3 核心工作流补全 #28 和 [Windows][W1] 文档安全与多文件编辑状态 #29 的内容。桌面端删除 hostIntegration 死代码
desktop/internal/pluginservice/builds.go:删除deps.Source != "hostIntegration"判断和原始结构体里只为它读取的Source字段。Core 现在会拒绝这种清单,宿主收不到这种声明。desktop/internal/pluginservice/builds_test.go:删除hosted用例和对应断言。Core 路径(
rust/crates/core/src/...→ 拆出的 crate)git ls-files和标识符定义批量改写 302 处,涉及 125 个文件。改写后的每个目标路径都在d235401中存在(rust/target/除外,它是构建输出目录)。lsp/interface/engine.rs按功能分到lsp-engine/src/{requests,server_messages,lifecycle,function_calls}.rs;plugins/declarative.rs分到plugin-manifest/src/{validation,settings,settings_surfaces,run_plans}.rs;git/mod.rs分到git/src/{branches,diff,untracked_directories,line_history,workspace_status,repository,write,commits}.rs;project/files.rs分到project/src/files/{search,replace}.rs和core-rules/src/visibility.rs。AGENTS.md:能力版本改为rust/crates/plugin-model/src/capabilities.rs,插件函数协议改为rust/crates/plugin-rpc/src/。.gitattributes、scripts/resources/worktree-resources.json及其测试:catalog_generated.rs改为rust/crates/diagnostics/src/catalog_generated.rs。docs/development/macos-plugin-api-plan.md:S1–S3 的 Core 链接改到 plugin-model、plugin-manifest、plugin-backend、plugin-rpc、plugin-native-ui。.agents/skills/develop-lithe/SKILL.md、references/logging.md。.agents/notes/implemented/**(33 篇)、.agents/notes/proposed/**(7 篇)。shared/platform-feature-matrix/features/*.json(81 个文件):证据路径和说明。git-large-untracked-directories.json的旧 macOS、Windows 证据里,改写后有一条重复的untracked_directories.rs,已去重。blob/<sha>/…)和它的标签。已删除代码的说明
jdt_build.rs、maven.rs、jdt.rs、jdt_maven_settings.rs、java.rs、java_syntax.rs)已由 Core fix:修复左侧Git提交文件无法全选问题 #23 移入插件。引用它们的 5 篇笔记补了“已迁出”行,指向 lithe-plugin-java 或 lithe-plugin-maven,当前的通用部分改指lsp-engine、execution。develop-litheSkill 中-configuration的示例改指 Java 插件的crates/java-domain/src/lsp/languages/jdt_configuration.rs。logging.md:runtime::helper_failures::install()注入,共三个(git-host、ide-host、remote);lithe_diagnostics::core_events。hostIntegration现在只是保留字段,写任何值都会被拒绝;Maven、Java 已改由插件提供。docs/ci-builds.md:git_path_roundtrip.rs测试的说明,这个测试已在 Core 中删除;featured.json([Bug] 左侧Git提交文件无法全选 #19)。scripts/resources/:删除mcp-registry-metadata条目、对应注释和测试。language-providers.json和catalog.rs的“已随 [Feature] Windows/macOS 统一 Viva 工作台与原生编辑器,保留 Rust Core 和插件体系(分阶段重构) #1794 移除”改为“已随 Core fix:修复左侧Git提交文件无法全选问题 #23 移除”:这两个 Core 文件是在 Core fix:修复左侧Git提交文件无法全选问题 #23(78c065d)删除的。bug-fix/2026-10-19-windows-claude-npm-shim-launch.md移入archived/,并写明归档原因:Core feat: add editor tab layout modes and reordering #18 删除了rust/lithe-agent-host,Viva 桌面端也不做 Agent 对话。没有其他文件引用它。不在本 PR 范围内 / Out of scope
macos/、windows/tauri/)的遗留内容按之前的约定等用户决定,本 PR 没有改:legacy证据里已删除的 Core 文件,包括git-status-commit.json的git_path_roundtrip.rs和windows-startup-feedback.json的rust/lithe-agent-host/*。docs/ci-builds.md里 MCP 编辑器原生验收截图一段(agent-ui-test-evidence),以及测试稳定性脚本、windows-and-rust.md里的 agent-host 引用。crate::execution::scan、plugins::declarative、lsp::interface::engine::real_jdt_tests::)是当时的记录,没有改。类型专属:fix
复现与根因
d235401的检出里查本仓库文档、笔记和功能矩阵引用的rust/crates/core/src/...路径,约 300 处不存在;期望每个非历史引用都指向现存文件。桌面端builds.go仍按source: "hostIntegration"跳过依赖声明,而 Core 已不接受这种声明。builds.go是 macOS 和 Windows 共用的桌面端代码。检查项
builds_test.go删掉的是死代码的用例。git ls-files逐条核对,见“验证”。git grep hostIntegration -- 'desktop/**/*.go'只剩这两处,已删除。.agents/notes/implemented/bug-fix/记录:没有改变行为约束;hostIntegration的契约变化已在原笔记开头注明。范围检查 / Scope checks
功能矩阵 / Feature matrix
shared/platform-feature-matrix/features/<id>.json:只改证据路径和说明里的 Core 路径,实现状态和验证状态都不变。./scripts/platform-feature-matrix/verify-platform-feature-matrix.sh;改了平台实现路径的,还运行了./scripts/platform-feature-matrix/verify-platform-feature-matrix-change.sh origin/preview HEAD.artifacts/下生成的矩阵视图统一日志系统 / Structured logging
N/A:没有新增或改动日志事件。只修正了日志文档里的 Core 路径和 sink 注入位置。
界面文案 / i18n
N/A:没有新增用户可见文案。两个 i18n 检查仍然运行,见“验证”。
逻辑归属 / Logic placement
refactorIssue:没有修改可共享逻辑。hostIntegration来源的特判。性能与内存 / Performance and memory
N/A:没有新增后台功能、子进程、缓存或依赖,也没有改动启动、输入、滚动、搜索路径。
设置 / Settings
N/A:没有改设置。
插件契约 / Plugin contract
shared/plugins/reference/protocol-changelog.md新增 2026-11-14 一行。scripts/desktop/build-desktop-core.sh的PINNED_CORE_REVISION已升到包含该契约的 Core commit,桌面端测试经scripts/desktop/desktop-go.sh读到的就是这份契约。[Windows][Epic] W1-W3 核心工作流补全 #28 合入后要改成合并 commit。node shared/plugins/scripts/sdk-e2e.mjs,三个 SDK 示例后端仍能跑通:在 [Windows][Epic] W1-W3 核心工作流补全 #28 的检出上运行,通过。发行包与资源 / Bundle and resources
./scripts/desktop/verify/verify-runtime-bundle-immutability.shscripts/resources/worktree-resources.json、scripts/resources/reuse-worktree-resources.mjs的校验路由、对应测试和docs/ci-builds.md“独立工作树的本地编译”一节:删除了已不存在的mcp-registry-metadata,改了catalog_generated.rs的路径,测试同步更新。无用代码与重构 / Dead code and refactoring
builds.go的Source字段和判断。git_path_roundtrip说明、npm shim 笔记)都在本 PR 处理,没有另建 Issue。验证 / Verification
d235401的git ls-files,核对本仓库所有非固定修订链接的rust/crates/...路径./scripts/agent-notes/verify-agent-notes.sh./scripts/platform-feature-matrix/verify-platform-feature-matrix.sh./scripts/platform-feature-matrix/verify-platform-feature-matrix-change.sh origin/preview HEADnode scripts/resources/test-reuse-worktree-resources.mjsnode scripts/i18n/verify-app-language-localization.mjsnode scripts/i18n/generate-i18n.mjs --check./scripts/desktop/verify/verify-runtime-bundle-immutability.shscripts/desktop/desktop-go.sh test ./...(固定到d235401)verify-docs.mjs、sdk-e2e.mjs未能执行的检查和原因: Windows 上的桌面端测试没有在本机运行,交给 ready 后的 CI。
提交前确认 / Final checks
preview创建;目标分支:preview.build/、target/、dist/、.artifacts/等产物,没有凭据、个人路径和未脱敏的日志或截图