UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

38 lines (37 loc) • 899 B
import { t as ensurePluginAllowlisted } from "./plugins-allowlist-DGbUrepm.mjs"; //#region src/plugin-sdk/provider-enable-config.ts /** * Enables provider plugins for provider contract setup without applying channel * normalization from the core plugin enable path. */ function enableProviderPluginInConfig(cfg, pluginId) { if (cfg.plugins?.enabled === false) return { config: cfg, enabled: false, reason: "plugins disabled" }; if (cfg.plugins?.deny?.includes(pluginId)) return { config: cfg, enabled: false, reason: "blocked by denylist" }; const next = { ...cfg, plugins: { ...cfg.plugins, entries: { ...cfg.plugins?.entries, [pluginId]: { ...cfg.plugins?.entries?.[pluginId], enabled: true } } } }; return { config: ensurePluginAllowlisted(next, pluginId), enabled: true }; } //#endregion export { enableProviderPluginInConfig as t };