Judges' 402-integrity test says "trigger a machine payment in the chat." Telegram is the canonical surface for that — and chat UI in the browser already works, so this is a parallel surface.
Plan
- `@BotFather` on Telegram → `/newbot` → save the token.
- Set `TELEGRAM_BOT_TOKEN` + `TELEGRAM_CHAT_ID` in `.env`.
- Create `agent/telegram-bot.ts`:
- Long-polling listener via `node-telegram-bot-api` (already in deps).
- On every message, call `runChatTurn(message, perChatHistory)` from agent/llm/loop.ts.
- Stream the reply back to the same chat. Render tool traces as monospace lines if they fired.
- Persist per-chat history keyed by Telegram `chat_id` (use the same JSON store pattern as findings).
- Add `npm run bot` → `tsx agent/telegram-bot.ts`.
- Test by chatting with the bot directly from your phone.
Done when
- Phone → message bot → agent replies in Telegram with tool calls firing
- The "Try to scan example.com" refusal demo works in Telegram too
Why polish, not gate
Dashboard chat already covers the in-chat-payment test. Telegram is the demo-friendly surface (judges chat with the bot on their own phone). High return, low cost.
Judges' 402-integrity test says "trigger a machine payment in the chat." Telegram is the canonical surface for that — and chat UI in the browser already works, so this is a parallel surface.
Plan
Done when
Why polish, not gate
Dashboard chat already covers the in-chat-payment test. Telegram is the demo-friendly surface (judges chat with the bot on their own phone). High return, low cost.