Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ IntelliJ Community 固定版本
### 实际执行由共享入口记录

Rust Core 负责 Git 参数策略、事件解码、脱敏和结果模型。
`rust/lithe-git-host/` 负责原生子进程、管道、临时输入文件和限时清理。
`rust/crates/git-host/` 负责原生子进程、管道、临时输入文件和限时清理。
已有 Core 捕获入口调用该适配器,保留旧 JSON 和 C ABI(C 语言调用边界)
兼容性;其他旧的 Git 检查辅助函数尚未全部迁移。

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ languageID 对应描述元数据已有的 `languageServerLaunch.executableNames`
本次没有新缓存目录、下载或安装资源写入,运行时只读发行基线不变。

LSP 子进程、stdio、JSON-RPC 状态机、文档版本、请求 deadline、诊断和
结果归一化统一收归 Rust Core(`rust/lithe-core/src/lsp/`(已随 #1794 移除)),
结果归一化统一收归 Rust Core(`rust/crates/core/src/lsp/`(已随 #1794 移除)),
平台 adapter 只负责可执行文件与运行环境发现。Swift 只保留 UI 投影和
由不透明 operation ID 标识的应用层完成回调,不再持有 LSP 请求 ID、
原始 JSON、framing 缓冲区、子进程句柄或文档 open 状态的真值。
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ Maven JDK、显式覆盖及资源步骤;#1133 的 Maven 原生资源步骤保
`LITHE_JDTLS_SMOKE_MAVEN`。不设置包路径时普通单元车道不启动外部工具;
明确设置后缺少工具或包必须失败,不能降级跳过。
通过 Rust 计时入口运行,真实工具场景沿用专属的 600 秒总预算:
`node .agents/skills/write-stable-tests/scripts/run-rust-tests-with-timing.mjs --manifest rust/lithe-core/Cargo.toml --test-budget lsp::interface::engine::real_jdt_tests::=600000 --report .artifacts/test-stability/stage-d-real-jdt-core.json`。
`node .agents/skills/write-stable-tests/scripts/run-rust-tests-with-timing.mjs --manifest rust/crates/core/Cargo.toml --test-budget lsp::interface::engine::real_jdt_tests::=600000 --report .artifacts/test-stability/stage-d-real-jdt-core.json`。
本机 1395 项通过,其中新增集成 35.983 秒,另两项真实 JDT 为 14.897/11.520 秒。
最后把临时目录所有权提前到首个 fixture 写入前;该场景再次逐项计时通过,含进程清理为 27.751 秒。
- 原生工程归属、链接路径及取消回归:
Expand Down Expand Up @@ -392,9 +392,9 @@ Maven JDK、显式覆盖及资源步骤;#1133 的 Maven 原生资源步骤保

## 适用范围

- Rust Core:`rust/lithe-core/src/execution/configuration.rs`
- Rust Core:`rust/crates/core/src/execution/configuration.rs`
- Rust Core 构建协调:`rust/lithe-core/src/lsp/languages/jdt_build.rs`、
`rust/lithe-core/src/lsp/interface/engine.rs`
`rust/crates/core/src/lsp/interface/engine.rs`
- macOS:`LanguageToolingSessionManager`、`AppModel+RunConfiguration`、`RunService`
- Windows:`java-run-launch.ts`、`lsp-core-adapter.ts`、`run.store.ts`
- 相关笔记:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ Windows 休眠的 Run Actions 宿主不再扫描其他语言的 manifest 或自
- `MacPluginPackageDownloaderTests`:验证 stable/preview 发行资产 URL 按 App 发布版本和架构确定性生成。
- `LanguageExtensionProcessLifecycleTests.packagedServersArePinnedToTheirOwnPackage`、`LanguageServerToolServiceTests.pinnedExecutableIsTheOnlyCandidate`:验证插件打包的 Intelephense 只从本插件已安装的版本目录启动,不按文件名在 PATH 或其他插件中查找。
- `PluginPackageStoreTests/reinstallCanReplaceTheActiveVersionOnlyAfterValidation`:验证重装不会绕过签名校验,并在校验完成后替换当前版本。
- `cargo test --manifest-path rust/lithe-core/Cargo.toml --lib declarative_plugins`:PHP 运行、PHPUnit 整套/单文件/单方法命令展开与路径保护。
- `cargo test --manifest-path rust/crates/core/Cargo.toml --lib declarative_plugins`:PHP 运行、PHPUnit 整套/单文件/单方法命令展开与路径保护。
- `LITHE_RUN_PHP_INTEGRATION=1 ./scripts/macos/test/test-macos.sh --filter RealPhpIntegrationTests`:真实工具测试;先在 `shared/fixtures/phpunit-project` 执行 `composer install`,并提供 Node.js 与插件组装出的 Intelephense launcher。
- Windows 前端测试包含禁用时不扫描、Composer 数组、下载取消、在途启动后禁用及跨工作区进程隔离。Windows native 测试与实际应用启动必须在 Windows 环境执行;Linux 交叉编译不等于运行验收。

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ Lithe 不自己判断“要不要重解析”,而是按 JDT LS 上游(vscode
更新会重新解析所有 Maven 项目,大工程上比“什么都不做”慢,但这正是用户点重新加载
时要的结果。

**验证。** Rust Core `cargo test --manifest-path rust/lithe-core/Cargo.toml --lib`
**验证。** Rust Core `cargo test --manifest-path rust/crates/core/Cargo.toml --lib`
覆盖内容寻址(内容变路径变、相同内容复用、旧副本保留、临时文件所有权、默认用户设置、读不到时降级),
以及 `update_maven_configuration` 的四条路径(设置变化、强制更新、握手前更新、
profile 变化、失败或超时期间变更补跑、握手前无设置变化的强制重载)。Windows `bun test src/platform src/features/maven`
Expand Down Expand Up @@ -455,7 +455,7 @@ CARGO_TARGET_DIR="$PWD/rust/target/macos" CARGO_BUILD_JOBS=2 node --input-type=m
import { run, parseArguments } from './.agents/skills/write-stable-tests/scripts/run-rust-tests-with-timing.mjs';
import { runProcess } from './.agents/skills/write-stable-tests/scripts/test-timing-lib.mjs';
await run(parseArguments([
'--manifest', 'rust/lithe-core/Cargo.toml', '--package', 'lithe-core', '--keep-going',
'--manifest', 'rust/crates/core/Cargo.toml', '--package', 'lithe-core', '--keep-going',
'--report', '.artifacts/test-stability/core-mvnd/core-mvnd-languages.json',
]), { runProcessImpl: request => runProcess({
...request,
Expand All @@ -474,7 +474,7 @@ macOS 使用 `MacRuntimeDiscoveryTests`、`MacRuntimeProbeCacheTests` 和
本次拥有的 daemon 状态目录,验证构建与 JDT 全局设置,并在有界结束后清理进程。
单元测试或跨平台编译不能替代这一步,功能矩阵在原生验收完成前保持待验证。

- Rust Core:`cargo test --manifest-path rust/lithe-core/Cargo.toml`
- Rust Core:`cargo test --manifest-path rust/crates/core/Cargo.toml`
覆盖主目录、bin 目录与启动器写法都能推出正确的全局设置、Wrapper 与无 `conf`
的安装正确返回空、`initializationOptions` 注入且不吃掉扩展目录的键、
Profile 指纹随安装变化,以及生成文档保留镜像/注释、插入缺失节点、展开空元素、
Expand All @@ -501,7 +501,7 @@ macOS 使用 `MacRuntimeDiscoveryTests`、`MacRuntimeProbeCacheTests` 和
过期结果不覆盖新结果与输入防抖。macOS `MavenRuntimeTests` 覆盖来源判断、检测未完成
不同步探测、Maven JDK 回退与 Maven 选择链,`WorkbenchFeatureModelTests` 覆盖重复
分类请求。
- 项目环境设置入口:`cargo test --manifest-path rust/lithe-core/Cargo.toml
- 项目环境设置入口:`cargo test --manifest-path rust/crates/core/Cargo.toml
project_environment_saves_before_generation` 用共享 fixture
`shared/fixtures/run-configuration/project-environment.json` 覆盖未生成配置时保存
默认值、保留服务覆盖以及 `checkFingerprint` 的两种行为。Windows 运行
Expand Down Expand Up @@ -543,7 +543,7 @@ JDK 和未知偏好;非空值成为本机 Build 默认值,空值继续表示

- Rust Core Maven 域:`rust/lithe-core/src/project/maven.rs`
- Rust Core JDT 适配:`rust/lithe-core/src/lsp/languages/jdt.rs`
- Rust Core 语言服务引擎:`rust/lithe-core/src/lsp/interface/engine.rs`
- Rust Core 语言服务引擎:`rust/crates/core/src/lsp/interface/engine.rs`
- Rust Core 设置副本:`rust/lithe-core/src/lsp/languages/jdt_maven_settings.rs`
- Windows 实时同步与问题展示:`windows/tauri/src/features/maven/services/java-maven-configuration.ts`、
`windows/tauri/src/features/maven/services/reload-maven-workspace.ts`、
Expand All @@ -556,7 +556,7 @@ JDK 和未知偏好;非空值成为本机 Build 默认值,空值继续表示
- Windows 宿主:`windows/tauri/src-tauri/src/run.rs`(`maven_resolve_installation`)
- macOS:`macos/Sources/LitheExecutionModule/Services/BuildSystemService.swift`
- 项目环境与运行配置设置入口:
- Rust Core:`rust/lithe-core/src/execution/configuration.rs`(`runConfig.inspect`、
- Rust Core:`rust/crates/core/src/execution/configuration.rs`(`runConfig.inspect`、
`runConfig.updateOptions` 工具链分支)
- 共享契约:`Lithe-core-rust/rust/contracts/rust-core-api.md`、
`shared/fixtures/run-configuration/project-environment.json`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ m2e 内嵌的 Maven,而不是用户配置的 Maven 或 mvnd,违反“依赖

## 验证

- Rust Core:`cargo test --manifest-path rust/lithe-core/Cargo.toml maven_depend`
- Rust Core:`cargo test --manifest-path rust/crates/core/Cargo.toml maven_depend`
覆盖计划参数(含 `-N` 与 `outputFile` 校验)、共享 fixture
`shared/fixtures/maven/dependency-tree-v2.json`(LF 与 CRLF)、6,000 与
10,000 节点的大树、字节/节点/行长/深度上限、格式漂移与缺失文件。完整校验运行
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

官方语言插件(Go、PHP)不再是"在 Lithe 进程里加载的 Swift Bundle",而是声明式插件包:包里只有 `plugin.json` 和它声明的资源(例如打包好的 Intelephense)。Lithe 读取声明,由 Rust Core 校验并展开运行/测试命令,再由宿主自己启动语言服务器和运行进程。插件不在宿主进程内执行任何代码,所以插件包不再依赖宿主二进制,Lithe 每次发版也不用重新编译插件,之后可以把插件拆到独立仓库维护。Go 和 PHP 后来确实拆成了 Lithe Store 社区插件,见 [Go 与 PHP 改为 Lithe Store 社区插件](2026-10-20-go-php-community-plugins.md)。

对日常开发的直接影响:新增语言插件时写 `plugin.json`,不要写 Swift 入口类;声明格式和语义以 `Lithe-core-rust/shared/plugins/contract/v1/` 为准,校验与命令模板展开只在 `rust/lithe-core/src/plugins/declarative.rs` 实现一次。
对日常开发的直接影响:新增语言插件时写 `plugin.json`,不要写 Swift 入口类;声明格式和语义以 `Lithe-core-rust/shared/plugins/contract/v1/` 为准,校验与命令模板展开只在 `rust/crates/core/src/plugins/declarative.rs` 实现一次。

通用工作台 UI 已通过 API level 2 扩展,见 [宿主管理的工作台 UI 贡献](2026-10-12-workbench-ui-contributions.md)。语言插件的 API level 1 和进程归属保持兼容。

Expand Down Expand Up @@ -98,7 +98,7 @@ gopls 把 `fmt.Println` 的定义指向 `GOROOT/src/fmt/print.go`,Intelephense

## 验证

- `cargo test --manifest-path rust/lithe-core/Cargo.toml --lib declarative_plugins`:合法样例、非法样例错误码、命令展开标准答案,以及仓库里的官方 `plugin.json`。
- `cargo test --manifest-path rust/crates/core/Cargo.toml --lib declarative_plugins`:合法样例、非法样例错误码、命令展开标准答案,以及仓库里的官方 `plugin.json`。
- ~~./scripts/architecture/verify-shared-contracts.sh~~(随旧客户端移除):契约目录自洽(schema、fixture 引用、错误码均已在 README 中登记)。
- 官方插件包的组装与校验(原 verify-official-plugins 脚本:组装官方包并用 `LitheOfficialPluginVerifier` 检查信任策略、打包入口和"包内无 Mach-O"。)已随插件移出本仓库,由各插件仓库的 CI 负责(#1495)。
- `./.agents/skills/write-stable-tests/scripts/test-stability-macos.sh -- --filter 'Plugin|LanguageExtensionProcessLifecycleTests|LanguageServerToolServiceTests|LanguageNavigationCoordinatorTests|ExternalNavigationTests'`:包校验、旧包过渡、签名、启停与进程清理、打包入口固定、跨工作区跳转边界。
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,12 @@ Agent 的配置入口由同一个目录补齐,移动到任何已有停靠区

## 验证

- `WorkbenchContributionHostTests.chineseActionSearchFindsAndRestoresHiddenTerminal` 使用实际中英资源验证中文标题、中文说明和英文别名,执行后恢复终端入口,切换回英文后不再沿用旧语言;修复前中文查询确认为空。Core 的 `Lithe-core-rust/rust/fixtures/search/actions-v1.json` 验证排序、Unicode、插件原文和输入预算。 动作匹配实现位于 `rust/lithe-core/src/action_search/mod.rs`,遵循 Core 根目录仅保留 `lib.rs` 的既有布局规则;模块路径和 `search.actions` 协议不变。
- `WorkbenchContributionHostTests.chineseActionSearchFindsAndRestoresHiddenTerminal` 使用实际中英资源验证中文标题、中文说明和英文别名,执行后恢复终端入口,切换回英文后不再沿用旧语言;修复前中文查询确认为空。Core 的 `Lithe-core-rust/rust/fixtures/search/actions-v1.json` 验证排序、Unicode、插件原文和输入预算。 动作匹配实现位于 `rust/crates/core-rules/src/action_search.rs`,遵循 Core 根目录仅保留 `lib.rs` 的既有布局规则;模块路径和 `search.actions` 协议不变。

- `WorkbenchContributionHostTests.toolWindowsMenuRestoresHiddenTerminalAtItsSavedDockWithoutToggling` 覆盖隐藏入口恢复、原停靠组、重复 Show 不关闭、模块禁用及旧菜单动作;已安装声明式插件流程补充从同一菜单恢复。`ContextMenuCoverageTests.rightClickOnSubmenuKeepsThePopupAndShowRemainsKeyboardAccessible` 用原生右键事件验证父弹层保持可见,再用方向键和 Return 执行显示;模型回归确认菜单构造不激活模块或创建终端会话。实际产品还需在深浅主题检查左侧“…”、菜单打开/关闭、快捷键与终端已有会话。

- ~~./scripts/architecture/verify-shared-contracts.sh~~(随旧客户端移除)
- `cargo test --manifest-path rust/lithe-core/Cargo.toml --lib declarative_plugins`
- `cargo test --manifest-path rust/crates/core/Cargo.toml --lib declarative_plugins`
- `./.agents/skills/write-stable-tests/scripts/test-stability-macos.sh -- --filter 'PluginUIIconTests|WorkbenchContributionHostTests|WorkbenchFeatureModelTests|WorkbenchModuleUIRegistryTests|ModuleSessionCoordinatorTests'`
- ~~./scripts/architecture/verify-service-boundaries.sh~~(随旧客户端移除)
- `./scripts/desktop/verify/verify-runtime-bundle-immutability.sh`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Java 的语言服务器 JDT LS(Eclipse 的 Java 语言服务器,提供补全
| 插件资源 | 集成要读的文件 | `hostIntegration.resources`,由插件声明包内路径 |
| 宿主能力 | 仍由宿主内置实现提供的运行、测试、调试 | `hostIntegration.capabilities`,由插件逐项声明 |

字段语义以 `Lithe-core-rust/shared/plugins/contract/v1/README.md` 为准,校验和模板展开只在 `rust/lithe-core/src/plugins/declarative.rs` 实现一次。
字段语义以 `Lithe-core-rust/shared/plugins/contract/v1/README.md` 为准,校验和模板展开只在 `rust/crates/core/src/plugins/declarative.rs` 实现一次。

### 2. 契约 API 2 增加的内容

Expand Down Expand Up @@ -208,7 +208,7 @@ dev.lithe.plugin.java-support/

以下命令和结论是旧客户端的历史验证,不适用于当前 Viva 工作树;迁移完成后必须重新验证插件资源、会话生命周期、Java 功能以及安装包只读约束。

- `cargo test --manifest-path rust/lithe-core/Cargo.toml --lib plugins`:API 2 的合法与非法清单、启动计划标准答案、运行时版本判定,以及仓库里的官方 `plugin.json`。
- `cargo test --manifest-path rust/crates/core/Cargo.toml --lib plugins`:API 2 的合法与非法清单、启动计划标准答案、运行时版本判定,以及仓库里的官方 `plugin.json`。
- 官方插件包的组装与校验(原 verify-official-plugins 脚本:组装三个官方包并校验入口、自带运行时、符号链接和原生代码的位置。)已随插件移出本仓库,由各插件仓库的 CI 负责(#1495)。
- `./.agents/skills/write-stable-tests/scripts/test-stability-macos.sh -- --filter 'Plugin|LanguageExtensionProcessLifecycleTests|LanguageServerToolServiceTests|JavaLanguageServerRuntimeTests|MacJdtWorkspaceStateTests|MacJdtHostIntegrationStateTests|LanguageToolEnvironmentTests'`:按声明定位资源、路径固定在包内、版本过滤、默认启用、移除与恢复;卸载后 JDT 的索引和 Equinox 配置区被删除(扫描失败或插件被拒绝时保留);运行时启动的服务器 `PATH` 上先找到宿主选中的运行时。
- 旧版 `RealJavaDebugIntegrationTests` 从组装好的插件包启动真实 JDT LS 并完成 Spring Boot 断点调试。迁移初版时它因 `java.project.getClasspaths` 在服务端抛空指针而失败(迁移前的代码同样失败),该问题已随入口发现的修复一并解决,见 [Java 入口由 JDT 判定](2026-09-21-java-entrypoints-owned-by-jdt.md)。这组测试直接组装调试会话,不验证应用里的能力目录。
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ Shelf 存储在平台 `app_data_dir()/git-shelves/<规范化根路径哈希>`,
- `./.agents/skills/write-stable-tests/scripts/test-stability-windows.ps1 -Scope Frontend`
- `git-saved-changes.test.tsx` 控制列表加载与删除确认的完成顺序,验证跨仓库加载失败、迟到结果、刷新失败及 A→B→A 后旧操作不能恢复或删除记录;`shelf_storage.rs` 验证 WSL 大小写隔离、旧桶保留及普通 Windows 键兼容。
- 保存改动组件测试覆盖整个 Git 父面板卸载后重挂载:A 操作完成或失败均不解锁仍在运行的 B,回到 A 后必须等待 A 的原操作结束;旧面板的原生删除结束后,新面板重新加载列表并移除旧记录。同一组件保持挂载并切换 A→B→A 时,操作归属也要按最初会话区分,原生删除结束后刷新当前列表。`git-stash-diff-api.test.ts` 控制不同 OID 占用同一位置、旧读取重试和旧 positional 调用的完成顺序,确认 Diff 结果与缓存不会串用。工作区锁测试覆盖路径别名、WSL 大小写和过期释放回调。恢复工作流测试覆盖仅暂存层已恢复、两层已恢复但删除失败、检查失败及检查期间切换工作区。项目树选择测试核对编辑器单选跟随后的高亮、复制、剪切与范围锚点,以及明确多选和未切换编辑文件时的目录选择保留。
- `cargo test --manifest-path rust/lithe-core/Cargo.toml git_diff_and_apply_round_trip_a_patch -- --test-threads=1` 核对复用的 Core 索引及工作区逆向检查,不将只读检查误作实际恢复。
- `cargo test --manifest-path rust/lithe-core/Cargo.toml git_patch_exchange -- --test-threads=1`
- `cargo test --manifest-path rust/crates/core/Cargo.toml git_diff_and_apply_round_trip_a_patch -- --test-threads=1` 核对复用的 Core 索引及工作区逆向检查,不将只读检查误作实际恢复。
- `cargo test --manifest-path rust/crates/core/Cargo.toml git_patch_exchange -- --test-threads=1`
- Shelf 真实 Git 回归覆盖暂存删除后保留同内容或改过内容的原文件,以及暂存重命名后重建源文件;核对清理后的干净状态和恢复后的暂存内容、磁盘字节。Dependencies 组件测试双击嵌套 reactor 的根和子模块依赖,确认编辑器接收正确的 POM 路径。
- `cargo test --manifest-path windows/tauri/src-tauri/Cargo.toml`
- ~~./scripts/windows/build/build-windows.ps1 -Configuration Release~~(随旧客户端移除)
Expand Down
Loading
Loading