UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

30 lines (29 loc) • 1.17 kB
import { n as isTruthyEnvValue } from "./env-HehwidXj.mjs"; import { t as resolveCliCommandPathPolicy } from "./command-path-policy-CLmNyiTh.mjs"; //#region src/cli/command-startup-policy.ts function resolveCliStartupPolicy(e) { const t = resolveCliCommandPathPolicy(e.commandPath); const n = e.nativeUpdateExecutorCheck === true; const r = n || e.jsonOutputMode || e.machineOutputMode === true; const i = r || t.ownsProtocolStdout; const a = typeof t.configGuard === "function" ? t.configGuard({ argv: e.argv ?? [], commandPath: e.commandPath, options: e.options }) : t.configGuard; const o = e.env ?? process.env; return { suppressDoctorStdout: i, hideBanner: r || t.hideBanner || isTruthyEnvValue(o.OPENCLAW_HIDE_BANNER), skipConfigGuard: n || a === "skip" || a === "defer", ...a === "validate" || a === "defer" ? { validateConfigOnly: true } : {}, loadPlugins: !n && (typeof t.loadPlugins === "function" ? t.loadPlugins({ argv: e.argv ?? [], commandPath: e.commandPath, jsonOutputMode: e.jsonOutputMode }) : t.loadPlugins === "always"), pluginRegistry: t.pluginRegistry }; } //#endregion export { resolveCliStartupPolicy as t };