import type { OpenClawConfig, ReplyToMode } from "agdi/plugin-sdk/config-runtime"; import { type RuntimeEnv } from "agdi/plugin-sdk/runtime-env"; import { type TelegramBotDeps } from "./bot-deps.js"; import { apiThrottler, Bot, sequentialize } from "./bot.runtime.js"; import { type TelegramTransport } from "./fetch.js"; import { getTelegramSequentialKey } from "./sequential-key.js"; export type TelegramBotOptions = { token: string; accountId?: string; runtime?: RuntimeEnv; requireMention?: boolean; allowFrom?: Array; groupAllowFrom?: Array; mediaMaxMb?: number; replyToMode?: ReplyToMode; proxyFetch?: typeof fetch; config?: OpenClawConfig; /** Signal to abort in-flight Telegram API fetch requests (e.g. getUpdates) on shutdown. */ fetchAbortSignal?: AbortSignal; updateOffset?: { lastUpdateId?: number | null; onUpdateId?: (updateId: number) => void | Promise; }; testTimings?: { mediaGroupFlushMs?: number; textFragmentGapMs?: number; }; /** Pre-resolved Telegram transport to reuse across bot instances. If not provided, creates a new one. */ telegramTransport?: TelegramTransport; telegramDeps?: TelegramBotDeps; }; export { getTelegramSequentialKey }; type TelegramBotRuntime = { Bot: typeof Bot; sequentialize: typeof sequentialize; apiThrottler: typeof apiThrottler; }; export declare function setTelegramBotRuntimeForTest(runtime?: TelegramBotRuntime): void; export declare function createTelegramBot(opts: TelegramBotOptions): Bot>;