docs(plugins): explain catalog install trust

This commit is contained in:
Vincent Koc
2026-05-04 11:31:29 -07:00
parent daefb5e341
commit 417660b662
2 changed files with 5 additions and 0 deletions

View File

@@ -1009,6 +1009,8 @@ describe("plugins cli install", () => {
await runPluginsCommand(["plugins", "install", "@wecom/wecom-openclaw-plugin@latest"]);
// Alternate selectors stay trusted by catalog package name, but must not
// inherit catalog integrity unless the install spec matches exactly.
expect(installPluginFromNpmSpec).toHaveBeenCalledWith(
expect.objectContaining({
spec: "@wecom/wecom-openclaw-plugin@latest",

View File

@@ -71,6 +71,9 @@ function findTrustedCatalogPackageInstall(packageName: string):
expectedIntegrity?: string;
}
| undefined {
// The catalog is the trust list. Raw npm selectors such as
// @scope/pkg@latest inherit install-scan trust when their package name is
// cataloged; integrity remains tied to exact catalog specs in the planner.
const entry = getOfficialExternalPluginCatalogEntryForPackage(packageName);
if (!entry) {
return undefined;