Repository navigation
feat(sdk): 补合入 #24,三个官方 SDK 支持插件函数协议 4 - #25
Merged
Merged
Conversation
- 协商到函数协议 4;Host.functions() 封装 lithe/host/functions/providers 与 invoke,返回原始的 {providers} 与 {value}
- 协议 3 及以下在本地拒绝两个中转方法(plugin.host.unavailable,-32601),不写帧;参数不合法时本地失败(sdk.functions.invalidCall)
- invoke 只发送契约列出的字段;parentOperationID 默认取正在处理的函数调用的线上 operationID
- CallContext.caller():协议 4 且线上 caller 恰为 {pluginID} 时可读,其余情况为 null
- HostError 补宿主错误码 -32022 至 -32026 和 11 个 plugin.function.* 码;新增 pluginErrorCode()
- HostTest 跟上契约新 fixture:跳过 params 不是对象的用例,新宿主通知走 onHostNotification
- 协商到函数协议 4;host.functions.providers 与 invoke 返回原始的 {providers} 与 {value}
- 协议 3 及以下在本地拒绝两个中转方法(plugin.host.unavailable,-32601),通用 host.request 同样拦截,不写帧
- invoke 只发送契约列出的字段,参数不合法时本地失败(sdk.functions.invalidCall);parentOperationID 默认取正在处理的函数调用的线上 operationID
- 函数处理器的 context.caller:协议 4 且线上 caller 恰为 {pluginID} 时可读,其余情况为 null
- HOST_ERRORS 补宿主错误码 -32022 至 -32026 和 11 个 plugin.function.* 码;类型定义同步
- host.test.mjs 跟上契约新 fixture:新宿主通知走 onHostNotification
- README、API 总表、后端领域页:SDK 支持的函数协议改为 1–4,删去 API-35 的“SDK 尚无封装” - 能力与版本页:对照表改为 Node 0.4.0、Java 0.4.0、Rust 0.3.0,中英发版历史各加三行 - 后端工作区指南第 10 节加入 Node SDK 的 functions.providers/invoke 与 context.caller 示例 - 协议更新记录:函数协议 4 一行注明从哪个 SDK 版本起支持
- 协商到函数协议 4;Host::functions() 的 providers 与 invoke 返回原始的 {providers} 与 {value}
- 协议 3 及以下在 Host::send 本地拒绝两个中转方法(plugin.host.unavailable,-32601),通用 request 同样拦截,不写帧
- invoke 只发送契约列出的字段,参数不合法时本地失败(sdk.functions.invalidCall);handler 内 parentOperationID 默认取正在处理的调用的 operationID
- Context::caller() 与 Caller 类型:协议 4 且线上 caller 恰为 {pluginID} 时有值
- HOST_ERROR_CODES 补 -32022 至 -32026(21 项),新增 RELAY_ERROR_CODES(11 个 plugin.function.*)
- host_services 测试跟上契约新 fixture:新宿主通知走 on_host_notification
xiaoyumuxi
marked this pull request as ready for review
November 5, 2026 10:26
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.
#24 合入
sync/1730-merged-preview时,#23 已先一步把这个分支合进 main(相差 18 秒),所以 SDK 改动没有进 main。本 PR 只带 #24 的 4 个提交,没有别的改动:lithe/host/functions/providers、lithe/host/functions/invoke),处理函数可读调用方caller合入后再打
sdk-node-v0.4.0、sdk-java-v0.4.0、sdk-rust-v0.3.0三个 tag。