//#region extensions/crypto/src/services/typing-indicator.d.ts /** * Typing Indicator — sends Telegram "typing..." action for the full * duration the agent is thinking/processing. * * Telegram's `sendChatAction` typing indicator expires after ~5 seconds, * so we re-send it every 4.5s on a loop until explicitly stopped. * * Follows the same raw Bot API call pattern as telegram-draft-stream.ts. * No new dependencies — uses guardedFetch. * * Lifecycle: * message_received → start(chatId) * message_sending → stop(chatId) * * Safety: * - Max duration cap (5 minutes) prevents orphaned indicators * - Errors are swallowed (typing indicator is non-critical UX) * - Only activates for Telegram channel */ declare class TypingIndicatorService { private active; private botToken; private tokenResolved; /** Resolve the bot token lazily (only when first needed). */ private getToken; /** * Start the typing indicator for a chat. * Sends `sendChatAction` immediately, then repeats every 4.5s. */ start(chatId: string): void; /** Stop the typing indicator for a chat. */ stop(chatId: string): void; /** Stop all active indicators (for shutdown). */ stopAll(): void; /** Number of chats with active typing indicator (for testing). */ get size(): number; /** Whether a chat has an active indicator (for testing). */ isActive(chatId: string): boolean; /** Send a single sendChatAction typing call. Fire-and-forget. */ private sendTyping; } declare function getTypingIndicator(): TypingIndicatorService; declare function resetTypingIndicator(): void; //#endregion export { getTypingIndicator, resetTypingIndicator }; //# sourceMappingURL=typing-indicator.d.mts.map