()
| 183 | } |
| 184 | |
| 185 | func (m *Manager) GetPlugins() []Plugin { |
| 186 | m.mu.RLock() |
| 187 | defer m.mu.RUnlock() |
| 188 | |
| 189 | list := make([]Plugin, 0, len(m.plugins)) |
| 190 | for _, p := range m.plugins { |
| 191 | // Skip built-ins that are shadowed by MCP server overrides |
| 192 | if _, hidden := m.shadowed[p.Name()]; hidden { |
| 193 | continue |
| 194 | } |
| 195 | list = append(list, p) |
| 196 | } |
| 197 | // Ordena por nome para consistência |
| 198 | sort.Slice(list, func(i, j int) bool { |
| 199 | return list[i].Name() < list[j].Name() |
| 200 | }) |
| 201 | return list |
| 202 | } |
| 203 | |
| 204 | // SetShadowedBuiltins updates the set of built-in plugin names that are hidden |
| 205 | // because MCP servers declared them as overrides. Call this whenever MCP server |
no test coverage detected