Add a practical Telegram guide covering BotFather setup, private polling,
access and administrator lists, commands, attachments, project/profile
ownership, groups, webhooks, and preservation of existing configurations.
Explain distinct bot accounts per saved scope, inheritance, duplicate-token
recovery, and the limits of connection checks and default project routing.
Link the guide from the main README, documentation index, and plugin
reference. Add four optimized screenshots using neutral unsaved drafts,
with complete dialog frames and comfortable spacing. Record that screenshot
framing requirement in the documentation contracts.
Validation:
- Checked guide links, anchors, and assets alongside the website counterpart.
- Verified UI labels and screenshots against the live Docker instance.
- Confirmed Telegram configuration and activation files stayed unchanged.
- git diff --check passed.
Restore global, project, profile, and project/profile configuration with
one bot identity per saved scope. Preserve inherited configuration and
pause conflicting legacy bot identities without discarding their settings.
Revalidate scope, activation, and access rules for inbound messages,
commands, callbacks, session selection, and outbound delivery. Keep scoped
bots within their owning project/profile, omit credentials from persisted
chat metadata, and sanitize attachment filenames.
Automatically back up existing configuration, activation, and session
mappings before upgrade. Preserve their contents and stable global session
keys, while provisioning secure webhook secrets where legacy settings
require them. Document scope ownership, conflict recovery, and migration.
Validation:
- Docker framework suite: 216 passed, plus 73 subtests.
- Live Telegram status and message/reply round-trip confirmed.
- Missing and forged webhook credentials rejected with HTTP 403.
- Existing live configuration, activation, and session mappings unchanged.
Telegram advertised project/profile settings while its lifecycle and sender
authorization read only global configuration. A saved scoped allowlist or
disable could therefore leave a permissive global bot accepting messages.
Make Telegram configuration and activation explicitly global, preserving
per-user project routing. Enforce manifest scope support before plugin
configuration or activation writes and return HTTP 400 for invalid saves.
Pause Telegram bots and block incoming events whenever legacy scoped
configurations or activation overrides exist. Preserve those files, skip
attachment cleanup, notify the operator, and retain settings UI access for
manual review and removal. Each event must resolve a currently enabled
global bot; removed, renamed, disabled, or globally deactivated bots cannot
fall back to captured settings.
Add regressions for scope rejection without side effects, supported-plugin
scopes, legacy settings shutdown and migration, current allowlists, and
immediate revocation. Update existing administrator tests and owning docs.
Validation: 339 tests and 73 subtests passed in both Conda a0 and Docker's
framework runtime. A before/after reproduction showed an excluded sender
reaching context creation before the fix and being blocked afterward.
Restarted the live runtime and checked HTTP health and Telegram settings UI.
No live Telegram message test was performed.
Accepted Telegram senders could use /permissions and its callbacks to
persistently remove their own tool restrictions. The same access also
exposed instance-wide plugin toggles.
Add a per-bot admin_users allowlist and enforce it when opening settings
and processing every settings callback. Administrators must still pass
allowed_users; an omitted or empty admin_users list grants nobody settings
access. Resolve membership from the current bot configuration on each
event so revocation applies to existing buttons.
Expose the administrator list in the WebUI and document its defaults.
Add regression coverage for message and callback routes, denied writes,
authorized policy persistence, runtime tool decisions, and revocation.
Validation:
- Conda framework: 123 tests and 41 subtests passed.
- Docker framework: 9 focused tests and 41 subtests passed.
- WebUI: administrator field renders, parses entries, and clears correctly.
- JavaScript syntax and git diff checks passed.
- Restarted the bound Docker instance and verified HTTP 200.
Telegram network delivery was not exercised; tests use synthetic events
and disposable policy files without changing live bot access settings.
Resolve built-in, plugin, global, and project slash commands before wrapping Telegram messages, preserving custom overrides and existing integration controls. Add paginated command, plugin, and permission menus, compaction confirmation, transcript export, and fresh-chat session binding.
Generate stable names for unnamed bots, reject duplicate names on save, and restart bots when their connection settings change. Preserve webhook authentication and private-only group controls, and prevent rendered or queued messages from resolving a second slash command.
Validation: 80 tests and 11 webhook subtests passed. Verified command execution and menu rendering in the Docker framework runtime, source/runtime file hashes, HTTP health, and polling with 33 registered commands. Telegram replies were confirmed by the user; direct in-app browser automation was unavailable.
Reject HTTP updates for polling bots and require a matching nonempty webhook secret before aiogram dispatch. Validate webhook secrets during setup and revoke local webhook authorization before removal or polling startup.
Update configuration guidance and the security ledger. Add regression coverage through the real Flask route and aiogram dispatcher, including invalid headers, setup validation, and polling transitions.
Validation: 13 tests and 11 subtests passed in the focused Telegram suite; both new tests also passed in the Docker framework runtime.
Add shared transport-level control commands so Telegram, WhatsApp, and
email threads can manage the active chat directly.
- add a shared integration command helper for /project, /config, /send,
and /queue send
- wire native command handling into Telegram and WhatsApp sessions
- expose Telegram control commands through bot command routing and update
transport docs
- add email thread command handling for existing A0 email conversations
- add an optional per-handler email conversation preset backed by model
presets in the email settings UI and default config
- document the new transport control flow across Telegram, WhatsApp, and
email
- Update default backup path from /a0/tmp/self-update-backups to /root/update-backups in self_update_manager.py, helpers/self_update.py, and documentation
- Move aiogram from global requirements.txt to plugin-local requirements for _telegram_integration
- Add ensure_dependencies() helper that installs aiogram on-demand via uv pip install
- Add has_aiogram() check to avoid