feat: adapt to ZCode CLI 0.16.1 protocol (App 3.6.5) - #8
Merged
Conversation
Owner
Author
复审闭环记录(commander 总结)第一轮(swarm reviewer ×2 + 真机 E2E):E2E 30/30 PASS;reviewer 发现 P0×1(turn.failed 无 resultType 被误报成功,已修并失败注入实测)、P1×2(事件翻译覆盖回退、降级宣称失实)、P2×8,均已修复闭环。 第二轮(zcode 狗食 review,GLM-5.2,plan 模式 + diff 附件):发现 P1×3(跨 turn 陈旧投影/cancel 双发 stop/探测超时硬判 v16)、P2×5(规格书口径、兼容性表缺项、agent-help 方法表、轮询失败检测局限、docstring),均已修复——其中「陈旧投影」经读码核实在 0.16.1 不可达(防御性修复 + 测试钉死)。 第三轮(zcode 复审):无 P0/P1/P2,仅 5 条 P3 nit(已记录,后续跟进)。 终态验证:CI 全绿(lint/exec-bit/py3.11/py3.13);真机 ACP 冒烟通过(initialize→session/new→流式 chunk→end_turn,usage_update {used:15939, size:1000000},size 快照兜底生效)。本地 unittest 178/178。 合并标准(无 P0/P1/P2 + CI 绿 + E2E 绿)已满足。 |
…/prompt 别名文档化/双处维护互指/规格书措辞)
Owner
Author
P3 nit 清尾(commit aa06769)zcode 复审第二轮留下的 5 条 P3 + 复审遗留 2 条已全部修完:
CI 四项全绿(此前一次 Lint fail 为 GitHub Actions 拉取 checkout 的基础设施故障,重跑已恢复)。至此所有 review 渠道(swarm ×2、zcode 两轮、CI、真机 E2E)零遗留。 |
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.
摘要
ZCode App 3.6.5(CLI 0.16.1)对 app-server 协议做了破坏性变更,本 PR 完成 ACP bridge 适配并同步文档/能力清单。MCP server 与 agent-help 的 headless 路径不受影响(已实测)。
技术规格书(全部协议结论的真机实测记录 + Wave 2 复审勘误):
docs/upgrade-0.16.1-spec.md核心变更
ACP bridge(packages/acp-bridge/zcode-acp-bridge)
session/requestRuntimePreferences:两个 scope(runtime-materialization / user-execution)均应答,这是 0.16 下桥接卡死的真正根因-32600/invalid_union、含invalid-message占位 id 的拒绝帧),legacy 走原有路径,向后兼容保持session/subscribe必传deliveryKind:"desktop-continuous"session/event(type 在 params 顶层)的turn.started/model.streaming(text_delta) /turn.completed(usage) /state.updatedpatch 投影;v4/telemetry/event、process/resourceSample正确丢弃turn.failed无条件判失败(0.16 载荷无resultType,此前会被误报为 end_turn 假成功——复审 P0 修复)usage_update.size用 subscribe 快照projection.contextWindow缓存兜底(0.16 的 turn.completed.usage 无 contextWindow)session/steer、session/rewind*、prompt/enhance*)的-32601映射为明确文案「ZCode 0.16 已移除该能力」测试(tests/,149 → 170 用例)
jsonrpc键真断言、tool.updated(含 0.16 result dict 形态)、reasoning_delta、turn.failed 真实载荷、-32601 降级文档(README + SKILL + 规格书)
/opt/ZCode/app/resources/glm/zcode.cjs)+ Node.js ≥18 前置依赖tui命令,但独立终端实测仍报Cannot find package '@zcode/tui'updateRuntimeModelConfig实测存活但 schema 新要求runtimeModel.revisionagent-help(packages/agent-help/zcode-agent-help)
验证矩阵
已知 P3 级 follow-up(不阻塞)
status:idlepatch,行为正确、注释名不副实)turn.failed的error字段若为字符串形态缺 isinstance 守卫(0.16.1 实测恒为 dict)兼容性声明
legacy(CLI 0.14.8 ~ 0.15.x)路径原样保留,双模探测自动切换;对旧版向后兼容不变。