interactive-bot
Interactive Bot
Gmail Commander Telegram bot — slash commands for email access + AI-powered free-text routing. This skill explains what the bot does and where its code lives; operating the running bot is covered by bot-process-control.
Self-Evolving Skill: This skill improves through use. If instructions are wrong, parameters drifted, or a workaround was needed — fix this file immediately, don't defer. Only update for real, reproducible issues.
Where it runs
The bot runs in a private Restate tenant on an always-on Mac mini. The tenant imports buildBot() from scripts/bot.ts, owns its own durable Telegram getUpdates chain, and feeds each update into the returned grammY bot through bot.handleUpdate(). There is no workstation daemon; the laptop launchd job was retired on 2026-09-24.
Do not start scripts/bot.ts directly with the production bot token to "test" it. Telegram allows one getUpdates consumer per token, so a second poller breaks the deployed bot with 409 Conflict. Test against a separate bot token, or exercise the code by importing buildBot().