feat(acp): handle version-gated JSON-RPC response batches - #194
Draft
YoungSx wants to merge 34 commits into
Draft
Conversation
Default only an absent v1 type to agent, reject non-string discriminators, and preserve unsupported strings and payload fields. Share version-aware authentication serialization across DTO, collection, and initialize roots so unknown fields cannot override the negotiated method identity. Add raw initialize transport regressions, presentation selection coverage, and schema round-trip properties. Validation: 593 SDK tests, 26 presentation authentication tests, analyzer and package validation, external nupkg consumer, and a 9-case failing whitelist mutation. Refs #147
Apply negotiated identifiers and required message identities across direct, collection, and parent contracts. Preserve unknown command and resource metadata, honor explicit schema recovery rules, and keep v1-only state off draft wire. Keep live v2 disabled and preserve the published serialization surface. Validate 680 SDK tests, package compatibility against 1.0.0, and 38 draft consumer diagnostics; version-rule mutations fail 45 targeted cases.
Wait for the native canvas and splash removal within the existing boot deadline before enabling accessibility once. Uno 6.7.103 (cd452e3ee242c9a2a8dee5e65ad8088b6f5dbf83) can retain initial sibling bounds when ancestor layout moves after early semantic activation, causing pointer gates to click an adjacent card. Validated against the same Debug product with CPU throttle 4: early activation fails, late activation passes, restoring early fails, restoring late passes. The unchanged two-round pointer gate passes with the final helper at CPU rates 4 and 1. Product focus code is unchanged.
Prepare every pending session cancellation before retrying its shared response array. Keep cancelled request ownership until the write succeeds, preserve bounded in-flight cancellation retries, and commit URL completion from the actual wire response. Verify both pre-fix failure probes, nine regression cases, and all 1003 SDK tests.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
ACP v2 数组帧现在按连接版本解析和分发:混合请求、通知、响应各走既有 owner,只有需要回复的元素进入一个完整响应数组。空批和非法元素保留正确 JSON-RPC 错误,通知不生成回复,稳定 V1 继续拒绝 batch。
批量权限、表单与私有交互的准备结果在物理写入成功后统一提交;失败保留原请求及取消意图,重试同一数组不会让旧选择覆盖取消,旧连接结果不能关闭新请求。真实 stdio 门禁要求 V1 拒绝与 V2 分发/取消两个案例实际执行,零跳过。
本 PR 为 #149 的 D 阶段,包含 #184、#187、#186、#189、#192、#193 的前置。公开 live V2 和生产默认仍禁用 V2,只有内部测试入口验证草案生命周期。保持 draft,不关闭 #149。
已完成的验证快照:
cdb50791:SDK 1074/1074,format、分析器和 Release 构建零警告/错误;1.0.0 包基线、46 个草案类型的真实 nupkg external consumer 与两种显式抑制路径通过。3e3015c6:23/23 定向、248/248 投影/资源测试;撤两处 reconcile 后 2/2 转红。回移至稳定取消分支的真实 Desktop/WASM 构建通过,实际 WASM 的两条无工具卡权限请求依次操作、只回复一次、最终面板消失均已通过;这些跨树结果不替代本 PR 最终 SHA 门禁。当前独立审查仍有必须完成的整合项:SDK prepared/取消/完成状态通知、peer cancel 失败可重试、UI 在 batch 首项准备后展示下一项、失败恢复与取消按钮可达。后续修复正在同一流水线进行;当前快照不声明所有门禁最终通过。正式 live V2、配置产品接线、独立第三方 Agent 与生产 bridge 互操作仍需单独验收。