import { a as normalizeLowercaseStringOrEmpty } from "./string-coerce-mnp54Vah.js";
import { b as parseStrictPositiveInteger } from "./number-coercion-CJQ8TR--.js";
import "./parse-finite-number-Z7n6tXLk.js";
import { t as sanitizeForLog } from "./ansi-BI9w76Cm.js";
import { n as resolveOpenClawPackageRootSync } from "./openclaw-root-CEzFKGY_.js";
import { pathToFileURL } from "node:url";
import fs from "node:fs";
import path from "node:path";
//#region src/daemon/runtime-binary.ts
const NODE_VERSIONED_PATTERN = /^node(?:-\d+|\d+)(?:\.\d+)*(?:\.exe)?$/;
function normalizeRuntimeBasename(execPath) {
	const trimmed = execPath.trim().replace(/^["']|["']$/g, "");
	const lastSlash = Math.max(trimmed.lastIndexOf("/"), trimmed.lastIndexOf("\\"));
	return normalizeLowercaseStringOrEmpty(lastSlash === -1 ? trimmed : trimmed.slice(lastSlash + 1));
}
function isNodeRuntime(execPath) {
	const base = normalizeRuntimeBasename(execPath);
	return base === "node" || base === "node.exe" || base === "nodejs" || base === "nodejs.exe" || NODE_VERSIONED_PATTERN.test(base);
}
function isBunRuntime(execPath) {
	const base = normalizeRuntimeBasename(execPath);
	return base === "bun" || base === "bun.exe";
}
const ROOT_BOOLEAN_FLAGS = new Set(["--dev", "--no-color"]);
const ROOT_VALUE_FLAGS = new Set([
	"--profile",
	"--log-level",
	"--container"
]);
function isValueToken(arg) {
	if (!arg || arg === "--") return false;
	if (!arg.startsWith("-")) return true;
	return /^-\d+(?:\.\d+)?$/.test(arg);
}
function consumeRootOptionToken(args, index) {
	const arg = args[index];
	if (!arg) return 0;
	if (ROOT_BOOLEAN_FLAGS.has(arg)) return 1;
	if (arg.startsWith("--profile=") || arg.startsWith("--log-level=") || arg.startsWith("--container=")) return 1;
	if (ROOT_VALUE_FLAGS.has(arg)) return isValueToken(args[index + 1]) ? 2 : 1;
	return 0;
}
//#endregion
//#region src/cli/program/command-descriptor-utils.ts
const SAFE_COMMAND_NAME_PATTERN = /^[A-Za-z0-9][A-Za-z0-9_-]*$/;
function normalizeCommandDescriptorName(name) {
	const normalized = name.trim();
	return SAFE_COMMAND_NAME_PATTERN.test(normalized) ? normalized : null;
}
function assertSafeCommandDescriptorName(name) {
	const normalized = normalizeCommandDescriptorName(name);
	if (!normalized) throw new Error(`Invalid CLI command name: ${JSON.stringify(name.trim())}`);
	return normalized;
}
function sanitizeCommandDescriptorDescription(description) {
	return sanitizeForLog(description).trim();
}
function getCommandDescriptorNames(descriptors) {
	return descriptors.map((descriptor) => descriptor.name);
}
function getCommandsWithSubcommands(descriptors) {
	return descriptors.filter((descriptor) => descriptor.hasSubcommands).map((descriptor) => descriptor.name);
}
function getParentDefaultHelpCommands(descriptors) {
	return descriptors.filter((descriptor) => descriptor.parentDefaultHelp).map((descriptor) => descriptor.name);
}
function collectUniqueCommandDescriptors(descriptorGroups) {
	const seen = /* @__PURE__ */ new Set();
	const descriptors = [];
	for (const group of descriptorGroups) for (const descriptor of group) {
		if (seen.has(descriptor.name)) continue;
		seen.add(descriptor.name);
		descriptors.push(descriptor);
	}
	return descriptors;
}
function defineCommandDescriptorCatalog(descriptors) {
	return {
		descriptors,
		getDescriptors: () => descriptors,
		getNames: () => getCommandDescriptorNames(descriptors),
		getCommandsWithSubcommands: () => getCommandsWithSubcommands(descriptors),
		getParentDefaultHelpCommands: () => getParentDefaultHelpCommands(descriptors)
	};
}
function addCommandDescriptorsToProgram(program, descriptors, existingCommands = /* @__PURE__ */ new Set()) {
	for (const descriptor of descriptors) {
		const name = assertSafeCommandDescriptorName(descriptor.name);
		if (existingCommands.has(name)) continue;
		program.command(name).description(sanitizeCommandDescriptorDescription(descriptor.description));
		existingCommands.add(name);
	}
	return existingCommands;
}
//#endregion
//#region src/cli/program/core-command-descriptors.ts
const coreCliCommandCatalog = defineCommandDescriptorCatalog([
	{
		name: "crestodian",
		description: "Open the interactive setup and repair assistant",
		hasSubcommands: false
	},
	{
		name: "setup",
		description: "初始化本地配置和代理工作区",
		hasSubcommands: false
	},
	{
		name: "onboard",
		description: "交互式引导配置网关、工作区和技能",
		hasSubcommands: false
	},
	{
		name: "configure",
		description: "交互式配置凭证、渠道、网关和代理默认设置",
		hasSubcommands: false
	},
	{
		name: "config",
		description: "非交互式配置工具（get/set/unset/file/validate）。默认：启动引导式设置。",
		hasSubcommands: true
	},
	{
		name: "backup",
		description: "创建和验证 OpenClaw 状态的本地备份归档",
		hasSubcommands: true
	},
	{
		name: "migrate",
		description: "Import state from another agent system",
		hasSubcommands: true
	},
	{
		name: "doctor",
		description: "诊断并修复配置、网关、插件和渠道问题",
		hasSubcommands: false
	},
	{
		name: "dashboard",
		description: "使用当前令牌打开控制面板",
		hasSubcommands: false
	},
	{
		name: "reset",
		description: "重置本地配置/状态（保留 CLI）",
		hasSubcommands: false
	},
	{
		name: "uninstall",
		description: "卸载网关服务和本地数据（保留 CLI）",
		hasSubcommands: false
	},
	{
		name: "message",
		description: "发送、读取和管理渠道消息",
		hasSubcommands: true
	},
	{
		name: "mcp",
		description: "管理 OpenClaw MCP 配置和渠道桥接",
		hasSubcommands: true,
		parentDefaultHelp: true
	},
	{
		name: "transcripts",
		description: "Inspect stored transcripts",
		hasSubcommands: true
	},
	{
		name: "agent",
		description: "通过网关运行一次代理",
		hasSubcommands: false
	},
	{
		name: "agents",
		description: "管理隔离的代理（工作区、认证、路由）",
		hasSubcommands: true
	},
	{
		name: "status",
		description: "显示网关、渠道、模型和最近会话状态",
		hasSubcommands: false
	},
	{
		name: "health",
		description: "从运行中的网关获取详细健康状态",
		hasSubcommands: false
	},
	{
		name: "sessions",
		description: "列出已存储的对话会话",
		hasSubcommands: true
	},
	{
		name: "commitments",
		description: "List and manage inferred follow-up commitments",
		hasSubcommands: true
	},
	{
		name: "tasks",
		description: "查看持久化后台任务和流程",
		hasSubcommands: true
	}
]);
const CORE_CLI_COMMAND_DESCRIPTORS = coreCliCommandCatalog.descriptors;
function getCoreCliCommandDescriptors() {
	return coreCliCommandCatalog.getDescriptors();
}
function getCoreCliCommandNames() {
	return coreCliCommandCatalog.getNames();
}
function getCoreCliCommandsWithSubcommands() {
	return coreCliCommandCatalog.getCommandsWithSubcommands();
}
function getCoreCliParentDefaultHelpCommands() {
	return coreCliCommandCatalog.getParentDefaultHelpCommands();
}
//#endregion
//#region src/cli/program/private-qa-cli.ts
const PRIVATE_QA_DIST_RELATIVE_PATH = path.join("dist", "plugin-sdk", "qa-lab.js");
const SOURCE_CHECKOUT_MARKER_RELATIVE_PATHS = [".git", "pnpm-workspace.yaml"];
function isPrivateQaCliEnabled(env = process.env) {
	return env.OPENCLAW_ENABLE_PRIVATE_QA_CLI === "1";
}
function resolvePrivateQaSourceModuleSpecifier(params) {
	if (!isPrivateQaCliEnabled(params?.env ?? process.env)) return null;
	const packageRoot = (params?.resolvePackageRootSync ?? resolveOpenClawPackageRootSync)({
		argv1: params?.argv1 ?? process.argv[1],
		cwd: params?.cwd ?? process.cwd(),
		moduleUrl: params?.moduleUrl ?? import.meta.url
	});
	if (!packageRoot) return null;
	const existsSync = params?.existsSync ?? fs.existsSync;
	const sourceModulePath = path.join(packageRoot, PRIVATE_QA_DIST_RELATIVE_PATH);
	if (!SOURCE_CHECKOUT_MARKER_RELATIVE_PATHS.some((relativePath) => existsSync(path.join(packageRoot, relativePath))) || !existsSync(path.join(packageRoot, "src")) || !existsSync(sourceModulePath)) return null;
	return pathToFileURL(sourceModulePath).href;
}
async function dynamicImportPrivateQaCliModule(specifier) {
	return await import(specifier);
}
function loadPrivateQaCliModule(params) {
	const specifier = resolvePrivateQaSourceModuleSpecifier(params);
	if (!specifier) throw new Error("Private QA CLI is only available from an OpenClaw source checkout.");
	return (params?.importModule ?? dynamicImportPrivateQaCliModule)(specifier);
}
//#endregion
//#region src/cli/program/subcli-descriptors.ts
const subCliCommandCatalog = defineCommandDescriptorCatalog([
	{
		name: "acp",
		description: "运行和管理基于 ACP 的代码代理",
		hasSubcommands: true
	},
	{
		name: "gateway",
		description: "运行、检查和查询 OpenClaw 网关",
		hasSubcommands: true
	},
	{
		name: "daemon",
		description: "管理网关服务（旧版别名）",
		hasSubcommands: true
	},
	{
		name: "logs",
		description: "本地或通过 RPC 查看网关日志",
		hasSubcommands: false
	},
	{
		name: "system",
		description: "系统事件、心跳和在线状态",
		hasSubcommands: true
	},
	{
		name: "models",
		description: "列出、扫描和设置模型提供商",
		hasSubcommands: true
	},
	{
		name: "infer",
		description: "运行提供商支持的模型、媒体、搜索和嵌入命令",
		hasSubcommands: true
	},
	{
		name: "capability",
		description: "运行提供商能力命令（备用别名：infer）",
		hasSubcommands: true
	},
	{
		name: "approvals",
		description: "管理执行审批（网关或节点主机）",
		hasSubcommands: true,
		parentDefaultHelp: true
	},
	{
		name: "exec-policy",
		description: "查看或同步请求的执行策略与主机审批",
		hasSubcommands: true
	},
	{
		name: "nodes",
		description: "通过网关配对节点并运行节点主机命令",
		hasSubcommands: true
	},
	{
		name: "devices",
		description: "设备配对和令牌管理",
		hasSubcommands: true,
		parentDefaultHelp: true
	},
	{
		name: "node",
		description: "运行和管理无头节点主机服务",
		hasSubcommands: true
	},
	{
		name: "sandbox",
		description: "管理沙箱容器以隔离代理",
		hasSubcommands: true
	},
	{
		name: "tui",
		description: "打开连接到网关的终端界面",
		hasSubcommands: false
	},
	{
		name: "terminal",
		description: "Open a local terminal UI (alias for tui --local)",
		hasSubcommands: false
	},
	{
		name: "chat",
		description: "Open a local terminal UI (alias for tui --local)",
		hasSubcommands: false
	},
	{
		name: "cron",
		description: "调度和查看网关后台任务",
		hasSubcommands: true,
		parentDefaultHelp: true
	},
	{
		name: "dns",
		description: "DNS 工具 - 广域发现（Tailscale + CoreDNS）",
		hasSubcommands: true
	},
	{
		name: "docs",
		description: "搜索 OpenClaw 在线文档",
		hasSubcommands: false
	},
	{
		name: "qa",
		description: "运行 QA 场景并启动私有 QA 调试器 UI",
		hasSubcommands: true
	},
	{
		name: "proxy",
		description: "运行 OpenClaw 调试代理并查看捕获的流量",
		hasSubcommands: true
	},
	{
		name: "hooks",
		description: "管理内部代理 Hooks",
		hasSubcommands: true
	},
	{
		name: "webhooks",
		description: "Webhook 工具与集成",
		hasSubcommands: true
	},
	{
		name: "qr",
		description: "生成移动端配对二维码/设置码",
		hasSubcommands: false
	},
	{
		name: "clawbot",
		description: "旧版 clawbot 命令别名",
		hasSubcommands: true
	},
	{
		name: "pairing",
		description: "安全私信配对（审批入站请求）",
		hasSubcommands: true
	},
	{
		name: "plugins",
		description: "安装、启用、禁用和查看插件",
		hasSubcommands: true,
		parentDefaultHelp: true
	},
	{
		name: "channels",
		description: "添加、删除、登录和查看聊天渠道",
		hasSubcommands: true,
		parentDefaultHelp: true
	},
	{
		name: "directory",
		description: "查询支持渠道的联系人和群组 ID",
		hasSubcommands: true
	},
	{
		name: "security",
		description: "安全工具和本地配置审计",
		hasSubcommands: true
	},
	{
		name: "secrets",
		description: "审计、应用和重载基于 SecretRef 的凭证",
		hasSubcommands: true
	},
	{
		name: "skills",
		description: "列出、查看和安装代理技能",
		hasSubcommands: true
	},
	{
		name: "update",
		description: "更新 OpenClaw 并检查更新渠道状态",
		hasSubcommands: true
	},
	{
		name: "completion",
		description: "生成 Shell 补全脚本",
		hasSubcommands: false
	}
]);
function filterPrivateQaItems(items, getName) {
	if (isPrivateQaCliEnabled()) return items;
	return items.filter((item) => getName(item) !== "qa");
}
const SUB_CLI_DESCRIPTORS = filterPrivateQaItems(subCliCommandCatalog.descriptors, (descriptor) => descriptor.name);
function getSubCliEntries() {
	return filterPrivateQaItems(subCliCommandCatalog.getDescriptors(), (descriptor) => descriptor.name);
}
function getSubCliCommandsWithSubcommands() {
	return [...filterPrivateQaItems(subCliCommandCatalog.getCommandsWithSubcommands(), (command) => command)];
}
function getSubCliParentDefaultHelpCommands() {
	return [...filterPrivateQaItems(subCliCommandCatalog.getParentDefaultHelpCommands(), (command) => command)];
}
//#endregion
//#region src/cli/argv.ts
const HELP_FLAGS = new Set(["-h", "--help"]);
const VERSION_FLAGS = new Set(["-V", "--version"]);
const ROOT_VERSION_ALIAS_FLAG = "-v";
const ROOT_COMMAND_DESCRIPTORS = [...CORE_CLI_COMMAND_DESCRIPTORS, ...SUB_CLI_DESCRIPTORS];
const KNOWN_ROOT_COMMANDS = new Set(ROOT_COMMAND_DESCRIPTORS.map((descriptor) => descriptor.name));
const ROOT_COMMANDS_WITH_SUBCOMMANDS = new Set(ROOT_COMMAND_DESCRIPTORS.filter((descriptor) => descriptor.hasSubcommands).map((descriptor) => descriptor.name));
function isHelpOrVersionInvocation(argv) {
	if (hasRootVersionAlias(argv)) return true;
	const args = argv.slice(2);
	let sawCommandOption = false;
	const positionals = [];
	for (let i = 0; i < args.length; i += 1) {
		const arg = args[i];
		if (!arg || arg === "--") break;
		const rootConsumed = consumeRootOptionToken(args, i);
		if (rootConsumed > 0) {
			i += rootConsumed - 1;
			continue;
		}
		if (HELP_FLAGS.has(arg) || VERSION_FLAGS.has(arg)) return true;
		if (arg.startsWith("-")) {
			sawCommandOption = true;
			continue;
		}
		positionals.push(arg);
		if (arg !== "help") continue;
		if (sawCommandOption) return false;
		if (positionals.length === 1) return true;
		const [primary] = positionals;
		if (!primary || !KNOWN_ROOT_COMMANDS.has(primary)) return true;
		if (positionals.length === 2 && ROOT_COMMANDS_WITH_SUBCOMMANDS.has(primary)) return true;
		return false;
	}
	return false;
}
function parsePositiveInt(value) {
	return parseStrictPositiveInteger(value);
}
function hasFlag(argv, name) {
	const args = argv.slice(2);
	for (const arg of args) {
		if (arg === "--") break;
		if (arg === name) return true;
	}
	return false;
}
function hasRootVersionAlias(argv) {
	const args = argv.slice(2);
	let hasAlias = false;
	for (let i = 0; i < args.length; i += 1) {
		const arg = args[i];
		if (!arg) continue;
		if (arg === "--") break;
		if (arg === ROOT_VERSION_ALIAS_FLAG) {
			hasAlias = true;
			continue;
		}
		const consumed = consumeRootOptionToken(args, i);
		if (consumed > 0) {
			i += consumed - 1;
			continue;
		}
		if (arg.startsWith("-")) return false;
		return false;
	}
	return hasAlias;
}
function isRootVersionInvocation(argv) {
	return isRootInvocationForFlags(argv, VERSION_FLAGS, { includeVersionAlias: true });
}
function isRootInvocationForFlags(argv, targetFlags, options) {
	const args = argv.slice(2);
	let hasTarget = false;
	for (let i = 0; i < args.length; i += 1) {
		const arg = args[i];
		if (!arg) continue;
		if (arg === "--") break;
		if (targetFlags.has(arg) || options?.includeVersionAlias === true && arg === ROOT_VERSION_ALIAS_FLAG) {
			hasTarget = true;
			continue;
		}
		const consumed = consumeRootOptionToken(args, i);
		if (consumed > 0) {
			i += consumed - 1;
			continue;
		}
		return false;
	}
	return hasTarget;
}
function isRootHelpInvocation(argv) {
	return isRootInvocationForFlags(argv, HELP_FLAGS);
}
function scanHelpNormalizationArgv(argv) {
	const positionals = [];
	const rootOptions = [];
	let helpFlagIndex = null;
	for (let index = 2; index < argv.length; index += 1) {
		const arg = argv[index];
		if (!arg || arg === "--") break;
		const consumed = consumeRootOptionToken(argv, index);
		if (consumed > 0) {
			rootOptions.push(...argv.slice(index, index + consumed));
			index += consumed - 1;
			continue;
		}
		if (HELP_FLAGS.has(arg)) {
			helpFlagIndex = index;
			continue;
		}
		if (arg.startsWith("-")) return { ok: false };
		positionals.push({
			value: arg,
			index
		});
	}
	return {
		ok: true,
		positionals,
		rootOptions,
		helpFlagIndex
	};
}
function normalizeGeneratedHelpCommandArgv(argv) {
	const scan = scanHelpNormalizationArgv(argv);
	if (!scan.ok) return argv;
	const { positionals, rootOptions, helpFlagIndex } = scan;
	const [primary, secondary, target] = positionals;
	if (!primary || secondary?.value !== "help" || KNOWN_ROOT_COMMANDS.has(primary.value) && !ROOT_COMMANDS_WITH_SUBCOMMANDS.has(primary.value)) return argv;
	if (positionals.length === 2 && helpFlagIndex === secondary.index + 1) return argv.toSpliced(helpFlagIndex, 1);
	if (!target || positionals.length !== 3 || helpFlagIndex !== null && helpFlagIndex !== target.index + 1) return argv;
	return [
		argv[0],
		argv[1],
		...rootOptions,
		primary.value,
		target.value,
		"--help"
	];
}
function normalizeRootHelpTargetArgv(argv) {
	const scan = scanHelpNormalizationArgv(argv);
	if (!scan.ok) return argv;
	const { positionals, rootOptions, helpFlagIndex } = scan;
	const [help, target] = positionals;
	if (help?.value !== "help" || !target || helpFlagIndex !== null && helpFlagIndex !== positionals.at(-1).index + 1) return argv;
	const targetPath = positionals.slice(1).map((positional) => positional.value);
	return [
		argv[0],
		argv[1],
		...rootOptions,
		...targetPath,
		"--help"
	];
}
function getFlagValue(argv, name) {
	const args = argv.slice(2);
	for (let i = 0; i < args.length; i += 1) {
		const arg = args[i];
		if (arg === "--") break;
		if (arg === name) {
			const next = args[i + 1];
			return isValueToken(next) ? next : null;
		}
		if (arg.startsWith(`${name}=`)) {
			const value = arg.slice(name.length + 1);
			return value ? value : null;
		}
	}
}
function getVerboseFlag(argv, options) {
	if (hasFlag(argv, "--verbose")) return true;
	if (options?.includeDebug && hasFlag(argv, "--debug")) return true;
	return false;
}
function getPositiveIntFlagValue(argv, name) {
	const raw = getFlagValue(argv, name);
	if (raw === null || raw === void 0) return raw;
	return parsePositiveInt(raw);
}
function getCommandPathWithRootOptions(argv, depth = 2) {
	return getCommandPathInternal(argv, depth, { skipRootOptions: true });
}
function getCommandPathInternal(argv, depth, opts) {
	const args = argv.slice(2);
	const path = [];
	for (let i = 0; i < args.length; i += 1) {
		const arg = args[i];
		if (!arg) continue;
		if (arg === "--") break;
		if (opts.skipRootOptions) {
			const consumed = consumeRootOptionToken(args, i);
			if (consumed > 0) {
				i += consumed - 1;
				continue;
			}
		}
		if (arg.startsWith("-")) continue;
		path.push(arg);
		if (path.length >= depth) break;
	}
	return path;
}
function getPrimaryCommand(argv) {
	const [primary] = getCommandPathWithRootOptions(argv, 1);
	return primary ?? null;
}
function consumeKnownOptionToken(args, index, booleanFlags, valueFlags) {
	const arg = args[index];
	if (!arg || arg === "--" || !arg.startsWith("-")) return 0;
	const equalsIndex = arg.indexOf("=");
	const flag = equalsIndex === -1 ? arg : arg.slice(0, equalsIndex);
	if (booleanFlags.has(flag)) return equalsIndex === -1 ? 1 : 0;
	if (!valueFlags.has(flag)) return 0;
	if (equalsIndex !== -1) return arg.slice(equalsIndex + 1).trim() ? 1 : 0;
	return isValueToken(args[index + 1]) ? 2 : 0;
}
function getCommandPositionalsWithRootOptions(argv, options) {
	const args = argv.slice(2);
	const commandPath = options.commandPath;
	const booleanFlags = new Set(options.booleanFlags ?? []);
	const valueFlags = new Set(options.valueFlags ?? []);
	const positionals = [];
	let commandIndex = 0;
	for (let i = 0; i < args.length; i += 1) {
		const arg = args[i];
		if (!arg || arg === "--") break;
		const rootConsumed = consumeRootOptionToken(args, i);
		if (rootConsumed > 0) {
			i += rootConsumed - 1;
			continue;
		}
		if (arg.startsWith("-")) {
			const optionConsumed = consumeKnownOptionToken(args, i, booleanFlags, valueFlags);
			if (optionConsumed === 0) return null;
			i += optionConsumed - 1;
			continue;
		}
		if (commandIndex < commandPath.length) {
			if (arg !== commandPath[commandIndex]) return null;
			commandIndex += 1;
			continue;
		}
		positionals.push(arg);
	}
	if (commandIndex < commandPath.length) return null;
	return positionals;
}
function buildParseArgv(params) {
	const baseArgv = params.rawArgs && params.rawArgs.length > 0 ? params.rawArgs : params.fallbackArgv && params.fallbackArgv.length > 0 ? params.fallbackArgv : process.argv;
	const programName = params.programName ?? "";
	const normalizedArgv = programName && baseArgv[0] === programName ? baseArgv.slice(1) : baseArgv[0]?.endsWith("openclaw") ? baseArgv.slice(1) : baseArgv;
	if (normalizedArgv.length >= 2 && (isNodeRuntime(normalizedArgv[0] ?? "") || isBunRuntime(normalizedArgv[0] ?? ""))) return normalizedArgv;
	return [
		"node",
		programName || "openclaw",
		...normalizedArgv
	];
}
function shouldMigrateStateFromPath(path) {
	if (path.length === 0) return true;
	const [primary, secondary] = path;
	if (primary === "health" || primary === "sessions") return false;
	if (primary === "update" && secondary === "status") return false;
	if (primary === "config" && (secondary === "get" || secondary === "unset")) return false;
	return true;
}
//#endregion
export { isBunRuntime as A, getCoreCliParentDefaultHelpCommands as C, sanitizeCommandDescriptorDescription as D, normalizeCommandDescriptorName as E, consumeRootOptionToken as O, getCoreCliCommandsWithSubcommands as S, collectUniqueCommandDescriptors as T, getSubCliEntries as _, getPositiveIntFlagValue as a, getCoreCliCommandDescriptors as b, hasFlag as c, isRootHelpInvocation as d, isRootVersionInvocation as f, getSubCliCommandsWithSubcommands as g, shouldMigrateStateFromPath as h, getFlagValue as i, isNodeRuntime as j, isValueToken as k, hasRootVersionAlias as l, normalizeRootHelpTargetArgv as m, getCommandPathWithRootOptions as n, getPrimaryCommand as o, normalizeGeneratedHelpCommandArgv as p, getCommandPositionalsWithRootOptions as r, getVerboseFlag as s, buildParseArgv as t, isHelpOrVersionInvocation as u, getSubCliParentDefaultHelpCommands as v, addCommandDescriptorsToProgram as w, getCoreCliCommandNames as x, loadPrivateQaCliModule as y };
