/** * Commands auto-enable probe reads character feature config without importing * the full plugin runtime. */ import type { PluginAutoEnableContext } from "@elizaos/core"; function isFeatureEnabled( config: PluginAutoEnableContext["config"], key: string, ): boolean { const f = (config.features as Record | undefined)?.[key]; if (f === true) return true; if (f && typeof f === "object" && f !== null) { return (f as Record).enabled !== false; } return false; } /** Enable when `config.features.commands` is truthy or not explicitly disabled. */ export function shouldEnable(ctx: PluginAutoEnableContext): boolean { return isFeatureEnabled(ctx.config, "commands"); }