Repository navigation
fix(mcp): 恢复 Agent/Job 专用 MCP App 续接展示入口 - #1028
Conversation
swjnxyf
left a comment
There was a problem hiding this comment.
Maintainer follow-up review completed on the current head after adding review commit 8de5bd091 (fix(mcp): harden restored continuation card lifecycle). The core restoration is consistent with the intended #772/#1018 architecture: only the dedicated MCP App presentation tools return to Direct with ToolDirectReason::Continuation; durable wait tools remain Gateway; presentation stays read-only and retains the existing app-only authorization / generation / Wake claim / dispatch fencing paths; model guidance now requires a normal assistant final response so the presenting turn can finalize cleanly.
During review I found one concrete Host-protocol edge case in the original head: ui/notifications/tool-input may omit optional arguments; the v19 View treated that as an invalid selector and could tear down an otherwise valid/ref-bootstrapping binding. The review commit makes an omitted-arguments notification a no-selector no-op, advances the Agent App resource to v20, adds ordering/binding regressions, and aligns remaining lifecycle docs that still said yield/end without an ordinary final response.
Validation on the patched head: Agent App JS 162/162; continuation tool-contract tests 18/18; Agent continuation MCP Rust tests 10/10; formatting/diff checks and 858 Markdown links pass. I also merged current origin/main into the review worktree without committing: no conflicts, and the same JS 162/162, tool-contract 18/18 and MCP Rust 10/10 suites pass against that integrated tree. No remaining review blocker found. The new CI run for 8de5bd091 remains the merge gate.
Revert the net changes of yyjeqhc#1029 before syncing main and retaining the independent acceptance documentation and regression coverage.
Preserve the real-Host gate, owned Gateway wait to Direct presentation regression, scoped discovery and invocation coverage, and compatible Agent ref initialization cases from yyjeqhc#1029. Keep production behavior from yyjeqhc#1028, including the presentationRef fence and selector descriptions. Update current Agent resource documentation to v20 and retired-URI rejection.
改动说明
关联 #1018。
小范围恢复现有 continuation presentation path:
present_agent_continuation和present_job_terminal_continuation恢复为专用 Direct MCP App presenter,使用ToolDirectReason::Continuation。保留现有授权、Endpoint generation、幂等及 fail-closed 安全约束;沿用既有 capability-scoped App resource 关联机制。原作者 selector 修复将 Agent 资源升级至 v19;maintainer follow-up
8de5bd091又针对 Host 可能省略ui/notifications/tool-input.arguments的协议边界将资源升级至 v20,并补充对应顺序/绑定回归测试。验证
d3c7726d:Agent 6/6、Job 6/6,覆盖 Extra High/Medium 下约30秒、前台5分钟和后台5分钟唤醒。验证边界
真实 Host 矩阵未在追加指导文字修正后重跑。Host 内部 finalize 时间不可读取,也未专门构造“挂载后没有普通 final”的负向实验。
本次未观察到
previous Code Mode continuation is no longer available。超过5分钟的等待、Pro 长思考异常及异常停止后的自动唤醒仍未验证。issue-1018-evidencea.zip
Maintainer review follow-up
8de5bd091additionally fixes omittedtool-input.argumentsso a no-selector Host notification cannot tear down a valid/ref-bootstrapping Agent card, advances the App identity to v20, and aligns remaining lifecycle docs with the required normal assistant final response. Local review validation: Agent App JS 162/162, continuation contracts 18/18, Agent MCP Rust 10/10; the same focused suites pass after a clean no-conflict integration with currentmain. New-head CI is the merge gate.