type TelegramChatId = string | number;
interface TelegramPhotoSize {
    file_id: string;
}
interface TelegramDocument {
    file_id: string;
    file_name?: string;
    mime_type?: string;
}
interface TelegramAudio {
    file_id: string;
    mime_type?: string;
}
interface TelegramMessage {
    message_id: number;
    chat: {
        id: TelegramChatId;
    };
    text?: string;
    caption?: string;
    photo?: TelegramPhotoSize[];
    document?: TelegramDocument;
    voice?: TelegramAudio;
    audio?: TelegramAudio;
}
interface TelegramSendOptions {
    parse_mode?: 'Markdown' | 'HTML';
}
interface TelegramEditOptions {
    chat_id: TelegramChatId;
    message_id: number;
}
type TelegramMessageHandler = (message: TelegramMessage) => void | Promise<void>;
type TelegramErrorHandler = (error: Error) => void;
export declare class TelegramBot {
    private readonly token;
    private readonly apiBase;
    private readonly fileBase;
    private messageHandler;
    private pollingErrorHandler;
    private stopped;
    private offset;
    private abortController;
    constructor(token: string, options?: {
        polling?: boolean;
    });
    on(event: 'message', handler: TelegramMessageHandler): void;
    on(event: 'polling_error', handler: TelegramErrorHandler): void;
    sendMessage(chatId: TelegramChatId, text: string, options?: TelegramSendOptions): Promise<TelegramMessage>;
    sendChatAction(chatId: TelegramChatId, action: 'typing'): Promise<void>;
    getFileLink(fileId: string): Promise<string>;
    editMessageText(text: string, options: TelegramEditOptions): Promise<void>;
    deleteMessage(chatId: TelegramChatId, messageId: number): Promise<void>;
    stopPolling(): void;
    private poll;
    private call;
    private emitPollingError;
}
export declare function startTelegramBot(token: string, serverUrl: string, allowedChatIds?: string[]): TelegramBot | null;
export declare function buildTelegramEmptyModelResponse(input: {
    toolCalls: number;
    toolNames: string[];
    toolSummaries: string[];
    errors: string[];
    doneReason: string;
}): string;
export declare function normalizeTelegramChatText(text: string): string;
export declare function summarizeTelegramToolResult(name: string, success: boolean, output: unknown): string;
/**
 * Send a notification to all known Telegram chat IDs.
 * Used by the automation scheduler and autonomy runner.
 */
export declare function sendTelegramNotification(title: string, body: string): Promise<number>;
export declare function getKnownTelegramChatIds(): string[];
export declare function getTelegramPollingLockInfo(projectDir?: string): {
    path: string;
    pid: number | null;
    active: boolean;
    ownedByCurrentProcess: boolean;
};
export declare function loadPersistedChatIds(projectDir: string): Promise<void>;
export declare function stopTelegramBot(): void;
export declare function isTelegramBotRunning(): boolean;
export {};
//# sourceMappingURL=telegram.d.ts.map