-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Description
背景
当前分支的实际改动范围已经超出最初“新增最小 A2A client 骨架”的讨论范畴。
除了 src/opencode_a2a/client/ 初始化能力之外,本轮实现还实际引入并修正了 peering 场景下的 outbound A2A 调用链路,包括:
- CLI 侧 direct outbound call 入口
- server 内
a2a_call工具执行链路 - outbound bearer auth
- streamed peer output 消费
- server 侧 outbound client 配置全量接线
因此本 issue 需要从“client 初始化骨架”更新为覆盖当前真实交付范围的跟踪项。
现状
- 当前仓库已经具备 A2A server 侧运行时能力。
- 当前分支已新增
src/opencode_a2a/client/,并将其接入 peering/runtime 执行链路。 - 当前变更不再只是静态骨架,而是已经形成可用的 outbound A2A client 支撑能力。
需求目标
在不破坏现有 server 主体能力的前提下,完成面向 peering 场景的 outbound A2A client 支撑:
- 建立可复用的
client/模块边界与 facade。 - 提供 CLI 侧 outbound A2A 调用能力。
- 让 server 能执行
a2a_call工具,并消费下游 peer 的真实输出。 - 补齐 outbound 鉴权与配置接线,避免半接线与运行时偏差。
- 同步文档与测试,保证行为可以被验证与维护。
实际改造范围
client facade
- 新增
src/opencode_a2a/client/下 facade、配置、错误模型与公开类型。 - 支持 agent card 获取、发送消息、查询任务、取消任务、重订阅任务。
peering / runtime integration
- 新增 CLI
opencode-a2a call子命令。 - executor 支持处理 OpenCode 返回的
a2a_call工具调用。 - 引入
A2AClientManager管理 server 生命周期内的 outbound client 复用。
reliability fixes
- 修正 outbound bearer auth 缺失问题。
- 修正 streamed peer output 仅返回占位文本的问题。
- 补齐 server 侧 outbound client 配置:
A2A_CLIENT_TIMEOUT_SECONDSA2A_CLIENT_CARD_FETCH_TIMEOUT_SECONDSA2A_CLIENT_USE_CLIENT_PREFERENCEA2A_CLIENT_BEARER_TOKENA2A_CLIENT_SUPPORTED_TRANSPORTS
docs / tests
- 更新
README.md与docs/guide.md。 - 新增并补充 client / executor / server 相关测试。
验收标准
- 在
src/opencode_a2a/client/下建立清晰的 client 模块边界。 - 提供最小可用的 outbound A2A client facade。
- 提供 CLI 侧 outbound 调用入口。
- 让
a2a_call工具链路可以消费下游 peer 真实输出。 - 补齐 outbound 鉴权与配置接线。
- 补充文档说明与测试覆盖。
- 完成基线验证:
uv run pre-commit run --all-files、uv run pytest。
关联实现
- Draft PR: feat(a2a): add outbound A2A client facade, CLI call, and streamed a2a_call integration #286
代码仓库快照
git rev-parse HEAD:d0e43d4cac272ba2cf7b7a4518eb71ae54864311
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels