SubAgentManager 子 Agent 管理器 负责创建、执行和管理子 Agent 的生命周期
| 18 | // SubAgentManager 子 Agent 管理器 |
| 19 | // 负责创建、执行和管理子 Agent 的生命周期 |
| 20 | type SubAgentManager struct { |
| 21 | mu sync.RWMutex |
| 22 | deps *Dependencies |
| 23 | |
| 24 | // 运行中的子 Agent |
| 25 | running map[string]*SubAgentHandle |
| 26 | |
| 27 | // 子 Agent 规格注册表 |
| 28 | specs map[string]*types.SubAgentSpec |
| 29 | |
| 30 | // 默认配置 |
| 31 | defaultTimeout time.Duration |
| 32 | maxDepth int |
| 33 | } |
| 34 | |
| 35 | // SubAgentHandle 子 Agent 句柄 |
| 36 | type SubAgentHandle struct { |
nothing calls this directly
no outgoing calls
no test coverage detected