From 4def4073d48103294f3e9b40f226abad4be1e0e3 Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Fri, 1 May 2026 22:05:15 +0100 Subject: [PATCH] refactor: trim cli helper exports --- src/cli/cli-name.ts | 2 +- src/cli/config-set-parser.ts | 4 ++-- src/cli/gateway-secret-options.ts | 4 ++-- src/cli/help-format.ts | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/cli/cli-name.ts b/src/cli/cli-name.ts index 041c2a30dd5..254ec375dfb 100644 --- a/src/cli/cli-name.ts +++ b/src/cli/cli-name.ts @@ -1,6 +1,6 @@ import path from "node:path"; -export const DEFAULT_CLI_NAME = "openclaw"; +const DEFAULT_CLI_NAME = "openclaw"; const KNOWN_CLI_NAMES = new Set([DEFAULT_CLI_NAME]); const CLI_PREFIX_RE = /^(?:((?:pnpm|npm|bunx|npx)\s+))?(openclaw)\b/; diff --git a/src/cli/config-set-parser.ts b/src/cli/config-set-parser.ts index a3cac0217bc..cbacfeecdec 100644 --- a/src/cli/config-set-parser.ts +++ b/src/cli/config-set-parser.ts @@ -1,6 +1,6 @@ -export type ConfigSetMode = "value" | "json" | "ref_builder" | "provider_builder" | "batch"; +type ConfigSetMode = "value" | "json" | "ref_builder" | "provider_builder" | "batch"; -export type ConfigSetModeResolution = +type ConfigSetModeResolution = | { ok: true; mode: ConfigSetMode; diff --git a/src/cli/gateway-secret-options.ts b/src/cli/gateway-secret-options.ts index 6ac9adb2cfd..38ae2abd774 100644 --- a/src/cli/gateway-secret-options.ts +++ b/src/cli/gateway-secret-options.ts @@ -2,7 +2,7 @@ import { readSecretFromFile } from "../acp/secret-file.js"; import { defaultRuntime } from "../runtime.js"; import { normalizeOptionalString } from "../shared/string-coerce.js"; -export function resolveGatewaySecretOption(params: { +function resolveGatewaySecretOption(params: { direct?: unknown; file?: unknown; directFlag: string; @@ -20,7 +20,7 @@ export function resolveGatewaySecretOption(params: { return direct || undefined; } -export function warnGatewaySecretCliFlag(flag: "--token" | "--password"): void { +function warnGatewaySecretCliFlag(flag: "--token" | "--password"): void { defaultRuntime.error( `Warning: ${flag} can be exposed via process listings. Prefer ${flag}-file or environment variables.`, ); diff --git a/src/cli/help-format.ts b/src/cli/help-format.ts index a5e821285ca..1be31d63d92 100644 --- a/src/cli/help-format.ts +++ b/src/cli/help-format.ts @@ -2,11 +2,11 @@ import { theme } from "../terminal/theme.js"; export type HelpExample = readonly [command: string, description: string]; -export function formatHelpExample(command: string, description: string): string { +function formatHelpExample(command: string, description: string): string { return ` ${theme.command(command)}\n ${theme.muted(description)}`; } -export function formatHelpExampleLine(command: string, description: string): string { +function formatHelpExampleLine(command: string, description: string): string { if (!description) { return ` ${theme.command(command)}`; }