

























@@ -1,6 +1,7 @@
11import type { OpenClawConfig } from "../config/types.openclaw.js";
22import { loadPluginManifestRegistryForInstalledIndex } from "./manifest-registry-installed.js";
33import type { PluginManifestRecord } from "./manifest-registry.js";
4+import type { PluginMetadataSnapshot } from "./plugin-metadata-snapshot.js";
45import { loadPluginRegistrySnapshot } from "./plugin-registry.js";
56import { resolveDiscoveredProviderPluginIds } from "./providers.js";
67import { resolvePluginProviders } from "./providers.runtime.js";
@@ -76,15 +77,18 @@ function resolveProviderDiscoveryEntryPlugins(params: {
7677includeUntrustedWorkspacePlugins?: boolean;
7778requireCompleteDiscoveryEntryCoverage?: boolean;
7879discoveryEntriesOnly?: boolean;
80+pluginMetadataSnapshot?: Pick<PluginMetadataSnapshot, "index" | "manifestRegistry">;
7981}): ProviderDiscoveryEntryResult {
80-const registry = loadPluginRegistrySnapshot(params);
81-const manifestRegistry = loadPluginManifestRegistryForInstalledIndex({
82-index: registry,
83-config: params.config,
84-workspaceDir: params.workspaceDir,
85-env: params.env,
86-includeDisabled: true,
87-});
82+const registry = params.pluginMetadataSnapshot?.index ?? loadPluginRegistrySnapshot(params);
83+const manifestRegistry =
84+params.pluginMetadataSnapshot?.manifestRegistry ??
85+loadPluginManifestRegistryForInstalledIndex({
86+index: registry,
87+config: params.config,
88+workspaceDir: params.workspaceDir,
89+env: params.env,
90+includeDisabled: true,
91+});
8892const pluginIds = resolveDiscoveredProviderPluginIds({
8993 ...params,
9094 registry,
@@ -144,6 +148,7 @@ export function resolvePluginDiscoveryProvidersRuntime(params: {
144148includeUntrustedWorkspacePlugins?: boolean;
145149requireCompleteDiscoveryEntryCoverage?: boolean;
146150discoveryEntriesOnly?: boolean;
151+pluginMetadataSnapshot?: Pick<PluginMetadataSnapshot, "index" | "manifestRegistry">;
147152}): ProviderPlugin[] {
148153const env = params.env ?? process.env;
149154const entryResult = resolveProviderDiscoveryEntryPlugins(params);
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。