You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit f3bcee8
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: docs/cli/plugins.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -437,6 +437,8 @@ Updates apply to tracked plugin installs in the managed plugin index and tracked
437
437
<Accordiontitle="Resolving plugin id vs npm spec">
438
438
When you pass a plugin id, OpenClaw reuses the recorded install spec for that plugin. That means previously stored dist-tags such as `@beta` and exact pinned versions continue to be used on later `update <id>` runs.
439
439
440
+
During `update <id> --dry-run`, exact pinned npm installs stay pinned. If OpenClaw can also resolve the package's registry default line and that default line is newer than the installed pinned version, the dry run reports the pin and prints the explicit `@latest` package update command to follow the registry default line.
441
+
440
442
That targeted-update rule is different from the bulk `openclaw plugins update --all` maintenance path. Bulk updates still respect ordinary tracked install specs, but trusted official OpenClaw plugin records can sync to the current official catalog target instead of staying on a stale exact official package. Use targeted `update <id>` when you intentionally want to keep an exact or tagged official spec untouched.
441
443
442
444
For npm installs, you can also pass an explicit npm package spec with a dist-tag or exact version. OpenClaw resolves that package name back to the tracked plugin record, updates that installed plugin, and records the new npm spec for future id-based updates.
"reports newer registry default releases for exact pinned npm dry-runs from %s",
2465
+
async(spec)=>{
2466
+
constinstallPath=createInstalledPackageDir({
2467
+
name: "@acme/demo",
2468
+
version: "1.2.3",
2469
+
});
2470
+
mockNpmViewMetadata({
2471
+
name: "@acme/demo",
2472
+
version: "1.2.4",
2473
+
});
2474
+
installPluginFromNpmSpecMock.mockResolvedValue({
2475
+
ok: true,
2476
+
pluginId: "demo",
2477
+
targetDir: installPath,
2478
+
version: "1.2.3",
2479
+
extensions: ["index.ts"],
2480
+
npmResolution: {
2481
+
name: "@acme/demo",
2482
+
version: "1.2.3",
2483
+
resolvedSpec: spec,
2484
+
},
2485
+
});
2486
+
2487
+
constresult=awaitupdateNpmInstalledPlugins({
2488
+
config: createNpmInstallConfig({
2489
+
pluginId: "demo",
2490
+
spec,
2491
+
installPath,
2492
+
}),
2493
+
pluginIds: ["demo"],
2494
+
dryRun: true,
2495
+
});
2496
+
2497
+
expect(npmInstallCall()?.spec).toBe(spec);
2498
+
expect(npmViewCall()?.[0]).toEqual([
2499
+
"npm",
2500
+
"view",
2501
+
"@acme/demo",
2502
+
"name",
2503
+
"version",
2504
+
"dist.integrity",
2505
+
"dist.shasum",
2506
+
"openclaw",
2507
+
"--json",
2508
+
]);
2509
+
expectRecordFields(result.outcomes[0],{
2510
+
pluginId: "demo",
2511
+
status: "unchanged",
2512
+
currentVersion: "1.2.3",
2513
+
nextVersion: "1.2.3",
2514
+
message: `demo is pinned to ${spec} (installed 1.2.3); registry default resolves to 1.2.4. Pass \`openclaw plugins update @acme/demo@latest\` to follow the registry default line.`,
2515
+
});
2516
+
},
2517
+
);
2518
+
2463
2519
it("updates disabled trusted official ClawHub installs through the catalog spec",async()=>{
0 commit comments