openclaw
Version:
Multi-channel AI gateway with extensible messaging integrations
15 lines (14 loc) • 666 B
JavaScript
import { I as resolveParentAwareCommandPath, a as getPrimaryCommand, l as isHelpOrVersionInvocation, n as getCommandPathWithRootOptions, u as isRootHelpInvocation } from "./argv-DNjh_yaF.js";
//#region src/cli/argv-invocation.ts
/** Resolves command path and help/version mode from a raw process argv array. */
function resolveCliArgvInvocation(argv) {
return {
argv,
commandPath: resolveParentAwareCommandPath(argv) ?? getCommandPathWithRootOptions(argv, 2),
primary: getPrimaryCommand(argv),
hasHelpOrVersion: isHelpOrVersionInvocation(argv),
isRootHelpInvocation: isRootHelpInvocation(argv)
};
}
//#endregion
export { resolveCliArgvInvocation as t };