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.
Reuse the context-aware command catalog across messaging integrations and resolve WhatsApp commands before adding message envelopes. Preserve custom overrides, attachments, and once-only execution.
Add text menus, tool permissions, plugin settings, confirmed compaction, transcript exports, and persistent chat selection scoped to the originating conversation.
Validation: 57 focused Python tests and 2 WhatsApp bridge tests passed. Live WhatsApp command checks were confirmed by the user.
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.
Ignore initialization calls without a configuration object, matching Email. Prevent the initial Config load from trying to add a bot before settings are available.
Remove the redundant Open dashboard and its unused status endpoint, store and dashboard tests. Retain scoped bot configuration and connection checks in Config.
Enable project and agent-profile scoped configuration, add a token-native status page, and replace the custom advanced panel with the shared accordion.
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.
Render API keys, access tokens, client secrets, and similar non-password credentials as masked text inputs so browsers do not offer to save them as passwords. Preserve readable placeholders and reveal controls while leaving genuine password fields unchanged.
Centralize omission of the internal default profile in the shared presentation catalog and keep status reporting intact for existing chats. Align Settings, model-switcher, Connector, Telegram, and selector contracts with focused regressions.
Introduce the x-icon custom element and migrate first-party WebUI and bundled plugin markup while retaining legacy Material icon compatibility. Defer icon-font readiness until the splash-installed document is parsed so Firefox does not leave icons transparent. Centralize chat message collapse handling, avoid false Show More controls on short user messages, and align grouped-message pagination styling. Update DOX and add regression coverage for the icon and collapse behavior.
Make model presets a single global collection and treat presets as reusable setups (main, utility, embedding). Persisted scope configs now store only a preset name (Default is always present and immutable); project-scoped preset definitions were removed and attempts to edit/reset project presets are rejected. Add embedding-model support throughout: include embedding slot in presets, surface embedding in the switcher and override APIs, and notify extensions when the effective embedding model changes. Implement rename/retire propagation to update plugin configs, saved chats, and live AgentContext objects when preset names change or presets are removed. Update CLI/integration commands to use an "inherit" action for returning to the scoped preset and to report the effective scoped-or-chat preset. Add startup migration/bootstrap to initialize presets from remote or bundled fallback and numerous docs/UI text updates to reflect the new preset model. Extra: refactor config resolution helpers and add safety checks (validation, atomic writes) when saving presets.
Validate call_subordinate profile arguments against available agent profiles so missing profiles fail as repairable errors. Persist each agent's profile in saved chats and avoid flattening existing subordinate profiles during profile switches, settings refresh, or restart reload.
Make Telegram tool lifecycle hooks no-op for contexts that do not expose a raw data dict or do not carry the Telegram bot marker.
This keeps global tool extension dispatch safe for non-Telegram contexts, including Responses API tool-call regression tests, without changing behavior for real Telegram sessions.
Add comprehensive file-level DOX documentation across the repo and update directory AGENTS.md indexes. Many new `*.py.dox.md` files were added under api, helpers, tools, plugins, extensions, webui, and other dirs to document endpoint purpose, ownership, runtime contracts, work guidance, and verification. Several AGENTS.md files were created or updated (agents profiles, api, docker, extensions, helpers, plugins, skills, webui components, etc.) to list child DOX files and clarify documentation/work guidance. Also add example and bundled profile DOX files (agent0, default, developer, hacker, researcher) and minor updates to helpers/dirty_json.py and its tests. These changes improve on-disk documentation coverage and establish the convention that each direct runtime file should have a matching `*.dox.md` describing its contracts and verification steps.
Align integration config UX/saving behavior and project binding.
- Telegram integration: keep Save available when appropriate in the wizard footer
so config changes (including deleting bots) can be persisted reliably.
- WhatsApp integration: fix project dropdown binding by using normalized
key/value helpers (supports both `key/label` and `name/title` payloads) and
showing project labels correctly.
- Mirror both fixes into the runtime plugin copy under agentdocker so the
running container gets the update immediately.
This resolves user-reported integration setup issues and restores expected
save/delete behavior.
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
Redesign the three messaging integration panels with a clearer, more guided
setup flow and polished user experience.
- simplify the email panel by surfacing the essentials first, moving
advanced scheduling behind Advanced, and making connection checks more
visible
- redesign Telegram and WhatsApp as step-based setup flows with clearer
status states, safer access warnings, richer test feedback, and more
responsive layouts
- add shared plugin-settings wizard footer support, extract WhatsApp state
into its own store, and align test-connection messages with the new UX
ux: ease Email connector setup and refresh copy
- Redesign the Email connector settings around a guided first-run flow with a clearer empty state, provider presets, and much friendlier copy
- Move server, routing, and scheduling power-user controls into an `Advanced` section while keeping the existing config model compatible
- Improve connection-test messaging, add Exchange inbound validation, and refresh the dashboard Email card copy while keeping the card visible
- Verify the updated setup flow in the browser on desktop and mobile
update and simplify x-data based on established frontend patterns
Update 10_discovery_cards.py
further polishing and first-draft no-click model for email and telegram
update whatsapp
Update telegram-config-store.js
- 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
- Fix group @mention with attachments being silently dropped: filter now checks caption / caption_entities for media messages
- Fix typing indicator cancelled prematurely on inline updates (break_loop=false): typing and reply_to cleanup moved to process_chain_end's finally block
- Fix same user's group and private chat interfering with each other: _map_key now includes chat_id for per-chat context isolation
- Refactor _make_handler to use direct function references instead of string-based getattr
- Group reply matching: Bot quotes user's message when user replies to bot in groups; normal send for @mentions or private chats
- System prompt formatting guidance: Added formatting rules block guiding the agent to use Telegram-compatible Markdown subset (no tables/HR/deep nesting)
- md_to_telegram_html refactor: Simplified table handling (strip pipes vs complex bullet-list conversion), added ~~~ tilde fence support, ***bold italic*** support, strip trailing newlines from code blocks
- handler.py: Added handle_new_members() to send customized greetings (supports {name} placeholder, skips bots).
- bot_manager.py: Registered new handler using NEW_CHAT_MEMBERS filter.
- _10_telegram_bot.py: Integrated _wrap_new_members to ensure the bot uses the latest configuration.
- config.html: Added Welcome New Members toggle and Welcome Message input (conditional visibility based on Group Mode).
- telegram-config-store.js & default_config.yaml: Added default state (false) and documentation.
- handler.py: Cleaned up. All functions and imports are now actively used.
- _enqueue_user_message: Refactored to handle both messages and callback queries, eliminating duplicate building logic.
- _20_telegram_context.py: Now the single source of truth for injecting agent_instructions and system_context_reply.
- File Cleanup: Deleted unused fw.telegram.system_context.md and fw.telegram.cleared.md.
- fix: Corrected bot invocation logic within group chats.
- Replaced :value reactive binding on Allowed Users and User→Project Mapping inputs with x-effect and focus guard, ensuring Alpine.js rerenders don't clear user-typed values while editing.
- Enhanced setUserProjects() to preserve incomplete entries (e.g., 123=), preventing accidental data loss.
- Refactored Default Project <select> persistence: replaced x-model with a x-effect + @change one-way binding, fixing value resets before option loading completes.
- Removed standalone aiohttp HTTP server for webhook mode; switched to Agent Zero's built-in API handler at /api/plugins/_telegram_integration/webhook.
- Added a new unauthenticated POST handler (api/webhook.py) that receives Telegram updates and feeds them to aiogram's Dispatcher.
- Webhook URLs are auto-constructed from the base URL and API path—no additional port or reverse proxy configuration required.
- Added webhook_secret verification in the API handler for improved security.
- bot.delete_webhook() is now called before starting polling mode to prevent TelegramConflictError races.
- Improved bot lifecycle: detects active webhook mode via webhook_active flag to avoid restart loops on each job_loop tick.
- Removed unused aiohttp/SimpleRequestHandler code.