From 3338581c20e7e741a32eda8e2f0c6739006ba0ca Mon Sep 17 00:00:00 2001 From: Vincent Koc Date: Sun, 3 May 2026 02:13:03 -0700 Subject: [PATCH] fix(onboarding): prefer clawhub diagnostics installs --- CHANGELOG.md | 1 + .../lib/official-external-plugin-catalog.json | 4 ++-- src/wizard/setup.official-plugins.test.ts | 20 ++++++++++++++++++- 3 files changed, 22 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6e25911d8fd..e17b81b754f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ Docs: https://docs.openclaw.ai ### Fixes - Plugins/onboarding: trust optional official plugin and web-search installs selected from the official catalog so npm security scanning treats them like other source-linked official install paths. Thanks @vincentkoc. +- Plugins/onboarding: default official diagnostics plugin choices to ClawHub while keeping npm fallback metadata, matching the intended storepack-first install path. Thanks @vincentkoc. - Microsoft Teams: persist sent-message markers across Gateway restarts so follow-up replies to recent bot messages keep resolving the original conversation instead of dropping out after restart, with marker TTLs preserved on best-effort recovery. (#75585) Thanks @amknight. - Matrix: persist pending approval reaction targets across Gateway restarts so room approvers can still approve or deny outstanding prompts after OpenClaw comes back online. (#75586) Thanks @amknight. - Channels/onboarding: map third-party official WeCom and Yuanbao catalog entries to their published plugin ids so npm installs pass expected-plugin validation. Thanks @vincentkoc. diff --git a/scripts/lib/official-external-plugin-catalog.json b/scripts/lib/official-external-plugin-catalog.json index dd2c50a46d7..21d9a0e6554 100644 --- a/scripts/lib/official-external-plugin-catalog.json +++ b/scripts/lib/official-external-plugin-catalog.json @@ -62,7 +62,7 @@ "install": { "clawhubSpec": "clawhub:@openclaw/diagnostics-otel", "npmSpec": "@openclaw/diagnostics-otel", - "defaultChoice": "npm", + "defaultChoice": "clawhub", "minHostVersion": ">=2026.4.25" } } @@ -80,7 +80,7 @@ "install": { "clawhubSpec": "clawhub:@openclaw/diagnostics-prometheus", "npmSpec": "@openclaw/diagnostics-prometheus", - "defaultChoice": "npm", + "defaultChoice": "clawhub", "minHostVersion": ">=2026.4.25" } } diff --git a/src/wizard/setup.official-plugins.test.ts b/src/wizard/setup.official-plugins.test.ts index f332064cbd2..b64e02a2c79 100644 --- a/src/wizard/setup.official-plugins.test.ts +++ b/src/wizard/setup.official-plugins.test.ts @@ -69,6 +69,24 @@ describe("formatInstallHint", () => { ).toBe("npm, with ClawHub fallback"); }); + it("keeps catalog diagnostics installs ClawHub first with npm fallback", () => { + const diagnostics = resolveOfficialPluginOnboardingInstallEntries({ config: {} }).filter( + (entry) => entry.pluginId.startsWith("diagnostics-"), + ); + + expect(diagnostics).toHaveLength(2); + for (const entry of diagnostics) { + expect(entry.install).toEqual( + expect.objectContaining({ + clawhubSpec: expect.stringMatching(/^clawhub:@openclaw\/diagnostics-/u), + npmSpec: expect.stringMatching(/^@openclaw\/diagnostics-/u), + defaultChoice: "clawhub", + }), + ); + expect(__testing.formatInstallHint(entry.install)).toBe("ClawHub, with npm fallback"); + } + }); + it("keeps dual-source clawhub-default installs ClawHub first", () => { expect( __testing.formatInstallHint({ @@ -116,7 +134,7 @@ describe("setupOfficialPluginInstalls", () => { install: expect.objectContaining({ clawhubSpec: "clawhub:@openclaw/diagnostics-otel", npmSpec: "@openclaw/diagnostics-otel", - defaultChoice: "npm", + defaultChoice: "clawhub", }), }), promptInstall: false,