(logger slog.Logger, agentAPI agentproto.DRPCAgentClient28)
| 154 | var _ SubAgentClient = (*subAgentAPIClient)(nil) |
| 155 | |
| 156 | func NewSubAgentClientFromAPI(logger slog.Logger, agentAPI agentproto.DRPCAgentClient28) SubAgentClient { |
| 157 | if agentAPI == nil { |
| 158 | panic("developer error: agentAPI cannot be nil") |
| 159 | } |
| 160 | return &subAgentAPIClient{ |
| 161 | logger: logger.Named("subagentclient"), |
| 162 | api: agentAPI, |
| 163 | } |
| 164 | } |
| 165 | |
| 166 | func (a *subAgentAPIClient) List(ctx context.Context) ([]SubAgent, error) { |
| 167 | a.logger.Debug(ctx, "listing sub agents") |