UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

29 lines (28 loc) • 1.12 kB
import { p as resolveEffectivePluginActivationState } from "./config-state-B1JlHgba.mjs"; import { a as resolveManifestOwnerBasePolicyBlock } from "./manifest-owner-policy-B8Brw4Zo.mjs"; import { r as hasExplicitChannelConfig } from "./channel-presence-policy-6XNqNGJr.mjs"; //#region src/plugins/channel-startup-policy.ts /** Shares configured-channel eligibility between startup and manifest schema selection. */ 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; } //#endregion export { canStartConfiguredChannelPlugin as t };