| 179 | } |
| 180 | |
| 181 | func (s settings) toHeaders() map[string]string { |
| 182 | h := map[string]string{} |
| 183 | if s.toolsets != "" { |
| 184 | h[mcphdr.MCPToolsetsHeader] = s.toolsets |
| 185 | } |
| 186 | if s.tools != "" { |
| 187 | h[mcphdr.MCPToolsHeader] = s.tools |
| 188 | } |
| 189 | if s.excludeTools != "" { |
| 190 | h[mcphdr.MCPExcludeToolsHeader] = s.excludeTools |
| 191 | } |
| 192 | if s.features != "" { |
| 193 | h[mcphdr.MCPFeaturesHeader] = s.features |
| 194 | } |
| 195 | if s.readOnly { |
| 196 | h[mcphdr.MCPReadOnlyHeader] = "true" |
| 197 | } |
| 198 | if s.insiders { |
| 199 | h[mcphdr.MCPInsidersHeader] = "true" |
| 200 | } |
| 201 | if s.lockdown { |
| 202 | h[mcphdr.MCPLockdownHeader] = "true" |
| 203 | } |
| 204 | if len(h) == 0 { |
| 205 | return nil |
| 206 | } |
| 207 | return h |
| 208 | } |
| 209 | |
| 210 | func firstFeatureFlag() string { |
| 211 | flags := append([]string(nil), github.AllowedFeatureFlags...) |