Commit de3884d
committed
feat(core): add LocalSubagentProtocol wrapping LocalAgentExecutor behind AgentProtocol
Introduces LocalSubagentProtocol (implements AgentProtocol) and
LocalSubagentSession (extends AgentSession) to wrap the existing
LocalAgentExecutor behind the unified agent session interface.
- Translates SubagentActivityEvent callbacks into typed AgentEvent emissions
- Maps AgentTerminateMode to StreamEndReason for proper stream lifecycle
- Exposes getResult() for executor output retrieval
- Supports external AbortSignal propagation
- Accepts optional rawActivityCallback for rich UI display
- 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/227001 parent 5c1011e commit de3884d
2 files changed
Lines changed: 1405 additions & 0 deletions
0 commit comments