Skip to content

Commit b88f809

Browse files
authored
refactor: localize internal implementation symbols (#101831)
1 parent fa84741 commit b88f809

62 files changed

Lines changed: 80 additions & 89 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎extensions/discord/src/channel.conversation.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ export function resolveDiscordCommandConversation(params: {
119119
return conversationId ? { conversationId } : null;
120120
}
121121

122-
export function resolveDiscordThreadConversationRef(params: {
122+
function resolveDiscordThreadConversationRef(params: {
123123
threadId?: string | number | null;
124124
threadParentId?: string | number | null;
125125
parentSessionKey?: string | null;

‎extensions/discord/src/monitor/message-handler.reply-typing-policy.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export type DiscordAcceptedTypingPrestartDecision = {
1919
| "defer-to-message";
2020
};
2121

22-
export function resolveDiscordSourceReplyDeliveryMode(
22+
function resolveDiscordSourceReplyDeliveryMode(
2323
ctx: DiscordMessagePreflightContext,
2424
): SourceReplyDeliveryMode {
2525
// Keep prestart policy keyed to the same source-reply mode as dispatch.

‎extensions/discord/src/monitor/model-picker.state.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,7 @@ function chunkBucketsByCount(sortedItems: string[]): DiscordModelPickerBucket[]
454454
* "bad customId → reset to defaults" semantics already used for other
455455
* state fields.
456456
*/
457-
export function resolveBucket(
457+
function resolveBucket(
458458
buckets: DiscordModelPickerBucket[],
459459
id: string | undefined,
460460
): DiscordModelPickerBucket | null {

‎extensions/discord/src/monitor/native-command-auth.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import type { DiscordConfig } from "./native-command.types.js";
2121
import { resolveDiscordNativeInteractionChannelContext } from "./native-interaction-channel-context.js";
2222
import { resolveDiscordSenderIdentity } from "./sender-identity.js";
2323

24-
export function resolveDiscordNativeCommandAllowlistAccess(params: {
24+
function resolveDiscordNativeCommandAllowlistAccess(params: {
2525
cfg: OpenClawConfig;
2626
accountId?: string | null;
2727
sender: { id: string; name?: string; tag?: string };

‎extensions/discord/src/monitor/provider.deploy-errors.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ export function formatDiscordDeployErrorMessage(err: unknown): string {
187187
return `Discord REST ${operation} was aborted${timingText}`;
188188
}
189189

190-
export function resolveDiscordDeployRateLimitDetails(
190+
function resolveDiscordDeployRateLimitDetails(
191191
err: unknown,
192192
): DiscordDeployRateLimitDetails | undefined {
193193
if (!err || typeof err !== "object") {

‎extensions/discord/src/voice/realtime.ts‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -222,15 +222,15 @@ function isDiscordAgentProxyVoiceMode(mode: DiscordVoiceMode): boolean {
222222
return mode === "agent-proxy";
223223
}
224224

225-
export function resolveDiscordRealtimeInterruptResponseOnInputAudio(params: {
225+
function resolveDiscordRealtimeInterruptResponseOnInputAudio(params: {
226226
realtimeConfig: DiscordRealtimeVoiceConfig;
227227
providerId: string;
228228
}): boolean {
229229
const providerConfig = params.realtimeConfig?.providers?.[params.providerId];
230230
return readProviderConfigBoolean(providerConfig, "interruptResponseOnInputAudio") ?? true;
231231
}
232232

233-
export function resolveDiscordRealtimeBargeIn(params: {
233+
function resolveDiscordRealtimeBargeIn(params: {
234234
realtimeConfig: DiscordRealtimeVoiceConfig;
235235
providerId: string;
236236
}): boolean {
@@ -241,7 +241,7 @@ export function resolveDiscordRealtimeBargeIn(params: {
241241
return resolveDiscordRealtimeInterruptResponseOnInputAudio(params);
242242
}
243243

244-
export function buildDiscordSpeakExactUserMessage(text: string): string {
244+
function buildDiscordSpeakExactUserMessage(text: string): string {
245245
return [
246246
"Internal OpenClaw voice playback result.",
247247
"Do not call openclaw_agent_consult or any other tool for this message.",

‎extensions/feishu/src/bitable.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ type BitableRecordUpdateFields = NonNullable<
2323
NonNullable<BitableRecordUpdatePayload["data"]>["fields"]
2424
>;
2525

26-
export class LarkApiError extends Error {
26+
class LarkApiError extends Error {
2727
readonly code: number;
2828
readonly api: string;
2929
readonly context?: Record<string, unknown>;

‎extensions/feishu/src/doctor.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -544,7 +544,7 @@ function collectRepairSessionEntries(
544544
);
545545
}
546546

547-
export function inspectFeishuDoctorState(params: {
547+
function inspectFeishuDoctorState(params: {
548548
cfg: OpenClawConfig;
549549
env?: NodeJS.ProcessEnv;
550550
}): FeishuDoctorInspection {

‎extensions/feishu/src/media.ts‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ export type SendMediaResult = {
417417
* Upload an image to Feishu and get an image_key for sending.
418418
* Supports: JPEG, PNG, WEBP, GIF, TIFF, BMP, ICO
419419
*/
420-
export async function uploadImageFeishu(params: {
420+
async function uploadImageFeishu(params: {
421421
cfg: ClawdbotConfig;
422422
image: Buffer | string; // Buffer or file path
423423
imageType?: "message" | "avatar";
@@ -470,7 +470,7 @@ export function sanitizeFileNameForUpload(fileName: string): string {
470470
* Upload a file to Feishu and get a file_key for sending.
471471
* Max file size: 30MB
472472
*/
473-
export async function uploadFileFeishu(params: {
473+
async function uploadFileFeishu(params: {
474474
cfg: ClawdbotConfig;
475475
file: Buffer | string; // Buffer or file path
476476
fileName: string;
@@ -514,7 +514,7 @@ export async function uploadFileFeishu(params: {
514514
/**
515515
* Send an image message using an image_key
516516
*/
517-
export async function sendImageFeishu(params: {
517+
async function sendImageFeishu(params: {
518518
cfg: ClawdbotConfig;
519519
to: string;
520520
imageKey: string;
@@ -568,7 +568,7 @@ export async function sendImageFeishu(params: {
568568
/**
569569
* Send a file message using a file_key
570570
*/
571-
export async function sendFileFeishu(params: {
571+
async function sendFileFeishu(params: {
572572
cfg: ClawdbotConfig;
573573
to: string;
574574
fileKey: string;
@@ -625,7 +625,7 @@ export async function sendFileFeishu(params: {
625625
/**
626626
* Helper to detect file type from extension
627627
*/
628-
export function detectFileType(
628+
function detectFileType(
629629
fileName: string,
630630
): "opus" | "mp4" | "pdf" | "doc" | "xls" | "ppt" | "stream" {
631631
const ext = normalizeLowercaseStringOrEmpty(path.extname(fileName));

‎extensions/feishu/src/monitor.state.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ function isServerNotRunningError(error: Error): boolean {
180180
return (error as NodeJS.ErrnoException).code === "ERR_SERVER_NOT_RUNNING";
181181
}
182182

183-
export async function closeFeishuHttpServer(server: http.Server): Promise<void> {
183+
async function closeFeishuHttpServer(server: http.Server): Promise<void> {
184184
await new Promise<void>((resolve, reject) => {
185185
let settled = false;
186186
const settle = (err?: Error) => {

0 commit comments

Comments
 (0)