UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

3 lines • 873 B
import{p as resolveEffectivePluginActivationState}from"./config-state-C1eV6UWf.mjs";import{a as resolveManifestOwnerBasePolicyBlock}from"./manifest-owner-policy-DVnu9FAE.mjs";import{n as hasExplicitChannelConfig}from"./channel-presence-policy-iYxMh2HT.mjs"; //!src/plugins/channel-startup-policy.ts function canStartConfiguredChannelPlugin(e){const{id:t,origin:n,channelIds:r,config:i,pluginsConfig:a,activationSource:o}=e;const s=resolveManifestOwnerBasePolicyBlock({plugin:{id:t},normalizedConfig:a});if(s&&(s!==`not-in-allowlist`||n!==`bundled`||!(r??[]).some(e=>hasExplicitChannelConfig({config:o.rootConfig??i,channelId:e}))))return false;if(n===`bundled`)return true;const c=resolveEffectivePluginActivationState({id:t,origin:n,channelIds:r,config:a,rootConfig:i,activationSource:o});return c.enabled&&c.explicitlyEnabled}export{canStartConfiguredChannelPlugin as t};