openclaw/src/plugin-sdk/telegram.ts
Bob ea15819ecf
ACP: harden startup and move configured routing behind plugin seams (#48197)
* ACPX: keep plugin-local runtime installs out of dist

* Gateway: harden ACP startup and service PATH

* ACP: reinitialize error-state configured bindings

* ACP: classify pre-turn runtime failures as session init failures

* Plugins: move configured ACP routing behind channel seams

* Telegram tests: align startup probe assertions after rebase

* Discord: harden ACP configured binding recovery

* ACP: recover Discord bindings after stale runtime exits

* ACPX: replace dead sessions during ensure

* Discord: harden ACP binding recovery

* Discord: fix review follow-ups

* ACP bindings: load channel snapshots across workspaces

* ACP bindings: cache snapshot channel plugin resolution

* Experiments: add ACP pluginification holy grail plan

* Experiments: rename ACP pluginification plan doc

* Experiments: drop old ACP pluginification doc path

* ACP: move configured bindings behind plugin services

* Experiments: update bindings capability architecture plan

* Bindings: isolate configured binding routing and targets

* Discord tests: fix runtime env helper path

* Tests: fix channel binding CI regressions

* Tests: normalize ACP workspace assertion on Windows

* Bindings: isolate configured binding registry

* Bindings: finish configured binding cleanup

* Bindings: finish generic cleanup

* Bindings: align runtime approval callbacks

* ACP: delete residual bindings barrel

* Bindings: restore legacy compatibility

* Revert "Bindings: restore legacy compatibility"

This reverts commit ac2ed68fa2426ecc874d68278c71c71ad363fcfe.

* Tests: drop ACP route legacy helper names

* Discord/ACP: fix binding regressions

---------

Co-authored-by: Onur <2453968+osolmaz@users.noreply.github.com>
2026-03-17 17:27:52 +01:00

121 lines
4.5 KiB
TypeScript

export type {
ChannelAccountSnapshot,
ChannelGatewayContext,
ChannelMessageActionAdapter,
ChannelPlugin,
} from "../channels/plugins/types.js";
export type { OpenClawConfig } from "../config/config.js";
export type { PluginRuntime } from "../plugins/runtime/types.js";
export type { OpenClawPluginApi } from "../plugins/types.js";
export type {
TelegramAccountConfig,
TelegramActionConfig,
TelegramNetworkConfig,
} from "../config/types.js";
export type {
ChannelConfiguredBindingProvider,
ChannelConfiguredBindingConversationRef,
ChannelConfiguredBindingMatch,
} from "../channels/plugins/types.adapters.js";
export type { InspectedTelegramAccount } from "../../extensions/telegram/src/account-inspect.js";
export type { ResolvedTelegramAccount } from "../../extensions/telegram/src/accounts.js";
export type { TelegramProbe } from "../../extensions/telegram/src/probe.js";
export type {
TelegramButtonStyle,
TelegramInlineButtons,
} from "../../extensions/telegram/src/button-types.js";
export type { StickerMetadata } from "../../extensions/telegram/src/bot/types.js";
export { emptyPluginConfigSchema } from "../plugins/config-schema.js";
export { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "../routing/session-key.js";
export { parseTelegramTopicConversation } from "../acp/conversation-id.js";
export { formatCliCommand } from "../cli/command-format.js";
export { formatDocsLink } from "../terminal/links.js";
export {
PAIRING_APPROVED_MESSAGE,
applyAccountNameToChannelSection,
buildChannelConfigSchema,
deleteAccountFromConfigSection,
formatPairingApproveHint,
getChatChannelMeta,
migrateBaseNameToDefaultAccount,
setAccountEnabledInConfigSection,
} from "./channel-plugin-common.js";
export { clearAccountEntryFields } from "../channels/plugins/config-helpers.js";
export { resolveTelegramPollVisibility } from "../poll-params.js";
export {
projectCredentialSnapshotFields,
resolveConfiguredFromCredentialStatuses,
} from "../channels/account-snapshot-fields.js";
export {
listTelegramDirectoryGroupsFromConfig,
listTelegramDirectoryPeersFromConfig,
} from "../channels/plugins/directory-config.js";
export {
resolveAllowlistProviderRuntimeGroupPolicy,
resolveDefaultGroupPolicy,
} from "../config/runtime-group-policy.js";
export {
resolveTelegramGroupRequireMention,
resolveTelegramGroupToolPolicy,
} from "../channels/plugins/group-mentions.js";
export { TelegramConfigSchema } from "../config/zod-schema.providers-core.js";
export { buildTokenChannelStatusSummary } from "./status-helpers.js";
export {
createTelegramActionGate,
listTelegramAccountIds,
resolveDefaultTelegramAccountId,
resolveTelegramPollActionGateState,
} from "../../extensions/telegram/src/accounts.js";
export { inspectTelegramAccount } from "../../extensions/telegram/src/account-inspect.js";
export {
looksLikeTelegramTargetId,
normalizeTelegramMessagingTarget,
} from "../../extensions/telegram/src/normalize.js";
export {
parseTelegramReplyToMessageId,
parseTelegramThreadId,
} from "../../extensions/telegram/src/outbound-params.js";
export {
isNumericTelegramUserId,
normalizeTelegramAllowFromEntry,
} from "../../extensions/telegram/src/allow-from.js";
export { fetchTelegramChatId } from "../../extensions/telegram/src/api-fetch.js";
export {
resolveTelegramInlineButtonsScope,
resolveTelegramTargetChatType,
} from "../../extensions/telegram/src/inline-buttons.js";
export { resolveTelegramReactionLevel } from "../../extensions/telegram/src/reaction-level.js";
export {
createForumTopicTelegram,
deleteMessageTelegram,
editForumTopicTelegram,
editMessageTelegram,
reactMessageTelegram,
sendMessageTelegram,
sendPollTelegram,
sendStickerTelegram,
} from "../../extensions/telegram/src/send.js";
export { getCacheStats, searchStickers } from "../../extensions/telegram/src/sticker-cache.js";
export { resolveTelegramToken } from "../../extensions/telegram/src/token.js";
export { telegramMessageActions } from "../../extensions/telegram/src/channel-actions.js";
export { collectTelegramStatusIssues } from "../../extensions/telegram/src/status-issues.js";
export { sendTelegramPayloadMessages } from "../../extensions/telegram/src/outbound-adapter.js";
export {
buildBrowseProvidersButton,
buildModelsKeyboard,
buildProviderKeyboard,
calculateTotalPages,
getModelsPageSize,
type ProviderInfo,
} from "../../extensions/telegram/src/model-buttons.js";
export {
isTelegramExecApprovalApprover,
isTelegramExecApprovalClientEnabled,
} from "../../extensions/telegram/src/exec-approvals.js";