mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-12 15:30:39 +00:00
20 lines
650 B
TypeScript
20 lines
650 B
TypeScript
import { createSubsystemLogger } from "../logging/subsystem.js";
|
|
import { loadOpenClawPlugins, type PluginLoadOptions } from "./loader.js";
|
|
import { createPluginLoaderLogger } from "./logger.js";
|
|
import type { ProviderPlugin } from "./types.js";
|
|
|
|
const log = createSubsystemLogger("plugins");
|
|
|
|
export function resolvePluginProviders(params: {
|
|
config?: PluginLoadOptions["config"];
|
|
workspaceDir?: string;
|
|
}): ProviderPlugin[] {
|
|
const registry = loadOpenClawPlugins({
|
|
config: params.config,
|
|
workspaceDir: params.workspaceDir,
|
|
logger: createPluginLoaderLogger(log),
|
|
});
|
|
|
|
return registry.providers.map((entry) => entry.provider);
|
|
}
|