Files
gemini-cli/packages
Adam Weidman d0eed7378d feat(core): add RemoteSubagentProtocol wrapping A2A client behind AgentProtocol
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
2026-04-13 13:02:34 -04:00
..