Repository navigation
feat(core)!: #1799 删除 MCP 配置与库命令 - #19
Merged
Merged
Conversation
桌面端不做 Agent 对话后,MCP 管理已经没有调用方:Go 客户端对 mcp.* 命令零引用, 旧 SwiftUI/Tauri 客户端也已从 Lithe-IDEA 移除。MCP 后续会重新设计,本次先把整块 删掉: - 删除 lithe-core 的 mcp 模块(配置解析、Registry、库规划、工具策略、命令行、 格式保留编辑等 14 个文件)。 - 删除 mcp.* 命令:parseConfiguration、parseRegistry、featuredRegistry、 planWrite、toolPolicy、commandLine、librarySnapshot、validateDraft、batchPlan。 - 删除 rust/fixtures/mcp 与 rust/contracts/mcp-registry-page.json,并从 rust-core-api.md 删除 MCP configuration 章节;该章节还残留上一轮已删除的 mcp.probe 说明,一并清掉。 保留 IDE 面向的 MCP 服务端:lithe-ide-host 的 lithe-mcp 二进制与 rust/fixtures/ide-api/mcp-protocol.json 不动,它们不依赖 lithe-core 的 mcp 模块。 验证:cargo fmt --all --check;cargo check -p lithe-core --lib; cargo test -p lithe-core --lib(1739 通过);注释校验脚本通过。 Co-Authored-By: AtomCode (deepseek-v4.1-flash) <noreply@atomgit.com>
1lck
marked this pull request as ready for review
November 12, 2026 03:30
xiaoyumuxi
added a commit
that referenced
this pull request
Nov 13, 2026
- rust-core-api.md 补回 #19 误删的命令总表(375 条,每个 CoreCommand::parse 接受的命令一行) 和 AI configuration 章节;Build systems 表补上 build.resolveStoredOptions、build.editStoredOption。 - protocol::command 新增测试:命令表与解析器逐条比对,增删改命令必须同一次提交更新表格。 - 删除 rust/fixtures/i18n(归 Lithe-IDEA i18n 生成器所有,迁到 shared/i18n/fixtures) 和无人读取的 rust/fixtures/phpunit-project。 Refs 1lck/Lithe-IDEA#1853
xiaoyumuxi
added a commit
that referenced
this pull request
Nov 13, 2026
* feat(core)!: 删除 Java/Maven/JDT 特判与契约专属死命令,run/start 临时文件支持 base64
Core 对 Java 等语言零依赖、零特判,语言和工具专属知识全部由插件注入。
- 删除 execution.planLaunchCommand(JDK @argfile 规划)及 execution/launch_plan.rs
- 删除 LSP 内置语言目录:lsp/languages/catalog.rs、resources/lsp/language-providers.json、
FFI lithe_core_lsp_provider_catalog_json 与头文件声明
- 删除 tree-sitter、tree-sitter-java 依赖
- 删除 lithe-ide-host 目录里的 Java/Maven 工具
- 删除只存在于契约、fixture、测试中的 23 个命令名(java.*、lsp.jdt*、maven.*、
mybatis.index、spring.index、runConfig.selectJava、build.languageImport、
agent.attachments.retentionPlan)及其 fixture
- 删除 maven-launch-context-v1、maven-portable-configuration-v1、run-configuration-v1 schema
- run/start 的 temporaryFiles 增加 {name, base64} 字节文件,宿主原样写入
- 模板 ${field.<id>.major} 取第一个数字分量,不再特判 1.x
- 旧版工具链 pin 的条目改为不透明字符串记录,不再点名 javaHome
- 契约文档和测试 fixture 去掉 Java/Maven/JDT 专属内容
Refs 1lck/Lithe-IDEA#1856, 1lck/Lithe-IDEA#1857, 1lck/Lithe-IDEA#1858, 1lck/Lithe-IDEA#1853
* docs(plugins): 协议更新记录补上 #23
* test(run): 契约 fixture 覆盖 temporaryFiles base64 的拒绝用例
run-start.json 增加三条拒绝用例:同时给出 contents 和 base64、两者都不给、
base64 不是标准编码。Core 的 fixture 回放测试改为传入临时目录,
让这些用例走到逐项校验,而不是停在缺少临时目录。
* docs(contracts): Core 作为应用契约唯一真源,补回命令表与 AI 配置章节
- rust-core-api.md 补回 #19 误删的命令总表(375 条,每个 CoreCommand::parse 接受的命令一行)
和 AI configuration 章节;Build systems 表补上 build.resolveStoredOptions、build.editStoredOption。
- protocol::command 新增测试:命令表与解析器逐条比对,增删改命令必须同一次提交更新表格。
- 删除 rust/fixtures/i18n(归 Lithe-IDEA i18n 生成器所有,迁到 shared/i18n/fixtures)
和无人读取的 rust/fixtures/phpunit-project。
Refs 1lck/Lithe-IDEA#1853
* refactor(ai): AI 命令拆成独立 crate lithe-ai
- rust/lithe-core/src/ai 整体移到 rust/lithe-ai:提交信息生成、PR 描述、内联编辑、
AI CLI 配置解析。新 crate 只依赖 serde、serde_json、toml、url,不做文件、网络和凭据访问。
- lithe-ai 提供 COMMANDS / execute / execute_json 和 AiError,形状与 lithe-core-rules 一致;
lithe-core 的 9 个 ai.* 分发分支改为调用 lithe_ai::execute,AiError 一一映射到 CoreError。
- git.commitMessageContext 仍在 lithe-core(要跑 git),改用 lithe_ai 的敏感路径与预算规则。
- lithe_core::ai 改为 re-export lithe_ai,原有路径不变。命令名、C ABI、JSON 和错误码不变。
- 注释规范检查覆盖 lithe-ai;新增测试确认每个 lithe-ai 命令都经 Core 路由到 lithe-ai。
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.
关联
这个 PR 做什么
Go 客户端对
mcp.*命令零引用,旧 SwiftUI/Tauri 客户端也已从 Lithe-IDEA 移除,lithe-core的 MCP 子系统(配置解析、Registry、库规划、工具策略、命令行、格式保留编辑)在 Core 里不再有调用方。破坏性变更
删除 9 个命令:
mcp.parseConfiguration、mcp.parseRegistry、mcp.featuredRegistry、mcp.planWrite、mcp.toolPolicy、mcp.commandLine、mcp.librarySnapshot、mcp.validateDraft、mcp.batchPlan。删除清单
rust/lithe-core/src/mcp/toml_edit子模块与测试rust/lithe-core/src/protocol/command.rsMcp*变体与命令名映射rust/lithe-core/src/runtime/dispatcher.rsrust/fixtures/mcp/featured-setup-v1.json、library-v1.json、tools-v1.jsonrust/contracts/mcp-registry-page.jsonrust/contracts/rust-core-api.md### MCP configuration章节(该章节还残留上一轮已删除的mcp.probe说明,一并清掉)保留
rust/lithe-ide-host的lithe-mcp二进制与rust/fixtures/ide-api/mcp-protocol.json:这是 Lithe 对外提供的 IDE API MCP 服务端,不依赖lithe-core的 mcp 模块,与本次删除无关。toml_editcrate 依赖保留(toolchain/pin_sources.rs仍在使用),ignore依赖保留(toolchain/pin_sources.rs使用)。验证
cargo fmt --all --check:通过cargo check -p lithe-core --lib:通过(仅剩仓库既有 warning)cargo test -p lithe-core --lib:1739 passed / 0 failedscripts/rust-core/verify-rust-core-comments.sh:通过后续
PINNED_CORE_REVISION。shared/fixtures/mcp、shared/contracts/mcp-registry-page.json、两个 MCP 功能矩阵条目、仅旧客户端使用的 MCP 词条,并归档 MCP 服务器库 Note。