diff --git a/scripts/release/lib/channels-umbrella.test.ts b/scripts/release/lib/channels-umbrella.test.ts index 17a79127c0..5304bf20ef 100644 --- a/scripts/release/lib/channels-umbrella.test.ts +++ b/scripts/release/lib/channels-umbrella.test.ts @@ -1,3 +1,6 @@ +import { readFileSync } from "node:fs"; +import { dirname, join } from "node:path"; +import { fileURLToPath } from "node:url"; import { describe, expect, it } from "vitest"; import { ADAPTERS, @@ -162,4 +165,29 @@ describe("createConsumerWorkspaceYaml", () => { // whole scope. expect(RELEASE_AGE_EXCLUDE).not.toContain("@ag-ui/*"); }); + + // The packed-consumer install runs in a temp dir, which never inherits the + // repo-root `.npmrc`, so this list is a second copy of the same policy. The + // two drifted once: `@ag-ui/mcp-middleware` was added to `.npmrc` alone, and + // a fresh publish then failed the age gate only inside the packed-runtime + // verification. Keep them identical. + it("matches the age-gate exemptions in the repo-root .npmrc", () => { + const root = join( + dirname(fileURLToPath(import.meta.url)), + "..", + "..", + "..", + ); + const npmrc = readFileSync(join(root, ".npmrc"), "utf8"); + const fromNpmrc = npmrc + .split("\n") + .map((line) => line.trim()) + .filter((line) => line.startsWith("minimum-release-age-exclude[]=")) + .map((line) => + line.slice("minimum-release-age-exclude[]=".length).trim(), + ); + + expect(fromNpmrc.length).toBeGreaterThan(0); + expect([...fromNpmrc].sort()).toEqual([...RELEASE_AGE_EXCLUDE].sort()); + }); }); diff --git a/scripts/release/lib/channels-umbrella.ts b/scripts/release/lib/channels-umbrella.ts index fe5fd1f0ff..68c8000ebb 100644 --- a/scripts/release/lib/channels-umbrella.ts +++ b/scripts/release/lib/channels-umbrella.ts @@ -53,6 +53,8 @@ export const RELEASE_AGE_EXCLUDE = [ "@ag-ui/langgraph", "@ag-ui/a2ui-middleware", "@ag-ui/a2ui-toolkit", + "@ag-ui/mcp-middleware", + "@ag-ui/mcp-apps-middleware", ] as const; export function createConsumerWorkspaceYaml(): string {