From 34581bf46cc86519f9f7c7d62f260725296afb39 Mon Sep 17 00:00:00 2001 From: Vincent Koc Date: Sun, 3 May 2026 02:51:18 -0700 Subject: [PATCH] fix(plugins): align beta external launch metadata --- extensions/acpx/package.json | 2 +- extensions/googlechat/package.json | 2 +- extensions/line/package.json | 2 +- .../official-external-channel-catalog.json | 1 + .../official-external-plugin-catalog.test.ts | 39 +++++++++++++++++++ 5 files changed, 43 insertions(+), 3 deletions(-) diff --git a/extensions/acpx/package.json b/extensions/acpx/package.json index a57deb9a344..e2c2c3d38af 100644 --- a/extensions/acpx/package.json +++ b/extensions/acpx/package.json @@ -20,7 +20,7 @@ "./index.ts" ], "install": { - "npmSpec": "@openclaw/acpx", + "npmSpec": "@openclaw/acpx@beta", "defaultChoice": "npm", "minHostVersion": ">=2026.4.25" }, diff --git a/extensions/googlechat/package.json b/extensions/googlechat/package.json index 7f481c42151..95dc382257d 100644 --- a/extensions/googlechat/package.json +++ b/extensions/googlechat/package.json @@ -70,7 +70,7 @@ ] }, "install": { - "npmSpec": "@openclaw/googlechat", + "npmSpec": "@openclaw/googlechat@beta", "defaultChoice": "npm", "minHostVersion": ">=2026.4.10" }, diff --git a/extensions/line/package.json b/extensions/line/package.json index e8dc1f5252e..0092efe8774 100644 --- a/extensions/line/package.json +++ b/extensions/line/package.json @@ -40,7 +40,7 @@ "quickstartAllowFrom": true }, "install": { - "npmSpec": "@openclaw/line", + "npmSpec": "@openclaw/line@beta", "defaultChoice": "npm", "minHostVersion": ">=2026.4.10" }, diff --git a/scripts/lib/official-external-channel-catalog.json b/scripts/lib/official-external-channel-catalog.json index 92119d96627..cd7714bb5ce 100644 --- a/scripts/lib/official-external-channel-catalog.json +++ b/scripts/lib/official-external-channel-catalog.json @@ -356,6 +356,7 @@ "label": "Twitch", "selectionLabel": "Twitch (Chat)", "docsPath": "/channels/twitch", + "docsLabel": "twitch", "blurb": "Twitch chat integration", "aliases": ["twitch-chat"] }, diff --git a/src/plugins/official-external-plugin-catalog.test.ts b/src/plugins/official-external-plugin-catalog.test.ts index 29d3f622c2f..f55f0b3ce8d 100644 --- a/src/plugins/official-external-plugin-catalog.test.ts +++ b/src/plugins/official-external-plugin-catalog.test.ts @@ -1,3 +1,5 @@ +import fs from "node:fs"; +import path from "node:path"; import { describe, expect, it } from "vitest"; import { getOfficialExternalPluginCatalogEntry, @@ -46,4 +48,41 @@ describe("official external plugin catalog", () => { expect(ids.has("matrix")).toBe(false); expect(ids.has("mattermost")).toBe(false); }); + + it("keeps local package install metadata aligned with external catalog specs", () => { + const mismatches: string[] = []; + + for (const entry of listOfficialExternalPluginCatalogEntries()) { + const pluginId = resolveOfficialExternalPluginId(entry); + const catalogInstall = resolveOfficialExternalPluginInstall(entry); + if (!pluginId || !catalogInstall) { + continue; + } + const packagePath = path.join("extensions", pluginId, "package.json"); + if (!fs.existsSync(packagePath)) { + continue; + } + const packageJson = JSON.parse(fs.readFileSync(packagePath, "utf8")) as { + openclaw?: { + install?: { + clawhubSpec?: string; + npmSpec?: string; + }; + }; + }; + const packageInstall = packageJson.openclaw?.install ?? {}; + if (packageInstall.npmSpec && packageInstall.npmSpec !== catalogInstall.npmSpec) { + mismatches.push( + `${pluginId} npmSpec catalog=${catalogInstall.npmSpec ?? ""} package=${packageInstall.npmSpec}`, + ); + } + if (packageInstall.clawhubSpec && packageInstall.clawhubSpec !== catalogInstall.clawhubSpec) { + mismatches.push( + `${pluginId} clawhubSpec catalog=${catalogInstall.clawhubSpec ?? ""} package=${packageInstall.clawhubSpec}`, + ); + } + } + + expect(mismatches).toEqual([]); + }); });