Skip to content

Commit c8d95da

Browse files
authored
refactor: localize file-private exports (#101701)
1 parent a7faec8 commit c8d95da

38 files changed

Lines changed: 50 additions & 52 deletions

extensions/acpx/src/process-reaper.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ function parseProcessList(stdout: string): AcpxProcessInfo[] {
211211
}
212212

213213
/** List host processes in the compact shape needed by ACPX cleanup. */
214-
export async function listPlatformProcesses(): Promise<AcpxProcessInfo[]> {
214+
async function listPlatformProcesses(): Promise<AcpxProcessInfo[]> {
215215
if (process.platform === "win32") {
216216
return [];
217217
}

extensions/browser/src/browser/chrome-mcp.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1381,15 +1381,15 @@ export async function closeChromeMcpSession(profileName: string): Promise<boolea
13811381
}
13821382

13831383
/** Close every cached Chrome MCP session. */
1384-
export async function stopAllChromeMcpSessions(): Promise<void> {
1384+
async function stopAllChromeMcpSessions(): Promise<void> {
13851385
const names = uniqueStrings([...sessions.keys()].map((key) => JSON.parse(key)[0] as string));
13861386
for (const name of names) {
13871387
await closeChromeMcpSession(name).catch(() => {});
13881388
}
13891389
}
13901390

13911391
/** List raw Chrome MCP pages for a profile. */
1392-
export async function listChromeMcpPages(
1392+
async function listChromeMcpPages(
13931393
profileName: string,
13941394
profileOptions?: string | ChromeMcpProfileOptions,
13951395
options: ChromeMcpCallOptions = {},

extensions/discord/src/monitor/reply-safety.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ function stripDiscordInternalChannelLines(text: string): string {
5757
return kept.join("\n");
5858
}
5959

60-
export function sanitizeDiscordFrontChannelText(text: string): string {
60+
function sanitizeDiscordFrontChannelText(text: string): string {
6161
const withoutToolCallBlocks = stripPlainTextToolCallBlocks(text);
6262
const withoutAssistantScaffolding = sanitizeAssistantVisibleText(withoutToolCallBlocks);
6363
const withoutResidualToolCallBlocks = stripPlainTextToolCallBlocks(withoutAssistantScaffolding);

extensions/discord/src/voice-message.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ export type VoiceMessageMetadata = {
8686
/**
8787
* Get audio duration using ffprobe
8888
*/
89-
export async function getAudioDuration(filePath: string): Promise<number> {
89+
async function getAudioDuration(filePath: string): Promise<number> {
9090
try {
9191
const stdout = await runFfprobe([
9292
"-v",
@@ -112,7 +112,7 @@ export async function getAudioDuration(filePath: string): Promise<number> {
112112
* Generate waveform data from audio file using ffmpeg
113113
* Returns base64 encoded byte array of amplitude samples (0-255)
114114
*/
115-
export async function generateWaveform(filePath: string): Promise<string> {
115+
async function generateWaveform(filePath: string): Promise<string> {
116116
try {
117117
// Extract raw PCM and sample amplitude values
118118
return await generateWaveformFromPcm(filePath);

src/agents/anthropic-transport-stream.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -658,7 +658,7 @@ function tagPendingCommentaryText(content: TransportContentBlock[]): void {
658658
const DEFAULT_ANTHROPIC_BASE_URL = "https://api.anthropic.com";
659659

660660
/** Resolve the effective Anthropic API base URL from model or environment. */
661-
export function resolveAnthropicBaseUrl(baseUrl?: string): string {
661+
function resolveAnthropicBaseUrl(baseUrl?: string): string {
662662
return baseUrl?.trim() || process.env.ANTHROPIC_BASE_URL?.trim() || DEFAULT_ANTHROPIC_BASE_URL;
663663
}
664664

src/agents/harness/compaction-recovery.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import type { EmbeddedAgentCompactResult } from "../embedded-agent-runner/types.js";
88

99
/** Returns whether a native harness failure reason indicates a recoverable binding issue. */
10-
export function isRecoverableNativeHarnessBindingReason(reason: unknown): boolean {
10+
function isRecoverableNativeHarnessBindingReason(reason: unknown): boolean {
1111
if (typeof reason !== "string") {
1212
return false;
1313
}

src/agents/sandbox/shared.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export function slugifySessionKey(value: string) {
2626
}
2727

2828
/** Resolves the per-session sandbox workspace directory under the configured sandbox root. */
29-
export function resolveSandboxWorkspaceDir(root: string, sessionKey: string) {
29+
function resolveSandboxWorkspaceDir(root: string, sessionKey: string) {
3030
const resolvedRoot = resolveUserPath(root);
3131
const slug = slugifySessionKey(sessionKey);
3232
return path.join(resolvedRoot, slug);

src/agents/timeout.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import {
99
} from "@openclaw/normalization-core/number-coercion";
1010
import type { OpenClawConfig } from "../config/types.openclaw.js";
1111

12-
export const DEFAULT_AGENT_TIMEOUT_SECONDS = 48 * 60 * 60;
12+
const DEFAULT_AGENT_TIMEOUT_SECONDS = 48 * 60 * 60;
1313
export const DEFAULT_AGENT_TIMEOUT_MS = DEFAULT_AGENT_TIMEOUT_SECONDS * 1000;
1414

1515
const normalizeNumber = (value: unknown): number | undefined =>

src/auto-reply/reply/agent-runner-run-params.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export function resolveModelFallbackOptions(
3939
}
4040

4141
/** Resolves whether final-answer tags should be enforced for an embedded follow-up run. */
42-
export function resolveEnforceFinalTagWithResolver(
42+
function resolveEnforceFinalTagWithResolver(
4343
run: FollowupRun["run"],
4444
provider: string,
4545
model: string,

src/auto-reply/reply/agent-runner-usage-line.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import { buildUsageContract } from "../usage-bar/contract.js";
1515
import { loadUsageBarTemplate } from "../usage-bar/template.js";
1616
import { renderUsageBar } from "../usage-bar/translator.js";
1717

18-
export const formatResponseUsageLine = (params: {
18+
const formatResponseUsageLine = (params: {
1919
usage?: {
2020
input?: number;
2121
output?: number;

0 commit comments

Comments
 (0)