























@@ -50,11 +50,7 @@ import {
5050type NormalizedPluginsConfig,
5151} from "./config-state.js";
5252import { isPluginEnabledByDefaultForPlatform } from "./default-enablement.js";
53-import {
54-discoverOpenClawPlugins,
55-type PluginCandidate,
56-type PluginDiscoveryResult,
57-} from "./discovery.js";
53+import { discoverOpenClawPlugins, type PluginCandidate } from "./discovery.js";
5854import { shouldRejectHardlinkedPluginFiles } from "./hardlink-policy.js";
5955import { getGlobalHookRunner, initializeGlobalHookRunner } from "./hook-runner-global.js";
6056import { toSafeImportPath } from "./import-specifier.js";
@@ -202,14 +198,6 @@ export type PluginLoadOptions = {
202198loadModules?: boolean;
203199throwOnLoadError?: boolean;
204200manifestRegistry?: PluginManifestRegistry;
205-/**
206- * Pre-computed plugin discovery result. When supplied, internal calls to
207- * `discoverOpenClawPlugins` are skipped. Callers in the same startup flow
208- * can compute one discovery result and share it across loader entry points
209- * to eliminate redundant filesystem walks. Ignored when `manifestRegistry`
210- * is also provided (the registry already implies a discovery snapshot).
211- */
212-discovery?: PluginDiscoveryResult;
213201};
214202215203function detailPluginStartupTrace(
@@ -1702,13 +1690,12 @@ export function loadOpenClawPlugins(options: PluginLoadOptions = {}): PluginRegi
17021690candidates: createPluginCandidatesFromManifestRegistry(suppliedManifestRegistry),
17031691diagnostics: [] as PluginDiagnostic[],
17041692}
1705- : (options.discovery ??
1706-discoverOpenClawPlugins({
1693+ : discoverOpenClawPlugins({
17071694workspaceDir: options.workspaceDir,
17081695extraPaths: normalized.loadPaths,
17091696 env,
17101697 installRecords,
1711-}));
1698+});
17121699const manifestRegistry =
17131700suppliedManifestRegistry ??
17141701loadPluginManifestRegistry({
@@ -2572,14 +2559,12 @@ export async function loadOpenClawPluginCliRegistry(
25722559activateGlobalSideEffects: false,
25732560});
257425612575-const discovery =
2576-options.discovery ??
2577-discoverOpenClawPlugins({
2578-workspaceDir: options.workspaceDir,
2579-extraPaths: normalized.loadPaths,
2580- env,
2581- installRecords,
2582-});
2562+const discovery = discoverOpenClawPlugins({
2563+workspaceDir: options.workspaceDir,
2564+extraPaths: normalized.loadPaths,
2565+ env,
2566+ installRecords,
2567+});
25832568const manifestRegistry = loadPluginManifestRegistry({
25842569config: cfg,
25852570workspaceDir: options.workspaceDir,
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。