(frontmatter map[string]any, serverFilter string, configs *[]RegistryMCPServerConfig)
| 100 | } |
| 101 | |
| 102 | func addSafeOutputsConfig(frontmatter map[string]any, serverFilter string, configs *[]RegistryMCPServerConfig) { |
| 103 | safeOutputsSection, hasSafeOutputs := frontmatter["safe-outputs"] |
| 104 | if !hasSafeOutputs { |
| 105 | return |
| 106 | } |
| 107 | mcpLog.Print("Found safe-outputs configuration") |
| 108 | if !serverFilterMatches(constants.SafeOutputsMCPServerID.String(), serverFilter) { |
| 109 | return |
| 110 | } |
| 111 | |
| 112 | config := RegistryMCPServerConfig{ |
| 113 | BaseMCPServerConfig: types.BaseMCPServerConfig{ |
| 114 | Type: "stdio", |
| 115 | Command: "node", |
| 116 | Env: make(map[string]string), |
| 117 | }, |
| 118 | Name: constants.SafeOutputsMCPServerID.String(), |
| 119 | } |
| 120 | if safeOutputsMap, ok := safeOutputsSection.(map[string]any); ok { |
| 121 | for toolType := range safeOutputsMap { |
| 122 | if mappedTool, ok := safeOutputToolName(toolType); ok { |
| 123 | config.Allowed = append(config.Allowed, mappedTool) |
| 124 | } |
| 125 | } |
| 126 | } |
| 127 | *configs = append(*configs, config) |
| 128 | } |
| 129 | |
| 130 | func addSafeJobsConfig(frontmatter map[string]any, serverFilter string, configs *[]RegistryMCPServerConfig) { |
| 131 | safeJobsSection, hasSafeJobs := frontmatter["safe-jobs"] |
no test coverage detected