a2a-Market UCP Broadcast
Define the transport and protocol shell for intent broadcast in UCP.
Current status: framework release for registration. Prioritize interoperability contracts over optimization.
Scope
- - Build intent payload schema and canonical signing routine.
- Broadcast to eligible nodes and track delivery acknowledgements.
- Feed response stream into quote intake service.
Suggested Project Layout
- - INLINECODE0
- INLINECODE1
- INLINECODE2
- INLINECODE3
Minimum Contracts (MVP P0)
- 1.
build_intent(payload) normalizes and version-tags message. - INLINECODE5 returns detached signature object.
- INLINECODE6 returns dispatch receipt ids.
- INLINECODE7 returns per-node ack status.
Event Mapping
- - Emit
INTENT_CREATED before dispatch. - Emit
INTENT_BROADCASTED after fan-out completes. - Emit
NODE_RESPONDED when quote/ack arrives.
Guardrails
- - Keep canonical JSON serialization deterministic for signing.
- Record per-node retry counters and stop after configured threshold.
- Attach protocol version in every envelope.
Implementation Backlog
- - Add adaptive node selection based on reputation percentile.
- Add dead-letter handling for nodes with repeated timeouts.
Runtime Implementation
- - Status: implemented in local runtime package.
- Primary code paths:
- INLINECODE11
- INLINECODE12
- Validation: covered by
runtime/tests and npm test in runtime/.
a2a-Market UCP 广播
定义UCP中意图广播的传输层与协议外壳。
当前状态:框架发布以进行注册。优先考虑互操作性合约而非优化。
范围
- - 构建意图负载模式与规范签名流程。
- 向合格节点广播并跟踪投递确认。
- 将响应流输入报价接收服务。
建议项目结构
- - app/protocol/ucp/intentmessage.py
- app/protocol/ucp/signer.py
- app/application/services/broadcastservice.py
- app/infrastructure/ws/ucp_gateway.py
最低合约(MVP P0)
- 1. buildintent(payload) 规范化消息并添加版本标签。
- signintent(intent, privatekey) 返回分离签名对象。
- broadcast(intentid, targetnodes) 返回分发回执ID。
- collectacks(intentid, timeoutms) 返回每个节点的确认状态。
事件映射
- - 在分发前触发 INTENTCREATED。
- 在扇出完成后触发 INTENTBROADCASTED。
- 在报价/确认到达时触发 NODE_RESPONDED。
防护措施
- - 保持规范JSON序列化的确定性以确保签名一致性。
- 记录每个节点的重试计数器,达到配置阈值后停止。
- 在每个信封中附加协议版本。
实现待办项
- - 基于信誉百分位添加自适应节点选择。
- 为反复超时的节点添加死信处理。
运行时实现
- - 状态:已在本地运行时包中实现。
- 主要代码路径:
- runtime/src/protocol/ucp-client.js
- runtime/src/application/market-agent.js
- 验证:由 runtime/tests 和 runtime/ 中的 npm test 覆盖。