UNPKG

@gguf/claw

Version:

WhatsApp gateway CLI (Baileys web) with Pi RPC agent

33 lines (30 loc) 1.13 kB
import { o as createSubsystemLogger } from "./entry.js"; import { c as resolveDefaultAgentId, s as resolveAgentWorkspaceDir } from "./agent-scope-jm0ZdXwM.js"; import { r as loadConfig } from "./config-DCT1RAo6.js"; import { t as loadOpenClawPlugins } from "./loader-BYWxo-_j.js"; //#region src/cli/plugin-registry.ts const log = createSubsystemLogger("plugins"); let pluginRegistryLoaded = false; function ensurePluginRegistryLoaded() { if (pluginRegistryLoaded) return; const config = loadConfig(); loadOpenClawPlugins({ config, workspaceDir: resolveAgentWorkspaceDir(config, resolveDefaultAgentId(config)), logger: { info: (msg) => log.info(msg), warn: (msg) => log.warn(msg), error: (msg) => log.error(msg), debug: (msg) => log.debug(msg) } }); pluginRegistryLoaded = true; } //#endregion //#region src/cli/command-options.ts function hasExplicitOptions(command, names) { if (typeof command.getOptionValueSource !== "function") return false; return names.some((name) => command.getOptionValueSource(name) === "cli"); } //#endregion export { ensurePluginRegistryLoaded as n, hasExplicitOptions as t };