/** * commands.ts, the standard Telegram bot commands every client offers. * * Telegram's own UI puts `/start` in front of every new user: tapping "Start" * on a bot sends it before any conversation exists. `/help` and `/stop` are the * other two BotFather-documented commands clients surface in the command menu. * * These are ONBOARDING, not work. Routing them through the normal task path * spawns an agent whose task is the literal string "/start", which is what the * adapter used to do, and it is both useless and surprising. They are answered * here instead, after the route binding is established so the reply lands in a * chat the daemon can talk back to. * * `/goodvibes` is deliberately NOT in this set: it is the task prefix, stripped * by extractTelegramTask, and the text after it is real work. */ /** A standard Telegram bot command the adapter answers itself. */ export type TelegramBotCommand = 'start' | 'help' | 'stop'; export interface ParsedTelegramBotCommand { readonly command: TelegramBotCommand; /** Anything after the command, e.g. a `/start ` deep-link value. */ readonly args: string; } /** * Recognise `/start`, `/help`, or `/stop`, with or without the `@botname` * suffix Telegram appends in group chats, and with or without trailing * arguments (`/start` carries a deep-link payload when the user arrives from a * t.me link). Returns null for anything else, including a bare `/` or an * unrelated slash command, which stay on the normal task path. */ export declare function parseTelegramBotCommand(text: string | undefined, botUsername?: string): ParsedTelegramBotCommand | null; /** * The reply text for a standard command. Written to answer the question a new * user actually has, "I pressed Start, now what?", rather than confirming * receipt and leaving them staring at an idle chat. */ export declare function telegramBotCommandReply(command: TelegramBotCommand, options: { readonly botUsername?: string | undefined; readonly isPrivateChat: boolean; }): string; //# sourceMappingURL=commands.d.ts.map