diff --git a/shared/plugins/guides/plugin-api-pr-guide.zh-CN.md b/shared/plugins/guides/plugin-api-pr-guide.zh-CN.md index b3461654..0ee020f7 100644 --- a/shared/plugins/guides/plugin-api-pr-guide.zh-CN.md +++ b/shared/plugins/guides/plugin-api-pr-guide.zh-CN.md @@ -125,7 +125,7 @@ PR 必须逐项回答: 1. 在契约 README 写清参数、结果、错误码、权限、生命周期、缺省行为及平台限制;schema、fixture 和执行代码一致。 2. 在对应 `guides/` 或 `reference/` 专题页补充用法,并从已有入口链接到新页面。仅写在 PR、实施计划、宿主源码或 Agent Note 中,不算公开契约。 3. 更新 [协议更新记录](https://github.com/Lithe-IDEA/Lithe-core-rust/blob/main/shared/plugins/reference/protocol-changelog.md):修改协议或 API、PR、修改人(PR 作者)及合入日期。未合入就如实写“待合入”,合入时回填真实日期;没有新版本也要登记。确有新版本时,另更新“按协议查首次出现”。 -4. 新增或修改宿主方法、通知时,PR 正文逐个列出下表,按 API 编号升序排列,“用途”用中文,方法名保持真实协议名;没有编号的 `—` 放在最后。Core 的 [API 总表](https://github.com/Lithe-IDEA/Lithe-core-rust/blob/main/shared/plugins/reference/api-catalog.md)中英方法或通知表,以及更新记录的“宿主方法(按 API 编号)”索引同步逐项登记;同类方法分几次 PR 加入时,分别记自己的 PR。创建 PR 后将文档中的“本 PR”回填为真实编号;合入日期只在确认合并后回填。 +4. 新增或修改宿主方法、通知时(给已有方法或通知加参数、返回字段或取值,或者改它的执行、校验行为,都算修改),PR 正文逐个列出下表,按 API 编号升序排列,“用途”用中文,方法名保持真实协议名;没有编号的 `—` 放在最后。Core 的 [API 总表](https://github.com/Lithe-IDEA/Lithe-core-rust/blob/main/shared/plugins/reference/api-catalog.md)中英方法或通知表,以及更新记录的“宿主方法(按 API 编号)”索引同步逐项登记:新增的方法在总表和索引各加一行;修改已有方法时只在索引加一行、协议列括号里写补了什么,总表改原来那一行;同类方法分几次 PR 加入时,分别记自己的 PR。创建 PR 后将文档中的“本 PR”回填为真实编号;合入日期只在确认合并后回填。 5. 搜索并检查所有受影响消费者;新增或修改的公共插件 API 在 Rust、Go、Node、Java 四个官方 SDK 中同步补齐,更新对应类型、专题说明和能力支持表。不能只补提出需求的插件所用语言。 新增或修改方法、通知的表格格式如下;把每一项单独填一行: diff --git a/shared/plugins/reference/protocol-changelog.md b/shared/plugins/reference/protocol-changelog.md index 4a4bb7f6..109c1aa7 100644 --- a/shared/plugins/reference/protocol-changelog.md +++ b/shared/plugins/reference/protocol-changelog.md @@ -14,35 +14,7 @@ ## 待合入 -- [#224](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/224)(待合入),[@xiaoyumuxi](https://github.com/xiaoyumuxi),`agents` 0 / `litheFunctions` 0 内补充(API-45):提示可以带附件,按 ACP 的方式分成图片和文件链接。`agents.prompt` 新增可选 `attachments: [{path}]`(用户选择、粘贴或拖入的文件、文件夹和图片,按用户的顺序,最多 64 个,不限大小,带附件时正文可以为空),新增错误码 `agents.invalidAttachment`(不是绝对路径或路径不存在)、`agents.tooManyAttachments`;被拒绝的提示不开始回合,附件路径不进日志和拒绝信息。清单 `agents[].native` 新增可选 `imageTypes`(`image/png`、`image/jpeg`、`image/gif`、`image/webp` 中不重复的若干项),Agent 目录条目同名带出;Core 按文件开头字节判断类型、不看文件名,Agent 声明了的类型当作图片,其余文件、文件夹、空文件和读不了的文件都当作文件链接。`litheFunctions` 0 内通知 `agents/didPrompt` 在有附件时带 `attachments`:图片是 `{type: "image", path, name, uri, mimeType}`,文件链接是 `{type: "file", path, name, uri}`,`uri` 是路径的 `file:` URI,文件夹以 `/` 结尾。四种官方 SDK 新增附件处理方法(Rust `prompt_attachments` 与 `text_with_links`,Go 可选接口 `AgentAttachmentPrompter.PromptAttachments` 与 `TextWithLinks`,Node 可选 `promptAttachments` 与 `attachmentLink`、`textWithLinks`,Java 默认方法 `promptAttachments` 与 `AgentAttachment.textWithLinks`);后端没有实现时,全是文件链接的提示按“正文、空行、每行一个 `[@名称](file:///…)`”交给 `prompt`,带图片的提示这一回合以 `failed` 结束;没有附件的提示照旧走 `prompt`。fixture `agents/native-session.json` 补充带图片和文件链接的 `didPrompt`,以及没有附件处理方法的 Agent `plain`。旧 Core 以 `plugin.manifest.invalid` 拒绝声明了 `imageTypes` 的清单,也拒绝带 `attachments` 的 `agents.prompt`。同一 PR 回填 #223 的合入日期。没有新增宿主方法、通知或能力版本。 - -- [#207](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/207)(待合入),[@1lck](https://github.com/1lck),`debugAdapters` 0(API-30)增加可选 `launch.executableSetting`。命令型适配器可读取用户全局文件路径,留空沿用原命令查找;旧宿主会拒绝包含该声明的清单。无新增方法、通知或能力版本。 - -- [#198](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/198)(2026-11-24),[@1lck](https://github.com/1lck),`pluginAPIVersion` 0 / `litheFunctions` 0 内补充(API-27):`editor/registerActions` 的 `services.editor.options.actionIcons` 新增四个通用行首导航图标 token:`navigate-implemented`(接口/契约有子实现,向下)、`navigate-implementing`(实现接口/契约,向上)、`navigate-overridden`(父类/方法被覆写,向下)、`navigate-overriding`(覆写父类声明,向上),保留已有 `navigate-super` 与 `navigate-implementations` 向后兼容。`plugins.editorActions.decode` 仍由宿主声明的 `actionIcons` 列表动态校验,插件通过 `getCapabilities` 发现是否支持新 token,在旧宿主上回退到原有图标;契约 README、领域参考与 `fixtures/editor/editor-actions.json` 同步更新。没有新增能力版本、协议版本、宿主方法、通知或 SDK 版本。 - -- [#196](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/196)(合入日期待合并时填写),[@xiaoyumuxi](https://github.com/xiaoyumuxi),`runConfigurationTypes` 0 内的补充(API-29):`buildSystems[].run[]` 新增可选字段 `configurationType`(引用同一构建系统的 `runConfigurationTypes[].id`)和 `values`(按字段 ID 填写初始值,字符串与 `arguments` 列表项支持 `${root}`、`${project.*}`、`${target.*}` 模板展开),必须配合 `fromTargets` 使用,与 `source: "provider"`、`debug`、`entrypoints`、`fromTasks`、`arguments`、`extension`、`execution` 互斥;清单继续写 `requires.runConfigurationTypes: 0`(旧宿主 Core 因 `deny_unknown_fields` 会直接以 `plugin.manifest.invalid` 拒绝,不会静默忽略)。`build.decodeModel` 展开模板并在 `model.run[]` 中输出 `provider: "build.run-type"` 与 `runType: {pluginID, buildSystemID, type, values}`;`runConfig.generate` 的 `providerRuns` 快照支持物化为确定性 ID(`generated:run-type:`)的 `build.run-type` 生成层配置,与手动创建的同类型配置共用分组、图标、编辑器表单和 `build.runConfigurationPlan` 启动计划;`runConfig.editorForm` 和 `runConfig.saveConfiguration` 支持直接读取并覆盖生成层的 `build.run-type` 配置,且在层合并时整体替换 `extensions.build` 以免被清空的可选字段回渗。没有新增能力版本、宿主方法、通知或 SDK 版本。 - -- [#194](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/194)(待合入),[@xiaoyumuxi](https://github.com/xiaoyumuxi),`pluginAPIVersion` 0 / `litheFunctions` 0 内修正(API-03、API-16):`plugins.workflow` 在原生副作用前校验状态项引用的命令属于调用会话清单、Markdown/HTML 资源扩展名及浏览器资源的 `unsaved` 默认值;预览省略 `presentation` 时仍为 `editorAndPreview`,浏览器省略 `unsaved` 时仍为 `requireSaved`。补齐内核命令总表遗漏的 `plugins.workflow`,修正 Rust SDK 测试模块位置,并在四种官方 SDK 验证进度取消、结束与订阅释放。没有新增方法、通知、权限、错误码或协议版本。 - -- [#193](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/193)(合入日期待合并时填写),[@xiaoyumuxi](https://github.com/xiaoyumuxi),`pluginAPIVersion` 0 / `litheFunctions` 0 内补充(API-03/12/13/16/17/18/22/38):新增 19 个独立授权方法,补齐输入、内联只读预览、文本对比、视图刷新、输出、可取消进度、状态项、剪贴板、文件管理器和有界 HTTP;已有 HTML 预览新增内联来源,浏览器资源形式补齐已保存/拒绝未保存语义。树新增 `hasChildren`、`cursor` 和 `expand`、`loadMore`、`refresh` 事件;后端保留完整已加载范围,分页无进展停止,失败显式重试。共享 `plugins.workflow` 负责严格参数、默认值、限额、搜索、排序、分页和输出增量,四种官方 SDK 同步包装与事件。没有新协议版本;宿主可用方法仍由 `getCapabilities` 发现。 - -- [#191](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/191),[@xiaoyumuxi](https://github.com/xiaoyumuxi)(—,贡献规则与版本说明):新增插件 API PR 提交指南,明确 API-01–44 是可扩展领域、特有需求不得提升任何系统 API 版本,公共变化也须先证明兼容扩展不足;保留已有 1、2 等版本并按实际用法选最低值。要求统一日志具备可定位语义并集中脱敏、错误码全契约查重、Rust/Go/Node/Java 四个 SDK 在同一 PR 补齐,example 可后补。Core AI 入口及中英导航、契约和版本页同步纠正机械升版与全部填 0 的旧表述。没有新增运行时字段、方法、通知、错误码或版本;合入日期在合并时补齐。 -- [#190](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/190),[@xiaoyumuxi](https://github.com/xiaoyumuxi)(API-07/08,`pluginAPIVersion` 0 内补充):Core 新增 `workspace.watchPlan`、`workspace.watchEvents`、`workspace.findFiles`、`workspace.findText`,宿主方法保持原名和权限。路由前严格校验监听与搜索参数,复用文件匹配、编码和隐藏/索引规则,以 no-follow 句柄处理实时磁盘;搜索分页有查询绑定游标、200 条总上限、取消和 30 秒预算,监听投影有排序去重、隐藏过滤和溢出重扫。桌面使用 Viva 原生事件,订阅受插件/会话/上下文约束,注册后先发重扫,释放前停止通知;无空闲轮询。macOS 原生事件与资源释放已验证,Windows 原生验证本轮未执行。没有新增协议版本、宿主方法或通知;合入日期在合并时补齐。 - -- [#190](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/190),[@xiaoyumuxi](https://github.com/xiaoyumuxi)(API-06,`pluginAPIVersion` 0 内补充):Core 新增 `workspace.readDirectory`、`workspace.stat`、`workspace.readFile` 三个执行命令;宿主方法保持原名和权限。路由前严格校验上下文、资源、未知字段与分页/读取上限。补齐 no-follow、Windows reparse point、稳定有界分页、磁盘 UTF-8/base64 和截断前缀 identity 的公开行为及共享 fixture;Node SDK 同步明确前缀 identity 类型与可空修改时间;其他 SDK 保留通用 JSON 返回值。没有新增协议版本、方法或通知。合入日期在合并时补齐。 - -- [#188](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/188),[@mirakyux](https://github.com/mirakyux),`pluginAPIVersion` 0 内补充(API-25):`editor/registerProviders` 新增 `colorDecorations`,注册普通后端函数和最多 64 个有稳定 ID 的明暗 `#RRGGBB` 颜色;结果为 UTF-16 单行范围与颜色 ID。Core 拒绝单源重叠、空范围、未知颜色 ID 和超限结果,并用 `plugins.editorProviders.decode` 的 `kind: "mergeColorDecorations"` 按 `/` 字典序合并,较早来源优先且裁切后续范围。没有新增宿主方法、通知、能力版本或 SDK 包装。 -- [#187](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/187),[@Mucheen](https://github.com/Mucheen),插件市场增量索引 `schemaVersion` **0**(—)。主索引格式不变,`resolveSource` 额外提供 `deltasURL`,新增桌面 Core 命令 `selectDelta` 和 `applyDelta`。增量补丁重建市场已记录摘要的完整 ZIP,继续使用既有安装审查。 -- [#182](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/182)(关联 [1lck/Lithe-IDEA#2260](https://github.com/1lck/Lithe-IDEA/issues/2260)),`lithe-support[bot]`,**`toolchainProviders` 1 / `litheToolchains` 1**(API-23):权限和 authority 错误改用 `-32082`、`-32083`,稳定字符串码不变。Core 按重新校验的清单版本解码;版本 0 保留 `-32070`、`-32071`,不同版本的号码互不接受。Rust SDK 保留版本 0 默认语义,通过 `Backend::toolchain_provider_version(ToolchainProviderVersion::V1)` 显式选择新版本;没有匹配的协商版本就不启用提供者。四个 SDK 的 `plugin.function.*` 号码不变。 -- [#184](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/184),[@xiaoyumuxi](https://github.com/xiaoyumuxi),`pluginAPIVersion` 0 内的补充(API-11):`workspace/create` 的 `kind` 新增 `symlink`,配合新字段 `linkTarget`(1–4096 字节,不含 NUL)新建符号链接。链接原样保存目标,可以是绝对路径,也可以相对链接所在目录,可以指向根目录外或不存在的路径;新建链接不放宽任何检查,`workspace/readFile`、列表和 `editor/open` 仍做根目录检查,也不能穿过离开根目录的父目录新建任何东西;Windows 上目标里的 `/` 存成 `\`,目标是已存在的目录就建目录链接,否则建文件链接,系统拒绝建链接时返回 `failed`。API-11 七个方法的参数改为在路由前严格检查:`resource`、`target` 只能是 `{rootID,path}`,路径只有一种写法(`/` 分隔,没有空段、`.`、`..`,最长 4096 字节,Windows 上不能原样保存的名字也拒绝),移动的目标在同一根目录且不在源之内,`create` 的字段必须和 `kind` 一致,否则返回 `invalidParams`。fixture `backend/function-protocol.json` 新增 3 个用例,四个官方 SDK 的 `create` 注释写明 `symlink`,Node 类型按 `kind` 分成三种参数形状。Rust Core 新增内核命令 `workspace.createEntry`、`renameEntry`、`copyEntry`、`resolveEntry` 和错误码 `entry_not_found`、`entry_exists`,路径解析、不覆盖的重命名、符号链接和复制都在 Core 里完成,宿主只负责文档、视图和系统废纸篓。桌面端接入见 [1lck/Lithe-IDEA#2358](https://github.com/1lck/Lithe-IDEA/pull/2358)。没有新增能力版本、宿主方法、通知或 SDK 版本。 -- [#183](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/183),[@xiaoyumuxi](https://github.com/xiaoyumuxi),`pluginAPIVersion` 0 内的补充(API-11):新增宿主方法 `documents/save`、`documents/saveAs`、`documents/close`(新权限 `documents.save`)和 `workspace/create`、`workspace/rename`、`workspace/copy`、`workspace/trash`(新权限 `workspace.files.write`)。每个权限只授予自己的方法,原有权限(包括聚合的 `workspace` 授权和 `documents.read`)都不授予它们。宿主经文档所有者保存,保留版本、撤销记录和语言会话;`close` 先保存再关闭,从不丢弃修改;`saveAs`、`create`、`rename`、`copy` 的目标已存在时失败,从不覆盖;`trash` 只移到系统废纸篓,没有永久删除;`rename`、`trash` 先保存其下打开的文档,保存失败就不动。这些方法不弹询问:需要用户选择的情形(未命名文档、硬链接文件、文件在磁盘上已改变)直接拒绝。新增失败码 `plugin.host.alreadyExists`(`-32080`,目标已存在)和 `plugin.host.diskChanged`(`-32081`,文件在磁盘上被改动或删除,没有写入)。清单 schema 的权限枚举加上两个新权限,fixture `backend/function-protocol.json` 新增 4 个宿主请求用例和 2 个失败码用例,`rust/fixtures/plugins/host-api-v1.json` 新增 4 个授权用例。四个官方 SDK 新增 7 个方法的封装和两个失败码。桌面端实现见 [1lck/Lithe-IDEA#2358](https://github.com/1lck/Lithe-IDEA/pull/2358)。没有新增能力版本、通知或 SDK 版本。 -- [#176](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/176),[@xiaoyumuxi](https://github.com/xiaoyumuxi),`languageServers` 0 内的说明补充(—):写明后端决定启动方式的语言服务器在 `immediate` 设置变化时的行为。启动应答自带 `workspaceConfiguration` 时,宿主用这次启动的四个目录、工作区 `context` 和新的 `settings` 再调用一次启动函数,同样交给 `plugins.languageServers.decodeLaunch` 解码,只把计划里的 `workspaceConfiguration` 通过 `lsp.updateWorkspaceConfiguration` 发出(整体替换原配置),应答的其余部分等下次启动;应答不带时发送声明的展开,不再调用函数。所以这类启动函数每次启动可能被调用多次,安装或下载只应在缺少时进行。契约 README 的 Workspace configuration 和 Backend-resolved launch 两节、`reference/domains/languages.md` 与 `settings.md` 的中英文随之补充。桌面端实现见 1lck/Lithe-IDEA#2319。Core 代码、能力版本、宿主方法、通知和协议字段都不变。 -- [#175](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/175),[@xiaoyumuxi](https://github.com/xiaoyumuxi),`ui` 0 内的补充(API-13、API-23):撤回 #174 新增的 `ui` 1,设置区域 `tool` 行的可选布尔字段 `choose` 改为 `ui` 0 内的补充,清单写 `requires.ui: 0` 即可使用。`capabilities.rs` 和清单 schema 的 `requires.ui` 回到只有 0,能力对照表删去 `ui` 1 一行。`choose` 不是布尔值时 Core 以 `plugin.ui.invalidView` 拒绝整个结果,位置指向 `choose`;旧宿主的 Core 不认识这个字段,同样会拒绝带它的视图,所以插件要等包含本改动的桌面端发布后再写。fixture `ui/view-results.json` 改为两个用例(接受选择器、`choose` 不是布尔值时拒绝),替换原来“`requires.ui` 为 0 时拒绝”的用例。`ui` 1 没有随任何宿主发布过。没有新增能力版本、宿主方法、通知或进程协议字段。 -- [#174](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/174),[@xiaoyumuxi](https://github.com/xiaoyumuxi),**`ui` 1**(API-13、API-23):设置区域视图的 `tool` 行新增可选的布尔字段 `choose`,带上后这一行同时是该工具的选择器,像解释器下拉框一样列出自动选择、已发现和已添加的安装(带版本和来源)、添加目录和打开工具链页的入口;选择只改设置窗口的草稿,“应用”提交、“取消”丢弃,行上显示待提交的选择,应用后启动和运行拿到选中的安装。清单 `requires.ui` 为 0 时 Core 以 `plugin.ui.invalidView` 拒绝整个结果,位置指向 `choose`。契约 README 的插件视图一节补充:为某个工作区显示的视图(项目窗口里的工具窗口,或从项目窗口打开的设置页)调用时,带上该窗口的工作区上下文作为 invoke 的 `params.context`,后端可以在 `click` 里用它调用 `run/start` 等需要上下文的宿主方法;没有工作区时不带。fixture `ui/view-results.json` 新增一个用例,Node SDK 的视图节点类型加上 `choose`,Rust 和 Go SDK 的工作区上下文说明随之修正。没有新增宿主方法、通知或进程协议字段。(`ui` 1 已由 #175 撤回,`choose` 改为 `ui` 0 内的补充。) -- [#173](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/173),[@xiaoyumuxi](https://github.com/xiaoyumuxi),市场索引 `schemaVersion` 0 内的补充(—):`plugins.marketplace.resolveSource` 的结果新增 `revision: { repository: { owner, name }, ref }`(托管在 GitHub 且不带查询参数的索引才有,否则为 null),输入新增可选的 `commit`,带上后结果多出 `pinned: { commit, indexURL, recommendationsURL }`,即同一批文件在该提交上的地址;`commit` 不是完整的 SHA-1 或 SHA-256 时返回新的拒绝码 `plugin.source.commitInvalid`。`indexURL` 仍是来源身份。宿主借此绕过 raw.githubusercontent.com 对分支地址约 5 分钟的缓存,查询或固定下载失败时退回原地址。fixture `marketplace/source-urls.json` 从 11 个用例增加到 17 个。索引格式、插件清单、宿主方法和能力版本都不变。 -- [#171](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/171),[@xiaoyumuxi](https://github.com/xiaoyumuxi),`pluginAPIVersion` 0 内的说明修正(Go SDK):Go SDK 需要的最低 Go 版本从 1.22 提高到 1.27.4,和桌面端构建用的 Go 一致。`shared/plugins/sdk/go/go.mod` 改为 `go 1.27.4`,契约 README 的 Official backend SDK 中 `sdk/go` 一段、插件总览、原生构建指南和四个 SDK 的 README 随之更新。插件升级到这个版本的 SDK 后,自己的 `go.mod` 也要写 `go 1.27.4` 或更高。SDK 代码和对外接口不变,没有新增版本号、宿主方法、通知或协议字段。 -- [#151](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/151),[@xiaoyumuxi](https://github.com/xiaoyumuxi),`pluginAPIVersion` 0 内的补充(API-05、API-35、API-40):远程工作区上下文的 `authority` 新增 `platform: { os, arch }`,取值同托管运行时(`os` 为 `linux`,`arch` 为 `arm64` 或 `x86_64`),本地上下文没有这个字段。新增宿主方法 `workspace/getHostPaths`:返回远程上下文的根目录在远端主机上的绝对 POSIX 路径 `hostPath`,可选的 `rootIDs`(1–256 个不重复的根目录 ID)决定返回哪些根目录和顺序;它是 `workspace.metadata` 下单独的方法授权,本地上下文返回 `plugin.host.authorityUnsupported`,未知根目录返回 `plugin.host.notFound`;声明 `workspace.metadata` 的插件,启动计划的 `backend.hostServices` 因此多出 `lithe/host/workspace/getHostPaths`,宿主传给 `lsp.startServer` 时去掉自己没有注册处理器的方法授权,后端调用它们得到 `plugin.host.permissionDenied`。新增失败码 `plugin.host.remoteDisconnected`(`-32078`,操作进行中与远端主机断开)和 `plugin.host.platformUnavailable`(`-32079`,插件没有适合远端平台的程序包或托管运行时)。插件函数中转不再拒绝远程工作区的上下文,导出的 `context: "workspace"` 指两种来源的工作区,Core 不读也不改写参数和结果里的路径。四个官方 SDK 新增远端平台读取、`getHostPaths`、按来源选择进程所用路径的辅助方法和两个失败码,`path` 与 `hostPath` 是不同类型。没有新增能力版本、通知或 SDK 版本。 -- [#150](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/150),[@Mucheen](https://github.com/Mucheen),`runConfigurationTypes` 0 内的行为修正(API-29)。`build.runConfigurationPlan` 在工作目录为工作区根且没有匹配实例时,用唯一生效的文件字段解析后的工作区内目标定位最深的构建实例。`./` 等价于工作区根,指向工作区外的链接不参与定位。进程工作目录和执行前任务选择规则保持原样。没有新增宿主方法、通知或协议版本。 +还没合入的 PR 先在这里登记,日期写“待合入”;合入后移进下面的时间线,并回填“按协议查首次出现”和“宿主方法(按 API 编号)”里的日期。目前没有待合入的记录。 ## 按协议查首次出现 @@ -62,7 +34,7 @@ | `litheSettingsSources`、`litheSettingsSourceEdit` | 0 | 2026-11-15 | [#57](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/57) | | 市场推荐索引 `schemaVersion` | 0 | 2026-11-20 | [#130](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/130) | -| 市场增量索引 `schemaVersion` | 0 | 待合入 | [#187](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/187) | +| 市场增量索引 `schemaVersion` | 0 | 2026-11-24 | [#187](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/187) | ### 能力版本(`requires`) @@ -100,7 +72,7 @@ | `toolDefinitions` | 0 | 2026-11-11 | [#17](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/17) | | `toolDefinitions` | 1 | 2026-11-18 | [#99](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/99) | | `toolchainProviders` | 0 | 2026-11-11 | [#17](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/17) | -| `toolchainProviders` | 1 | 待合入 | [#182](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/182)([#2260](https://github.com/1lck/Lithe-IDEA/issues/2260)) | +| `toolchainProviders` | 1 | 2026-11-23 | [#182](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/182)([#2260](https://github.com/1lck/Lithe-IDEA/issues/2260)) | | `ui` | 0 | 2026-11-11 | [#17](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/17) | | `vcsProviders` | 0 | 2026-11-11 | [#17](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/17) | @@ -115,13 +87,13 @@ | `litheBuild`(`buildProviders`) | 1 | 2026-11-18 | [#89](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/89) | | `litheVcs`(`vcsProviders`) | 0 | 2026-11-11 | [#17](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/17) | | `litheToolchains`(`toolchainProviders`) | 0 | 2026-11-11 | [#17](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/17) | -| `litheToolchains`(`toolchainProviders`) | 1 | 待合入 | [#182](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/182)([#2260](https://github.com/1lck/Lithe-IDEA/issues/2260)) | +| `litheToolchains`(`toolchainProviders`) | 1 | 2026-11-23 | [#182](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/182)([#2260](https://github.com/1lck/Lithe-IDEA/issues/2260)) | | `litheKeymapImport`(`keymapImportProviders`) | 0 | 2026-11-11 | [#17](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/17) | | `litheLogging`(`pluginAPIVersion`) | 0 | 2026-11-11 | [#17](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/17) | ### 宿主方法(按 API 编号) -向后兼容地新增宿主方法、通知或可选字段时不升版本(见契约 [Extending the host services](../contract/v1/README.md#extending-the-host-services)),上面的版本表看不出某个方法是什么时候加的,所以宿主方法和通知在这里逐个登记。一个 API 编号下可以有多个方法,每个方法一行,记首次加入的日期和 PR;后续的执行或行为补充另加一行,保留首次记录。方法名省略前缀 `lithe/host/`;用途和权限见 [API 总表](api-catalog.md#已公开的宿主方法)。`keymapImport/*` 属于 `litheKeymapImport` 协议,不在 API-01–45 内。`functions/providers`、`functions/invoke` 是 `litheFunctions` 里的跨插件调用,只对声明了至少一个 `calls` 的后端开放。 +向后兼容地新增宿主方法、通知或可选字段时不升版本(见契约 [Extending the host services](../contract/v1/README.md#extending-the-host-services)),上面的版本表看不出某个方法是什么时候加的,所以宿主方法和通知在这里逐个登记。一个 API 编号下可以有多个方法,每个方法一行,记首次加入的日期和 PR;以后给它加参数、返回字段或取值,或者改它的执行、校验行为,都另加一行,协议列的括号里写补了什么;同一个方法的各行排在一起,首次记录在前。方法名省略前缀 `lithe/host/`;用途和权限见 [API 总表](api-catalog.md#已公开的宿主方法)。`keymapImport/*` 属于 `litheKeymapImport` 协议,不在 API-01–45 内。`functions/providers`、`functions/invoke` 是 `litheFunctions` 里的跨插件调用,只对声明了至少一个 `calls` 的后端开放。 | API | 方法 | 协议 | 日期 | PR | | --- | --- | --- | --- | --- | @@ -129,27 +101,29 @@ | API-01 | `subscriptions/dispose` | 0 | 2026-11-11 | [#17](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/17) | | API-02 | `commands/didRun`(通知) | 0 | 2026-11-11 | [#17](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/17) | | API-03 | `statusBar/setItem` | 0 | 2026-11-23 | [#193](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/193) | -| API-03 | `statusBar/setItem` | 0(原生执行前校验与默认值) | 待合入 | [#194](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/194) | +| API-03 | `statusBar/setItem` | 0(原生执行前校验与默认值) | 2026-11-24 | [#194](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/194) | | API-03 | `statusBar/removeItem` | 0 | 2026-11-23 | [#193](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/193) | | API-04、API-05 | `workspace/didChangeContexts`(通知) | 0 | 2026-11-11 | [#17](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/17) | | API-05 | `workspace/listContexts` | 0 | 2026-11-11 | [#17](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/17) | +| API-05 | `workspace/listContexts` | 0(远程上下文的 `authority` 新增 `platform`) | 2026-11-21 | [#151](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/151) | | API-05 | `workspace/getContext` | 0 | 2026-11-11 | [#17](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/17) | +| API-05 | `workspace/getContext` | 0(远程上下文的 `authority` 新增 `platform`) | 2026-11-21 | [#151](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/151) | | API-05 | `workspace/getFolders` | 0 | 2026-11-11 | [#17](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/17) | | API-05 | `workspace/setDirectoryTypes` | 0 | 2026-11-27 | [#215](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/215) | | API-05 | `workspace/setDirectoryMarks` | 0 | 2026-11-27 | [#215](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/215) | | API-06 | `workspace/readDirectory` | 0 | 2026-11-11 | [#17](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/17) | -| API-06 | `workspace/readDirectory` | 0(执行/校验补充) | 待合入 | [#190](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/190) | +| API-06 | `workspace/readDirectory` | 0(执行/校验补充) | 2026-11-23 | [#190](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/190) | | API-06 | `workspace/stat` | 0 | 2026-11-11 | [#17](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/17) | -| API-06 | `workspace/stat` | 0(执行/校验补充) | 待合入 | [#190](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/190) | +| API-06 | `workspace/stat` | 0(执行/校验补充) | 2026-11-23 | [#190](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/190) | | API-06 | `workspace/readFile` | 0 | 2026-11-11 | [#17](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/17) | -| API-06 | `workspace/readFile` | 0(执行/校验补充) | 待合入 | [#190](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/190) | +| API-06 | `workspace/readFile` | 0(执行/校验补充) | 2026-11-23 | [#190](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/190) | | API-07 | `workspace/watch` | 0 | 2026-11-11 | [#17](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/17) | -| API-07 | `workspace/watch` | 0(执行/校验补充) | 待合入 | [#190](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/190) | +| API-07 | `workspace/watch` | 0(执行/校验补充) | 2026-11-23 | [#190](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/190) | | API-07、API-24 | `subscriptions/notify`(通知) | 0 | 2026-11-11 | [#17](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/17) | | API-08 | `workspace/findFiles` | 0 | 2026-11-11 | [#17](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/17) | -| API-08 | `workspace/findFiles` | 0(执行/校验补充) | 待合入 | [#190](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/190) | +| API-08 | `workspace/findFiles` | 0(执行/校验补充) | 2026-11-23 | [#190](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/190) | | API-08 | `workspace/findText` | 0 | 2026-11-11 | [#17](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/17) | -| API-08 | `workspace/findText` | 0(执行/校验补充) | 待合入 | [#190](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/190) | +| API-08 | `workspace/findText` | 0(执行/校验补充) | 2026-11-23 | [#190](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/190) | | API-09 | `documents/list` | 0 | 2026-11-11 | [#17](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/17) | | API-09 | `documents/getSnapshot` | 0 | 2026-11-11 | [#17](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/17) | | API-09 | `editor/getActive` | 0 | 2026-11-11 | [#17](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/17) | @@ -157,26 +131,33 @@ | API-10 | `editor/applyEdits` | 0 | 2026-11-11 | [#17](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/17) | | API-10 | `editor/replaceSelections` | 0 | 2026-11-11 | [#17](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/17) | | API-10 | `editor/insertText` | 0 | 2026-11-11 | [#17](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/17) | -| API-11 | `documents/save` | 0 | 待合入 | [#183](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/183) | -| API-11 | `documents/saveAs` | 0 | 待合入 | [#183](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/183) | -| API-11 | `documents/close` | 0 | 待合入 | [#183](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/183) | -| API-11 | `workspace/create` | 0 | 待合入 | [#183](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/183) | -| API-11 | `workspace/rename` | 0 | 待合入 | [#183](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/183) | -| API-11 | `workspace/copy` | 0 | 待合入 | [#183](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/183) | -| API-11 | `workspace/trash` | 0 | 待合入 | [#183](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/183) | +| API-11 | `documents/save` | 0 | 2026-11-23 | [#183](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/183) | +| API-11 | `documents/save` | 0(路由前严格校验参数) | 2026-11-23 | [#184](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/184) | +| API-11 | `documents/saveAs` | 0 | 2026-11-23 | [#183](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/183) | +| API-11 | `documents/saveAs` | 0(路由前严格校验参数) | 2026-11-23 | [#184](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/184) | +| API-11 | `documents/close` | 0 | 2026-11-23 | [#183](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/183) | +| API-11 | `documents/close` | 0(路由前严格校验参数) | 2026-11-23 | [#184](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/184) | +| API-11 | `workspace/create` | 0 | 2026-11-23 | [#183](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/183) | +| API-11 | `workspace/create` | 0(`kind` 新增 `symlink` 与 `linkTarget`;路由前严格校验参数) | 2026-11-23 | [#184](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/184) | +| API-11 | `workspace/rename` | 0 | 2026-11-23 | [#183](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/183) | +| API-11 | `workspace/rename` | 0(路由前严格校验参数) | 2026-11-23 | [#184](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/184) | +| API-11 | `workspace/copy` | 0 | 2026-11-23 | [#183](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/183) | +| API-11 | `workspace/copy` | 0(路由前严格校验参数) | 2026-11-23 | [#184](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/184) | +| API-11 | `workspace/trash` | 0 | 2026-11-23 | [#183](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/183) | +| API-11 | `workspace/trash` | 0(路由前严格校验参数) | 2026-11-23 | [#184](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/184) | | API-12 | `editor/showDiff` | 0 | 2026-11-23 | [#193](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/193) | | API-12 | `documents/registerContentProvider` | 0 | 2026-11-11 | [#17](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/17) | | API-13 | `views/refresh` | 0 | 2026-11-23 | [#193](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/193) | | API-15 | `editor/open` | 0 | 2026-11-11 | [#17](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/17) | | API-15 | `editor/reveal` | 0 | 2026-11-11 | [#17](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/17) | | API-16 | `preview/openMarkdown` | 0 | 2026-11-23 | [#193](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/193) | -| API-16 | `preview/openMarkdown` | 0(原生执行前校验与默认值) | 待合入 | [#194](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/194) | -| API-16 | `preview/openHTML`(内联来源) | 0 | 2026-11-23 | [#193](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/193) | -| API-16 | `preview/openHTML` | 0(原生执行前校验与默认值) | 待合入 | [#194](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/194) | -| API-16 | `browser/openExternal`(资源打开) | 0 | 2026-11-23 | [#193](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/193) | -| API-16 | `browser/openExternal` | 0(原生执行前校验与默认值) | 待合入 | [#194](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/194) | +| API-16 | `preview/openMarkdown` | 0(原生执行前校验与默认值) | 2026-11-24 | [#194](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/194) | | API-16 | `preview/openHTML` | 0 | 2026-11-11 | [#17](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/17) | +| API-16 | `preview/openHTML` | 0(内联来源) | 2026-11-23 | [#193](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/193) | +| API-16 | `preview/openHTML` | 0(原生执行前校验与默认值) | 2026-11-24 | [#194](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/194) | | API-16 | `browser/openExternal` | 0 | 2026-11-11 | [#17](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/17) | +| API-16 | `browser/openExternal` | 0(资源打开) | 2026-11-23 | [#193](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/193) | +| API-16 | `browser/openExternal` | 0(原生执行前校验与默认值) | 2026-11-24 | [#194](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/194) | | API-17 | `window/showQuickPick` | 0 | 2026-11-23 | [#193](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/193) | | API-17 | `window/showInputBox` | 0 | 2026-11-23 | [#193](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/193) | | API-17 | `window/showInformation` | 0 | 2026-11-11 | [#17](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/17) | @@ -198,10 +179,10 @@ | API-22 | `progress/end` | 0 | 2026-11-23 | [#193](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/193) | | API-22、API-25 | `languageServer/setStatus` | 0 | 2026-11-11 | [#17](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/17) | | API-23 | `run/start` | 0 | 2026-11-11 | [#17](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/17) | +| API-23 | `run/start` | 0(`temporaryFiles` 增加 `{name, base64}` 字节文件) | 2026-11-13 | [#23](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/23) | +| API-23 | `run/start` | 0(`process.outputEncoding` 可选声明) | 2026-11-20 | [#128](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/128) | | API-23 | `run/stop` | 0 | 2026-11-11 | [#17](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/17) | | API-23 | `run/didExit`(通知) | 0 | 2026-11-11 | [#17](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/17) | -| API-23 | `run/start`:`temporaryFiles` 增加 `{name, base64}` 字节文件 | 0 | 2026-11-13 | [#23](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/23) | -| API-23 | `run/start`:`process.outputEncoding` 可选声明 | 0 | 2026-11-20 | [#128](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/128) | | API-24 | `terminal/create` | 0 | 2026-11-11 | [#17](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/17) | | API-24 | `terminal/show` | 0 | 2026-11-11 | [#17](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/17) | | API-24 | `terminal/close` | 0 | 2026-11-11 | [#17](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/17) | @@ -209,19 +190,22 @@ | API-24 | `terminal/dispose` | 0 | 2026-11-11 | [#17](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/17) | | API-24 | `terminal/onExit` | 0 | 2026-11-11 | [#17](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/17) | | API-25 | `editor/registerProviders` | 0 | 2026-11-11 | [#17](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/17) | +| API-25 | `editor/registerProviders` | 0(新增 `colorDecorations`) | 2026-11-23 | [#188](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/188) | | API-25 | `languageServer/request` | 0 | 2026-11-11 | [#17](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/17) | | API-25 | `languageServer/notify` | 0 | 2026-11-11 | [#17](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/17) | | API-25 | `languageServer/didChangeState`(通知) | 0 | 2026-11-11 | [#17](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/17) | | API-25 | `languageServer/didReceiveNotification`(通知) | 0 | 2026-11-11 | [#17](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/17) | | API-27 | `editor/registerActions` | 0 | 2026-11-11 | [#17](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/17) | +| API-27 | `editor/registerActions` | 0(`actionIcons` 新增 4 个导航图标 token) | 2026-11-24 | [#198](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/198) | | API-29 | `build/getOptions` | 0 | 2026-11-21 | [#155](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/155) | | API-29 | `build/watchConfiguration` | 0 | 2026-11-21 | [#155](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/155) | -| API-29 | `lithe/build/prepareRun`:返回值 `outputEncoding` 可选声明(提供者方法) | `litheBuild` 0、1 | 2026-11-20 | [#128](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/128) | +| API-29 | `lithe/build/prepareRun`(提供者方法) | `litheBuild` 0、1(返回值 `outputEncoding` 可选声明) | 2026-11-20 | [#128](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/128) | | API-30 | `debug/start` | 0 | 2026-11-11 | [#17](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/17) | | API-35 | `functions/providers` | 0 | 2026-11-11 | [#17](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/17) | | API-35 | `functions/invoke` | 0 | 2026-11-11 | [#17](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/17) | +| API-35 | `functions/invoke` | 0(转发远程工作区上下文的调用) | 2026-11-21 | [#151](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/151) | | API-38 | `network/request` | 0 | 2026-11-23 | [#193](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/193) | -| API-40 | `workspace/getHostPaths` | 0 | 待合入 | [#151](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/151) | +| API-40 | `workspace/getHostPaths` | 0 | 2026-11-21 | [#151](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/151) | | API-45 | `agents/write` | 0 | 2026-11-27 | [#216](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/216) | | API-45 | `agents/report` | 0 | 2026-11-27 | [#216](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/216) | | API-45 | `agents/report` | 0(事件新增 `configOptions`) | 2026-11-28 | [#220](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/220) | @@ -230,6 +214,7 @@ | API-45 | `agents/didStart`(通知) | 0 | 2026-11-27 | [#216](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/216) | | API-45 | `agents/didOutput`(通知) | 0 | 2026-11-27 | [#216](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/216) | | API-45 | `agents/didPrompt`(通知) | 0 | 2026-11-27 | [#216](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/216) | +| API-45 | `agents/didPrompt`(通知) | 0(有附件时带 `attachments`) | 2026-11-28 | [#224](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/224) | | API-45 | `agents/didCancel`(通知) | 0 | 2026-11-27 | [#216](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/216) | | API-45 | `agents/didDecidePermission`(通知) | 0 | 2026-11-27 | [#216](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/216) | | API-45 | `agents/didSetConfigOption`(通知) | 0 | 2026-11-28 | [#220](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/220) | @@ -243,6 +228,7 @@ | PR | 修改人 | API 编号 | 协议 / 能力 | 改动 | | --- | --- | --- | --- | --- | +| [#224](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/224) | [@xiaoyumuxi](https://github.com/xiaoyumuxi) | API-45 | `agents` 0 / `litheFunctions` 0 内补充 | 提示可以带附件,按 ACP 的方式分成图片和文件链接。`agents.prompt` 新增可选 `attachments: [{path}]`(用户选择、粘贴或拖入的文件、文件夹和图片,按用户的顺序,最多 64 个,不限大小,带附件时正文可以为空),新增错误码 `agents.invalidAttachment`(不是绝对路径或路径不存在)、`agents.tooManyAttachments`;被拒绝的提示不开始回合,附件路径不进日志和拒绝信息。清单 `agents[].native` 新增可选 `imageTypes`(`image/png`、`image/jpeg`、`image/gif`、`image/webp` 中不重复的若干项),Agent 目录条目同名带出;Core 按文件开头字节判断类型、不看文件名,Agent 声明了的类型当作图片,其余文件、文件夹、空文件和读不了的文件都当作文件链接。`litheFunctions` 0 内通知 `agents/didPrompt` 在有附件时带 `attachments`:图片是 `{type: "image", path, name, uri, mimeType}`,文件链接是 `{type: "file", path, name, uri}`,`uri` 是路径的 `file:` URI,文件夹以 `/` 结尾。四种官方 SDK 新增附件处理方法(Rust `prompt_attachments` 与 `text_with_links`,Go 可选接口 `AgentAttachmentPrompter.PromptAttachments` 与 `TextWithLinks`,Node 可选 `promptAttachments` 与 `attachmentLink`、`textWithLinks`,Java 默认方法 `promptAttachments` 与 `AgentAttachment.textWithLinks`);后端没有实现时,全是文件链接的提示按“正文、空行、每行一个 `[@名称](file:///…)`”交给 `prompt`,带图片的提示这一回合以 `failed` 结束;没有附件的提示照旧走 `prompt`。fixture `agents/native-session.json` 补充带图片和文件链接的 `didPrompt`,以及没有附件处理方法的 Agent `plain`。旧 Core 以 `plugin.manifest.invalid` 拒绝声明了 `imageTypes` 的清单,也拒绝带 `attachments` 的 `agents.prompt`。同一 PR 回填 #223 的合入日期。没有新增宿主方法、通知或能力版本。 | | [#223](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/223) | [@xiaoyumuxi](https://github.com/xiaoyumuxi) | API-45 | `agents` 0 | Agent 资源库与逐条调用列表。清单 `agents[]` 新增可选 `configuration {instructions?, skills?, files?, read?, edit?}`:`instructions`、`skills` 是 CLI 的用户指令文件和用户技能目录,`files` 是最多 8 个保存 MCP 服务器与 Hooks 的 CLI 配置文件(`{id, roots}`),路径写法同会话来源的根目录(每处 1–4 个候选,变量后至少一段);三者至少声明一个,声明了 `files` 就必须有后端函数 `read`,没有 `files` 时不能有 `read`,`edit` 需要 `read`。新增权限 `agents.configuration`(有 `configuration` 时必须声明,没有时声明即拒绝),带 `read` 的 Agent 需要后端和 `onAgent:`。安装审查新增 `agentConfiguration` 程序,列出全部路径和是否可编辑;Agent 目录条目新增 `configuration {instructions, skills, files, editable}` 和 `mayConfigure`,`sessionRootVariables` 也包括配置路径用到的变量。`read`、`edit` 是普通插件函数:`read` 回答 `litheAgentConfiguration` 快照(MCP 服务器、Hooks、Hook 事件、CLI 自带的技能,以及每类改动写进哪个文件;环境变量和请求头只给名称),`edit` 只改 Core 给的暂存副本、保留文件里其他内容并回答 `litheAgentConfigurationEdit`,Core 校验后原子替换,文件在此期间被改动就拒绝。Core 新增宿主命令 `agentLibrary.configure`、`read`、`save`、`apply`、`importSkill`、`removeSkill`:资源库(MCP 服务器、Hooks、指令集和技能)存放在平台应用数据目录,`read` 带修订号,`save` 只在修订号未变时替换,`apply` 把用户选中的一项改动写进一个 Agent(指令文件整份写成当前指令集加该 Agent 的附加文字,技能用符号链接),`save`、`apply`、`importSkill`、`removeSkill` 只接受用户发起的请求;新增 `agentLibrary.*` 错误码(逐个见契约 Agent configuration 一节)和日志事件 `agent.library.*`。同一 PR 里新增宿主命令 `agentSessions.calls`:按时间倒序分页列出 `scan` 报告的调用,可按 Agent、会话、时间、模型和成败筛选,每行带 Core 算出的费用、缓存命中率和速度,超出范围的翻页拒绝为 `agentSessions.invalidPage`。旧 Core 以 `plugin.manifest.invalid` 拒绝声明了 `configuration` 或 `agents.configuration` 的清单,也不回答 `agentLibrary.*` 和 `agentSessions.calls`。fixture `agents/agents.plugin.json` 补充配置声明,`manifest/invalid-manifests.json` 新增 10 个拒绝用例,四种官方 SDK 的说明补充配置函数。同一 PR 回填 #220 的合入日期。没有新增宿主方法、通知或能力版本。 | | [#220](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/220) | [@xiaoyumuxi](https://github.com/xiaoyumuxi) | API-45 | `agents` 0 / `litheFunctions` 0 | 原生会话可以报告用户可改的会话设置,用户在宿主里切换模型、推理等级或模式。会话事件新增 `configOptions`(对应 ACP 的 session config options,ACP 的 `thought_level` 写作 `thoughtLevel`):最多 16 个 `{id, name, description?, category?, currentValue, options}`,`category` 为 `model`、`thoughtLevel`、`mode` 之一,`options` 为 1–128 个 `{value, name, description?}`;设置 ID 唯一、同一设置的值唯一、`currentValue` 必须在 `options` 里,`thoughtLevel` 的值从低到高排列;每次报告替换上一次,空列表撤回全部设置;这个事件不属于任何回合,随时可以报告。新增宿主命令 `agents.setConfigOption {session, option, value}` → `{}`:只接受用户发起的请求(`agents.userActionRequired`),回合进行中也可以调用;设置或值不在后端最近一次报告里时分别拒绝为新错误码 `agents.unknownConfigOption`、`agents.unknownConfigValue`,后端没有接收时为 `agents.backendUnavailable`。`litheFunctions` 0 内新增通知 `agents/didSetConfigOption {session, option, value}`(`agents.native`),后端在 CLI 能接受时应用,再报告一次 `configOptions`;CLI 拒绝时报告未改变的设置和一条 `notice`。fixture `agents/native-session.json` 补充这条通知和一个 `configOptions` 报告,四种官方 SDK 新增会话处理器方法(Rust `set_config_option`、Go `SetConfigOption`、Node `setConfigOption`、Java `setConfigOption`,默认什么都不做),Go SDK 的宿主通知改为统一走 Agent 通知分发。旧 Core 以未知事件拒绝 `configOptions` 报告(`-32602`),插件在旧宿主上应忽略这次拒绝、照常运行。没有新增能力版本、协议版本或宿主方法。 | | [#219](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/219) | [@xiaoyumuxi](https://github.com/xiaoyumuxi) | API-45 | `agents` 0 | 宿主命令 `agentSessions.list` 新增 `cwdUnder`(最多 64 个目录,会话的 `cwd` 是其中之一或在它下面才保留,末尾的 `/`、`\` 不影响匹配,没有 `cwd` 的会话不在任何目录下)、`order`(`updated` 最近活动在前,默认;`started` 最近开始在前)和 `counts`;`counts: true` 时回答多出 `total`(不受 `offset`、`limit` 影响)、`groups`(每个目录 `{cwd?, count, updatedAtMs?}`,最近活动在前,最多 500 组)和 `groupsTruncated`。每个会话多出 `messageCount`(插件后端在会话自己文件里报的可搜索片段数,子代理文件不计)、`lastMessageRange`(最后一个片段的范围,用 `agentSessions.read` 读出该条消息,Core 不缓存正文)、`subagentCount`(调用里不同 `threadID` 的个数)和 `model`(最近一次主线程调用的 `model`,没有时用 `requestedModel`;全部调用都带 `threadID` 时取最近一次调用的)。旧 Core 以未知字段拒绝三个新参数,也不回答四个新字段,宿主应显示不带它们的列表。没有新增宿主方法、通知、错误码或能力版本。 | @@ -254,40 +240,71 @@ | --- | --- | --- | --- | --- | | [#216](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/216) | [@xiaoyumuxi](https://github.com/xiaoyumuxi) | API-45 | **`agents` 0** | 清单 `agents[]` 声明用户自己安装的 Agent CLI、它的运行形式(`native`、`acp`、`terminal`、`update`)和会话来源 `sessionSources`;新增权限 `agents.run`、`agents.native`、`agents.sessions.read`、`agents.usage.read` 与激活事件 `onAgent:`,多声明或少声明都拒绝。`litheFunctions` 0 内新增宿主方法 `agents/write`、`agents/report`、`agents/usage`(Core 直接回答,宿主收不到)和通知 `agents/didStart`、`didOutput`、`didPrompt`、`didCancel`、`didDecidePermission`、`didExit`。Core 新增 `agent-runtime`(启动和回收 CLI 进程、校验会话事件、有界事件队列)与宿主命令 `agents.*`、`agentSessions.*`,会话记录的分组键改为 `sessionID`;安装审查新增 `agent`、`agentSessions` 两类程序;新增 `fixtures/agents/` 两个清单和 23 个拒绝用例,四种官方 SDK 同步封装。版本 0 不运行 ACP 客户端,会话只在可信的本地工作区运行。 | | [#215](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/215) | [@xiaoyumuxi](https://github.com/xiaoyumuxi) | API-05 | `pluginAPIVersion` 0 / `litheFunctions` 0 | 新增宿主方法 `workspace/setDirectoryTypes` 与 `workspace/setDirectoryMarks`(新权限 `workspace.directoryMarks`),允许插件后端在当前工作区上下文注册自定义目录类型(最多 32 个,`id` 以 `plugin.` 开头)与动态目录标记(最多 500 条);`workspace.resolveDirectoryPresentation` 新增可选 `pluginTypes` 与 `pluginMarks` 字段及输出可选 `pluginId`,按 `user > shared > plugin > glob > vcs > plain` 确定性合并呈现与索引排除,并允许用户手动分配 `plugin.*` 角色;插件提交时的校验与解析器一致,宿主保存下来的登记不会让整次解析失败;清单 schema 与四种官方 SDK(Rust、Go、Node、Java)同步补齐。无新增能力版本、协议版本或 SDK 版本。 | +| [#207](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/207) | [@devin-ai-integration[bot]](https://github.com/apps/devin-ai-integration) | API-30 | `debugAdapters` 0 内的补充 | 增加可选 `launch.executableSetting`。命令型适配器可读取用户全局文件路径,留空沿用原命令查找;旧宿主会拒绝包含该声明的清单。无新增方法、通知或能力版本。 | + +### 2026-11-24 + +| PR | 修改人 | API 编号 | 协议 / 能力 | 改动 | +| --- | --- | --- | --- | --- | +| [#198](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/198) | [@1lck](https://github.com/1lck) | API-27 | `pluginAPIVersion` 0 / `litheFunctions` 0 内补充 | `editor/registerActions` 的 `services.editor.options.actionIcons` 新增四个通用行首导航图标 token:`navigate-implemented`(接口/契约有子实现,向下)、`navigate-implementing`(实现接口/契约,向上)、`navigate-overridden`(父类/方法被覆写,向下)、`navigate-overriding`(覆写父类声明,向上),保留已有 `navigate-super` 与 `navigate-implementations` 向后兼容。`plugins.editorActions.decode` 仍由宿主声明的 `actionIcons` 列表动态校验,插件通过 `getCapabilities` 发现是否支持新 token,在旧宿主上回退到原有图标;契约 README、领域参考与 `fixtures/editor/editor-actions.json` 同步更新。没有新增能力版本、协议版本、宿主方法、通知或 SDK 版本。 | +| [#187](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/187) | [@Mucheen](https://github.com/Mucheen) | — | **插件市场增量索引 `schemaVersion` 0** | 主索引格式不变,`resolveSource` 额外提供 `deltasURL`,新增桌面 Core 命令 `selectDelta` 和 `applyDelta`。增量补丁重建市场已记录摘要的完整 ZIP,继续使用既有安装审查。 | +| [#196](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/196) | [@xiaoyumuxi](https://github.com/xiaoyumuxi) | API-29 | `runConfigurationTypes` 0 内的补充 | `buildSystems[].run[]` 新增可选字段 `configurationType`(引用同一构建系统的 `runConfigurationTypes[].id`)和 `values`(按字段 ID 填写初始值,字符串与 `arguments` 列表项支持 `${root}`、`${project.*}`、`${target.*}` 模板展开),必须配合 `fromTargets` 使用,与 `source: "provider"`、`debug`、`entrypoints`、`fromTasks`、`arguments`、`extension`、`execution` 互斥;清单继续写 `requires.runConfigurationTypes: 0`(旧宿主 Core 因 `deny_unknown_fields` 会直接以 `plugin.manifest.invalid` 拒绝,不会静默忽略)。`build.decodeModel` 展开模板并在 `model.run[]` 中输出 `provider: "build.run-type"` 与 `runType: {pluginID, buildSystemID, type, values}`;`runConfig.generate` 的 `providerRuns` 快照支持物化为确定性 ID(`generated:run-type:`)的 `build.run-type` 生成层配置,与手动创建的同类型配置共用分组、图标、编辑器表单和 `build.runConfigurationPlan` 启动计划;`runConfig.editorForm` 和 `runConfig.saveConfiguration` 支持直接读取并覆盖生成层的 `build.run-type` 配置,且在层合并时整体替换 `extensions.build` 以免被清空的可选字段回渗。没有新增能力版本、宿主方法、通知或 SDK 版本。 | +| [#194](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/194) | [@xiaoyumuxi](https://github.com/xiaoyumuxi) | API-03、API-16 | `pluginAPIVersion` 0 / `litheFunctions` 0 内修正 | `plugins.workflow` 在原生副作用前校验状态项引用的命令属于调用会话清单、Markdown/HTML 资源扩展名及浏览器资源的 `unsaved` 默认值;预览省略 `presentation` 时仍为 `editorAndPreview`,浏览器省略 `unsaved` 时仍为 `requireSaved`。补齐内核命令总表遗漏的 `plugins.workflow`,修正 Rust SDK 测试模块位置,并在四种官方 SDK 验证进度取消、结束与订阅释放。没有新增方法、通知、权限、错误码或协议版本。 | ### 2026-11-23 | PR | 修改人 | API 编号 | 协议 / 能力 | 改动 | | --- | --- | --- | --- | --- | | [#193](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/193) | [@xiaoyumuxi](https://github.com/xiaoyumuxi) | API-03、API-12、API-13、API-16、API-17、API-18、API-22、API-38 | `pluginAPIVersion` 0 / `litheFunctions` 0 | 新增 19 个独立授权方法,补齐输入、内联只读预览、文本对比、视图刷新、输出、可取消进度、状态项、剪贴板、文件管理器和有界 HTTP;已有 HTML 预览新增内联来源,浏览器资源形式补齐已保存/拒绝未保存语义。树新增 `hasChildren`、`cursor` 和 `expand`、`loadMore`、`refresh` 事件;后端保留完整已加载范围,分页无进展停止,失败显式重试。共享 `plugins.workflow` 负责严格参数、默认值、限额、搜索、排序、分页和输出增量,四种官方 SDK 同步包装与事件。没有新协议版本;宿主可用方法仍由 `getCapabilities` 发现。 | +| [#191](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/191) | [@xiaoyumuxi](https://github.com/xiaoyumuxi) | — | `pluginAPIVersion` 0 内的说明修正(贡献规则与版本说明) | 新增插件 API PR 提交指南,明确 API-01–44 是可扩展领域、特有需求不得提升任何系统 API 版本,公共变化也须先证明兼容扩展不足;保留已有 1、2 等版本并按实际用法选最低值。要求统一日志具备可定位语义并集中脱敏、错误码全契约查重、Rust/Go/Node/Java 四个 SDK 在同一 PR 补齐,example 可后补。Core AI 入口及中英导航、契约和版本页同步纠正机械升版与全部填 0 的旧表述。没有新增运行时字段、方法、通知、错误码或版本。 | +| [#190](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/190) | [@xiaoyumuxi](https://github.com/xiaoyumuxi) | API-07、API-08 | `pluginAPIVersion` 0 内补充 | Core 新增 `workspace.watchPlan`、`workspace.watchEvents`、`workspace.findFiles`、`workspace.findText`,宿主方法保持原名和权限。路由前严格校验监听与搜索参数,复用文件匹配、编码和隐藏/索引规则,以 no-follow 句柄处理实时磁盘;搜索分页有查询绑定游标、200 条总上限、取消和 30 秒预算,监听投影有排序去重、隐藏过滤和溢出重扫。桌面使用 Viva 原生事件,订阅受插件/会话/上下文约束,注册后先发重扫,释放前停止通知;无空闲轮询。macOS 原生事件与资源释放已验证,Windows 原生验证本轮未执行。没有新增协议版本、宿主方法或通知。 | +| [#190](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/190) | [@xiaoyumuxi](https://github.com/xiaoyumuxi) | API-06 | `pluginAPIVersion` 0 内补充 | Core 新增 `workspace.readDirectory`、`workspace.stat`、`workspace.readFile` 三个执行命令;宿主方法保持原名和权限。路由前严格校验上下文、资源、未知字段与分页/读取上限。补齐 no-follow、Windows reparse point、稳定有界分页、磁盘 UTF-8/base64 和截断前缀 identity 的公开行为及共享 fixture;Node SDK 同步明确前缀 identity 类型与可空修改时间;其他 SDK 保留通用 JSON 返回值。没有新增协议版本、方法或通知。 | +| [#188](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/188) | [@mirakyux](https://github.com/mirakyux) | API-25 | `pluginAPIVersion` 0 内补充 | `editor/registerProviders` 新增 `colorDecorations`,注册普通后端函数和最多 64 个有稳定 ID 的明暗 `#RRGGBB` 颜色;结果为 UTF-16 单行范围与颜色 ID。Core 拒绝单源重叠、空范围、未知颜色 ID 和超限结果,并用 `plugins.editorProviders.decode` 的 `kind: "mergeColorDecorations"` 按 `/` 字典序合并,较早来源优先且裁切后续范围。没有新增宿主方法、通知、能力版本或 SDK 包装。 | +| [#182](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/182) | [@lithe-support[bot]](https://github.com/apps/lithe-support) | API-23 | **`toolchainProviders` 1**、**`litheToolchains` 1** | 权限和 authority 错误改用 `-32082`、`-32083`,稳定字符串码不变。Core 按重新校验的清单版本解码;版本 0 保留 `-32070`、`-32071`,不同版本的号码互不接受。Rust SDK 保留版本 0 默认语义,通过 `Backend::toolchain_provider_version(ToolchainProviderVersion::V1)` 显式选择新版本;没有匹配的协商版本就不启用提供者。四个 SDK 的 `plugin.function.*` 号码不变。关联 [1lck/Lithe-IDEA#2260](https://github.com/1lck/Lithe-IDEA/issues/2260)。 | +| [#184](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/184) | [@xiaoyumuxi](https://github.com/xiaoyumuxi) | API-11 | `pluginAPIVersion` 0 内的补充 | `workspace/create` 的 `kind` 新增 `symlink`,配合新字段 `linkTarget`(1–4096 字节,不含 NUL)新建符号链接。链接原样保存目标,可以是绝对路径,也可以相对链接所在目录,可以指向根目录外或不存在的路径;新建链接不放宽任何检查,`workspace/readFile`、列表和 `editor/open` 仍做根目录检查,也不能穿过离开根目录的父目录新建任何东西;Windows 上目标里的 `/` 存成 `\`,目标是已存在的目录就建目录链接,否则建文件链接,系统拒绝建链接时返回 `failed`。API-11 七个方法的参数改为在路由前严格检查:`resource`、`target` 只能是 `{rootID,path}`,路径只有一种写法(`/` 分隔,没有空段、`.`、`..`,最长 4096 字节,Windows 上不能原样保存的名字也拒绝),移动的目标在同一根目录且不在源之内,`create` 的字段必须和 `kind` 一致,否则返回 `invalidParams`。fixture `backend/function-protocol.json` 新增 3 个用例,四个官方 SDK 的 `create` 注释写明 `symlink`,Node 类型按 `kind` 分成三种参数形状。Rust Core 新增内核命令 `workspace.createEntry`、`renameEntry`、`copyEntry`、`resolveEntry` 和错误码 `entry_not_found`、`entry_exists`,路径解析、不覆盖的重命名、符号链接和复制都在 Core 里完成,宿主只负责文档、视图和系统废纸篓。桌面端接入见 [1lck/Lithe-IDEA#2358](https://github.com/1lck/Lithe-IDEA/pull/2358)。没有新增能力版本、宿主方法、通知或 SDK 版本。 | +| [#183](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/183) | [@xiaoyumuxi](https://github.com/xiaoyumuxi) | API-11 | `pluginAPIVersion` 0 内的补充 | 新增宿主方法 `documents/save`、`documents/saveAs`、`documents/close`(新权限 `documents.save`)和 `workspace/create`、`workspace/rename`、`workspace/copy`、`workspace/trash`(新权限 `workspace.files.write`)。每个权限只授予自己的方法,原有权限(包括聚合的 `workspace` 授权和 `documents.read`)都不授予它们。宿主经文档所有者保存,保留版本、撤销记录和语言会话;`close` 先保存再关闭,从不丢弃修改;`saveAs`、`create`、`rename`、`copy` 的目标已存在时失败,从不覆盖;`trash` 只移到系统废纸篓,没有永久删除;`rename`、`trash` 先保存其下打开的文档,保存失败就不动。这些方法不弹询问:需要用户选择的情形(未命名文档、硬链接文件、文件在磁盘上已改变)直接拒绝。新增失败码 `plugin.host.alreadyExists`(`-32080`,目标已存在)和 `plugin.host.diskChanged`(`-32081`,文件在磁盘上被改动或删除,没有写入)。清单 schema 的权限枚举加上两个新权限,fixture `backend/function-protocol.json` 新增 4 个宿主请求用例和 2 个失败码用例,`rust/fixtures/plugins/host-api-v1.json` 新增 4 个授权用例。四个官方 SDK 新增 7 个方法的封装和两个失败码。桌面端实现见 [1lck/Lithe-IDEA#2358](https://github.com/1lck/Lithe-IDEA/pull/2358)。没有新增能力版本、通知或 SDK 版本。 | +| [#177](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/177) | [@xiaoyumuxi](https://github.com/xiaoyumuxi) | API-23 | `toolDefinitions` 0 内的补充 | 工具定义新增可选布尔字段 `executableLinksOutsideHome`,不升版本。写 `true` 时,外部安装的布局程序可以经过一次或多次链接指向主目录外的普通可执行文件,例如虚拟环境的 `bin/python3` 链接到环境外的基础解释器、Homebrew 的 `libexec/bin/python3` 链接到 `libexec` 外的 framework;主目录到程序之间的各级目录(例如 `bin`)必须被观察到是目录、规范路径在规范主目录内且不在任何工作区内,否则以 `unsafePath` 拒绝,链接目标也不能在工作区内。这类程序的报告、版本探针和启动都用规范主目录下的布局路径,不用链接目标,所以虚拟环境仍能找到自己的 `pyvenv.cfg` 和包;`${home}` 导出仍是主目录。不写或写 `false` 时行为不变,其他值以 `plugin.manifest.invalid`(字段 `toolDefinitions.executableLinksOutsideHome`)拒绝。固定、`fixed:{home}`、`homeVariable`、发现规则和提供者报告都按这条规则检查,项目候选按 `projectKind` 的规则,不受影响。清单 schema、契约 `toolchains/README.md` 和 `reference/domains/toolchains.md`(中英)随之补充;Core 早于这个字段的宿主会拒绝写了它的清单。关联 [1lck/Lithe-IDEA#2316](https://github.com/1lck/Lithe-IDEA/issues/2316)。没有新增能力版本、宿主方法、通知或 SDK 版本。 | +| [#176](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/176) | [@xiaoyumuxi](https://github.com/xiaoyumuxi) | — | `languageServers` 0 内的说明补充 | 写明后端决定启动方式的语言服务器在 `immediate` 设置变化时的行为。启动应答自带 `workspaceConfiguration` 时,宿主用这次启动的四个目录、工作区 `context` 和新的 `settings` 再调用一次启动函数,同样交给 `plugins.languageServers.decodeLaunch` 解码,只把计划里的 `workspaceConfiguration` 通过 `lsp.updateWorkspaceConfiguration` 发出(整体替换原配置),应答的其余部分等下次启动;应答不带时发送声明的展开,不再调用函数。所以这类启动函数每次启动可能被调用多次,安装或下载只应在缺少时进行。契约 README 的 Workspace configuration 和 Backend-resolved launch 两节、`reference/domains/languages.md` 与 `settings.md` 的中英文随之补充。桌面端实现见 1lck/Lithe-IDEA#2319。Core 代码、能力版本、宿主方法、通知和协议字段都不变。 | + +### 2026-11-22 + +| PR | 修改人 | API 编号 | 协议 / 能力 | 改动 | +| --- | --- | --- | --- | --- | +| [#175](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/175) | [@xiaoyumuxi](https://github.com/xiaoyumuxi) | API-13、API-23 | `ui` 0 内的补充 | 撤回 #174 新增的 `ui` 1,设置区域 `tool` 行的可选布尔字段 `choose` 改为 `ui` 0 内的补充,清单写 `requires.ui: 0` 即可使用。`capabilities.rs` 和清单 schema 的 `requires.ui` 回到只有 0,能力对照表删去 `ui` 1 一行。`choose` 不是布尔值时 Core 以 `plugin.ui.invalidView` 拒绝整个结果,位置指向 `choose`;旧宿主的 Core 不认识这个字段,同样会拒绝带它的视图,所以插件要等包含本改动的桌面端发布后再写。fixture `ui/view-results.json` 改为两个用例(接受选择器、`choose` 不是布尔值时拒绝),替换原来“`requires.ui` 为 0 时拒绝”的用例。`ui` 1 没有随任何宿主发布过。没有新增能力版本、宿主方法、通知或进程协议字段。 | +| [#174](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/174) | [@xiaoyumuxi](https://github.com/xiaoyumuxi) | API-13、API-23 | **`ui` 1**(已由 #175 撤回) | 设置区域视图的 `tool` 行新增可选的布尔字段 `choose`,带上后这一行同时是该工具的选择器,像解释器下拉框一样列出自动选择、已发现和已添加的安装(带版本和来源)、添加目录和打开工具链页的入口;选择只改设置窗口的草稿,“应用”提交、“取消”丢弃,行上显示待提交的选择,应用后启动和运行拿到选中的安装。清单 `requires.ui` 为 0 时 Core 以 `plugin.ui.invalidView` 拒绝整个结果,位置指向 `choose`。契约 README 的插件视图一节补充:为某个工作区显示的视图(项目窗口里的工具窗口,或从项目窗口打开的设置页)调用时,带上该窗口的工作区上下文作为 invoke 的 `params.context`,后端可以在 `click` 里用它调用 `run/start` 等需要上下文的宿主方法;没有工作区时不带。fixture `ui/view-results.json` 新增一个用例,Node SDK 的视图节点类型加上 `choose`,Rust 和 Go SDK 的工作区上下文说明随之修正。没有新增宿主方法、通知或进程协议字段。(`ui` 1 已由 #175 撤回,`choose` 改为 `ui` 0 内的补充。) | +| [#173](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/173) | [@xiaoyumuxi](https://github.com/xiaoyumuxi) | — | 市场索引 `schemaVersion` 0 内的补充 | `plugins.marketplace.resolveSource` 的结果新增 `revision: { repository: { owner, name }, ref }`(托管在 GitHub 且不带查询参数的索引才有,否则为 null),输入新增可选的 `commit`,带上后结果多出 `pinned: { commit, indexURL, recommendationsURL }`,即同一批文件在该提交上的地址;`commit` 不是完整的 SHA-1 或 SHA-256 时返回新的拒绝码 `plugin.source.commitInvalid`。`indexURL` 仍是来源身份。宿主借此绕过 raw.githubusercontent.com 对分支地址约 5 分钟的缓存,查询或固定下载失败时退回原地址。fixture `marketplace/source-urls.json` 从 11 个用例增加到 17 个。索引格式、插件清单、宿主方法和能力版本都不变。 | +| [#171](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/171) | [@xiaoyumuxi](https://github.com/xiaoyumuxi) | — | `pluginAPIVersion` 0 内的说明修正(Go SDK) | Go SDK 需要的最低 Go 版本从 1.22 提高到 1.27.4,和桌面端构建用的 Go 一致。`shared/plugins/sdk/go/go.mod` 改为 `go 1.27.4`,契约 README 的 Official backend SDK 中 `sdk/go` 一段、插件总览、原生构建指南和四个 SDK 的 README 随之更新。插件升级到这个版本的 SDK 后,自己的 `go.mod` 也要写 `go 1.27.4` 或更高。SDK 代码和对外接口不变,没有新增版本号、宿主方法、通知或协议字段。 | ### 2026-11-21 | PR | 修改人 | API 编号 | 协议 / 能力 | 改动 | | --- | --- | --- | --- | --- | | [#155](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/155) | [@1lck](https://github.com/1lck) | API-29 | `pluginAPIVersion` 0 | 增加 `build/getOptions` 和 `build/watchConfiguration`。构建后端可读取本插件的生效选项,订阅工作区构建选项及声明的配置文件变更。增加独立的方法权限和 Java SDK 调用入口。 | +| [#150](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/150) | [@Mucheen](https://github.com/Mucheen) | API-29 | `runConfigurationTypes` 0 内的行为修正 | `build.runConfigurationPlan` 在工作目录为工作区根且没有匹配实例时,用唯一生效的文件字段解析后的工作区内目标定位最深的构建实例。`./` 等价于工作区根,指向工作区外的链接不参与定位。进程工作目录和执行前任务选择规则保持原样。没有新增宿主方法、通知或协议版本。 | +| [#151](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/151) | [@xiaoyumuxi](https://github.com/xiaoyumuxi) | API-05、API-35、API-40 | `pluginAPIVersion` 0 内的补充 | 远程工作区上下文的 `authority` 新增 `platform: { os, arch }`,取值同托管运行时(`os` 为 `linux`,`arch` 为 `arm64` 或 `x86_64`),本地上下文没有这个字段。新增宿主方法 `workspace/getHostPaths`:返回远程上下文的根目录在远端主机上的绝对 POSIX 路径 `hostPath`,可选的 `rootIDs`(1–256 个不重复的根目录 ID)决定返回哪些根目录和顺序;它是 `workspace.metadata` 下单独的方法授权,本地上下文返回 `plugin.host.authorityUnsupported`,未知根目录返回 `plugin.host.notFound`;声明 `workspace.metadata` 的插件,启动计划的 `backend.hostServices` 因此多出 `lithe/host/workspace/getHostPaths`,宿主传给 `lsp.startServer` 时去掉自己没有注册处理器的方法授权,后端调用它们得到 `plugin.host.permissionDenied`。新增失败码 `plugin.host.remoteDisconnected`(`-32078`,操作进行中与远端主机断开)和 `plugin.host.platformUnavailable`(`-32079`,插件没有适合远端平台的程序包或托管运行时)。插件函数中转不再拒绝远程工作区的上下文,导出的 `context: "workspace"` 指两种来源的工作区,Core 不读也不改写参数和结果里的路径。四个官方 SDK 新增远端平台读取、`getHostPaths`、按来源选择进程所用路径的辅助方法和两个失败码,`path` 与 `hostPath` 是不同类型。没有新增能力版本、通知或 SDK 版本。 | ### 2026-11-20 -| PR | 修改人 | API 编号 | 协议 / 能力 | 改了什么 | +| PR | 修改人 | API 编号 | 协议 / 能力 | 改动 | | --- | --- | --- | --- | --- | | [#141](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/141) | [@xiaoyumuxi](https://github.com/xiaoyumuxi) | API-25、API-29、API-31 | **`languageServers` 1** | 语言服务器新增可选 `executesProjectCode`(不写按 `true`),启动请求新增 `projectCodeAllowed`(不写按未信任,[1lck/Lithe-IDEA#2208](https://github.com/1lck/Lithe-IDEA/issues/2208))。未信任的工作区里,`plugins.declarative.languageServerLaunchPlan` 和 `plugins.languageServers.decodeLaunch` 只给声明 `executesProjectCode: false` 的语言服务器计划;自带进程的构建提供者按 `buildSystems[].provider.executesProjectCode` 判断,共用语言服务器的跟随该服务器;VCS 提供者一律不给计划。拒绝码是新的 `plugin.launch.untrustedWorkspace`。插件后端和独立调试适配器不受影响。用 `executesProjectCode` 要声明 `requires.languageServers: 1`。没有新增宿主方法、通知或 SDK 版本。 | | [#139](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/139) | [@1lck](https://github.com/1lck) | API-29 | **`buildSystems` 2** | 构建提供者的 `application` 运行声明(含 `entrypoints: true`)可以通过 `debug.configurationType` 复用已注册的连接调试器。`lithe/build/prepareRun` 复用原有 `launchOptions.debug`,入口运行仍不带 `target`。已有服务运行声明继续适用旧版本。没有新增 RPC 方法、通知或 SDK 版本。 | | [#135](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/135) | [@xiaoyumuxi](https://github.com/xiaoyumuxi) | API-23 | `toolDefinitions` 0 内的行为修正 | 外部安装的 `executableLayouts` 文件链接到另一个文件名时,`toolchains.candidates` 的待探针路径和 `toolchains.resolve` 的 `executable` 改为规范主目录下的布局路径,不再是链接目标。rustup 把 `cargo`、`rust-analyzer` 链接到自身、按启动时的名字决定运行哪个工具,以前 Core 返回 `rustup`,版本探针失败。链接目标的类型、可执行位和越界检查不变;同名链接仍返回规范路径。没有新增字段、版本号、宿主方法、通知或 SDK 版本。 | -| [#133](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/133) | [@xiaoyumuxi](https://github.com/xiaoyumuxi) | API-23 | **`commandInstallers` 1** | 命令安装新增[下载安装](../contract/v1/README.md#download-installers):安装声明 `download`(与 `tool`、`minimumVersion`、`arguments` 互斥),固定上游 `version` 和 1–6 个平台归档,每个归档有 `os`、`arch`、HTTPS `url`、可选 `mirrors`(最多 8 个)、完整 `sha256`、`archive`(`zip`/`tar.gz`)和可选 `stripPrefix`,规则与 `managedRuntimes` 归档相同;只能用 `managed` 目标,不带 `arguments`、`environment`,`commandDirectory` 相对解压根目录,`mayUseNetwork` 必须为 `true`。`plugins.commandInstallers.requirements` 和 `plan` 新增可选 `platform: {os, arch}`:带上时没有该平台归档的下载安装不提供;安装条目新增 `download: null | {version}`;计划新增 `download`(工具安装为 `null`,下载安装为选中平台的归档、`cacheKey` 和 `commandDirectory`)。新增 Core 错误码 `plugin.commandInstaller.platformInvalid`、`unavailable`,宿主错误码 `plugin.commandInstaller.downloadFailed`、`checksumMismatch`、`archiveInvalid`;`failed` 只指工具安装失败。下载安装的审查程序列出全部归档,改地址、镜像、摘要或版本需要重新批准;只声明 `commandInstallers` 0 的宿主拒绝安装带下载安装的插件。没有新增宿主方法、通知或 SDK 版本。用于 Rust Support 插件按需下载 CodeLLDB。 | +| [#133](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/133) | [@xiaoyumuxi](https://github.com/xiaoyumuxi) | API-23 | **`commandInstallers` 1** | 命令安装新增[下载安装](../contract/v1/README.md#download-installers):安装声明 `download`(与 `tool`、`minimumVersion`、`arguments` 互斥),固定上游 `version` 和 1–6 个平台归档,每个归档有 `os`、`arch`、HTTPS `url`、可选 `mirrors`(最多 8 个)、完整 `sha256`、`archive`(`zip`/`tar.gz`)和可选 `stripPrefix`,规则与 `managedRuntimes` 归档相同;只能用 `managed` 目标,不带 `arguments`、`environment`,`commandDirectory` 相对解压根目录,`mayUseNetwork` 必须为 `true`。`plugins.commandInstallers.requirements` 和 `plan` 新增可选 `platform: {os, arch}`:带上时没有该平台归档的下载安装不提供;安装条目新增 `download: null \| {version}`;计划新增 `download`(工具安装为 `null`,下载安装为选中平台的归档、`cacheKey` 和 `commandDirectory`)。新增 Core 错误码 `plugin.commandInstaller.platformInvalid`、`unavailable`,宿主错误码 `plugin.commandInstaller.downloadFailed`、`checksumMismatch`、`archiveInvalid`;`failed` 只指工具安装失败。下载安装的审查程序列出全部归档,改地址、镜像、摘要或版本需要重新批准;只声明 `commandInstallers` 0 的宿主拒绝安装带下载安装的插件。没有新增宿主方法、通知或 SDK 版本。用于 Rust Support 插件按需下载 CodeLLDB。 | | [#130](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/130) | [@1lck](https://github.com/1lck) | — | **市场推荐索引 `schemaVersion` 0** | 市场契约新增同级推荐索引格式 `plugin-recommendations.schema.json`(`schemaVersion: 0`,独立于只增不破旧版的 `lithe-plugin-index.json`);`plugins.marketplace.resolveSource` 额外返回 `recommendationsURL`,并新增宿主内部 Core 命令 `plugins.marketplace.recommendForWorkspace`(不是插件 RPC),基于工作区采集文件名与已有市场索引匹配可安装的缺失插件。见 [1lck/Lithe-IDEA#2228](https://github.com/1lck/Lithe-IDEA/issues/2228)。 | | [#128](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/128) | [@xiaoyumuxi](https://github.com/xiaoyumuxi) | API-23、API-29 | `pluginAPIVersion` 0 内的补充 | `run/start` 的 `process` 和提供者 `lithe/build/prepareRun` 的返回值新增可选 `outputEncoding`,用稳定编码 ID 或别名声明进程写入管道的编码;Core 校验并规范化,拒绝未知或不兼容 ASCII 的编码。用户固定编码优先;自动模式逐行尝试声明、UTF-8,以及仅 Windows 的 GBK。省略字段时所有平台默认 UTF-8,Windows 兼容 GBK;不修改进程环境或终端代码页。新增宿主内部 Core 命令 `outputEncoding.resolve`,返回同一解析规则的候选与可选编码列表,不是插件 RPC。见 [1lck/Lithe-IDEA#2186](https://github.com/1lck/Lithe-IDEA/issues/2186)。 | | [#127](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/127) | [@Mucheen](https://github.com/Mucheen) | API-25 | `languages` 0 内的补充 | 从 `grammar.path` 指定的 TextMate 语法或独立的 `grammars/.first-line.json` 读取可选 `firstLineMatch`。独立文件可沿用宿主现有高亮。旧桌面仍可安装 `languages: 0` 的同一插件包。Core 解码返回可选提示并匹配完整首行,既有路径与用户关联优先。见 [1lck/Lithe-IDEA#2122](https://github.com/1lck/Lithe-IDEA/issues/2122)。 | ### 2026-11-19 -| PR | 修改人 | API 编号 | 协议 / 能力 | 改了什么 | +| PR | 修改人 | API 编号 | 协议 / 能力 | 改动 | | --- | --- | --- | --- | --- | | [#112](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/112) | [@Mucheen](https://github.com/Mucheen) | API-29 | **`buildSystems` 1** | 清单新增 `buildSystems[].test.discoveryCommand`,已有测试运行可以独立采用命令或 provider。命令使用现有构建工具,把 `litheTestDiscovery` v0 写到宿主提供的 `${outputFile}`。Core 的 `build.testDiscoveryPlan`、`build.decodeTestDiscovery` 和测试树兼容两种发现来源,检查每条选择器可原样运行,命令尝试沿用 `lithe/build/discoverTests` 的结构化终态。没有新增宿主方法、通知或 SDK 版本。见 [1lck/Lithe-IDEA#2122](https://github.com/1lck/Lithe-IDEA/issues/2122)。 | | [#122](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/122) | [@1lck](https://github.com/1lck) | API-29、API-37 | `buildSystems` 0 内的补充 | 包内翻译文件新增 `buildOptions..`,可翻译构建选项的 `displayName`、`description` 和固定选项值的 `title`,规则与 `runConfigurationTypes` 相同,不合规时整份拒绝,错误码 `plugin.build.invalidLocalization`。新 Core 命令 `build.localizeOptions` 接收已启用构建插件的清单和界面语言,采用两阶段读取翻译文件(与 `runConfig.configurationTypes` 相同),返回替换了选项文字的清单,宿主用它检测,选项对话框、工具栏开关和构建树都显示译文。插件清单、宿主方法、通知和能力版本都不变;旧 Core 会忽略翻译文件中的 `buildOptions`。见 [1lck/Lithe-IDEA#2204](https://github.com/1lck/Lithe-IDEA/issues/2204)。 | | [#121](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/121) | [@1lck](https://github.com/1lck) | API-29 | `buildSystems` 0 内的行为修正 | `build.resolveOptions` 对没有声明 `default` 的 `text`、`file`、`directory` 选项,用户覆盖时也返回 `implicitValue`,作为撤销覆盖后回到的值,宿主据此保留“覆盖”复选框。没有新增字段、版本号、宿主方法或通知。见 [1lck/Lithe-IDEA#2152](https://github.com/1lck/Lithe-IDEA/issues/2152)。 | | [#120](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/120) | [@1lck](https://github.com/1lck) | API-29 | `buildSystems` 0 内的补充 | 清单的 `options[]` 新增 `description`(1–512 字符),作为宿主 ⓘ 中的说明,只用于显示。`litheBuildModel` 和 `model.map` 的 `optionDefaults` 除 `choicesFromModel` 选项外,也可以填 `text`、`file`、`directory` 选项,值是选项未设置时工具实际使用的那一个(如 Maven 的用户设置文件和本地仓库),Core 只保留第一个值。`build.resolveOptions` 对未设置的这类选项返回 `implicitValue`,并返回 `description`。`implicitValue` 只用于显示,不生成参数,也不进入选项指纹。旧 Core 会拒绝声明了 `description` 或给路径选项填 `optionDefaults` 的清单。没有新增版本号、宿主方法、通知或 SDK 版本。见 [1lck/Lithe-IDEA#2152](https://github.com/1lck/Lithe-IDEA/issues/2152)、[#2204](https://github.com/1lck/Lithe-IDEA/issues/2204)。 | | [#118](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/118) | [@1lck](https://github.com/1lck) | — | `buildSystems` 0 内的行为补充 | 契约新增 [Workspace trust](../contract/v1/README.md#workspace-trust) 一节,取代“Lithe 没有工作区信任状态”的说法。构建计划请求新增 `projectCodeAllowed`;工作区未受信任时,Core 以新错误码 `plugin.build.untrustedWorkspace` 拒绝所有任务、测试、运行、调试准备,以及声明了 `executesProjectCode: true` 的模型、依赖命令和构建提供者请求。声明 `false` 的模型和依赖命令在安全模式下照常加载。插件清单和后端协议都不变;宿主必须在计划请求里传入信任,否则会运行项目代码的计划都会被拒绝。没有新增版本号、宿主方法、通知或 SDK 版本。见 [1lck/Lithe-IDEA#2201](https://github.com/1lck/Lithe-IDEA/issues/2201)。 | +| [#117](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/117) | [@xiaoyumuxi](https://github.com/xiaoyumuxi) | — | `litheBuild` 0、1 内的说明补充(Rust SDK) | Rust SDK 支持构建提供者,和 Node SDK 的 `backend.build.*` 对齐:可注册 `build_model`、`build_dependencies`、`build_execute`、`build_test`、`build_discover_tests`、`build_run_entrypoints`、`build_prepare_run`、`build_prepare_debug`。只有注册了处理函数且宿主提供 `experimental.litheBuild` 时才协商,选不高于 1 的最新版本,否则所有 `lithe/build/*` 请求返回 `-32601`;`BuildContext` 提供进度(4 KiB)和输出(按 64 KiB 分块)上报。契约 README 的 `sdk/rust` 一段改为包含构建提供者,依赖更正为 `serde`、`serde_json`、`base64`;文档按桌面端现状更正:调试/运行准备和提供者测试已经渲染,`buildProviders` 版本为 0 和 1。契约、能力版本、宿主方法、通知、清单字段和 plugin-rpc 都不变,SDK 版本没有升。 | | [#111](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/111) | [@Mucheen](https://github.com/Mucheen) | API-23 | `toolchainProviders` 0 内的修正 | 无项目时,`toolchains.resolve` 可使用同一代次的全局提供者回包。解析目录为 `.`,查询的 `workspace` 和 `context` 显式为 `null`,解析上下文也为空。工作区查询继续校验根目录和相对目录,两种查询都核对文件系统快照及排除根。 | | [#113](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/113) | [@xiaoyumuxi](https://github.com/xiaoyumuxi) | — | `pluginAPIVersion` 0 内的说明补充(官方 SDK 新增 Go) | Go 插件后端 SDK 放在 `shared/plugins/sdk/go`,模块路径 `github.com/Lithe-IDEA/Lithe-core-rust/shared/plugins/sdk/go`,需要 Go 1.22 或更高版本,只用标准库,按模块标签 `shared/plugins/sdk/go/v<版本>` 发布(还没有推送标签)。它实现函数协议和宿主服务(凭据、工作区、文档与编辑器、预览、浏览器、窗口消息、`functions/providers` 与 `functions/invoke`、原生终端、订阅)、插件视图 `View(id, handler)` 和 `litheKeymapImport` 0,不实现构建和 VCS 提供者。契约 README 的 Official backend SDK 加上 `sdk/go` 一段:在 Unix 上把协议移到 stdout 的副本、stdout 指向 stderr,处理函数 panic 只结束这一次调用。Go 示例后端和 Rust 示例后端跑同一个插件后端场景,`sdk-e2e.mjs` 新增 `plugin_sdk_go`。插件总览、日志指南和各参考页列出 Go SDK,并推荐新插件优先用 Rust 或 Go SDK(构建后端照旧用 Node.js 或 Java SDK,VCS 后端用 Node.js SDK)。没有新增版本号、宿主方法、通知或协议字段。 | | [#109](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/109) | [@xiaoyumuxi](https://github.com/xiaoyumuxi) | API-13 | `ui` 0 内的补充(API-13) | 视图事件新增 `width` 和 `resize`,画布可以跟随窗口宽度重新排版。会报告宽度的宿主在每个视图事件里带 `width`(排版视图节点用的宽度,单位为点,至少为 1 的整数,也是顶层画布的宽度),并且量到宽度之后才发 `open`;画布的 `on` 除 `viewport` 外可以写 `resize`,视图里有这样的画布时,宽度停止变化 400 ms 后宿主发 `resize` 和新的 `width`,等待中的 `resize` 可以合并成最新的一个。插件只有在收到带 `width` 的事件后才写 `resize`:不报告宽度的宿主不发 `resize`,它的 Core 也会拒绝写了 `resize` 的画布。契约 README 同时写明画布在缩放 1 时怎样放 `viewBox`:不写 `pan` 时显示整个 `viewBox`,按视图宽度缩放但不超过 `height`,从区域左上角开始;写了 `pan` 时宽度占满视图、上边对齐区域顶部,缩小到比区域窄时水平居中。以前的说明只有“按视图宽度缩放、`height` 点高”,在更宽的窗口里会裁掉场景下半部分。Core 的画布校验接受 `on: ["viewport", "resize"]`,`plugin-ui.schema.json` 的 canvas 说明和 `on` 同步;Rust SDK 新增 `ViewEventKind::Resize` 和 `ViewEvent::width`,Java SDK 新增 `Kind.RESIZE` 和 `width()`,Node SDK 的 `ViewEventKind` 加上 `resize`、`ViewEvent` 加上 `width`、画布 `on` 的类型放宽,三个 SDK 的 README 补充用法;`domains/settings.md` 中英两段说明区域画布怎样按 `width` 排版,以及旧宿主下的固定宽度(语言页约 610 点、构建系统页和编译器页右侧详情约 340 点)([1lck/Lithe-IDEA#2181](https://github.com/1lck/Lithe-IDEA/issues/2181))。没有新增能力版本、宿主方法、通知或 SDK 版本,取代 [#107](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/107)。 | @@ -296,7 +313,7 @@ ### 2026-11-18 -| PR | 修改人 | API 编号 | 协议 / 能力 | 改了什么 | +| PR | 修改人 | API 编号 | 协议 / 能力 | 改动 | | --- | --- | --- | --- | --- | | [#104](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/104) | [@xiaoyumuxi](https://github.com/xiaoyumuxi) | API-13、API-19、API-37 | `ui` 0、`settings` 0 内的替换 | 插件视图取代宿主绘制的原生 UI 文档。插件后端的视图函数(经已有的 `lithe/function/invoke` 调用)按事件(`open`、`close`、`click`、`change`、`select`、`activate`、`viewport`、`settings`)返回界面树或补丁:宿主控件(行、分区、文字、输入框、下拉、分段、开关、按钮、键值、表格、横幅、绑定设置的设置行、显示插件工具解析结果的工具行)、树和画布节点(可带圆角的矩形、路径、文字、图片、可点击分组及悬停/按下/选中状态),新 schema [`plugin-ui.schema.json`](../contract/v1/plugin-ui.schema.json) 取代 `native-ui.schema.json`,原生 UI 文档的 `schemaVersion` 一并删除。Core 新增命令 `plugins.ui.applyResult`:按清单、界面(工具窗口或设置区域)和上一版视图校验每个结果,返回新视图和是否变化,超出预算或违反界面规则以 `plugin.ui.invalidView`(带 `field`)拒绝。清单新增 `settingRegions`(最多 16 个):插件在语言、构建系统或编译器页(不写 `page` 时为插件自己的设置标签)放搜索关键词、插件视图或两者,设置搜索按关键词找到页面;`l10n/<语言>.json` 新增 `settingRegions..keywords`,翻译的关键词追加在声明的后面、忽略大小写去重。fixture `fixtures/ui/view-panel.plugin.json`、`fixtures/ui/view-results.json`,`fixtures/settings/` 补设置区域与中文关键词。Node、Rust、Java 三个 SDK 新增 `view(id, handler)`:把参数读成视图事件(不合法时 `sdk.view.invalidEvent`,处理函数不会运行),把返回的整个视图、补丁或“没有变化”写成结果;Node SDK 的 `index.d.ts` 给出界面节点、画布节点和补丁的类型。没有新增版本号、宿主方法、通知或 SDK 版本;这一版插件不能主动推送视图。 | | [#102](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/102) | [@xiaoyumuxi](https://github.com/xiaoyumuxi) | API-23、API-19 | `toolDefinitions` 1 内的补充 | `toolchains.settingsView` 的 `issues` 每项改为 `{index,status,group?}`:查询分组时 `group` 是工具所在分组的键,宿主从问题列表打开这个工具时可以一并展开它的分组,不必自己拼分组键;契约 README 同时写明 `issues` 一直不受查询影响、先错误后警告并各按名称排序。没有新增版本号、宿主方法、通知或 SDK 版本。 | @@ -311,7 +328,7 @@ ### 2026-11-17 -| PR | 修改人 | API 编号 | 协议 / 能力 | 改了什么 | +| PR | 修改人 | API 编号 | 协议 / 能力 | 改动 | | --- | --- | --- | --- | --- | | [#84](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/84) | [@1lck](https://github.com/1lck) | — | `outputLinkMatchers` 0 内的补充 | 运行和测试控制台里的网址可点击([1lck/Lithe-IDEA#1822](https://github.com/1lck/Lithe-IDEA/issues/1822)):`outputLinks.match` 跑完插件匹配器后,再识别行内的 `http`/`https` 网址,返回不带插件的 `{line, start, length, url}`,宿主在浏览器中打开。网址止于空白、引号、尖括号,不含句末标点和未配对的右括号;和插件链接重叠时插件链接优先;一行内的链接按起点排序。fixture `output-link-matchers.json` 新增一例。清单格式和能力版本不变,插件无需改动;没有新增宿主方法或通知。 | | [#83](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/83) | [@xiaoyumuxi](https://github.com/xiaoyumuxi) | — | `languages` 0 内的补充 | 编辑器的 TextMate 引擎按 vscode-textmate 的方式运行语法的 `injections`([1lck/Lithe-IDEA#2112](https://github.com/1lck/Lithe-IDEA/issues/2112)):只有给文档分词的那个语法应用自己的 `injections`,被它包含的语法的不生效;某个位置的 scope 符合选择器时,注入规则和当前规则一起尝试,起点更靠前的匹配胜出,起点相同时当前规则胜出,除非选择器带 `L:` 前缀。Core 随之校验它:`injections` 是以 scope 选择器为键的规则对象,最多 64 项,选择器 1–1024 字节,每条规则和其他规则一样检查并计入 16384 条上限,违反时以 `plugin.grammar.invalid`(字段 `grammar.injections[.<选择器>…]`)拒绝。`injectionSelector` 仍不运行、不检查。清单格式和能力版本不变,不运行 `injections` 的旧宿主照常加载这些语法;没有新增宿主方法或通知。 | @@ -320,7 +337,7 @@ ### 2026-11-16 -| PR | 修改人 | API 编号 | 协议 / 能力 | 改了什么 | +| PR | 修改人 | API 编号 | 协议 / 能力 | 改动 | | --- | --- | --- | --- | --- | | [#76](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/76) | [@xiaoyumuxi](https://github.com/xiaoyumuxi) | API-29 | `buildSystems` 0 内的补充 | Build 工具窗口的树改由 Core 统一排布,所有构建工具一样:项目按模型的 `parentID` 嵌套,每个项目依次列出按 `category`(没有时按 `group`)分好文件夹的任务、`dependencies.scopes` 含 `project` 时的依赖节点、带目标级任务(按 `targetTags` 匹配)的目标节点,然后是子项目;有 `project` 作用域的声明任务出现在每个项目里,只有 `workspace` 作用域或 `requiresUserArguments` 的任务、工作区依赖和测试发现只在根项目旁边出现一次;模型只有一个根项目时,它的内容直接作为构建系统的内容,任务仍在根项目上运行,所以只针对子项目的参数要用 `nestedProjectSelected` 保护。过滤时保留匹配的整个节点和通往它的项目与文件夹。新增宿主命令 `build.modelTree`(Core API 文档“Build model tree”),清单和模型格式不变,没有新增宿主方法、通知或能力版本。 | | [#72](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/72) | [@xiaoyumuxi](https://github.com/xiaoyumuxi) | API-29、API-31 | `buildSystems` 0、`vcsProviders` 0 内的补充 | 构建系统新增可选字段 `layout.hiddenDirectoryNames`([1lck/Lithe-IDEA#1856](https://github.com/1lck/Lithe-IDEA/issues/1856)):插件启用期间所有工作区在任意层级隐藏的目录名,最多 32 个。每个名字是一段路径,忽略 ASCII 大小写比较,不是 glob;是 `.` 或 `..`、有首尾空白、含 `/`、`\`、`*`、`?`、`[`、`]` 或控制字符、以 `!` 开头时,以 `plugin.path.invalid`(字段 `buildSystems[].layout.hiddenDirectoryNames[]`)拒绝。VCS 提供者的目录标记(如 `.svn`)是 VCS 元数据,插件启用期间同样隐藏。Core 不再内置 `.svn`、`.build`、`node_modules`、`target`、`build`、`.gradle`、`.venv` 等工具目录,默认只隐藏自己的 `.git`、`.worktree`、`.worktrees`;宿主用命令 `workspace.configureVisibility` 把已启用插件的清单交给 Core,项目树、搜索、文件事件、本地历史、运行发现、构建探测和 VCS、Git 仓库发现都读这份名单。Search Everywhere 在 `includeGeneratedFileNames` 时仍列出构建系统声明目录里的文件名,不列 VCS 元数据。旧宿主不认识这个字段,会拒绝带它的清单,所以插件要等包含本改动的桌面端发布后再声明。`workspace.configureVisibility` 是宿主调用 Core 的命令,不是插件方法;没有新增宿主方法、通知或能力版本。 | @@ -330,7 +347,7 @@ ### 2026-11-15 -| PR | 修改人 | API 编号 | 协议 / 能力 | 改了什么 | +| PR | 修改人 | API 编号 | 协议 / 能力 | 改动 | | --- | --- | --- | --- | --- | | [#58](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/58) | [@1lck](https://github.com/1lck) | API-19 | `sourceSettings` 0 内修正 | 修正来源编辑器绑定的 serde 名称,使 `buildSystemID`、`languageID` 与公开 schema、动作计划和桌面桥接一致;往返回归覆盖读取与规范序列化。明确来源字段 ID 只允许小写 ASCII 字母、数字和连字符。未新增宿主方法。 | | [#57](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/57) | [@1lck](https://github.com/1lck) | API-19、API-29 | **`sourceSettings` 0**;`buildSystems` 0 内补充 | 原生配置来源编辑:同插件独立读取/暂存函数、编译器页、上游语言/构建上下文、实际值与移除覆盖后的继承值、严格限额、显式保存及 SHA-256 收据。Core 新增 sourceState/sourceEdit/sourceReceipt 命令,原文不跨协议。构建运行时计划返回明确候选与 pathVariable,由原生宿主先验证运行时再启动构建工具;未新增宿主 RPC 方法或通知。 | @@ -342,7 +359,7 @@ ### 2026-11-14 -| PR | 修改人 | API 编号 | 协议 / 能力 | 改了什么 | +| PR | 修改人 | API 编号 | 协议 / 能力 | 改动 | | --- | --- | --- | --- | --- | | [#39](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/39) | [@1lck](https://github.com/1lck) | — | `pluginAPIVersion` 0 内的补充 | 同一语言只由一个已启用的插件提供语言服务器:启用插件、或确认安装后插件处于启用状态时,其他已启用且最新版本为同一语言声明了语言服务器的插件会被停用,宿主告诉用户停用了哪个插件。宿主命令 `plugins.installed.lifecycle` 的 `installed[]` 新增可选 `languageServers`,新增步骤 `{ kind: "displacePlugin", pluginID, languageIDs }`;规则之前已同时启用的插件按 ID 只保留第一个,等用户启用其中一个时再定下来。清单格式不变,不需要新能力版本。 | | [#36](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/36) | [@xiaoyumuxi](https://github.com/xiaoyumuxi) | API-37 | `pluginAPIVersion` 0 内的补充 | 插件包可以带 `l10n/<语言>.json`(新增 [`plugin-l10n.schema.json`](../contract/v1/plugin-l10n.schema.json)),按设置 ID、选项值、分组原文和按钮 ID 翻译设置的标题、说明、占位符、单位、选项标题、分组标题和按钮文字;ID、值、分组和顺序不变,没翻译的文字显示清单原文。宿主命令 `plugins.declarative.settingsState` 新增可选 `language`、`localizations`,返回 `localization`(候选文件、选中的文件、被拒绝的文件);候选按语言标签逐级截短(`zh-Hans-CN` → `zh-Hans` → `zh`),选第一个通过检查的文件,有问题的文件整份不用,以新错误码 `plugin.settings.invalidLocalization` 报告。不需要新能力版本,不读翻译的宿主照常显示原文。 | @@ -352,13 +369,14 @@ ### 2026-11-13 -| PR | 修改人 | API 编号 | 协议 / 能力 | 改了什么 | +| PR | 修改人 | API 编号 | 协议 / 能力 | 改动 | | --- | --- | --- | --- | --- | +| [#26](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/26) | [@xiaoyumuxi](https://github.com/xiaoyumuxi) | — | `pluginAPIVersion` 0 内的说明修正 | Rust crate 从 `rust/lithe-*/` 统一移到 `rust/crates/<名称>/`,契约 README 和 `toolchains/README.md` 里引用的 Core 源码路径随之更新(例如 `rust/lithe-core/src/plugins/` 改为 `rust/crates/core/src/plugins/`)。契约内容不变,没有新增版本号、宿主方法、通知或协议字段。 | | [#23](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/23) | [@xiaoyumuxi](https://github.com/xiaoyumuxi) | API-23 | `pluginAPIVersion` 0 内的补充 | `run/start` 的 `temporaryFiles` 可写 `{name, base64}` 字节文件,宿主原样写入、不转码,供编码必须由插件决定的格式使用(例如按系统代码页读取的参数文件);`hostIntegration` 明确为保留字段:Core 不实现任何宿主集成,任何 ID 都以 `plugin.integration.unsupported` 拒绝,清单 schema 去掉只含 `jdt`、`maven` 的枚举;项目生成器的 `${field..major}` 取版本的第一个数字段,不再把 `1.8.0_412` 特判成 `8`;契约去掉 Java、Maven、JDT 专属说明。 | ### 2026-11-11 -| PR | 修改人 | API 编号 | 协议 / 能力 | 改了什么 | +| PR | 修改人 | API 编号 | 协议 / 能力 | 改动 | | --- | --- | --- | --- | --- | | [#17](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/17) | [@xiaoyumuxi](https://github.com/xiaoyumuxi) | — | **单一基线 `0`**:`pluginAPIVersion`、清单 `schemaVersion`、18 个能力、进程协议和文档格式 | 单一基线:插件 API、清单格式、全部能力、进程协议和文档格式从 0 开始;契约、指南和 SDK 并入 Core 仓库 `shared/plugins/`。 | @@ -366,9 +384,9 @@ 修改 `shared/plugins/contract/v1/`、`rust/crates/plugin-model/src/capabilities.rs` 或 `rust/crates/plugin-rpc/src/` 的 Core PR,在**同一个 PR** 里更新本页: -1. 把这个 PR 补到时间线最上面(按合入日期分组):PR、修改人、API 编号、协议 / 能力、改了什么。不升版的兼容扩展同样登记;是否允许引入新版本,先按契约 [Versioning](../contract/v1/README.md#versioning) 和 [API PR 提交指南](../guides/plugin-api-pr-guide.zh-CN.md#3-api-版本怎么处理) 判断,不能照搬历史升版先例。确有新版本时才加粗,并写进“按协议查首次出现”里的对应表;所属能力与进程协议保持一致。 +1. 把这个 PR 补到时间线最上面(按合入日期分组):PR、修改人、API 编号、协议 / 能力、改动。不升版的兼容扩展同样登记;是否允许引入新版本,先按契约 [Versioning](../contract/v1/README.md#versioning) 和 [API PR 提交指南](../guides/plugin-api-pr-guide.zh-CN.md#3-api-版本怎么处理) 判断,不能照搬历史升版先例。确有新版本时才加粗,并写进“按协议查首次出现”里的对应表;所属能力与进程协议保持一致。 2. “API 编号”填这个 PR 涉及的全部 API-01–45 编号,取自 PR 描述里的“原计划编号”。PR 没写时按 [API 实施计划](https://github.com/1lck/Lithe-IDEA/blob/main/docs/development/macos-plugin-api-plan.md) 判断,不要自编新号;不属于任何编号的写 —。 -3. PR 新增或修改了宿主方法或通知时,每个方法在“宿主方法(按 API 编号)”表里加一行,写明 API 编号、协议、日期和 PR;同时在 [API 总表](api-catalog.md#已公开的宿主方法)的中英两张方法表里各加一行,写明用途、权限和协议。同一个 API 下的方法分几个 PR 加入时,各自登记自己的 PR。 +3. PR 新增或修改了宿主方法或通知时(给已有方法或通知加参数、返回字段或取值,或者改它的执行、校验行为,都算修改),每个方法在“宿主方法(按 API 编号)”表里加一行,写明 API 编号、协议、日期和 PR,修改的那一行在协议列的括号里写补了什么。新增的方法同时在 [API 总表](api-catalog.md#已公开的宿主方法)的中英两张方法表里各加一行,写明用途、权限和协议;修改已有方法时不在总表加行,用途、权限或协议变了就改总表里原来那一行。同一个 API 下的方法分几个 PR 加入时,各自登记自己的 PR。 4. “修改人”填 PR 作者的 GitHub 账号,写成 `[@账号](https://github.com/账号)`。账号可以这样查: ```sh