/** * Leaper Agent – Send-Message Tool (tools/send-message.ts) * * Cross-channel messaging: Telegram Bot API, Discord webhooks, Slack webhooks. * Translates Python tools/send_message_tool.py. * Uses proxyFetch() (available in Node 18+) with exponential-backoff retry. */ export type Platform = 'telegram' | 'discord' | 'slack'; export interface SendOptions { /** 'markdown' | 'html' – Telegram only; Discord/Slack use their own markup. */ parseMode?: 'markdown' | 'html'; /** Local file path to attach as media. */ mediaPath?: string; /** Thread ID (Discord threads) or Telegram message thread ID for forum topics. */ threadId?: string; } export interface SendResult { success: boolean; platform: string; messageId?: string; error?: string; } export interface ChannelInfo { platform: Platform; chatId: string; name: string; threadId?: string; } /** * Execute fn with exponential-backoff retry. * Retries on any thrown error or on HTTP 429/502/503/504 responses. */ export declare function withRetry(fn: () => Promise, maxAttempts?: number, baseDelayMs?: number): Promise; /** Replace credential-like query params and JSON fields with ***. */ export declare function sanitizeErrorText(text: string): string; /** * Parse a target string into {platform, chatId, threadId?}. * * Accepted formats: * "telegram:-1001234567890" * "telegram:-1001234567890:17585" (with thread/topic ID) * "discord:#general" * "slack:#channel-name" */ export declare function parseTarget(target: string): { platform: Platform; chatId: string; threadId?: string; } | null; /** * Return the list of channels configured via environment variables. */ export declare function listChannels(): ChannelInfo[]; /** * Send a message to any supported platform. */ export declare function sendMessage(platform: Platform, chatId: string, message: string, opts?: SendOptions): Promise; //# sourceMappingURL=send-message.d.ts.map