AgentToolsetStatuses returns one ToolsetStatus per toolset of the named agent, in declaration order. It mirrors CurrentAgentToolsetStatuses but for an arbitrary agent and is side-effect-free: it reads each toolset's live lifecycle (state, kind, last error, restart count) without starting it. Unknown
(name string)
| 1008 | // lifecycle (state, kind, last error, restart count) without starting it. |
| 1009 | // Unknown agents yield nil, so callers degrade gracefully. |
| 1010 | func (r *LocalRuntime) AgentToolsetStatuses(name string) []tools.ToolsetStatus { |
| 1011 | a, err := r.team.Agent(name) |
| 1012 | if err != nil || a == nil { |
| 1013 | return nil |
| 1014 | } |
| 1015 | toolSets := a.ToolSets() |
| 1016 | statuses := make([]tools.ToolsetStatus, 0, len(toolSets)) |
| 1017 | for _, ts := range toolSets { |
| 1018 | statuses = append(statuses, toolsetStatusFor(ts)) |
| 1019 | } |
| 1020 | return statuses |
| 1021 | } |
| 1022 | |
| 1023 | // RestartToolset locates the named toolset on the active agent and |
| 1024 | // asks it to restart in place. The supervisor closes the current |