UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

15 lines (14 loc) • 672 B
import { a as getPluginRuntimeGatewayRequestScope } from "./gateway-request-scope-Btza1qbw.mjs"; import { l as getActivePluginRegistry } from "./runtime-zG-NbNbr.mjs"; //#region src/channels/plugins/registry-loader.ts /** * Creates a lazy loader that resolves one value from the authoritative channel registry. */ function createChannelRegistryLoader(resolveValue) { return async (id) => { const pluginEntry = (getPluginRuntimeGatewayRequestScope()?.pluginRegistry ?? getActivePluginRegistry())?.channels.find((entry) => entry.plugin.id === id); return pluginEntry ? resolveValue(pluginEntry) : void 0; }; } //#endregion export { createChannelRegistryLoader as t };