/** * Where the Telegram bot token lives, and how the two halves are read back. * * Deliberately separate from `telegramApproval.ts`, which stays free of I/O so * the parts that decide whether a stranger may approve your commands can be * tested without a keychain, a config file, or a network. * * The token goes in the OS keychain — it *is* the bot, and anyone holding it can * send messages as you. The chat id is ordinary config: it names a conversation * and is useless on its own. */ import type { TelegramCredentials } from './telegramApproval.js'; export declare function setTelegramToken(token: string): Promise; export declare function clearTelegramToken(): Promise; export declare function hasTelegramToken(): Promise; /** * Both halves, or nothing. * * Returns null when the feature is off or either half is missing. Half- * configured must behave exactly like off: a token with no chat id would send * the question nowhere, and a chat id with no token cannot send at all — and * both would otherwise stall a run waiting for an answer that was never asked. */ export declare function loadTelegramCredentials(): Promise; /** * The same pair, for the inbox, behind its own switch. * * Not folded into the call above: someone can want the phone to be told a run * finished without wanting the phone to be able to start one, and the reverse. * One flag serving both would make turning either off turn both off. */ export declare function loadTelegramInboxCredentials(): Promise;