## 问题 `contract/v1/README.md`(同步自 1lck/Lithe-IDEA `589116e30` 的 `shared/contracts/plugins/v1/README.md`)里关于工具链的几处说明还停留在 1lck/Lithe-IDEA#1581 之前,和同一目录下 `toolchains.md` 的状态说明矛盾。 `toolchains.md` 开头写的是:shared Core 已实现;macOS 设置页以只读方式跑通两条路线——展开 `discoveryPlan` 扫描、启动提供方后端、通过 `lsp.toolchainRequest` 发送 `toolchains/query`、用 `decodeReply` 校验、探测版本并显示结果;结果还不用于构建、运行或语言服务器;Windows 未接入。 README 里过时的地方: | 行 | 现在的写法 | 问题 | | --- | --- | --- | | 25 | 文件表 `toolchains.md`:“native hosts are not connected” | macOS 设置页已经以只读方式接入 | | 26 | 文件表 `proposals/toolchains/`:“including unimplemented query transport, … settings UI …” | 查询传输和只读设置界面在 macOS 上已经实现 | | 59 | “Neither native host advertises or integrates this foundation yet.” | “advertises” 仍然成立,“integrates” 已经过时 | | 63 | “In particular, … settings pages … are not implemented here.” | 只读设置页已经实现 | | 99 | 能力表 `toolDefinitions`:“native adapters are not connected.” | 同第 25 行 | ## 仍然成立、修改时要保留的 - macOS 的宿主能力表(`macos/Sources/LitheModuleAPI/Plugins/PluginTypes.swift` 的 `hostCapabilities`)还没有声明 `toolDefinitions`、`toolchainProviders` 和 `executableResolution` 2。所以第 59 行的 “advertises”、能力版本表第 516–518 行的 “Core only”,以及 fixture 行 “require explicit new host capabilities, not yet supplied by native products” 都还是对的。 - Windows 未接入;保存固定值、`toolchainConsumers`、通用运行启动、mise/SDKMAN 提供方插件仍未实现。 ## 怎么修 1. 在 1lck/Lithe-IDEA 修改 `shared/contracts/plugins/v1/README.md`,让上面几处和 `toolchains.md` 的状态一致。不要在本仓库直接改 `contract/v1/` 副本。 2. 合并后在本仓库运行 `node scripts/contract.mjs sync --revision <合并后的 preview commit>`,再跑 `node scripts/contract.mjs verify --upstream` 和 `node --test scripts/*.test.mjs`,然后提交同步 PR。 ## 相关 - 发现于本仓库 #8(契约同步到 `589116e30`)。 - 1lck/Lithe-IDEA#1581:插件注入的工具链与 macOS 只读环境设置页。
Activity