mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-05-19 00:02:51 -07:00
22f7ec0227
This consolidated commit implements comprehensive gRPC V1 support for A2A agents while maintaining high standards for type safety and encapsulation:
- gRPC V1 Protocol Bridge: Implemented a direct gRPC implementation in 'v1-bridge.ts' to support the V1 protocol ('tenant' at Tag 1, 'Message' at Tag 2). Fixed request mapping to avoid nested object issues and correctly handle streaming responses.
- Robust Card Normalization: Refactored 'a2aUtils.ts' to preserve all original agent card fields (ensuring SDK compatibility) while safely normalizing 'protocolBinding' to 'transport' for gRPC discovery.
- Orchestration Clean-up: Refactored 'A2AClientManager' to use high-level delegation, extracting SDK and V1-specific logic into clean helper methods. Removed all 'eslint-disable' markers through robust type guards and explicit object construction.
- Registry Stability: Refined 'AgentRegistry' to use the canonical agent name as the storage key, ensuring consistency even when local overrides are applied.
- Infrastructure: Integrated UndiciAgent with 30-minute timeouts for remote agent tasks and improved agent card URL resolution.
- Validation: Added a real-world integration test against a local Go server. Verified with 75 tests passing project-wide.