| 1 | # Telegram Integration Plugin DOX |
| 2 | |
| 3 | ## Purpose |
| 4 | |
| 5 | - Own Telegram bot integration for Agent Zero with polling, webhook, per-user sessions, and file exchange. |
| 6 | |
| 7 | ## Ownership |
| 8 | |
| 9 | - `helpers/bot_manager.py` owns bot lifecycle. |
| 10 | - `helpers/handler.py` and `helpers/telegram_client.py` own message routing, replies, and Telegram API interaction. |
| 11 | - `helpers/dependencies.py` and `requirements.txt` own framework-runtime dependency bootstrap. |
| 12 | - `api/`, `prompts/`, `extensions/`, `default_config.yaml`, `plugin.yaml`, `README.md`, and `webui/` own tests/webhook endpoints, prompt fragments, hooks, settings, metadata, docs, and UI. |
| 13 | |
| 14 | ## Local Contracts |
| 15 | |
| 16 | - Treat bot tokens, chat IDs, attachments, and user data as sensitive. |
| 17 | - Keep allowed-user, group-mode, project, model, and `/send` controls enforced. |
| 18 | - Install Telegram dependencies into the framework runtime only when required. |
| 19 | - Agent profile picker actions change the top-level chat profile and must |
| 20 | preserve existing subordinate agent profiles. Picker rows and direct matches |
| 21 | use the shared presentation catalog while current status may still report an |
| 22 | existing chat that uses the utility profile. |
| 23 | - Model picker status shows the effective preset; clearing a chat override returns to its scoped preset rather than assuming `Default`. |
| 24 | |
| 25 | ## Work Guidance |
| 26 | |
| 27 | - Coordinate bot lifecycle changes with job-loop hooks and settings reload behavior. |
| 28 | |
| 29 | ## Verification |
| 30 | |
| 31 | - Smoke-test connection checks, polling or webhook delivery, per-user context reuse, attachments, and replies when practical. |
| 32 | |
| 33 | ## Child DOX Index |
| 34 | |
| 35 | No child DOX files. |