


























@@ -2,6 +2,7 @@ import fs from "node:fs";
22import path from "node:path";
33import { afterEach, describe, expect, it, vi } from "vitest";
44import type { PluginCandidate } from "./discovery.js";
5+import { buildInstalledPluginIndexRecords } from "./installed-plugin-index-record-builder.js";
56import {
67loadInstalledPluginIndexInstallRecordsSync,
78writePersistedInstalledPluginIndexInstallRecords,
@@ -16,6 +17,7 @@ import {
1617refreshInstalledPluginIndex,
1718} from "./installed-plugin-index.js";
1819import { recordPluginInstall } from "./installs.js";
20+import type { PluginManifestRecord } from "./manifest-registry.js";
1921import type { OpenClawPackageManifest } from "./manifest.js";
2022import { cleanupTrackedTempDirs, makeTrackedTempDir } from "./test-helpers/fs-fixtures.js";
2123@@ -289,6 +291,42 @@ describe("installed plugin index", () => {
289291});
290292});
291293294+it("tolerates stale manifest records without normalized channels", () => {
295+const rootDir = makeTempDir();
296+writeRuntimeEntry(rootDir);
297+const manifestPath = path.join(rootDir, "openclaw.plugin.json");
298+299+const records = buildInstalledPluginIndexRecords({
300+candidates: [createPluginCandidate({ rootDir })],
301+registry: {
302+plugins: [
303+{
304+id: "stale-record",
305+providers: [],
306+cliBackends: [],
307+skills: [],
308+hooks: [],
309+origin: "global",
310+ rootDir,
311+source: path.join(rootDir, "index.ts"),
312+ manifestPath,
313+} as unknown as PluginManifestRecord,
314+],
315+diagnostics: [],
316+},
317+diagnostics: [],
318+installRecords: {},
319+});
320+321+expect(records[0]).toMatchObject({
322+pluginId: "stale-record",
323+startup: {
324+sidecar: true,
325+},
326+compat: ["legacy-implicit-startup-sidecar"],
327+});
328+});
329+292330it("does not classify or tag explicit startup opt-outs as deprecated implicit sidecars", () => {
293331const rootDir = makeTempDir();
294332writeRuntimeEntry(rootDir);
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。