@@ -50,11 +50,7 @@ import {
5050 type 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 = {
202198 loadModules ?: boolean ;
203199 throwOnLoadError ?: boolean ;
204200 manifestRegistry ?: 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} ;
214202
215203function detailPluginStartupTrace (
@@ -1702,13 +1690,12 @@ export function loadOpenClawPlugins(options: PluginLoadOptions = {}): PluginRegi
17021690 candidates : createPluginCandidatesFromManifestRegistry ( suppliedManifestRegistry ) ,
17031691 diagnostics : [ ] as PluginDiagnostic [ ] ,
17041692 }
1705- : ( options . discovery ??
1706- discoverOpenClawPlugins ( {
1693+ : discoverOpenClawPlugins ( {
17071694 workspaceDir : options . workspaceDir ,
17081695 extraPaths : normalized . loadPaths ,
17091696 env,
17101697 installRecords,
1711- } ) ) ;
1698+ } ) ;
17121699 const manifestRegistry =
17131700 suppliedManifestRegistry ??
17141701 loadPluginManifestRegistry ( {
@@ -2572,14 +2559,12 @@ export async function loadOpenClawPluginCliRegistry(
25722559 activateGlobalSideEffects : false ,
25732560 } ) ;
25742561
2575- 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+ } ) ;
25832568 const manifestRegistry = loadPluginManifestRegistry ( {
25842569 config : cfg ,
25852570 workspaceDir : options . workspaceDir ,
0 commit comments