



























@@ -125,7 +125,8 @@ const baseEntry: ChannelPluginCatalogEntry = {
125125blurb: "Test",
126126},
127127install: {
128-npmSpec: "@openclaw/bundled-chat",
128+npmSpec: "@openclaw/bundled-chat@1.2.3",
129+expectedIntegrity: "sha512-bundled-chat",
129130localPath: bundledPluginRoot("bundled-chat"),
130131},
131132};
@@ -138,7 +139,7 @@ function mockBundledChatSource() {
138139{
139140pluginId: "bundled-chat",
140141localPath: bundledPluginRootAt("/opt/openclaw", "bundled-chat"),
141-npmSpec: "@openclaw/bundled-chat",
142+npmSpec: "@openclaw/bundled-chat@1.2.3",
142143},
143144],
144145]),
@@ -288,7 +289,7 @@ describe("ensureChannelSetupPluginInstalled", () => {
288289const prompter = makePrompter({
289290select: vi.fn(async () => "npm") as WizardPrompter["select"],
290291});
291-const cfg: OpenClawConfig = { plugins: { allow: ["other"] } };
292+const cfg: OpenClawConfig = { plugins: { allow: ["bundled-chat"] } };
292293vi.mocked(fs.existsSync).mockReturnValue(false);
293294installPluginFromNpmSpec.mockResolvedValue({
294295ok: true,
@@ -308,10 +309,12 @@ describe("ensureChannelSetupPluginInstalled", () => {
308309expect(result.cfg.plugins?.entries?.["bundled-chat"]?.enabled).toBe(true);
309310expect(result.cfg.plugins?.allow).toContain("bundled-chat");
310311expect(result.cfg.plugins?.installs?.["bundled-chat"]?.source).toBe("npm");
311-expect(result.cfg.plugins?.installs?.["bundled-chat"]?.spec).toBe("@openclaw/bundled-chat");
312+expect(result.cfg.plugins?.installs?.["bundled-chat"]?.spec).toBe(
313+"@openclaw/bundled-chat@1.2.3",
314+);
312315expect(result.cfg.plugins?.installs?.["bundled-chat"]?.installPath).toBe("/tmp/bundled-chat");
313316expect(installPluginFromNpmSpec).toHaveBeenCalledWith(
314-expect.objectContaining({ spec: "@openclaw/bundled-chat" }),
317+expect.objectContaining({ spec: "@openclaw/bundled-chat@1.2.3" }),
315318);
316319});
317320@@ -412,7 +415,8 @@ describe("ensureChannelSetupPluginInstalled", () => {
412415blurb: "Test",
413416},
414417install: {
415-npmSpec: "@vendor/bundled-chat-fork",
418+npmSpec: "@vendor/bundled-chat-fork@1.2.3",
419+expectedIntegrity: "sha512-vendor-bundled-chat-fork",
416420},
417421},
418422 prompter,
@@ -425,7 +429,7 @@ describe("ensureChannelSetupPluginInstalled", () => {
425429options: [
426430expect.objectContaining({
427431value: "npm",
428-label: "Download from npm (@vendor/bundled-chat-fork)",
432+label: "Download from npm (@vendor/bundled-chat-fork@1.2.3)",
429433}),
430434expect.objectContaining({
431435value: "skip",
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。