mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-28 05:16:23 -06:00
refactor(runtime): remove unused registry accessors
This commit is contained in:
@@ -422,15 +422,6 @@ export function listPluginDoctorSessionRouteStateOwners(params?: {
|
||||
return [...owners.values()].toSorted((left, right) => left.id.localeCompare(right.id));
|
||||
}
|
||||
|
||||
export function listPluginDoctorStateMigrations(params?: {
|
||||
config?: OpenClawConfig;
|
||||
workspaceDir?: string;
|
||||
env?: NodeJS.ProcessEnv;
|
||||
pluginIds?: readonly string[];
|
||||
}): PluginDoctorStateMigration[] {
|
||||
return listPluginDoctorStateMigrationEntries(params).map((entry) => entry.migration);
|
||||
}
|
||||
|
||||
export function listPluginDoctorStateMigrationEntries(params?: {
|
||||
config?: OpenClawConfig;
|
||||
workspaceDir?: string;
|
||||
|
||||
@@ -79,7 +79,6 @@ import type {
|
||||
ProviderPreferRuntimeResolvedModelContext,
|
||||
ProviderPlugin,
|
||||
ProviderResolveExternalAuthProfilesContext,
|
||||
ProviderResolveExternalOAuthProfilesContext,
|
||||
ProviderPrepareRuntimeAuthContext,
|
||||
ProviderApplyConfigDefaultsContext,
|
||||
ProviderResolveConfigApiKeyContext,
|
||||
@@ -87,13 +86,11 @@ import type {
|
||||
ProviderResolveUsageAuthContext,
|
||||
ProviderResolveDynamicModelContext,
|
||||
ProviderResolveTransportTurnStateContext,
|
||||
ProviderResolveWebSocketSessionPolicyContext,
|
||||
ProviderSystemPromptContributionContext,
|
||||
ProviderTransformSystemPromptContext,
|
||||
ProviderThinkingPolicyContext,
|
||||
ProviderTransportTurnState,
|
||||
ProviderValidateReplayTurnsContext,
|
||||
ProviderWebSocketSessionPolicy,
|
||||
PluginTextTransforms,
|
||||
} from "./types.js";
|
||||
|
||||
@@ -608,19 +605,6 @@ export function resolveProviderTransportTurnStateWithPlugin(params: {
|
||||
return plugin?.resolveTransportTurnState?.(params.context) ?? undefined;
|
||||
}
|
||||
|
||||
export function resolveProviderWebSocketSessionPolicyWithPlugin(params: {
|
||||
provider: string;
|
||||
config?: OpenClawConfig;
|
||||
workspaceDir?: string;
|
||||
env?: NodeJS.ProcessEnv;
|
||||
context: ProviderResolveWebSocketSessionPolicyContext;
|
||||
}): ProviderWebSocketSessionPolicy | undefined {
|
||||
return (
|
||||
resolveProviderRuntimePlugin(params)?.resolveWebSocketSessionPolicy?.(params.context) ??
|
||||
undefined
|
||||
);
|
||||
}
|
||||
|
||||
export async function createProviderEmbeddingProvider(params: {
|
||||
provider: string;
|
||||
config?: OpenClawConfig;
|
||||
@@ -992,15 +976,6 @@ export function resolveExternalAuthProfilesWithPlugins(params: {
|
||||
return matches;
|
||||
}
|
||||
|
||||
export function resolveExternalOAuthProfilesWithPlugins(params: {
|
||||
config?: OpenClawConfig;
|
||||
workspaceDir?: string;
|
||||
env?: NodeJS.ProcessEnv;
|
||||
context: ProviderResolveExternalOAuthProfilesContext;
|
||||
}): ProviderExternalAuthProfile[] {
|
||||
return resolveExternalAuthProfilesWithPlugins(params);
|
||||
}
|
||||
|
||||
export function shouldDeferProviderSyntheticProfileAuthWithPlugin(params: {
|
||||
provider: string;
|
||||
config?: OpenClawConfig;
|
||||
|
||||
@@ -780,27 +780,6 @@ export function resolveOwningPluginIdsForModelRefs(params: {
|
||||
);
|
||||
}
|
||||
|
||||
export function resolveNonBundledProviderPluginIds(params: {
|
||||
config?: PluginLoadOptions["config"];
|
||||
workspaceDir?: string;
|
||||
env?: PluginLoadOptions["env"];
|
||||
}): string[] {
|
||||
const registry = loadProviderRegistrySnapshot(params);
|
||||
const providerSurfacePluginIds = resolveProviderSurfacePluginIdSet({ ...params, registry });
|
||||
const normalizedConfig = normalizePluginsConfigWithRegistry(params.config?.plugins, registry);
|
||||
return listRegistryPluginIds(
|
||||
registry,
|
||||
(plugin) =>
|
||||
plugin.origin !== "bundled" &&
|
||||
providerSurfacePluginIds.has(plugin.pluginId) &&
|
||||
resolveEffectiveRegistryPluginActivation({
|
||||
plugin,
|
||||
normalizedConfig,
|
||||
rootConfig: params.config,
|
||||
}).activated,
|
||||
);
|
||||
}
|
||||
|
||||
export function resolveCatalogHookProviderPluginIds(params: {
|
||||
config?: PluginLoadOptions["config"];
|
||||
workspaceDir?: string;
|
||||
|
||||
Reference in New Issue
Block a user