/** * Telegram Gateway for MAMA Standalone * * Production-hardened Telegram bot integration using grammY: * - 2-stage message dedup (message_id + content signature) * - Group chat filtering (mention/command/reply-to-bot only) * - Sticker receive/send with emotion mapping * - ToolStatusTracker streaming (placeholder → editMessageText) * - Typing indicator, error handling */ import { BaseGateway } from './base-gateway.js'; import type { MessageRouter } from './message-router.js'; /** * Telegram Gateway configuration */ export interface TelegramGatewayConfig { /** Enable Telegram gateway */ enabled: boolean; /** Telegram bot token from @BotFather */ token: string; /** Allowed chat IDs (empty = allow all) */ allowedChats?: string[]; } /** * Telegram Gateway options */ export interface TelegramGatewayOptions { /** Telegram bot token */ token: string; /** Message router for processing messages */ messageRouter: MessageRouter; /** Gateway configuration */ config?: Partial; /** Polling interval in ms (unused with grammY, kept for interface compat) */ pollIntervalMs?: number; } /** * Telegram Gateway class */ export declare class TelegramGateway extends BaseGateway { readonly source: "telegram"; private token; private config; private bot; private botId; private botUsername; private lastError; private lastMessageAt; private recentMessageIds; private recentMessageSignatures; private dedupCleanupTimer; private stickerCache; private stickerSetLoaded; protected get mentionPattern(): RegExp | null; constructor(options: TelegramGatewayOptions); start(): Promise; stop(): Promise; private handleMessage; sendMessage(chatId: string, text: string): Promise; sendFile(chatId: string, filePath: string, caption?: string): Promise; sendImage(chatId: string, imagePath: string, caption?: string): Promise; sendSticker(chatId: string | number, emotion: string): Promise; getLastError(): string | null; getLastMessageAt(): number | undefined; private splitMessage; private loadStickerSet; } //# sourceMappingURL=telegram.d.ts.map