()
| 100 | } |
| 101 | |
| 102 | func (m *CLIBridgeModule) getAllowedTools() []string { |
| 103 | lc := m.loadListConfig() |
| 104 | if len(lc.AllowedTools) > 0 { |
| 105 | return lc.AllowedTools |
| 106 | } |
| 107 | v := m.plug.Config.Get(`AllowedTools`) |
| 108 | if tools, ok := v.([]any); ok { |
| 109 | result := make([]string, 0, len(tools)) |
| 110 | for _, t := range tools { |
| 111 | if s, ok := t.(string); ok { |
| 112 | result = append(result, s) |
| 113 | } |
| 114 | } |
| 115 | return result |
| 116 | } |
| 117 | return nil |
| 118 | } |
| 119 | |
| 120 | func (m *CLIBridgeModule) getAllowedPaths() []string { |
| 121 | lc := m.loadListConfig() |
no test coverage detected