






















@@ -239,8 +239,23 @@ describe("maybeRepairPluginRegistryState", () => {
239239expect(nextConfig).toStrictEqual({});
240240const persisted = await readRequiredPersistedInstalledPluginIndex(stateDir);
241241expect(persisted.refreshReason).toBe("migration");
242-expect(persisted.plugins).toHaveLength(1);
243-expect(persisted.plugins[0]?.pluginId).toBe("demo");
242+expect(persisted.plugins).toStrictEqual([
243+expect.objectContaining({
244+compat: [],
245+enabled: true,
246+manifestPath: path.join(pluginDir, "openclaw.plugin.json"),
247+origin: "global",
248+pluginId: "demo",
249+rootDir: pluginDir,
250+source: path.join(pluginDir, "index.ts"),
251+startup: {
252+agentHarnesses: [],
253+deferConfiguredChannelFullLoadUntilAfterListen: false,
254+memory: false,
255+sidecar: false,
256+},
257+}),
258+]);
244259});
245260246261it("does not repair when registry migration is disabled", async () => {
@@ -350,10 +365,25 @@ describe("maybeRepairPluginRegistryState", () => {
350365).not.toHaveProperty("dependencies");
351366const persisted = await readRequiredPersistedInstalledPluginIndex(stateDir);
352367expect(persisted.refreshReason).toBe("migration");
353-expect(persisted.plugins).toHaveLength(1);
354-expect(persisted.plugins[0]?.pluginId).toBe("google-meet");
355-expect(persisted.plugins[0]?.origin).toBe("bundled");
356-expect(persisted.plugins[0]?.rootDir).toBe(bundledDir);
368+expect(persisted.plugins).toStrictEqual([
369+expect.objectContaining({
370+compat: [],
371+enabled: true,
372+manifestPath: path.join(bundledDir, "openclaw.plugin.json"),
373+origin: "bundled",
374+packageName: "@openclaw/google-meet",
375+packageVersion: "2026.5.3",
376+pluginId: "google-meet",
377+rootDir: bundledDir,
378+source: path.join(bundledDir, "index.ts"),
379+startup: {
380+agentHarnesses: [],
381+deferConfiguredChannelFullLoadUntilAfterListen: false,
382+memory: false,
383+sidecar: false,
384+},
385+}),
386+]);
357387expect(vi.mocked(note).mock.calls.join("\n")).toContain(
358388"Removed stale managed npm plugin package",
359389);
@@ -408,10 +438,25 @@ describe("maybeRepairPluginRegistryState", () => {
408438const persisted = await readRequiredPersistedInstalledPluginIndex(stateDir);
409439expect(persisted.installRecords).toStrictEqual({});
410440expect(persisted.refreshReason).toBe("migration");
411-expect(persisted.plugins).toHaveLength(1);
412-expect(persisted.plugins[0]?.pluginId).toBe("google-meet");
413-expect(persisted.plugins[0]?.origin).toBe("bundled");
414-expect(persisted.plugins[0]?.rootDir).toBe(bundledDir);
441+expect(persisted.plugins).toStrictEqual([
442+expect.objectContaining({
443+compat: [],
444+enabled: true,
445+manifestPath: path.join(bundledDir, "openclaw.plugin.json"),
446+origin: "bundled",
447+packageName: "@openclaw/google-meet",
448+packageVersion: "2026.5.3",
449+pluginId: "google-meet",
450+rootDir: bundledDir,
451+source: path.join(bundledDir, "index.ts"),
452+startup: {
453+agentHarnesses: [],
454+deferConfiguredChannelFullLoadUntilAfterListen: false,
455+memory: false,
456+sidecar: false,
457+},
458+}),
459+]);
415460});
416461417462it("removes stale managed npm packages from the package lock during repair", async () => {
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。