( config: McpIntegrationConfigType, templateSlug: string | null, )
| 539 | * config-driven), so existing connections keep working. Ambiguity across |
| 540 | * several methods renders no auth rather than guessing. */ |
| 541 | const selectAuthMethod = ( |
| 542 | config: McpIntegrationConfigType, |
| 543 | templateSlug: string | null, |
| 544 | ): McpAuthMethod | undefined => { |
| 545 | const methods = config.authenticationTemplate ?? []; |
| 546 | if (templateSlug !== null) { |
| 547 | const match = methods.find((method: McpAuthMethod) => method.slug === templateSlug); |
| 548 | if (match) return match; |
| 549 | } |
| 550 | return methods.length === 1 ? methods[0] : undefined; |
| 551 | }; |
| 552 | |
| 553 | const buildConnectorInput = ( |
| 554 | config: McpIntegrationConfigType, |
no outgoing calls
no test coverage detected