feat: emit explicit interrupt resolved status updates#160
Merged
Conversation
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.
背景
permission.replied/question.replied/question.rejected时,只清理内部 pending interrupt 状态,不会向下游显式外发 resolved 信号。变更说明
模块一:interrupt 运行时协议
permission.asked/question.asked继续输出TaskStatusUpdateEvent(final=false, state=input-required)。metadata.shared.interrupt.phase=asked,让 interrupt 生命周期有显式起点。permission.repliedquestion.repliedquestion.rejectedTaskStatusUpdateEvent(final=false, state=working)。metadata.shared.interrupt中补充:request_idtypephase=resolvedresolution=replied|rejected模块二:幂等与去重语义
request_id当前仍处于 pending 状态时,才外发 resolved 事件。request_id关联,便于消费方做一一配对。模块三:测试与文档
phase=asked。phase/resolution字段state=workingdocs/guide.md,明确 interrupt asked/resolved 的输出契约与去重规则。模块四:下游接入评估(a2a-client-hub)
/home/juanjuan/a2a-client-hub现有实现评估:pendingInterruptUI。phase/resolution字段,并为其增加 toast、banner 或 timeline 状态。验证
uv run pre-commit run --all-filesuv run pytest163 passed,coverage84.48%关联