diff --git a/src/auto-reply/reply/commands-export-common.ts b/src/auto-reply/reply/commands-export-common.ts index 61a55a29636..6253efa3fc7 100644 --- a/src/auto-reply/reply/commands-export-common.ts +++ b/src/auto-reply/reply/commands-export-common.ts @@ -15,7 +15,7 @@ export interface ExportCommandSessionTarget { sessionFile: string; } -export const MAX_EXPORT_COMMAND_OUTPUT_PATH_CHARS = 512; +const MAX_EXPORT_COMMAND_OUTPUT_PATH_CHARS = 512; function escapeRegExp(value: string): string { return value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"); diff --git a/src/auto-reply/reply/commands-tasks.ts b/src/auto-reply/reply/commands-tasks.ts index 46788cf08b6..05076d2a0b9 100644 --- a/src/auto-reply/reply/commands-tasks.ts +++ b/src/auto-reply/reply/commands-tasks.ts @@ -78,7 +78,7 @@ function formatVisibleTask(task: TaskRecord, index: number): string { return lines.join("\n"); } -export function buildTasksText(params: { sessionKey: string; agentId: string }): string { +function buildTasksText(params: { sessionKey: string; agentId: string }): string { const sessionSnapshot = buildTaskStatusSnapshot( listTasksForSessionKeyForStatus(params.sessionKey), ); diff --git a/src/auto-reply/reply/directive-handling.shared.ts b/src/auto-reply/reply/directive-handling.shared.ts index 5fd5d67e15c..b37d7d79924 100644 --- a/src/auto-reply/reply/directive-handling.shared.ts +++ b/src/auto-reply/reply/directive-handling.shared.ts @@ -7,7 +7,7 @@ export const formatDirectiveAck = (text: string): string => { return prefixSystemMessage(text); }; -export const formatOptionsLine = (options: string) => `Options: ${options}.`; +const formatOptionsLine = (options: string) => `Options: ${options}.`; export const withOptions = (line: string, options: string) => `${line}\n${formatOptionsLine(options)}`; @@ -41,7 +41,7 @@ function canPersistInternalDirective(params: { export const canPersistInternalExecDirective = canPersistInternalDirective; export const canPersistInternalVerboseDirective = canPersistInternalDirective; -export const formatElevatedEvent = (level: ElevatedLevel) => { +const formatElevatedEvent = (level: ElevatedLevel) => { if (level === "full") { return "Elevated FULL - exec runs on host with auto-approval."; } @@ -51,7 +51,7 @@ export const formatElevatedEvent = (level: ElevatedLevel) => { return "Elevated OFF - exec stays in sandbox."; }; -export const formatReasoningEvent = (level: ReasoningLevel) => { +const formatReasoningEvent = (level: ReasoningLevel) => { if (level === "stream") { return "Reasoning STREAM - emit live ."; } diff --git a/src/auto-reply/reply/get-reply-fast-path.ts b/src/auto-reply/reply/get-reply-fast-path.ts index 862c59384e6..c92551fa448 100644 --- a/src/auto-reply/reply/get-reply-fast-path.ts +++ b/src/auto-reply/reply/get-reply-fast-path.ts @@ -78,7 +78,7 @@ export function withFullRuntimeReplyConfig(config: T): return markCompleteReplyConfig(config, { runtimeMode: "full" }); } -export function isCompleteReplyConfig(config: unknown): config is OpenClawConfig { +function isCompleteReplyConfig(config: unknown): config is OpenClawConfig { return Boolean( config && typeof config === "object" && @@ -86,7 +86,7 @@ export function isCompleteReplyConfig(config: unknown): config is OpenClawConfig ); } -export function usesFullReplyRuntime(config: unknown): boolean { +function usesFullReplyRuntime(config: unknown): boolean { return Boolean( config && typeof config === "object" && diff --git a/src/auto-reply/reply/history.ts b/src/auto-reply/reply/history.ts index ab75f86534d..654525c5e48 100644 --- a/src/auto-reply/reply/history.ts +++ b/src/auto-reply/reply/history.ts @@ -4,7 +4,7 @@ export const HISTORY_CONTEXT_MARKER = "[Chat messages since your last reply - fo export const DEFAULT_GROUP_HISTORY_LIMIT = 50; /** Maximum number of group history keys to retain (LRU eviction when exceeded). */ -export const MAX_HISTORY_KEYS = 1000; +const MAX_HISTORY_KEYS = 1000; /** * Evict oldest keys from a history map when it exceeds MAX_HISTORY_KEYS. diff --git a/src/cli/program/command-descriptor-utils.ts b/src/cli/program/command-descriptor-utils.ts index 9101e55d45f..3dfd5fe4733 100644 --- a/src/cli/program/command-descriptor-utils.ts +++ b/src/cli/program/command-descriptor-utils.ts @@ -18,7 +18,7 @@ export function normalizeCommandDescriptorName(name: string): string | null { return SAFE_COMMAND_NAME_PATTERN.test(normalized) ? normalized : null; } -export function assertSafeCommandDescriptorName(name: string): string { +function assertSafeCommandDescriptorName(name: string): string { const normalized = normalizeCommandDescriptorName(name); if (!normalized) { throw new Error(`Invalid CLI command name: ${JSON.stringify(name.trim())}`); diff --git a/src/cli/program/json-mode.ts b/src/cli/program/json-mode.ts index 3f2862bc5c4..60a18cb5dec 100644 --- a/src/cli/program/json-mode.ts +++ b/src/cli/program/json-mode.ts @@ -43,10 +43,7 @@ export function setCommandJsonMode(command: Command, mode: JsonMode): Command { return command; } -export function getCommandJsonMode( - command: Command, - argv: string[] = process.argv, -): JsonMode | null { +function getCommandJsonMode(command: Command, argv: string[] = process.argv): JsonMode | null { if (!commandSelectedJsonFlag(command, argv)) { return null; }