惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

有赞技术团队
有赞技术团队
Martin Fowler
Martin Fowler
N
Netflix TechBlog - Medium
WordPress大学
WordPress大学
罗磊的独立博客
H
Help Net Security
MongoDB | Blog
MongoDB | Blog
A
About on SuperTechFans
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
D
Docker
云风的 BLOG
云风的 BLOG
Microsoft Security Blog
Microsoft Security Blog
Blog — PlanetScale
Blog — PlanetScale
P
Proofpoint News Feed
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
I
InfoQ
J
Java Code Geeks
博客园 - 聂微东
大猫的无限游戏
大猫的无限游戏
Engineering at Meta
Engineering at Meta
美团技术团队
小众软件
小众软件
Stack Overflow Blog
Stack Overflow Blog
C
Check Point Blog

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
fix(plugins): trust chat catalog installs · openclaw/open...
vincentkoc · 2026-05-05 · via Recent Commits to openclaw:main

@@ -7,11 +7,13 @@ import { handlePluginsCommand } from "./commands-plugins.js";

77

import { buildPluginsCommandParams } from "./commands.test-harness.js";

8899

const {

10+

installPluginFromNpmSpecMock,

1011

installPluginFromPathMock,

1112

installPluginFromClawHubMock,

1213

installPluginFromGitSpecMock,

1314

persistPluginInstallMock,

1415

} = vi.hoisted(() => ({

16+

installPluginFromNpmSpecMock: vi.fn(),

1517

installPluginFromPathMock: vi.fn(),

1618

installPluginFromClawHubMock: vi.fn(),

1719

installPluginFromGitSpecMock: vi.fn(),

@@ -24,6 +26,7 @@ vi.mock("../../plugins/install.js", async () => {

2426

);

2527

return {

2628

...actual,

29+

installPluginFromNpmSpec: installPluginFromNpmSpecMock,

2730

installPluginFromPath: installPluginFromPathMock,

2831

};

2932

});

@@ -64,6 +67,7 @@ function buildPluginsParams(commandBodyNormalized: string, workspaceDir: string)

64676568

describe("handleCommands /plugins install", () => {

6669

afterEach(async () => {

70+

installPluginFromNpmSpecMock.mockReset();

6771

installPluginFromPathMock.mockReset();

6872

installPluginFromClawHubMock.mockReset();

6973

installPluginFromGitSpecMock.mockReset();

@@ -253,4 +257,60 @@ describe("handleCommands /plugins install", () => {

253257

);

254258

});

255259

});

260+261+

it("trusts catalog npm package installs with alternate selectors", async () => {

262+

installPluginFromNpmSpecMock.mockResolvedValue({

263+

ok: true,

264+

pluginId: "wecom-openclaw-plugin",

265+

targetDir: "/tmp/wecom-openclaw-plugin",

266+

version: "2026.4.23",

267+

extensions: ["index.js"],

268+

npmResolution: {

269+

name: "@wecom/wecom-openclaw-plugin",

270+

version: "2026.4.23",

271+

resolvedSpec: "@wecom/wecom-openclaw-plugin@2026.4.23",

272+

integrity: "sha512-wecom",

273+

resolvedAt: "2026-05-04T20:00:00.000Z",

274+

},

275+

});

276+

persistPluginInstallMock.mockResolvedValue({});

277+278+

await withTempHome("openclaw-command-plugins-home-", async () => {

279+

const workspaceDir = await workspaceHarness.createWorkspace();

280+

const params = buildPluginsParams(

281+

"/plugins install @wecom/wecom-openclaw-plugin@latest",

282+

workspaceDir,

283+

);

284+

const result = await handlePluginsCommand(params, true);

285+

if (result === null) {

286+

throw new Error("expected plugin install result");

287+

}

288+

expect(result.reply?.text).toContain('Installed plugin "wecom-openclaw-plugin"');

289+

expect(installPluginFromNpmSpecMock).toHaveBeenCalledWith(

290+

expect.objectContaining({

291+

spec: "@wecom/wecom-openclaw-plugin@latest",

292+

expectedPluginId: "wecom-openclaw-plugin",

293+

trustedSourceLinkedOfficialInstall: true,

294+

}),

295+

);

296+

expect(installPluginFromNpmSpecMock).toHaveBeenCalledWith(

297+

expect.not.objectContaining({

298+

expectedIntegrity: expect.any(String),

299+

}),

300+

);

301+

expect(persistPluginInstallMock).toHaveBeenCalledWith(

302+

expect.objectContaining({

303+

pluginId: "wecom-openclaw-plugin",

304+

install: expect.objectContaining({

305+

source: "npm",

306+

spec: "@wecom/wecom-openclaw-plugin@latest",

307+

installPath: "/tmp/wecom-openclaw-plugin",

308+

version: "2026.4.23",

309+

resolvedName: "@wecom/wecom-openclaw-plugin",

310+

resolvedVersion: "2026.4.23",

311+

}),

312+

}),

313+

);

314+

});

315+

});

256316

});