@warmio/mcp 9.1.0 → 9.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/warm-api-client.js +2 -1
- package/package.json +1 -1
package/dist/warm-api-client.js
CHANGED
|
@@ -161,7 +161,8 @@ export function createWarmApiClient(options = {}) {
|
|
|
161
161
|
const validateAudience = async () => {
|
|
162
162
|
const result = await verifyKey();
|
|
163
163
|
const expectedAudience = createWarmApiClientConfig(options).audience;
|
|
164
|
-
|
|
164
|
+
const hasCompatibleAudience = result.audience === expectedAudience || result.audience === 'oauth';
|
|
165
|
+
if (!result.valid || !hasCompatibleAudience) {
|
|
165
166
|
const article = expectedAudience === 'automation' ? 'an' : 'a';
|
|
166
167
|
throw new Error(`This MCP mode requires ${article} ${expectedAudience} API key. Run "${WARM_MCP_INSTALLER_COMMANDS[expectedAudience]}" to configure a separate key.`);
|
|
167
168
|
}
|