mirror of
https://github.com/openclaw/openclaw.git
synced 2026-07-20 21:41:36 +00:00
docs: document plugin program cli helpers
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
// Builds the root Commander program, context, help, hooks, and command registry.
|
||||
import process from "node:process";
|
||||
import { Command } from "commander";
|
||||
import { registerProgramCommands } from "./command-registry.js";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Core command registry that lazily imports command groups based on parsed argv.
|
||||
import type { Command } from "commander";
|
||||
import { resolveCliArgvInvocation } from "../argv-invocation.js";
|
||||
import { shouldRegisterPrimaryCommandOnly } from "../command-registration-policy.js";
|
||||
@@ -142,6 +143,7 @@ const coreEntrySpecs: readonly CommandGroupDescriptorSpec<
|
||||
];
|
||||
|
||||
function resolveCoreCommandGroups(ctx: ProgramContext, argv: string[]): CommandGroupEntry[] {
|
||||
// Descriptor metadata and import specs stay separate so help can stay cheap.
|
||||
return buildCommandGroupEntries(
|
||||
getCoreCliCommandDescriptors(),
|
||||
coreEntrySpecs,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// CLI config readiness guard, legacy-state migration routing, and invalid-config allowances.
|
||||
import fs from "node:fs";
|
||||
import os from "node:os";
|
||||
import path from "node:path";
|
||||
@@ -97,6 +98,7 @@ function hasBundledChannelLegacyStateMigrationInputs(stateDir: string, oauthDir:
|
||||
}
|
||||
|
||||
function hasLegacyStateMigrationInputs(): boolean {
|
||||
// Only run migration prompts when old state actually exists in known legacy locations.
|
||||
const stateDir = resolveStateDir(process.env, os.homedir);
|
||||
const oauthDir = resolveOAuthDir(process.env, stateDir);
|
||||
if (
|
||||
|
||||
Reference in New Issue
Block a user