/** * In-thread configuration slash commands for the threaded session surface. * * Replies are thread-native now (the old `/answer …` command is * removed), but the user can still adjust per-surface behaviour from inside a * session thread with small slash commands: * * - `/verbose` switch the mirror to per-turn assistant text + tool summaries + reasoning summaries * - `/lean` settled assistant answer at idle + immediate ask lead-ins (no intermediate tool-turn flood) * - `/verbosity lean|verbose` * - `/redact on|off` toggle redaction of streamed content * * This parser is pure so the command grammar is unit-testable; the daemon maps * the returned change onto a `config_command` frame / settings update. */ /** A parsed in-thread configuration change. */ export interface ConfigCommandChange { verbosity?: "lean" | "verbose"; redact?: boolean; } export type TelegramControlCommandName = "reasoning" | "usage" | "context" | "compact" | "model"; export type TelegramControlCommand = { name: "reasoning"; action: "cycle" | "status" | "set" | "show" | "hide"; level?: string; global?: boolean; } | { name: "usage"; } | { name: "context"; } | { name: "compact"; instructions?: string; } | { name: "model"; action: "list" | "set"; selector?: string; }; export type TelegramControlCommandParseResult = { kind: "none"; } | { kind: "ignored"; commandName: TelegramControlCommandName; } | { kind: "command"; command: TelegramControlCommand; } | { kind: "invalid"; commandName: TelegramControlCommandName; usage: string; }; export declare function telegramControlCommandUsage(commandName: TelegramControlCommandName): string; /** Parse deterministic Telegram session-control commands. Recognised roots fail closed. */ export declare function parseTelegramControlCommand(text: string, botUsername?: string): TelegramControlCommandParseResult; /** * Parse an in-thread config command. Returns the requested change, or * `undefined` when the text is not a recognised config command (so the daemon * can fall through to treating it as a free-text injection). */ export declare function parseInThreadConfigCommand(text: string): ConfigCommandChange | undefined; /** * Parse a `/rich on|off` toggle. Returns `true`/`false` for a recognised * on/off argument, or `undefined` otherwise (not a `/rich` command, or `/rich` * with a missing/invalid argument). This is intentionally SEPARATE from * `parseInThreadConfigCommand`: `/verbose`/`/redact` are producer/session config * forwarded over the WS, whereas rich is Telegram-daemon delivery policy handled * daemon-locally, so it never becomes a `config_command` frame or a user turn. */ export declare function parseRichToggleCommand(text: string): boolean | undefined; /** * Parse a `/toolactivity on|off` toggle for Telegram tool-activity delivery. * * This is daemon-local delivery policy rather than a host-session config * command, so it works without a connected session and persists globally. * Addressed commands are accepted only for the exact current bot username. */ export declare function parseToolActivityToggleCommand(text: string, botUsername?: string): boolean | undefined;