detectFromMCPScripts scans mcp-scripts tool definitions for language runtimes.
(mcpScripts *MCPScriptsConfig, requirements map[string]*RuntimeRequirement)
| 220 | |
| 221 | // detectFromMCPScripts scans mcp-scripts tool definitions for language runtimes. |
| 222 | func detectFromMCPScripts(mcpScripts *MCPScriptsConfig, requirements map[string]*RuntimeRequirement) { |
| 223 | if mcpScripts == nil { |
| 224 | return |
| 225 | } |
| 226 | |
| 227 | for _, tool := range mcpScripts.Tools { |
| 228 | switch { |
| 229 | case tool.Script != "": |
| 230 | if runtime := findRuntimeByID("node"); runtime != nil { |
| 231 | updateRequiredRuntime(runtime, "", requirements) |
| 232 | } |
| 233 | case tool.Py != "": |
| 234 | if runtime := findRuntimeByID("python"); runtime != nil { |
| 235 | updateRequiredRuntime(runtime, "", requirements) |
| 236 | } |
| 237 | case tool.Go != "": |
| 238 | if runtime := findRuntimeByID("go"); runtime != nil { |
| 239 | updateRequiredRuntime(runtime, "", requirements) |
| 240 | } |
| 241 | } |
| 242 | } |
| 243 | } |
| 244 | |
| 245 | // detectFromLSPServers adds runtime requirements for the runtimes needed by configured |
| 246 | // LSP servers. Each entry in lspInstallSpecs declares the runtime ID it needs (e.g. |