| 13 | export { splitTelegramMessage, TELEGRAM_MAX_MESSAGE } from "./limits"; |
| 14 | |
| 15 | export interface TelegramBridgeOptions { |
| 16 | token: string; |
| 17 | getApprovedUserIds: () => number[]; |
| 18 | coordinator: TurnCoordinator; |
| 19 | getTelegramAgent: (userId: number) => Agent; |
| 20 | onUserMessage?: (event: { turnKey: string; userId: number; content: string }) => void; |
| 21 | onAssistantMessage?: (event: { turnKey: string; userId: number; content: string; done: boolean }) => void; |
| 22 | onToolCalls?: (event: { turnKey: string; userId: number; toolCalls: ToolCall[] }) => void; |
| 23 | onToolResult?: (event: { turnKey: string; userId: number; toolCall: ToolCall; toolResult: ToolResult }) => void; |
| 24 | onError?: (message: string) => void; |
| 25 | } |
| 26 | |
| 27 | export interface TelegramBridgeHandle { |
| 28 | start: () => void; |
nothing calls this directly
no outgoing calls
no test coverage detected