The Open Framework for Building Agents
test(eve): reproduce auth.displayName rejected as an unknown connection key (#4979)
roboeve[bot]8896ae75199e
diff --git a/packages/eve/src/internal/authored-definition/connection.test.ts b/packages/eve/src/internal/authored-definition/connection.test.tsindex 0ca2bc608..97f2b7635 100644--- a/packages/eve/src/internal/authored-definition/connection.test.ts+++ b/packages/eve/src/internal/authored-definition/connection.test.ts@@ -185,6 +185,24 @@ describe("normalizeMcpClientConnectionDefinition", () => {expect((result.auth as Record<string, unknown>).evict).toBe(evict);});+ // Bug #4978: the documented `auth.displayName` is rejected as an unknown key.+ it.fails("preserves the optional auth displayName", () => {+ const result = normalizeMcpClientConnectionDefinition(+ validInput({+ auth: {+ completeAuthorization: async () => ({ token: "fresh" }),+ displayName: "Example",+ getToken: async () => ({ token: "cached" }),+ principalType: "user",+ startAuthorization: async () => ({ challenge: { url: "https://idp.example/auth" } }),+ },+ }),+ MSG,+ );++ expect(authProvider(result.auth).displayName).toBe("Example");+ });+it("drops a malformed vercelConnect marker without throwing", () => {// A misbehaving auth provider could attach a malformed marker; the// normalizer treats it as absent rather than failing the whole