Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure
TypeScript
fix(control-ui): use the spec's fallback copy for scope_audience_mismatch without a scope (F4-N4)
Diego Zacarias7e6fc1bd6b06
diff --git a/control-ui/lib/__tests__/remoteMcp.test.ts b/control-ui/lib/__tests__/remoteMcp.test.tsindex cd06c2b3d..34e470f67 100644--- a/control-ui/lib/__tests__/remoteMcp.test.ts+++ b/control-ui/lib/__tests__/remoteMcp.test.ts@@ -619,7 +619,9 @@ describe('mapRemoteInstallError', () => {code: 'scope_audience_mismatch',body: { error: 'scope_audience_mismatch' },})- expect(mapRemoteInstallError(err)).toMatch(/^A scope belongs to another API/)+ expect(mapRemoteInstallError(err)).toBe(+ "The scope belongs to another API, so a token for it must not be sent to this server. Remove it or use this server's own scope."+ )})it('maps scope_audience_missing to "add this server\'s own scope"', () => {diff --git a/control-ui/lib/remoteMcp.ts b/control-ui/lib/remoteMcp.tsindex 165b090fd..dc2b08fc2 100644--- a/control-ui/lib/remoteMcp.ts+++ b/control-ui/lib/remoteMcp.ts@@ -528,7 +528,7 @@ export function mapRemoteInstallError(const scope = typeof body?.scope === 'string' ? body.scope : ''return scope? `The scope "${scope}" belongs to another API, so a token for it must not be sent to this server. Remove it or use this server's own scope.`- : "A scope belongs to another API, so a token for it must not be sent to this server. Remove it or use this server's own scope."+ : "The scope belongs to another API, so a token for it must not be sent to this server. Remove it or use this server's own scope."}case 'scope_audience_missing':return 'Add this server’s own scope. Sign-in scopes alone (openid, profile, email, offline_access) would send a Microsoft Graph token to the server.'diff --git a/control-ui/package-lock.json b/control-ui/package-lock.jsonindex 39cfaf1b9..6d25e9544 100644--- a/control-ui/package-lock.json+++ b/control-ui/package-lock.json@@ -1,12 +1,12 @@{"name": "clerum-control-ui",- "version": "0.1.739",+ "version": "0.1.740","lockfileVersion": 3,"requires": true,"packages": {"": {"name": "clerum-control-ui",- "version": "0.1.739",+ "version": "0.1.740","dependencies": {"@clerum/display-field": "file:../packages/display-field","@clerum/frontend-components": "file:../packages/frontend-components",diff --git a/control-ui/package.json b/control-ui/package.jsonindex cf97cc7a7..0178f19a3 100644--- a/control-ui/package.json+++ b/control-ui/package.json@@ -1,6 +1,6 @@{"name": "clerum-control-ui",- "version": "0.1.739",+ "version": "0.1.740","private": true,"scripts": {"dev": "NEXT_IGNORE_INCORRECT_LOCKFILE=1 next dev",