fix(clawhub): clarify unreleased plugin artifacts · openclaw/openclaw@4473c56
vincentkoc
·
2026-05-03
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -22,6 +22,7 @@ Docs: https://docs.openclaw.ai
|
22 | 22 | - Control UI/Talk: fix Talk (OpenAI Realtime WebRTC) CORS failure by stripping server-side-only attribution headers (`originator`, `version`, `User-Agent`) from browser offer headers; `api.openai.com/v1/realtime/calls` only allows `authorization` and `content-type` in its CORS preflight, so forwarding these headers caused the browser SDP exchange to fail. Fixes #76435. Thanks @hclsys. |
23 | 23 | - 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. |
24 | 24 | - Tests/plugins: expose the Discord npm onboarding Docker lane as a package script and assert planned Docker lanes point at real scripts, so external-channel onboarding coverage can actually run. Thanks @vincentkoc. |
| 25 | +- Plugins/ClawHub: explain unreleased ClawHub plugin artifacts as a rollout-state fallback to `npm:` installs instead of leaking raw archive metadata fields. Thanks @vincentkoc. |
25 | 26 | - 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. |
26 | 27 | - 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. |
27 | 28 | - 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. |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -1038,7 +1038,7 @@ describe("installPluginFromClawHub", () => {
|
1038 | 1038 | ok: false, |
1039 | 1039 | code: CLAWHUB_INSTALL_ERROR_CODE.MISSING_ARCHIVE_INTEGRITY, |
1040 | 1040 | error: |
1041 | | -'ClawHub version metadata for "demo@2026.3.22" is missing sha256hash and usable files[] metadata for fallback archive verification.', |
| 1041 | +'ClawHub package "demo@2026.3.22" does not expose a downloadable plugin artifact yet. Use "npm:demo@2026.3.22" for launch installs while ClawHub artifact routing is being rolled out.', |
1042 | 1042 | }); |
1043 | 1043 | expect(downloadClawHubPackageArchiveMock).not.toHaveBeenCalled(); |
1044 | 1044 | }); |
@@ -1064,7 +1064,7 @@ describe("installPluginFromClawHub", () => {
|
1064 | 1064 | ok: false, |
1065 | 1065 | code: CLAWHUB_INSTALL_ERROR_CODE.MISSING_ARCHIVE_INTEGRITY, |
1066 | 1066 | error: |
1067 | | -'ClawHub version metadata for "demo@2026.3.22" is missing sha256hash and usable files[] metadata for fallback archive verification.', |
| 1067 | +'ClawHub package "demo@2026.3.22" does not expose a downloadable plugin artifact yet. Use "npm:demo@2026.3.22" for launch installs while ClawHub artifact routing is being rolled out.', |
1068 | 1068 | }); |
1069 | 1069 | expect(downloadClawHubPackageArchiveMock).not.toHaveBeenCalled(); |
1070 | 1070 | }); |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -375,6 +375,13 @@ function formatClawHubClawPackDownloadError(params: {
|
375 | 375 | return `ClawHub artifact download for "${params.packageName}@${params.version}" is not available yet (${message}). Use "npm:${params.packageName}@${params.version}" for launch installs while ClawHub artifact routing is being rolled out.`; |
376 | 376 | } |
377 | 377 | |
| 378 | +function formatClawHubMissingArtifactMetadataError(params: { |
| 379 | +packageName: string; |
| 380 | +version: string; |
| 381 | +}): string { |
| 382 | +return `ClawHub package "${params.packageName}@${params.version}" does not expose a downloadable plugin artifact yet. Use "npm:${params.packageName}@${params.version}" for launch installs while ClawHub artifact routing is being rolled out.`; |
| 383 | +} |
| 384 | + |
378 | 385 | function resolveRequestedVersion(params: { |
379 | 386 | detail: ClawHubPackageDetail; |
380 | 387 | requestedVersion?: string; |
@@ -1079,13 +1086,16 @@ export async function installPluginFromClawHub(
|
1079 | 1086 | return validationFailure; |
1080 | 1087 | } |
1081 | 1088 | const expectedClawPackSha256 = resolveClawHubClawPackArtifactSha256(versionState.clawpack); |
| 1089 | +const canonicalPackageName = detail.package?.name ?? parsed.name; |
1082 | 1090 | if (!versionState.verification && !expectedClawPackSha256) { |
1083 | 1091 | return buildClawHubInstallFailure( |
1084 | | -`ClawHub version metadata for "${parsed.name}@${versionState.version}" is missing sha256hash and usable files[] metadata for fallback archive verification.`, |
| 1092 | +formatClawHubMissingArtifactMetadataError({ |
| 1093 | +packageName: canonicalPackageName, |
| 1094 | +version: versionState.version, |
| 1095 | +}), |
1085 | 1096 | CLAWHUB_INSTALL_ERROR_CODE.MISSING_ARCHIVE_INTEGRITY, |
1086 | 1097 | ); |
1087 | 1098 | } |
1088 | | -const canonicalPackageName = detail.package?.name ?? parsed.name; |
1089 | 1099 | logClawHubPackageSummary({ |
1090 | 1100 | detail, |
1091 | 1101 | version: versionState.version, |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。