From d5736710a9d898549f644d66bea70ee75c7a8bd4 Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Fri, 1 May 2026 17:12:04 +0100 Subject: [PATCH] refactor: trim telegram helper exports --- extensions/telegram/src/api-logging.ts | 2 +- extensions/telegram/src/approval-callback-data.ts | 2 +- extensions/telegram/src/bot-access.ts | 2 +- extensions/telegram/src/bot-message-context.types.ts | 8 ++++---- .../telegram/src/bot-message-dispatch.media.ts | 2 +- extensions/telegram/src/bot-native-command-menu.ts | 4 ++-- extensions/telegram/src/bot/body-helpers.ts | 2 +- extensions/telegram/src/bot/native-quote.ts | 4 ++-- extensions/telegram/src/bot/reply-threading.ts | 2 +- extensions/telegram/src/bot/types.ts | 2 +- extensions/telegram/src/button-types.ts | 2 +- extensions/telegram/src/error-policy.ts | 2 +- extensions/telegram/src/format.ts | 2 +- extensions/telegram/src/group-access.ts | 8 ++++---- extensions/telegram/src/group-migration.ts | 2 +- extensions/telegram/src/interactive-dispatch.ts | 4 ++-- extensions/telegram/src/lane-delivery-state.ts | 4 ++-- extensions/telegram/src/preview-streaming.ts | 2 +- .../telegram/src/reasoning-lane-coordinator.ts | 4 ++-- extensions/telegram/src/reply-parameters.ts | 4 ++-- extensions/telegram/src/runtime.ts | 1 - extensions/telegram/src/runtime.types.ts | 12 ++++++------ extensions/telegram/src/secret-contract.ts | 3 +-- extensions/telegram/src/sequential-key.ts | 2 +- extensions/telegram/src/setup-core.ts | 2 +- extensions/telegram/src/setup-surface.ts | 3 --- extensions/telegram/src/shared.ts | 2 +- extensions/telegram/src/status-reaction-variants.ts | 2 +- extensions/telegram/src/thread-bindings.ts | 4 ++-- extensions/telegram/src/token.ts | 2 +- extensions/telegram/src/topic-name-cache.ts | 2 +- extensions/telegram/src/voice.ts | 2 +- 32 files changed, 48 insertions(+), 53 deletions(-) diff --git a/extensions/telegram/src/api-logging.ts b/extensions/telegram/src/api-logging.ts index b89165ac963..3a524aa4856 100644 --- a/extensions/telegram/src/api-logging.ts +++ b/extensions/telegram/src/api-logging.ts @@ -2,7 +2,7 @@ import { createSubsystemLogger } from "openclaw/plugin-sdk/runtime-env"; import type { RuntimeEnv } from "openclaw/plugin-sdk/runtime-env"; import { formatErrorMessage } from "openclaw/plugin-sdk/ssrf-runtime"; -export type TelegramApiLogger = (message: string) => void; +type TelegramApiLogger = (message: string) => void; type TelegramApiLoggingParams = { operation: string; diff --git a/extensions/telegram/src/approval-callback-data.ts b/extensions/telegram/src/approval-callback-data.ts index c9809b52d70..71f97a0f400 100644 --- a/extensions/telegram/src/approval-callback-data.ts +++ b/extensions/telegram/src/approval-callback-data.ts @@ -1,4 +1,4 @@ -export const TELEGRAM_CALLBACK_DATA_MAX_BYTES = 64; +const TELEGRAM_CALLBACK_DATA_MAX_BYTES = 64; const TELEGRAM_APPROVE_ALLOW_ALWAYS_PATTERN = /^\/approve(?:@[^\s]+)?\s+[A-Za-z0-9][A-Za-z0-9._:-]*\s+allow-always$/i; diff --git a/extensions/telegram/src/bot-access.ts b/extensions/telegram/src/bot-access.ts index b0f804e8610..c00236f054b 100644 --- a/extensions/telegram/src/bot-access.ts +++ b/extensions/telegram/src/bot-access.ts @@ -14,7 +14,7 @@ export type NormalizedAllowFrom = { invalidEntries: string[]; }; -export type AllowFromMatch = AllowlistMatch<"wildcard" | "id">; +type AllowFromMatch = AllowlistMatch<"wildcard" | "id">; const warnedInvalidEntries = new Set(); const log = createSubsystemLogger("telegram/bot-access"); diff --git a/extensions/telegram/src/bot-message-context.types.ts b/extensions/telegram/src/bot-message-context.types.ts index ee7a9cab87b..dbb500021bd 100644 --- a/extensions/telegram/src/bot-message-context.types.ts +++ b/extensions/telegram/src/bot-message-context.types.ts @@ -27,7 +27,7 @@ export type TelegramLogger = { info: (obj: Record, msg: string) => void; }; -export type ResolveTelegramGroupConfig = ( +type ResolveTelegramGroupConfig = ( chatId: string | number, messageThreadId?: number, ) => { @@ -35,16 +35,16 @@ export type ResolveTelegramGroupConfig = ( topicConfig?: TelegramTopicConfig; }; -export type ResolveGroupActivation = (params: { +type ResolveGroupActivation = (params: { chatId: string | number; agentId?: string; messageThreadId?: number; sessionKey?: string; }) => boolean | undefined; -export type ResolveGroupRequireMention = (chatId: string | number) => boolean; +type ResolveGroupRequireMention = (chatId: string | number) => boolean; -export type TelegramMessageContextRuntimeOverrides = Partial< +type TelegramMessageContextRuntimeOverrides = Partial< Pick< typeof import("./bot-message-context.runtime.js"), | "createStatusReactionController" diff --git a/extensions/telegram/src/bot-message-dispatch.media.ts b/extensions/telegram/src/bot-message-dispatch.media.ts index f9bf4dbb3d1..f8b2acec0d8 100644 --- a/extensions/telegram/src/bot-message-dispatch.media.ts +++ b/extensions/telegram/src/bot-message-dispatch.media.ts @@ -1,4 +1,4 @@ -export type TelegramMediaContextPayload = { +type TelegramMediaContextPayload = { MediaPath?: string; MediaUrl?: string; MediaType?: string; diff --git a/extensions/telegram/src/bot-native-command-menu.ts b/extensions/telegram/src/bot-native-command-menu.ts index 176407826b7..6acae08cac3 100644 --- a/extensions/telegram/src/bot-native-command-menu.ts +++ b/extensions/telegram/src/bot-native-command-menu.ts @@ -6,12 +6,12 @@ import { normalizeOptionalString, readStringValue } from "openclaw/plugin-sdk/te import { withTelegramApiErrorLogging } from "./api-logging.js"; import { normalizeTelegramCommandName, TELEGRAM_COMMAND_NAME_PATTERN } from "./command-config.js"; -export const TELEGRAM_MAX_COMMANDS = 100; +const TELEGRAM_MAX_COMMANDS = 100; export const TELEGRAM_TOTAL_COMMAND_TEXT_BUDGET = 5700; const TELEGRAM_COMMAND_RETRY_RATIO = 0.8; const TELEGRAM_MIN_COMMAND_DESCRIPTION_LENGTH = 1; -export type TelegramMenuCommand = { +type TelegramMenuCommand = { command: string; description: string; }; diff --git a/extensions/telegram/src/bot/body-helpers.ts b/extensions/telegram/src/bot/body-helpers.ts index 0e7baf45ed0..dcfc3ab291d 100644 --- a/extensions/telegram/src/bot/body-helpers.ts +++ b/extensions/telegram/src/bot/body-helpers.ts @@ -19,7 +19,7 @@ type TelegramMediaFileRef = | NonNullable | NonNullable; -export type TelegramPrimaryMedia = { +type TelegramPrimaryMedia = { placeholder: string; fileRef: TelegramMediaFileRef; }; diff --git a/extensions/telegram/src/bot/native-quote.ts b/extensions/telegram/src/bot/native-quote.ts index e98d154e349..1e7a58a2778 100644 --- a/extensions/telegram/src/bot/native-quote.ts +++ b/extensions/telegram/src/bot/native-quote.ts @@ -1,8 +1,8 @@ import type { TelegramTextEntity } from "./body-helpers.js"; -export const TELEGRAM_NATIVE_QUOTE_MAX_LENGTH = 1024; +const TELEGRAM_NATIVE_QUOTE_MAX_LENGTH = 1024; -export type TelegramNativeQuoteCandidate = { +type TelegramNativeQuoteCandidate = { text: string; position?: number; entities?: unknown[]; diff --git a/extensions/telegram/src/bot/reply-threading.ts b/extensions/telegram/src/bot/reply-threading.ts index a65d511cb99..142bb48c695 100644 --- a/extensions/telegram/src/bot/reply-threading.ts +++ b/extensions/telegram/src/bot/reply-threading.ts @@ -21,7 +21,7 @@ export function markReplyApplied(progress: DeliveryProgress, replyToId?: number) } } -export function markDelivered(progress: DeliveryProgress): void { +function markDelivered(progress: DeliveryProgress): void { progress.hasDelivered = true; } diff --git a/extensions/telegram/src/bot/types.ts b/extensions/telegram/src/bot/types.ts index 766c459b396..5903d321cbb 100644 --- a/extensions/telegram/src/bot/types.ts +++ b/extensions/telegram/src/bot/types.ts @@ -3,7 +3,7 @@ import type { ChatFullInfo, Message, UserFromGetMe } from "@grammyjs/types"; /** App-specific stream mode for Telegram stream previews. */ export type TelegramStreamMode = "off" | "partial" | "block"; -export type TelegramGetFile = () => Promise<{ file_path?: string }>; +type TelegramGetFile = () => Promise<{ file_path?: string }>; export type TelegramChatDetails = { id?: number | string; available_reactions?: ChatFullInfo["available_reactions"] | null; diff --git a/extensions/telegram/src/button-types.ts b/extensions/telegram/src/button-types.ts index fd640a4d8fc..0456a6e57ea 100644 --- a/extensions/telegram/src/button-types.ts +++ b/extensions/telegram/src/button-types.ts @@ -8,7 +8,7 @@ import { sanitizeTelegramCallbackData } from "./approval-callback-data.js"; export type TelegramButtonStyle = "danger" | "success" | "primary"; -export type TelegramInlineButton = { +type TelegramInlineButton = { text: string; callback_data: string; style?: TelegramButtonStyle; diff --git a/extensions/telegram/src/error-policy.ts b/extensions/telegram/src/error-policy.ts index fb320a1633f..d1a989ab9f9 100644 --- a/extensions/telegram/src/error-policy.ts +++ b/extensions/telegram/src/error-policy.ts @@ -5,7 +5,7 @@ import type { TelegramTopicConfig, } from "openclaw/plugin-sdk/config-types"; -export type TelegramErrorPolicy = "always" | "once" | "silent"; +type TelegramErrorPolicy = "always" | "once" | "silent"; type TelegramErrorConfig = | TelegramAccountConfig diff --git a/extensions/telegram/src/format.ts b/extensions/telegram/src/format.ts index 0eb092aa6a3..ea5f04c372d 100644 --- a/extensions/telegram/src/format.ts +++ b/extensions/telegram/src/format.ts @@ -10,7 +10,7 @@ import { } from "openclaw/plugin-sdk/text-runtime"; import { renderMarkdownWithMarkers } from "openclaw/plugin-sdk/text-runtime"; -export type TelegramFormattedChunk = { +type TelegramFormattedChunk = { html: string; text: string; }; diff --git a/extensions/telegram/src/group-access.ts b/extensions/telegram/src/group-access.ts index 5ed4fb7c0c9..80b06ddea21 100644 --- a/extensions/telegram/src/group-access.ts +++ b/extensions/telegram/src/group-access.ts @@ -11,12 +11,12 @@ import { resolveOpenProviderRuntimeGroupPolicy } from "openclaw/plugin-sdk/runti import { isSenderAllowed, type NormalizedAllowFrom } from "./bot-access.js"; import { firstDefined } from "./bot-access.js"; -export type TelegramGroupBaseBlockReason = +type TelegramGroupBaseBlockReason = | "group-disabled" | "topic-disabled" | "group-override-unauthorized"; -export type TelegramGroupBaseAccessResult = +type TelegramGroupBaseAccessResult = | { allowed: true } | { allowed: false; reason: TelegramGroupBaseBlockReason }; @@ -91,14 +91,14 @@ export const evaluateTelegramGroupBaseAccess = (params: { return { allowed: true }; }; -export type TelegramGroupPolicyBlockReason = +type TelegramGroupPolicyBlockReason = | "group-policy-disabled" | "group-policy-allowlist-no-sender" | "group-policy-allowlist-empty" | "group-policy-allowlist-unauthorized" | "group-chat-not-allowed"; -export type TelegramGroupPolicyAccessResult = +type TelegramGroupPolicyAccessResult = | { allowed: true; groupPolicy: "open" | "disabled" | "allowlist" } | { allowed: false; diff --git a/extensions/telegram/src/group-migration.ts b/extensions/telegram/src/group-migration.ts index fbdc0f23c89..9dfac226a44 100644 --- a/extensions/telegram/src/group-migration.ts +++ b/extensions/telegram/src/group-migration.ts @@ -7,7 +7,7 @@ type TelegramGroups = Record; type MigrationScope = "account" | "global"; -export type TelegramGroupMigrationResult = { +type TelegramGroupMigrationResult = { migrated: boolean; skippedExisting: boolean; scopes: MigrationScope[]; diff --git a/extensions/telegram/src/interactive-dispatch.ts b/extensions/telegram/src/interactive-dispatch.ts index 9dace75c49f..9749bd16eb6 100644 --- a/extensions/telegram/src/interactive-dispatch.ts +++ b/extensions/telegram/src/interactive-dispatch.ts @@ -7,7 +7,7 @@ import { type PluginInteractiveRegistration, } from "openclaw/plugin-sdk/plugin-runtime"; -export type TelegramInteractiveButtons = Array< +type TelegramInteractiveButtons = Array< Array<{ text: string; callback_data: string; style?: "danger" | "success" | "primary" }> >; @@ -52,7 +52,7 @@ export type TelegramInteractiveHandlerRegistration = PluginInteractiveRegistrati "telegram" >; -export type TelegramInteractiveDispatchContext = Omit< +type TelegramInteractiveDispatchContext = Omit< TelegramInteractiveHandlerContext, | "callback" | "respond" diff --git a/extensions/telegram/src/lane-delivery-state.ts b/extensions/telegram/src/lane-delivery-state.ts index 1761234ecaa..3801cf5da6e 100644 --- a/extensions/telegram/src/lane-delivery-state.ts +++ b/extensions/telegram/src/lane-delivery-state.ts @@ -1,10 +1,10 @@ -export type LaneDeliverySnapshot = { +type LaneDeliverySnapshot = { delivered: boolean; skippedNonSilent: number; failedNonSilent: number; }; -export type LaneDeliveryStateTracker = { +type LaneDeliveryStateTracker = { markDelivered: () => void; markNonSilentSkip: () => void; markNonSilentFailure: () => void; diff --git a/extensions/telegram/src/preview-streaming.ts b/extensions/telegram/src/preview-streaming.ts index d575c7a9492..5bbdfac566f 100644 --- a/extensions/telegram/src/preview-streaming.ts +++ b/extensions/telegram/src/preview-streaming.ts @@ -1,6 +1,6 @@ import { resolveChannelPreviewStreamMode } from "openclaw/plugin-sdk/channel-streaming"; -export type TelegramPreviewStreamMode = "off" | "partial" | "block"; +type TelegramPreviewStreamMode = "off" | "partial" | "block"; export function resolveTelegramPreviewStreamMode( params: { diff --git a/extensions/telegram/src/reasoning-lane-coordinator.ts b/extensions/telegram/src/reasoning-lane-coordinator.ts index 5f4f04ae7ae..447b60dd1d0 100644 --- a/extensions/telegram/src/reasoning-lane-coordinator.ts +++ b/extensions/telegram/src/reasoning-lane-coordinator.ts @@ -57,7 +57,7 @@ function isPartialReasoningTagPrefix(text: string): boolean { return REASONING_TAG_PREFIXES.some((prefix) => prefix.startsWith(trimmed)); } -export type TelegramReasoningSplit = { +type TelegramReasoningSplit = { reasoningText?: string; answerText?: string; }; @@ -90,7 +90,7 @@ export function splitTelegramReasoningText(text?: string): TelegramReasoningSpli return { reasoningText, answerText }; } -export type BufferedFinalAnswer = { +type BufferedFinalAnswer = { payload: ReplyPayload; text: string; }; diff --git a/extensions/telegram/src/reply-parameters.ts b/extensions/telegram/src/reply-parameters.ts index a895e4a70ff..fc9ba8cc887 100644 --- a/extensions/telegram/src/reply-parameters.ts +++ b/extensions/telegram/src/reply-parameters.ts @@ -2,7 +2,7 @@ import type { MessageEntity } from "@grammyjs/types"; import { buildTelegramThreadParams, type TelegramThreadSpec } from "./bot/helpers.js"; import { normalizeTelegramReplyToMessageId } from "./outbound-params.js"; -export type TelegramReplyParameters = { +type TelegramReplyParameters = { message_id: number; allow_sending_without_reply: true; quote?: string; @@ -10,7 +10,7 @@ export type TelegramReplyParameters = { quote_entities?: MessageEntity[]; }; -export type TelegramThreadReplyParams = { +type TelegramThreadReplyParams = { message_thread_id?: number; reply_parameters?: TelegramReplyParameters; reply_to_message_id?: number; diff --git a/extensions/telegram/src/runtime.ts b/extensions/telegram/src/runtime.ts index 265362451c4..694238bebc4 100644 --- a/extensions/telegram/src/runtime.ts +++ b/extensions/telegram/src/runtime.ts @@ -1,5 +1,4 @@ import { createPluginRuntimeStore } from "openclaw/plugin-sdk/runtime-store"; -export type { TelegramRuntime } from "./runtime.types.js"; import type { TelegramRuntime } from "./runtime.types.js"; const { diff --git a/extensions/telegram/src/runtime.types.ts b/extensions/telegram/src/runtime.types.ts index 81d3394bc79..f0cfbb1ff6d 100644 --- a/extensions/telegram/src/runtime.types.ts +++ b/extensions/telegram/src/runtime.types.ts @@ -3,13 +3,13 @@ import type { PluginRuntime } from "openclaw/plugin-sdk/channel-core"; import type { TelegramMonitorFn } from "./monitor.types.js"; export type TelegramProbeFn = typeof import("./probe.js").probeTelegram; -export type TelegramAuditCollectFn = typeof import("./audit.js").collectTelegramUnmentionedGroupIds; -export type TelegramAuditMembershipFn = typeof import("./audit.js").auditTelegramGroupMembership; -export type TelegramSendFn = typeof import("./send.js").sendMessageTelegram; -export type TelegramResolveTokenFn = typeof import("./token.js").resolveTelegramToken; +type TelegramAuditCollectFn = typeof import("./audit.js").collectTelegramUnmentionedGroupIds; +type TelegramAuditMembershipFn = typeof import("./audit.js").auditTelegramGroupMembership; +type TelegramSendFn = typeof import("./send.js").sendMessageTelegram; +type TelegramResolveTokenFn = typeof import("./token.js").resolveTelegramToken; type BasePluginRuntimeChannel = PluginRuntime extends { channel: infer T } ? T : never; -export type TelegramChannelRuntime = { +type TelegramChannelRuntime = { probeTelegram?: TelegramProbeFn; collectTelegramUnmentionedGroupIds?: TelegramAuditCollectFn; auditTelegramGroupMembership?: TelegramAuditMembershipFn; @@ -19,7 +19,7 @@ export type TelegramChannelRuntime = { messageActions?: ChannelMessageActionAdapter; }; -export interface TelegramRuntimeChannel extends BasePluginRuntimeChannel { +interface TelegramRuntimeChannel extends BasePluginRuntimeChannel { telegram?: TelegramChannelRuntime; } diff --git a/extensions/telegram/src/secret-contract.ts b/extensions/telegram/src/secret-contract.ts index da9b4a7903d..a7f3fab292b 100644 --- a/extensions/telegram/src/secret-contract.ts +++ b/extensions/telegram/src/secret-contract.ts @@ -5,7 +5,6 @@ import { hasOwnProperty, type ResolverContext, type SecretDefaults, - type SecretTargetRegistryEntry, } from "openclaw/plugin-sdk/channel-secret-basic-runtime"; function normalizeOptionalString(value: unknown): string | undefined { @@ -61,7 +60,7 @@ export const secretTargetRegistryEntries = [ includeInConfigure: true, includeInAudit: true, }, -] satisfies SecretTargetRegistryEntry[]; +] satisfies import("openclaw/plugin-sdk/channel-secret-basic-runtime").SecretTargetRegistryEntry[]; export function collectRuntimeConfigAssignments(params: { config: { channels?: Record }; diff --git a/extensions/telegram/src/sequential-key.ts b/extensions/telegram/src/sequential-key.ts index 0d78e3c6b4a..fa15b733ad9 100644 --- a/extensions/telegram/src/sequential-key.ts +++ b/extensions/telegram/src/sequential-key.ts @@ -11,7 +11,7 @@ import { } from "openclaw/plugin-sdk/command-primitives-runtime"; import { resolveTelegramForumThreadId } from "./bot/helpers.js"; -export type TelegramSequentialKeyContext = { +type TelegramSequentialKeyContext = { chat?: { id?: number }; me?: UserFromGetMe; message?: Message; diff --git a/extensions/telegram/src/setup-core.ts b/extensions/telegram/src/setup-core.ts index 7dea658a105..ace4893c41d 100644 --- a/extensions/telegram/src/setup-core.ts +++ b/extensions/telegram/src/setup-core.ts @@ -30,7 +30,7 @@ export const TELEGRAM_USER_ID_HELP_LINES = [ "Website: https://openclaw.ai", ]; -export function normalizeTelegramAllowFromInput(raw: string): string { +function normalizeTelegramAllowFromInput(raw: string): string { return raw .trim() .replace(/^(telegram|tg):/i, "") diff --git a/extensions/telegram/src/setup-surface.ts b/extensions/telegram/src/setup-surface.ts index e33075db187..e3ca7633f3a 100644 --- a/extensions/telegram/src/setup-surface.ts +++ b/extensions/telegram/src/setup-surface.ts @@ -15,7 +15,6 @@ import { parseTelegramAllowFromId, TELEGRAM_TOKEN_HELP_LINES, TELEGRAM_USER_ID_HELP_LINES, - telegramSetupAdapter, } from "./setup-core.js"; import { buildTelegramDmAccessWarningLines, @@ -109,5 +108,3 @@ export const telegramSetupWizard: ChannelSetupWizard = { dmPolicy: telegramSetupDmPolicy, disable: (cfg) => setSetupChannelEnabled(cfg, channel, false), }; - -export { parseTelegramAllowFromId, telegramSetupAdapter }; diff --git a/extensions/telegram/src/shared.ts b/extensions/telegram/src/shared.ts index 0d2098fd483..513d642c442 100644 --- a/extensions/telegram/src/shared.ts +++ b/extensions/telegram/src/shared.ts @@ -31,7 +31,7 @@ import { collectRuntimeConfigAssignments, secretTargetRegistryEntries } from "./ import { telegramSecurityAdapter } from "./security.js"; import { namedAccountPromotionKeys, singleAccountKeysToMove } from "./setup-contract.js"; -export const TELEGRAM_CHANNEL = "telegram" as const; +const TELEGRAM_CHANNEL = "telegram" as const; type TelegramConfigAccessorAccount = { config: TelegramAccountConfig; diff --git a/extensions/telegram/src/status-reaction-variants.ts b/extensions/telegram/src/status-reaction-variants.ts index 2074ed40679..b235a73b2e4 100644 --- a/extensions/telegram/src/status-reaction-variants.ts +++ b/extensions/telegram/src/status-reaction-variants.ts @@ -88,7 +88,7 @@ const TELEGRAM_SUPPORTED_REACTION_EMOJIS = new Set( TELEGRAM_SUPPORTED_REACTION_EMOJI_LIST, ); -export const TELEGRAM_STATUS_REACTION_VARIANTS: Record = { +const TELEGRAM_STATUS_REACTION_VARIANTS: Record = { queued: ["👀", "👍", "🔥"], thinking: ["🤔", "🤓", "👀"], tool: ["🔥", "⚡", "👍"], diff --git a/extensions/telegram/src/thread-bindings.ts b/extensions/telegram/src/thread-bindings.ts index 7f02435c7f5..1728d7cf0b5 100644 --- a/extensions/telegram/src/thread-bindings.ts +++ b/extensions/telegram/src/thread-bindings.ts @@ -35,7 +35,7 @@ async function loadTelegramSendModule() { type TelegramBindingTargetKind = "subagent" | "acp"; -export type TelegramThreadBindingRecord = { +type TelegramThreadBindingRecord = { accountId: string; conversationId: string; targetKind: TelegramBindingTargetKind; @@ -55,7 +55,7 @@ type StoredTelegramBindingState = { bindings: TelegramThreadBindingRecord[]; }; -export type TelegramThreadBindingManager = { +type TelegramThreadBindingManager = { accountId: string; shouldPersistMutations: () => boolean; getIdleTimeoutMs: () => number; diff --git a/extensions/telegram/src/token.ts b/extensions/telegram/src/token.ts index a3b54beeaf8..3a546bf2817 100644 --- a/extensions/telegram/src/token.ts +++ b/extensions/telegram/src/token.ts @@ -10,7 +10,7 @@ import { resolveSecretInputString, } from "openclaw/plugin-sdk/secret-input"; -export type TelegramTokenSource = "env" | "tokenFile" | "config" | "none"; +type TelegramTokenSource = "env" | "tokenFile" | "config" | "none"; export type TelegramTokenResolution = BaseTokenResolution & { source: TelegramTokenSource; diff --git a/extensions/telegram/src/topic-name-cache.ts b/extensions/telegram/src/topic-name-cache.ts index 8a9542da20e..319fe1e3df7 100644 --- a/extensions/telegram/src/topic-name-cache.ts +++ b/extensions/telegram/src/topic-name-cache.ts @@ -6,7 +6,7 @@ const MAX_ENTRIES = 2_048; const TOPIC_NAME_CACHE_STATE_KEY = Symbol.for("openclaw.telegramTopicNameCacheState"); const DEFAULT_TOPIC_NAME_CACHE_KEY = "__default__"; -export type TopicEntry = { +type TopicEntry = { name: string; iconColor?: number; iconCustomEmojiId?: string; diff --git a/extensions/telegram/src/voice.ts b/extensions/telegram/src/voice.ts index 5547c48b10b..7e9ce035b1f 100644 --- a/extensions/telegram/src/voice.ts +++ b/extensions/telegram/src/voice.ts @@ -1,6 +1,6 @@ import { isVoiceCompatibleAudio } from "openclaw/plugin-sdk/media-runtime"; -export function resolveTelegramVoiceDecision(opts: { +function resolveTelegramVoiceDecision(opts: { wantsVoice: boolean; contentType?: string | null; fileName?: string | null;