




















@@ -1439,6 +1439,20 @@ function resolvePluginModuleExport(moduleExport: unknown): {
14391439return {};
14401440}
144114411442+function kindIncludes(kind: unknown, target: string): boolean {
1443+return kind === target || (Array.isArray(kind) && kind.includes(target));
1444+}
1445+1446+function formatBundledChannelWrongLoaderError(kind: unknown): string | null {
1447+if (kindIncludes(kind, "bundled-channel-setup-entry")) {
1448+return "bundled channel setup entry requires setup-runtime loader";
1449+}
1450+if (kindIncludes(kind, "bundled-channel-entry")) {
1451+return "bundled channel entry requires setup-runtime loader";
1452+}
1453+return null;
1454+}
1455+14421456function pushDiagnostics(diagnostics: PluginDiagnostic[], append: PluginDiagnostic[]) {
14431457diagnostics.push(...append);
14441458}
@@ -2340,8 +2354,16 @@ export function loadOpenClawPlugins(options: PluginLoadOptions = {}): PluginRegi
23402354}
2341235523422356if (typeof register !== "function") {
2343-logger.error(`[plugins] ${record.id} missing register/activate export`);
2344-pushPluginLoadError(formatMissingPluginRegisterError(mod, env));
2357+const bundledChannelWrongLoaderError = formatBundledChannelWrongLoaderError(record.kind);
2358+if (bundledChannelWrongLoaderError) {
2359+logger.error(
2360+`[plugins] ${record.id} ${bundledChannelWrongLoaderError}; ensure plugin is loaded via bundled channel discovery, not legacy plugin loader`,
2361+);
2362+pushPluginLoadError(bundledChannelWrongLoaderError);
2363+} else {
2364+logger.error(`[plugins] ${record.id} missing register/activate export`);
2365+pushPluginLoadError(formatMissingPluginRegisterError(mod, env));
2366+}
23452367continue;
23462368}
23472369@@ -2793,8 +2815,16 @@ export async function loadOpenClawPluginCliRegistry(
27932815}
2794281627952817if (typeof register !== "function") {
2796-logger.error(`[plugins] ${record.id} missing register/activate export`);
2797-pushPluginLoadError(formatMissingPluginRegisterError(mod, env));
2818+const bundledChannelWrongLoaderError = formatBundledChannelWrongLoaderError(record.kind);
2819+if (bundledChannelWrongLoaderError) {
2820+logger.error(
2821+`[plugins] ${record.id} ${bundledChannelWrongLoaderError}; ensure plugin is loaded via bundled channel discovery, not legacy plugin loader`,
2822+);
2823+pushPluginLoadError(bundledChannelWrongLoaderError);
2824+} else {
2825+logger.error(`[plugins] ${record.id} missing register/activate export`);
2826+pushPluginLoadError(formatMissingPluginRegisterError(mod, env));
2827+}
27982828continue;
27992829}
28002830此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。