Repository navigation
sync: 契约同步到 preview 22c14a96b,登记 #1730、#1742、#1745、#1746、#1763 - #23
Merged
Merged
Conversation
- contract/v1 同步到 preview c5c68126b(#1730):新增权限 editor.providers、 宿主方法 editor/registerProviders、编辑器动作第 2 版(图标、alternatives、reveal)、 limits.editorActionSourceBytes,以及三个 editor fixtures 和一条清单拒绝用例。 - protocol-changelog:记录到 c5c68126b,2026-11-05 时间线加 #1730。 - api-catalog:API-25、API-27 现状,新增宿主方法 editor/registerProviders, 限制表补编辑器动作源文本上限、Provider 注册数量和调用时限。 - 编辑器、语言领域页,版本对照、reference 索引、后端工作区指南同步提及 Provider。
# Conflicts: # reference/api-catalog.md
契约副本跟到 22c14a96b:插件函数协议 4 与跨插件中转(pluginFunctions 1)、languageServers 3 会话、serverProcess 3 后端决定启动方式、serverProcess 4 工具定义 ID、debugAdapters 3、outputLinkMatchers 1、Run/调试会话、内容提供者,以及普通插件可声明的 hostIntegration 与短工具 ID 冲突规则。 参考页与指南按新契约更新:更新记录与 API 总表登记新协议、能力版本和宿主方法;后端、编辑器、语言、工具链、调试适配器、清单各功能页补充对应章节和用例;LSP、调试适配器、插件后端、构建工具指南补充开发者用法。
1 task done
requiresTools 的 schema 描述改为短 ID 冲突时不归属,与 #1763 一致。更新记录加 #1764 一行,“记录到”和能力对照页的核对基准改为 5cc06d5f4。
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 做了什么
把
contract/v1/同步到主仓库preview的5cc06d5f4(#1764),并在更新记录、API 总表和功能页登记 6 个 PR。上一次同步(#22)记录到5d38352a1(#1752)。c5c68126b017e9450fpluginFunctions1、函数协议 4:跨插件调用经 Core 中转(API-35)cd79e71d7languageServers3、serverProcess3:插件自有语言服务器会话、后端决定启动方式、内容 Provider、状态回收(API-12/20/22/25)69bc354e3serverProcess4、debugAdapters3、outputLinkMatchers1:后端发起运行与调试、适配器行为、输出链接(API-22/23/30)22c14a96bhostIntegration对所有插件开放、短工具 ID 冲突时不归属(无新版本号)5cc06d5f4requiresTools的描述改为与 #1763 一致(只改描述)契约副本(
node scripts/contract.mjs sync --revision 5cc06d5f4…)contract/v1/README.md:outputLinkMatchers1)、Adapter features and defaults (debugAdapters3)、Plugin-owned sessions (languageServers3)、Backend-resolved launch (serverProcess3)、Tool references (serverProcess4);alternatives、点击结果reveal)、services.editor.options与limits.editorActionSourceBytes;editor.providers、run.start、debug.start、languageServer.request、documents.contentProvider;plugin.function.*9 个(notDeclared、providerDisabled、notExported、versionMismatch、callCycle、depthExceeded、tooManyCalls、payloadTooLarge、providerUnavailable),以及plugin.host.languageServerUnavailable、languageServerError、methodNotDeclared、foreignContribution、toolUnresolved;hostIntegration与plugin.integration.unsupported的说明按 #1763 改写。plugin-manifest.schema.json:pluginFunctions、outputLinkMatchers段,serverProcess3 的launch.kind: "backend"、languageServers3 会话字段、requiresTools、debugAdapters3 的features/defaults,以及上面 5 个新权限;requiresTools的描述按 #1764 改为短 ID 冲突时不归属。fixtures/backend/function-protocol.json:协议 4 的协商、caller、operationID、parentOperationID和中转错误。toolchains/README.md:短 ID 冲突规则;toolchains.registry输入去掉verifiedOfficial,输出加conflicts。fixtures/manifest/invalid-manifests.json:183 条变为 225 条。删除 1 条(官方命名空间以外请求宿主集成);新增 43 条拒绝用例,其中 1 条来自 #1730(声明editor.providers但缺documents.read),其余 42 条覆盖requiresTools、debugAdapters3、outputLinkMatchers、run.start/debug.start、languageServers3 会话字段、documents.contentProvider和pluginFunctions。editor/editor-providers.plugin.json、editor/editor-providers.json、editor/editor-actions-v2.json;backend/plugin-functions-caller.plugin.json、backend/plugin-functions-exporter.plugin.json;languages/language-server-backend-launch.plugin.json、languages/language-server-launch-resolution.json;debug-adapters/debug-adapter-features.plugin.json、debug-adapters/debug-start.json;run/run-start.json、run/output-link-matchers.json、run/tool-reference-launch.plugin.json。contract.lock.json指向 5cc06d5f4。参考页(中英两部分同步修改)
reference/protocol-changelog.md:languageServers3、serverProcess3 和 4、debugAdapters3、outputLinkMatchers1、pluginFunctions1、litheFunctions4;functions/*只对协商到协议 4 的后端开放。reference/api-catalog.md:context的方法和functions/*的授权方式;languageServer/*、run/start、内容提供者和functions/invoke的上限。reference/capabilities-and-versions.md:litheFunctions4;preview5cc06d5f4 核对;写明 macOS 只声明serverProcess1 和 3,Windows 不声明本批新增版本;reference/README.md:功能页索引的范围、API 编号和能力列补上新增内容;计划中的 API 去掉 API-12、API-35。reference/domains/backend.md:pluginFunctions;reference/domains/editor.md:editor.providers、documents.contentProvider;editor/registerProviders,editor/registerActions补第 2 版;documents/registerContentProvider外,方法遇到远程工作区上下文返回plugin.host.authorityUnsupported。reference/domains/languages.md:serverProcess3)”“插件自有会话(languageServers3)”“宿主方法与通知”“输出链接(outputLinkMatchers1)”五节;hostIntegration对所有插件开放;languageServer/*的错误码表。reference/domains/toolchains.md:serverProcess4)”两节;toolchains.registry的输入输出改为{plugins: [{manifest}]}和conflicts;toolchains.instantiateLaunch、plugin.host.toolUnresolved。reference/domains/manifest.md:requiresTools、outputLinkMatchers、pluginFunctions;languageServers[].hostIntegration改为所有插件都可以声明;reference/domains/debug-adapters.md:debugAdapters3;debugAdapters3)”“由插件后端发起调试会话”两节。指南
guides/lsp-plugin-lifecycle.md:新增“由插件后端驱动的语言服务器(serverProcess3 与languageServers3)”,包括启动方式的选择、会话字段、宿主方法与通知、内容提供者。guides/debug-adapter-plugin.md:新增第 6 节“适配器行为声明与由后端发起调试(debugAdapters3)”,原第 6–9 节顺延为第 7–10 节。guides/plugin-backend-workspace.md:协议版本说明加 4;新增“协议 4:跨插件调用”;补上编辑器语言功能 Provider。guides/build-tool-integration.md:Java 项目的运行/测试/调试改为任何插件都可以声明hostIntegration: jdt。需要核对
@xiaoyumuxi:请核对
reference/protocol-changelog.md时间线里 #1730、#1742、#1745、#1746、#1763、#1764 六行,以及“宿主方法(按 API 编号)”里新加的 10 个方法和 3 个通知。SDK
本 PR 的新 fixture 增加了函数协议 4、宿主错误码 -32022 至 -32026 和新的宿主通知,所以 Java、Node、Rust 三个 SDK 测试会失败。修复在 #24:三个 SDK 协商到协议 4,封装跨插件调用(
functions/providers、functions/invoke、caller、parentOperationID),版本为 Node 0.4.0、Java 0.4.0、Rust 0.3.0。合并顺序:
sync/1730-merged-preview,SDK 测试变绿;main;sdk-node-v0.4.0、sdk-java-v0.4.0、sdk-rust-v0.3.0。协议 3 新增的
run/*、debug/start、languageServer/*、documents/registerContentProvider仍没有 SDK 封装,插件可以先用通用宿主请求调用。验证
node scripts/contract.mjs verify与verify --upstream:92 个文件与 5cc06d5f4 一致。node scripts/contract.mjs drift:没有漂移。node --test scripts/contract.test.mjs scripts/sdk-e2e.test.mjs:16 个通过。sdk-e2e:本分支单独跑会因 SDK 未升级失败;feat(sdk): 三个官方 SDK 支持插件函数协议 4(跨插件调用,Node/Java 0.4.0、Rust 0.3.0) #24 的 CI 已在合入后的状态下通过(含 SDK end-to-end with Rust Core)。