UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

3 lines • 865 B
import{t as resolveCliArgvInvocation}from"./argv-invocation-aH4sq40s.mjs";import{n as isTruthyEnvValue}from"./env-fLMEolk5.mjs"; //!src/cli/command-registration-policy.ts const RESERVED_NON_PLUGIN_COMMAND_ROOTS=/* @__PURE__ */ new Set([`auth`,`tool`]);function isReservedNonPluginCommandRoot(e){return typeof e===`string`&&RESERVED_NON_PLUGIN_COMMAND_ROOTS.has(e)}function shouldSkipPluginCommandRegistration(e){const t=resolveCliArgvInvocation(e.argv);if(e.primary===`help`)return t.hasHelpOrVersion&&t.commandPath.length<=1;return e.hasBuiltinPrimary||isReservedNonPluginCommandRoot(e.primary)||!e.primary&&t.hasHelpOrVersion}function shouldEagerRegisterSubcommands(e=process.env){return isTruthyEnvValue(e.OPENCLAW_DISABLE_LAZY_SUBCOMMANDS)}export{shouldEagerRegisterSubcommands as n,shouldSkipPluginCommandRegistration as r,isReservedNonPluginCommandRoot as t};