




















@@ -77,12 +77,38 @@ function buildPluginPlan(manifest) {
7777const contracts =
7878manifest.contracts && typeof manifest.contracts === "object" ? manifest.contracts : {};
7979const commandAliases = Array.isArray(manifest.commandAliases) ? manifest.commandAliases : [];
80+const channels = Array.isArray(manifest.channels)
81+ ? manifest.channels.filter(isNonEmptyString)
82+ : [];
83+const speechProviders = Array.isArray(contracts.speechProviders)
84+ ? contracts.speechProviders.filter(isNonEmptyString)
85+ : [];
86+const tools = Array.isArray(contracts.tools) ? contracts.tools.filter(isNonEmptyString) : [];
87+const hasRuntimeContractSurface = Boolean(
88+channels.length > 0 ||
89+speechProviders.length > 0 ||
90+tools.length > 0 ||
91+(Array.isArray(manifest.providers) && manifest.providers.length > 0) ||
92+(Array.isArray(manifest.cliBackends) && manifest.cliBackends.length > 0) ||
93+(Array.isArray(contracts.mediaUnderstandingProviders) &&
94+contracts.mediaUnderstandingProviders.length > 0) ||
95+(Array.isArray(contracts.migrationProviders) && contracts.migrationProviders.length > 0),
96+);
97+const legacyImplicitStartupSidecar =
98+manifest.activation?.onStartup === undefined &&
99+channels.length === 0 &&
100+!hasRuntimeContractSurface;
101+const commandAliasesActiveInThisProbe =
102+manifest.activation?.onStartup === true ||
103+legacyImplicitStartupSidecar ||
104+channels.length > 0 ||
105+speechProviders.length > 0 ||
106+tools.length > 0;
80107return {
81-channels: Array.isArray(manifest.channels) ? manifest.channels.filter(isNonEmptyString) : [],
82-speechProviders: Array.isArray(contracts.speechProviders)
83- ? contracts.speechProviders.filter(isNonEmptyString)
84- : [],
85-tools: Array.isArray(contracts.tools) ? contracts.tools.filter(isNonEmptyString) : [],
108+ channels,
109+ speechProviders,
110+ tools,
111+ commandAliasesActiveInThisProbe,
86112runtimeSlashAliases: commandAliases
87113.filter((alias) => alias?.kind === "runtime-slash")
88114.map((alias) => alias?.name)
@@ -321,11 +347,15 @@ async function runManifestProbes(plan, options) {
321347const status = await rpcCall("channels.status", { probe: false, timeoutMs: 2000 }, options);
322348assertChannelVisible(status, channel);
323349}
324-if (plan.runtimeSlashAliases.length > 0) {
350+if (plan.runtimeSlashAliases.length > 0 && plan.commandAliasesActiveInThisProbe) {
325351const commands = await rpcCall("commands.list", { scope: "both", includeArgs: true }, options);
326352for (const alias of plan.runtimeSlashAliases) {
327353assertCommandVisible(commands, alias);
328354}
355+} else if (plan.runtimeSlashAliases.length > 0) {
356+console.log(
357+`Runtime slash command smoke skipped for ${options.pluginId}: plugin is lazy in this probe`,
358+);
329359}
330360if (plan.tools.length > 0) {
331361const catalog = await rpcCall("tools.catalog", { includePlugins: true }, options);
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。