Skip to content

fix(mcp): 恢复 Agent/Job 专用 MCP App 续接展示入口 - #1028

Merged
swjnxyf merged 10 commits into
yyjeqhc:mainfrom
Corden404:fix/mcp-app-auto-resume-1018
Oct 11, 2026
Merged

swjnxyf merged 10 commits into
yyjeqhc:mainfrom
Corden404:fix/mcp-app-auto-resume-1018

Conversation

@Corden404

@Corden404 Corden404 commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

改动说明

关联 #1018。

小范围恢复现有 continuation presentation path:

  • 将 present_agent_continuation 和 present_job_terminal_continuation 恢复为专用 Direct MCP App presenter,使用 ToolDirectReason::Continuation。
  • durable wait tools 保持 Gateway 路由,保留 refactor: make tool surface policy explicit and sink inactive continuations #772 的其他工具表面策略。
  • 明确要求成功展示卡片后输出普通 assistant final,让当前 turn 正常结束。
  • 修复 Agent 卡片无法识别 Server 已支持的短引用 selector。
  • 更新过时的工具可见性/推荐流程测试预期,并压缩启动指导,保留原有预算检查。

保留现有授权、Endpoint generation、幂等及 fail-closed 安全约束;沿用既有 capability-scoped App resource 关联机制。原作者 selector 修复将 Agent 资源升级至 v19;maintainer follow-up 8de5bd091 又针对 Host 可能省略 ui/notifications/tool-input.arguments 的协议边界将资源升级至 v20,并补充对应顺序/绑定回归测试。

验证

  • 真实 ChatGPT GPT-6 / Windows Chrome 验证对应 d3c7726d:Agent 6/6、Job 6/6,覆盖 Extra High/Medium 下约30秒、前台5分钟和后台5分钟唤醒。
  • 成功用例包含普通 final 后的真实 MCP 工具调用、精确 consume/ACK,无需用户点击,未出现重复 wake/ACK。
  • 完整证据已独立打包,包含成功、失败和证据不完整的尝试;PR 仅保留验证摘要。

验证边界

真实 Host 矩阵未在追加指导文字修正后重跑。Host 内部 finalize 时间不可读取,也未专门构造“挂载后没有普通 final”的负向实验。

本次未观察到 previous Code Mode continuation is no longer available。超过5分钟的等待、Pro 长思考异常及异常停止后的自动唤醒仍未验证。
issue-1018-evidencea.zip

Maintainer review follow-up

8de5bd091 additionally fixes omitted tool-input.arguments so 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 current main. New-head CI is the merge gate.

@Corden404
Corden404 marked this pull request as ready for review October 11, 2026 06:41
Copilot AI balanced review requested due to automatic review settings October 11, 2026 06:41

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@swjnxyf swjnxyf left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@swjnxyf
swjnxyf enabled auto-merge (squash) October 11, 2026 07:12
@swjnxyf
swjnxyf merged commit 6fe2e5a into yyjeqhc:main Oct 11, 2026
14 checks passed
yyjeqhc added a commit to Xiiiing/webcodex that referenced this pull request Oct 11, 2026
Revert the net changes of yyjeqhc#1029 before syncing main and retaining the independent acceptance documentation and regression coverage.
yyjeqhc added a commit to Xiiiing/webcodex that referenced this pull request Oct 11, 2026
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.
@Corden404
Corden404 deleted the fix/mcp-app-auto-resume-1018 branch October 13, 2026 09:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants