export type ReplyEndChoice = "continue" | "stop" export type ReplyEndState = { lastChoice: ReplyEndChoice lastChoiceAt: string sourceMessageId: string sourceCallbackId: string active: boolean } export type ReplyEndStateMap = Record export type NormalizedReplyEndEvent = { choice: ReplyEndChoice conversationId: string sessionKey: string | null sourceMessageId: string sourceCallbackId: string channel: "telegram" timestamp: string } export type TelegramInlineButton = { text: string callback_data: string } export type TelegramInlineKeyboardMarkup = { inline_keyboard: TelegramInlineButton[][] } export type ReplyEndPolicyInput = { state: ReplyEndState | null hasTypedUserFollowup: boolean } export type ReplyEndPolicyDecision = { suppressProactiveContinuation: boolean }