Repository navigation
Description
Summary
openclaw plugins update --all --dry-run is a supported option, but for npm-installed plugins it can report the target version as unknown even when npm metadata resolution succeeded and the version is available on the result object.
This makes dry-run output look suspicious/incomplete and forces operators to manually resolve package specs with npm view before trusting an update.
Observed behavior
Environment:
- OpenClaw:
2026.5.6 (c97b9f7) - Install: global npm package install
- Plugins: npm-installed OpenClaw plugins under
~/.openclaw/npm/node_modules
Command:
openclaw plugins update --all --dry-runOutput excerpt from a real preflight before updating from 2026.5.5 to 2026.5.6:
Would update acpx: 2026.5.5 -> unknown.
Would update brave: 2026.5.5 -> unknown.
Would update discord: 2026.5.5 -> unknown.
Would update lobster: 2026.5.5 -> unknown.
Manual resolution of the tracked install specs showed the versions were known and were normal upgrades:
acpx: install record spec @openclaw/acpx resolves to 2026.5.6
brave: install record spec @openclaw/brave-plugin resolves to 2026.5.6
discord: install record spec @openclaw/discord@latest resolves to 2026.5.6
lobster: install record spec @openclaw/lobster resolves to 2026.5.6
After the update, the plugins did update/load correctly at 2026.5.6.
Expected behavior
Dry-run should report the resolved npm target version when metadata resolution succeeds:
Would update acpx: 2026.5.5 -> 2026.5.6.
Why this matters
--dry-run is documented by openclaw plugins update --help:
--dry-run Show what would change without writing
For update guardrails, unknown is not actionable enough. A safe updater has to treat current -> unknown as suspicious because it could be a downgrade, missing metadata, stale install record, or resolver bug.
Suspected cause
In the installed 2026.5.6 dist tree, the npm dry-run installer returns metadata on npmResolution:
if (dryRun) return {
ok: true,
pluginId: expectedPluginId ?? parsedSpec.name,
targetDir: installRoot,
extensions: [],
npmResolution,
...
};But the plugin update dry-run formatter appears to use only probe.version:
const nextVersion = probe.version ?? "unknown";
...
message: `Would update ${pluginId}: ${currentLabel} -> ${nextVersion}.`So npm dry-run results can have probe.npmResolution.version available while probe.version is undefined, producing unknown.
Relevant installed files/symbols:
dist/install-*.js/installPluginFromNpmSpec(...)dist/update-*.js/ dry-run branch in plugin update handlingdist/plugins-update-command-*.js
Suggested fix
When formatting npm plugin dry-run outcomes, use a fallback like:
const resolvedVersion = probe.version ?? probe.npmResolution?.version;
const nextVersion = resolvedVersion ?? "unknown";And set nextVersion in the outcome object from the same resolved value.
Regression test idea:
- Mock an npm plugin dry-run where
installPluginFromNpmSpec({ dryRun: true })returns{ ok: true, npmResolution: { version: "2026.5.6" } }and no top-levelversion. - Assert
openclaw plugins update --all --dry-runprintscurrent -> 2026.5.6, notcurrent -> unknown.
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Activity
Martin-Blau commentedon May 6, 2026
@amknight I would like to contribute here, could you assign this on me?
clawsweeper commentedon May 6, 2026
Thanks for the context here. I did a careful shell check against current
main, and this is already implemented.Current main and the shipped v2026.5.19 release already use npm resolution metadata when formatting plugin update dry-run target versions, so the reported
unknowntarget-version problem is fixed.I found the merged PR that appears to have closed this: #83566: fix: fall back from official ClawHub artifact blocks.
So I’m closing this as already implemented rather than keeping a duplicate issue open.
Review details
Best possible solution:
Keep the shipped updater fallback and close this report rather than reopening duplicate fix branches for behavior already present in releases.
Do we have a high-confidence way to reproduce the issue?
Yes for the historical bug: the installer dry-run returned
npmResolution.versionwithout top-levelversion, while the old formatter ignored that metadata. Current main no longer reproduces because the formatter now consumesnpmResolution.version.Is this the best way to solve the issue?
Yes. The shipped implementation fixes the narrow formatter/data-contract mismatch by centralizing npm result-version extraction and using it before falling back to
unknown.Security review:
Security review: No PR patch is under review, and the issue is not a security-sensitive report.
AGENTS.md: found and applied where relevant.
What I checked:
npmProbeVersionfromresolveNpmResultVersion(probe), includes it inresolvedProbeVersion, and uses that value fornextVersionand the dry-run message. (src/plugins/update.ts:1768, f1b8827d20c8)resolveNpmResultVersionreturnsresult.npmResolution?.version, which is the metadata field named in the report. (src/plugins/update.ts:761, f1b8827d20c8)npmResolutionwith no top-levelversion, matching the historical bug shape that the formatter now handles. (src/plugins/install.ts:1181, f1b8827d20c8)npmResolution.versionand no top-levelversion, and the outcome uses that version instead ofunknown. (src/plugins/update.test.ts:3313, f1b8827d20c8)resolveNpmResultVersionand inserted it into the dry-runresolvedProbeVersionchain. (src/plugins/update.ts:506, 3132969c6850)src/plugins/update.ts:506, 3132969c6850)Likely related people:
src/plugins/update.ts,src/plugins/update.test.ts)src/plugins/update.ts,src/plugins/update.test.ts,src/cli/plugins-cli.ts)src/plugins/update.ts,src/plugins/update.test.ts)Codex review notes: model internal, reasoning high; reviewed against f1b8827d20c8; fix evidence: merged PR #83566, release v2026.5.19, commit 3132969c6850.
fix(plugins): use npmResolution.version as fallback when probe.versio…
barnacle-openclaw commentedon May 31, 2026
This issue has been automatically marked as stale due to inactivity.
Please add updates or it will be closed.