




















@@ -1217,7 +1217,10 @@ function resolvePluginLoadCacheContext(options: PluginLoadOptions = {}) {
12171217const shouldInstallBundledRuntimeDeps = options.installBundledRuntimeDeps !== false;
12181218const runtimeSubagentMode = resolveRuntimeSubagentMode(options.runtimeOptions);
12191219const coreGatewayMethodNames = Object.keys(options.coreGatewayHandlers ?? {}).toSorted();
1220-const installRecords = loadInstalledPluginIndexInstallRecordsSync({ env });
1220+const installRecords = {
1221+ ...loadInstalledPluginIndexInstallRecordsSync({ env }),
1222+ ...cfg.plugins?.installs,
1223+};
12211224const cacheKey = buildCacheKey({
12221225workspaceDir: options.workspaceDir,
12231226plugins: trustNormalized,
@@ -1255,6 +1258,7 @@ function resolvePluginLoadCacheContext(options: PluginLoadOptions = {}) {
12551258shouldLoadModules: options.loadModules !== false,
12561259 shouldInstallBundledRuntimeDeps,
12571260 runtimeSubagentMode,
1261+ installRecords,
12581262 cacheKey,
12591263};
12601264}
@@ -2157,6 +2161,7 @@ export function loadOpenClawPlugins(options: PluginLoadOptions = {}): PluginRegi
21572161 shouldInstallBundledRuntimeDeps,
21582162 cacheKey,
21592163 runtimeSubagentMode,
2164+ installRecords,
21602165} = resolvePluginLoadCacheContext(options);
21612166const logger = options.logger ?? defaultLogger();
21622167const validateOnly = options.mode === "validate";
@@ -2316,6 +2321,7 @@ export function loadOpenClawPlugins(options: PluginLoadOptions = {}): PluginRegi
23162321 env,
23172322candidates: discovery.candidates,
23182323diagnostics: discovery.diagnostics,
2324+installRecords: Object.keys(installRecords).length > 0 ? installRecords : undefined,
23192325});
23202326pushDiagnostics(registry.diagnostics, manifestRegistry.diagnostics);
23212327warnWhenAllowlistIsOpen({
@@ -3180,12 +3186,20 @@ export function loadOpenClawPlugins(options: PluginLoadOptions = {}): PluginRegi
31803186export async function loadOpenClawPluginCliRegistry(
31813187options: PluginLoadOptions = {},
31823188): Promise<PluginRegistry> {
3183-const { env, cfg, normalized, activationSource, autoEnabledReasons, onlyPluginIds, cacheKey } =
3184-resolvePluginLoadCacheContext({
3185- ...options,
3186-activate: false,
3187-cache: false,
3188-});
3189+const {
3190+ env,
3191+ cfg,
3192+ normalized,
3193+ activationSource,
3194+ autoEnabledReasons,
3195+ onlyPluginIds,
3196+ cacheKey,
3197+ installRecords,
3198+} = resolvePluginLoadCacheContext({
3199+ ...options,
3200+activate: false,
3201+cache: false,
3202+});
31893203const logger = options.logger ?? defaultLogger();
31903204const onlyPluginIdSet = createPluginIdScopeSet(onlyPluginIds);
31913205const getJiti = createPluginJitiLoader(options);
@@ -3209,6 +3223,7 @@ export async function loadOpenClawPluginCliRegistry(
32093223 env,
32103224candidates: discovery.candidates,
32113225diagnostics: discovery.diagnostics,
3226+installRecords: Object.keys(installRecords).length > 0 ? installRecords : undefined,
32123227});
32133228pushDiagnostics(registry.diagnostics, manifestRegistry.diagnostics);
32143229warnWhenAllowlistIsOpen({
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。