























@@ -263,6 +263,90 @@ describe("installed plugin index", () => {
263263});
264264});
265265266+it("tags deprecated implicit startup sidecars for legacy plugins", () => {
267+const rootDir = makeTempDir();
268+writeRuntimeEntry(rootDir);
269+writePluginManifest(rootDir, {
270+id: "legacy-sidecar",
271+configSchema: { type: "object" },
272+});
273+274+const index = loadInstalledPluginIndex({
275+candidates: [
276+createPluginCandidate({
277+ rootDir,
278+}),
279+],
280+env: hermeticEnv(),
281+});
282+283+expect(index.plugins[0]).toMatchObject({
284+pluginId: "legacy-sidecar",
285+startup: {
286+sidecar: true,
287+},
288+compat: ["legacy-implicit-startup-sidecar"],
289+});
290+});
291+292+it("does not classify or tag explicit startup opt-outs as deprecated implicit sidecars", () => {
293+const rootDir = makeTempDir();
294+writeRuntimeEntry(rootDir);
295+writePluginManifest(rootDir, {
296+id: "modern-inert",
297+activation: {
298+onStartup: false,
299+},
300+configSchema: { type: "object" },
301+});
302+303+const index = loadInstalledPluginIndex({
304+candidates: [
305+createPluginCandidate({
306+ rootDir,
307+}),
308+],
309+env: hermeticEnv(),
310+});
311+312+expect(index.plugins[0]).toMatchObject({
313+pluginId: "modern-inert",
314+startup: {
315+sidecar: false,
316+},
317+compat: [],
318+});
319+});
320+321+it("classifies explicit startup activation as a gateway startup sidecar", () => {
322+const rootDir = makeTempDir();
323+writeRuntimeEntry(rootDir);
324+writePluginManifest(rootDir, {
325+id: "explicit-startup-provider",
326+providers: ["demo"],
327+activation: {
328+onStartup: true,
329+},
330+configSchema: { type: "object" },
331+});
332+333+const index = loadInstalledPluginIndex({
334+candidates: [
335+createPluginCandidate({
336+ rootDir,
337+}),
338+],
339+env: hermeticEnv(),
340+});
341+342+expect(index.plugins[0]).toMatchObject({
343+pluginId: "explicit-startup-provider",
344+startup: {
345+sidecar: true,
346+},
347+});
348+});
349+266350it("keeps bundle format metadata needed for manifest reconstruction", () => {
267351const rootDir = makeTempDir();
268352fs.mkdirSync(path.join(rootDir, ".claude-plugin"), { recursive: true });
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。