diff --git a/scripts/lib/official-external-channel-catalog.json b/scripts/lib/official-external-channel-catalog.json index d53e14d943c..1048a5d102d 100644 --- a/scripts/lib/official-external-channel-catalog.json +++ b/scripts/lib/official-external-channel-catalog.json @@ -35,9 +35,9 @@ } }, "install": { - "npmSpec": "@wecom/wecom-openclaw-plugin@2026.4.23", + "npmSpec": "@wecom/wecom-openclaw-plugin@2026.5.7", "defaultChoice": "npm", - "expectedIntegrity": "sha512-bnzfdIEEu1/LFvcdyjaTkyxt27w6c7dqhkPezU62OWaqmcdFsUGR3T55USK/O9pIKsNcnL1Tnu1pqKYCWHFgWQ==" + "expectedIntegrity": "sha512-TCkP9as00WfEhgFWG8YL/rcmaWGIshAki2HQh83nTRccGfVBCoGjrEboTTqq3yDmK9koWTV11zi8u8A4dNtvug==" } } }, diff --git a/src/channels/plugins/catalog.test.ts b/src/channels/plugins/catalog.test.ts index 7b9dda7f1af..fe71d1189be 100644 --- a/src/channels/plugins/catalog.test.ts +++ b/src/channels/plugins/catalog.test.ts @@ -12,7 +12,7 @@ describe("channel plugin catalog", () => { expect(wecom?.id).toBe("wecom"); expect(wecom?.pluginId).toBe("wecom-openclaw-plugin"); expect(wecom?.trustedSourceLinkedOfficialInstall).toBe(true); - expect(wecom?.install?.npmSpec).toBe("@wecom/wecom-openclaw-plugin@2026.4.23"); + expect(wecom?.install?.npmSpec).toBe("@wecom/wecom-openclaw-plugin@2026.5.7"); const yuanbao = getChannelPluginCatalogEntry("yuanbao", options); expect(yuanbao?.id).toBe("yuanbao"); diff --git a/src/channels/plugins/contracts/channel-catalog.contract.test.ts b/src/channels/plugins/contracts/channel-catalog.contract.test.ts index b85fd809a93..c0dd9f3fba5 100644 --- a/src/channels/plugins/contracts/channel-catalog.contract.test.ts +++ b/src/channels/plugins/contracts/channel-catalog.contract.test.ts @@ -39,7 +39,7 @@ describeOfficialFallbackChannelCatalogContract({ describeChannelCatalogEntryContract({ channelId: "wecom", - npmSpec: "@wecom/wecom-openclaw-plugin@2026.4.23", + npmSpec: "@wecom/wecom-openclaw-plugin@2026.5.7", alias: "wework", }); diff --git a/src/cli/plugins-cli.install.test.ts b/src/cli/plugins-cli.install.test.ts index 1f3c166b795..904c3d08d90 100644 --- a/src/cli/plugins-cli.install.test.ts +++ b/src/cli/plugins-cli.install.test.ts @@ -61,7 +61,7 @@ function cliInstallPath(pluginId: string): string { function useProfileExtensionsDir(): string { process.env.OPENCLAW_STATE_DIR = PROFILE_STATE_ROOT; - return path.join(PROFILE_STATE_ROOT, "extensions"); + return path.resolve(PROFILE_STATE_ROOT, "extensions"); } function createEnabledPluginConfig(pluginId: string): OpenClawConfig { @@ -850,10 +850,10 @@ describe("plugins cli install", () => { await runPluginsCommand(["plugins", "install", "wecom"]); - expect(npmInstallCall().spec).toBe("@wecom/wecom-openclaw-plugin@2026.4.23"); + expect(npmInstallCall().spec).toBe("@wecom/wecom-openclaw-plugin@2026.5.7"); expect(npmInstallCall().expectedPluginId).toBe("wecom-openclaw-plugin"); expect(npmInstallCall().expectedIntegrity).toBe( - "sha512-bnzfdIEEu1/LFvcdyjaTkyxt27w6c7dqhkPezU62OWaqmcdFsUGR3T55USK/O9pIKsNcnL1Tnu1pqKYCWHFgWQ==", + "sha512-TCkP9as00WfEhgFWG8YL/rcmaWGIshAki2HQh83nTRccGfVBCoGjrEboTTqq3yDmK9koWTV11zi8u8A4dNtvug==", ); expect(npmInstallCall().trustedSourceLinkedOfficialInstall).toBe(true); }); @@ -896,15 +896,15 @@ describe("plugins cli install", () => { installHooksFromNpmSpec.mockResolvedValue({ ok: false, error: - "aborted: npm package integrity drift detected for @wecom/wecom-openclaw-plugin@2026.4.23", + "aborted: npm package integrity drift detected for @wecom/wecom-openclaw-plugin@2026.5.7", }); await expect(runPluginsCommand(["plugins", "install", "wecom"])).rejects.toThrow("__exit__:1"); expect(npmInstallCall().trustedSourceLinkedOfficialInstall).toBe(true); - expect(hookNpmInstallCall().spec).toBe("@wecom/wecom-openclaw-plugin@2026.4.23"); + expect(hookNpmInstallCall().spec).toBe("@wecom/wecom-openclaw-plugin@2026.5.7"); expect(hookNpmInstallCall().expectedIntegrity).toBe( - "sha512-bnzfdIEEu1/LFvcdyjaTkyxt27w6c7dqhkPezU62OWaqmcdFsUGR3T55USK/O9pIKsNcnL1Tnu1pqKYCWHFgWQ==", + "sha512-TCkP9as00WfEhgFWG8YL/rcmaWGIshAki2HQh83nTRccGfVBCoGjrEboTTqq3yDmK9koWTV11zi8u8A4dNtvug==", ); }); diff --git a/src/commands/channel-setup/plugin-install.test.ts b/src/commands/channel-setup/plugin-install.test.ts index 6decf4e1561..68ec00b697a 100644 --- a/src/commands/channel-setup/plugin-install.test.ts +++ b/src/commands/channel-setup/plugin-install.test.ts @@ -417,7 +417,7 @@ describe("ensureChannelSetupPluginInstalled", () => { }); expectRecordFields(requireMockCallArg(installPluginFromNpmSpec, 0), "npm install args", { - extensionsDir: path.join(profileStateDir, "extensions"), + extensionsDir: path.resolve(profileStateDir, "extensions"), spec: bundledChatNpmSpec, }); }); diff --git a/src/commands/onboarding-plugin-install.test.ts b/src/commands/onboarding-plugin-install.test.ts index 14f5795999e..cd832c2fcb7 100644 --- a/src/commands/onboarding-plugin-install.test.ts +++ b/src/commands/onboarding-plugin-install.test.ts @@ -119,6 +119,7 @@ type NpmPackInstallCall = { type NpmSpecInstallCall = { expectedIntegrity?: string; expectedPluginId?: string; + mode?: string; spec?: string; timeoutMs?: number; trustedSourceLinkedOfficialInstall?: boolean; @@ -445,6 +446,7 @@ describe("ensureOnboardingPluginInstalled", () => { NpmSpecInstallCall, ]; expect(npmCall.spec).toBe("@wecom/wecom-openclaw-plugin@1.2.3"); + expect(npmCall.mode).toBe("update"); expect(npmCall.expectedPluginId).toBe("demo-plugin"); expect(npmCall.expectedIntegrity).toBe("sha512-wecom"); expect(npmCall.trustedSourceLinkedOfficialInstall).toBe(true); diff --git a/src/commands/onboarding-plugin-install.ts b/src/commands/onboarding-plugin-install.ts index d63d5f82431..b03a2bf2821 100644 --- a/src/commands/onboarding-plugin-install.ts +++ b/src/commands/onboarding-plugin-install.ts @@ -625,6 +625,7 @@ async function installPluginFromNpmSpecWithProgress(params: { const result = await withTimeout( installPluginFromNpmSpec({ spec: params.npmSpec, + mode: "update", timeoutMs: ONBOARDING_PLUGIN_INSTALL_TIMEOUT_MS, expectedPluginId: params.entry.pluginId, expectedIntegrity: params.entry.install.expectedIntegrity, diff --git a/src/plugins/install.npm-spec.test.ts b/src/plugins/install.npm-spec.test.ts index 024cd9a8366..997032caf7f 100644 --- a/src/plugins/install.npm-spec.test.ts +++ b/src/plugins/install.npm-spec.test.ts @@ -660,7 +660,7 @@ describe("installPluginFromNpmSpec", () => { expect(result.ok).toBe(false); if (!result.ok) { expect(result.error).toContain("plain-crypto-js"); - expect(result.error).toContain("node_modules/plain-crypto-js"); + expect(result.error).toContain(path.join("node_modules", "plain-crypto-js")); } }); diff --git a/src/plugins/official-external-plugin-catalog.test.ts b/src/plugins/official-external-plugin-catalog.test.ts index d3bf97d531e..7104929cbad 100644 --- a/src/plugins/official-external-plugin-catalog.test.ts +++ b/src/plugins/official-external-plugin-catalog.test.ts @@ -24,7 +24,7 @@ describe("official external plugin catalog", () => { expect(resolveOfficialExternalPluginId(wecomByChannel)).toBe("wecom-openclaw-plugin"); expect(resolveOfficialExternalPluginId(wecomByPlugin)).toBe("wecom-openclaw-plugin"); expect(resolveOfficialExternalPluginInstall(wecomByChannel)?.npmSpec).toBe( - "@wecom/wecom-openclaw-plugin@2026.4.23", + "@wecom/wecom-openclaw-plugin@2026.5.7", ); expect(resolveOfficialExternalPluginId(yuanbaoByChannel)).toBe("openclaw-plugin-yuanbao"); expect(resolveOfficialExternalPluginInstall(yuanbaoByChannel)?.npmSpec).toBe( diff --git a/test/official-channel-catalog.test.ts b/test/official-channel-catalog.test.ts index 44c7559bb04..c68d1b0626b 100644 --- a/test/official-channel-catalog.test.ts +++ b/test/official-channel-catalog.test.ts @@ -140,10 +140,10 @@ describe("buildOfficialChannelCatalog", () => { aliases: ["qywx", "wework", "enterprise-wechat"], }, install: { - npmSpec: "@wecom/wecom-openclaw-plugin@2026.4.23", + npmSpec: "@wecom/wecom-openclaw-plugin@2026.5.7", defaultChoice: "npm", expectedIntegrity: - "sha512-bnzfdIEEu1/LFvcdyjaTkyxt27w6c7dqhkPezU62OWaqmcdFsUGR3T55USK/O9pIKsNcnL1Tnu1pqKYCWHFgWQ==", + "sha512-TCkP9as00WfEhgFWG8YL/rcmaWGIshAki2HQh83nTRccGfVBCoGjrEboTTqq3yDmK9koWTV11zi8u8A4dNtvug==", }, }); expect(