mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 11:00:42 +00:00
fix: scope static catalog discovery fallback
This commit is contained in:
@@ -1,2 +1,2 @@
|
||||
8ac8add8354dc1af76b9aa6f15f7fdcc5265b0bdaf72ea7fc1d3d11bc9f74b8c plugin-sdk-api-baseline.json
|
||||
83310e1d3ea75e9216300ed36e61fdfcfdb6bba7d5c0df62cbfe03ec93565b73 plugin-sdk-api-baseline.jsonl
|
||||
cf3b7869a6870b51bfab5543a27f5f55a2754c59c268906d33b4da91352ab9bb plugin-sdk-api-baseline.json
|
||||
6938561c972c419925ac17eb10d5d857502d339603de2cf4ece127827676da5f plugin-sdk-api-baseline.jsonl
|
||||
|
||||
@@ -104,6 +104,7 @@ export async function loadProviderCatalogModelsForList(params: {
|
||||
env,
|
||||
onlyPluginIds: scopedPluginIds,
|
||||
includeUntrustedWorkspacePlugins: false,
|
||||
requireCompleteDiscoveryEntryCoverage: true,
|
||||
})
|
||||
).filter(
|
||||
(provider) =>
|
||||
|
||||
@@ -43,6 +43,7 @@ function resolveProviderDiscoveryEntryPlugins(params: {
|
||||
env?: NodeJS.ProcessEnv;
|
||||
onlyPluginIds?: string[];
|
||||
includeUntrustedWorkspacePlugins?: boolean;
|
||||
requireCompleteDiscoveryEntryCoverage?: boolean;
|
||||
}): ProviderPlugin[] {
|
||||
const pluginIds = resolveDiscoveredProviderPluginIds(params);
|
||||
const pluginIdSet = new Set(pluginIds);
|
||||
@@ -52,7 +53,7 @@ function resolveProviderDiscoveryEntryPlugins(params: {
|
||||
if (records.length === 0) {
|
||||
return [];
|
||||
}
|
||||
if (records.length < pluginIdSet.size) {
|
||||
if (params.requireCompleteDiscoveryEntryCoverage && records.length < pluginIdSet.size) {
|
||||
return [];
|
||||
}
|
||||
const loadSource = createPluginSourceLoader();
|
||||
@@ -80,6 +81,7 @@ export function resolvePluginDiscoveryProvidersRuntime(params: {
|
||||
env?: NodeJS.ProcessEnv;
|
||||
onlyPluginIds?: string[];
|
||||
includeUntrustedWorkspacePlugins?: boolean;
|
||||
requireCompleteDiscoveryEntryCoverage?: boolean;
|
||||
}): ProviderPlugin[] {
|
||||
const entryProviders = resolveProviderDiscoveryEntryPlugins(params);
|
||||
if (entryProviders.length > 0) {
|
||||
|
||||
@@ -34,6 +34,7 @@ export async function resolvePluginDiscoveryProviders(params: {
|
||||
env?: NodeJS.ProcessEnv;
|
||||
onlyPluginIds?: string[];
|
||||
includeUntrustedWorkspacePlugins?: boolean;
|
||||
requireCompleteDiscoveryEntryCoverage?: boolean;
|
||||
}): Promise<ProviderPlugin[]> {
|
||||
return (await loadProviderRuntime())
|
||||
.resolvePluginDiscoveryProvidersRuntime(params)
|
||||
|
||||
Reference in New Issue
Block a user