mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-05-20 16:53:12 -07:00
d0eed7378d
Introduces RemoteSubagentProtocol (implements AgentProtocol) and RemoteSubagentSession (extends AgentSession) to wrap the A2A remote agent streaming client behind the unified agent session interface. - Manages persistent session state (contextId, taskId) across sends - Handles auth setup via A2AAuthProviderFactory per agent definition - Uses A2AResultReassembler for response chunk processing - Maps A2A streaming events to typed AgentEvent emissions - Exposes getResult() and getLatestProgress() for result retrieval - Guards against concurrent send() with clear error messaging - Includes comprehensive test suite (776 lines) Part of the AgentSession unification effort to expose all agents (interactive, non-interactive, subagents) through the same contract. Bug: b/22700