diff --git a/extensions/googlechat/package.json b/extensions/googlechat/package.json index 883af1bd876..1a7a876b4ef 100644 --- a/extensions/googlechat/package.json +++ b/extensions/googlechat/package.json @@ -37,6 +37,11 @@ "npmSpec": "@openclaw/googlechat", "localPath": "extensions/googlechat", "defaultChoice": "npm" + }, + "releaseChecks": { + "rootDependencyMirrorAllowlist": [ + "google-auth-library" + ] } } } diff --git a/extensions/matrix/package.json b/extensions/matrix/package.json index 8970cd77d3c..f32e8915436 100644 --- a/extensions/matrix/package.json +++ b/extensions/matrix/package.json @@ -29,6 +29,13 @@ "npmSpec": "@openclaw/matrix", "localPath": "extensions/matrix", "defaultChoice": "npm" + }, + "releaseChecks": { + "rootDependencyMirrorAllowlist": [ + "@matrix-org/matrix-sdk-crypto-nodejs", + "@vector-im/matrix-bot-sdk", + "music-metadata" + ] } } } diff --git a/extensions/msteams/package.json b/extensions/msteams/package.json index 8bb3fd0938f..0415203ff0d 100644 --- a/extensions/msteams/package.json +++ b/extensions/msteams/package.json @@ -27,6 +27,11 @@ "npmSpec": "@openclaw/msteams", "localPath": "extensions/msteams", "defaultChoice": "npm" + }, + "releaseChecks": { + "rootDependencyMirrorAllowlist": [ + "@microsoft/agents-hosting" + ] } } } diff --git a/extensions/nostr/package.json b/extensions/nostr/package.json index 294a254b69a..389d7b210ff 100644 --- a/extensions/nostr/package.json +++ b/extensions/nostr/package.json @@ -25,6 +25,11 @@ "npmSpec": "@openclaw/nostr", "localPath": "extensions/nostr", "defaultChoice": "npm" + }, + "releaseChecks": { + "rootDependencyMirrorAllowlist": [ + "nostr-tools" + ] } } } diff --git a/extensions/tlon/package.json b/extensions/tlon/package.json index e1173e3b2f1..9fe4d84353a 100644 --- a/extensions/tlon/package.json +++ b/extensions/tlon/package.json @@ -27,6 +27,13 @@ "npmSpec": "@openclaw/tlon", "localPath": "extensions/tlon", "defaultChoice": "npm" + }, + "releaseChecks": { + "rootDependencyMirrorAllowlist": [ + "@tloncorp/api", + "@tloncorp/tlon-skill", + "@urbit/aura" + ] } } } diff --git a/extensions/zalouser/package.json b/extensions/zalouser/package.json index e957662f07c..217653508db 100644 --- a/extensions/zalouser/package.json +++ b/extensions/zalouser/package.json @@ -29,6 +29,11 @@ "npmSpec": "@openclaw/zalouser", "localPath": "extensions/zalouser", "defaultChoice": "npm" + }, + "releaseChecks": { + "rootDependencyMirrorAllowlist": [ + "zca-js" + ] } } } diff --git a/scripts/release-check.ts b/scripts/release-check.ts index 095f5f2a34b..db396672ff7 100755 --- a/scripts/release-check.ts +++ b/scripts/release-check.ts @@ -17,6 +17,9 @@ type PackageJson = { install?: { npmSpec?: string; }; + releaseChecks?: { + rootDependencyMirrorAllowlist?: string[]; + }; }; }; @@ -128,15 +131,6 @@ function normalizePluginSyncVersion(version: string): string { return normalized.replace(/[-+].*$/, ""); } -const ALLOWLISTED_BUNDLED_EXTENSION_ROOT_DEP_GAPS: Record = { - googlechat: ["google-auth-library"], - matrix: ["@matrix-org/matrix-sdk-crypto-nodejs", "@vector-im/matrix-bot-sdk", "music-metadata"], - msteams: ["@microsoft/agents-hosting"], - nostr: ["nostr-tools"], - tlon: ["@tloncorp/api", "@tloncorp/tlon-skill", "@urbit/aura"], - zalouser: ["zca-js"], -}; - export function collectBundledExtensionRootDependencyGapErrors(params: { rootPackage: PackageJson; extensions: Array<{ id: string; packageJson: PackageJson }>; @@ -156,7 +150,7 @@ export function collectBundledExtensionRootDependencyGapErrors(params: { .filter((dep) => dep !== "openclaw" && !rootDeps[dep]) .toSorted(); const allowlisted = [ - ...(ALLOWLISTED_BUNDLED_EXTENSION_ROOT_DEP_GAPS[extension.id] ?? []), + ...(extension.packageJson.openclaw?.releaseChecks?.rootDependencyMirrorAllowlist ?? []), ].toSorted(); if (missing.join("\n") !== allowlisted.join("\n")) { const unexpected = missing.filter((dep) => !allowlisted.includes(dep)); diff --git a/test/release-check.test.ts b/test/release-check.test.ts index e366623a886..8a9ec8fea0e 100644 --- a/test/release-check.test.ts +++ b/test/release-check.test.ts @@ -40,7 +40,12 @@ describe("collectBundledExtensionRootDependencyGapErrors", () => { id: "googlechat", packageJson: { dependencies: { "google-auth-library": "^1.0.0" }, - openclaw: { install: { npmSpec: "@openclaw/googlechat" } }, + openclaw: { + install: { npmSpec: "@openclaw/googlechat" }, + releaseChecks: { + rootDependencyMirrorAllowlist: ["google-auth-library"], + }, + }, }, }, { @@ -66,7 +71,12 @@ describe("collectBundledExtensionRootDependencyGapErrors", () => { id: "googlechat", packageJson: { dependencies: { "google-auth-library": "^1.0.0", undici: "^7.0.0" }, - openclaw: { install: { npmSpec: "@openclaw/googlechat" } }, + openclaw: { + install: { npmSpec: "@openclaw/googlechat" }, + releaseChecks: { + rootDependencyMirrorAllowlist: ["google-auth-library"], + }, + }, }, }, ], @@ -85,7 +95,12 @@ describe("collectBundledExtensionRootDependencyGapErrors", () => { id: "googlechat", packageJson: { dependencies: { "google-auth-library": "^1.0.0" }, - openclaw: { install: { npmSpec: "@openclaw/googlechat" } }, + openclaw: { + install: { npmSpec: "@openclaw/googlechat" }, + releaseChecks: { + rootDependencyMirrorAllowlist: ["google-auth-library"], + }, + }, }, }, ],