* Resolve a single MCP header value: a `SecretRef` resolves to its plaintext, a * `bearer(ref)` marker resolves to `Bearer `, and a plain string is * passed through unchanged.
( value: string | SecretRef | BearerRef, resolveSecret: (ref: SecretRef) => string, )
| 65 | * passed through unchanged. |
| 66 | */ |
| 67 | function resolveHeaderValue( |
| 68 | value: string | SecretRef | BearerRef, |
| 69 | resolveSecret: (ref: SecretRef) => string, |
| 70 | ): string { |
| 71 | if (isSecretRef(value)) return resolveSecret(value) |
| 72 | if (isBearerMarker(value)) return `Bearer ${resolveSecret(value.__bearerRef)}` |
| 73 | return value |
| 74 | } |
| 75 | |
| 76 | /** Escape a string for use as a double-quoted TOML basic string. */ |
| 77 | function tomlString(value: string): string { |
no test coverage detected