Commit graph

53 commits

Author SHA1 Message Date
Alessandro
395ef8dd33 integrations: add native chat controls and email config presets
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
2026-04-11 18:49:13 +02:00
Alessandro
2000ba74a3 ui: redesign email, Telegram, and WhatsApp settings
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
2026-04-11 01:40:24 +02:00
frdel
80518f22a6 Squashed commit of the following:
commit 5193ef7501
Author: frdel <38891707+frdel@users.noreply.github.com>
Date:   Tue Mar 31 09:47:02 2026 +0200

    refactor: change default mode from dedicated to self-chat and reorder UI settings

    - Change default mode to self-chat across all modules
    - Update README to reflect self-chat as primary mode with security warning
    - Move session/media storage from usr/whatsapp to tmp/whatsapp
    - Reorder config UI: move Mode above Allowed Numbers
    - Add warning banner when allowed_numbers is empty in self-chat mode
    - Move Bridge Port and Poll Interval to bottom of settings
    - Update mode descriptions to clarify self-chat handles both self

commit 9fece911b5
Author: frdel <38891707+frdel@users.noreply.github.com>
Date:   Tue Mar 31 09:20:35 2026 +0200

    refactor: centralize WhatsApp storage paths and improve bridge dependency handling

    - Add storage_paths.py helper for consistent session/media/runtime paths
    - Replace hardcoded usr/whatsapp paths across all modules
    - Fix bridge lock to be event-loop-aware (recreate per loop)
    - Add automatic dependency reinstall on startup failures
    - Track bridge startup output for better error diagnostics
    - Add dependency state tracking with package.json hash validation
    - Implement force reinstall when node_modules appears

commit bc511d221d
Author: linuztx <linuztx@gmail.com>
Date:   Tue Mar 31 09:07:46 2026 +0800

    fix: stop poll loop immediately when Node.js is not installed

commit a9554e132f
Author: linuztx <linuztx@gmail.com>
Date:   Tue Mar 31 08:49:15 2026 +0800

    fix: auto-reinstall corrupt node_modules and stop poll loop after repeated bridge failures

    _ensure_npm_install now verifies key package exists, not just
    node_modules dir. Wipes and reinstalls if corrupt.

    Poll loop stops after 5 consecutive bridge start failures instead
    of spamming errors and making A0 unusable.

commit 61fa1bf487
Author: linuztx <linuztx@gmail.com>
Date:   Tue Mar 31 08:38:51 2026 +0800

    fix: move allowed_numbers filtering from JS bridge to Python handler

    The JS bridge used LIDs (internal WhatsApp identifiers) for sender
    matching which never matched actual phone numbers. Moved filtering
    to Python handler.py where config is read fresh each poll cycle.

    - Add senderNumber (resolved phone) to bridge message payload
    - Filter in poll_messages() with normalized number comparison
    - Remove --allowed-numbers CLI arg and JS-side filtering
    - Fix ensure_bridge_http_up not recording _bridge_config
    - Fix falsy empty-dict check in bridge restart detection

commit 64ee177897
Author: linuztx <linuztx@gmail.com>
Date:   Sat Mar 28 23:34:23 2026 +0800

    refactor: move email agent instructions to system prompt and update prompt labels

commit 0f53b41d80
Author: linuztx <linuztx@gmail.com>
Date:   Sat Mar 28 10:59:44 2026 +0800

    Add node_modules to gitignore

commit eb6a4d3ad2
Author: linuztx <linuztx@gmail.com>
Date:   Sat Mar 28 10:53:59 2026 +0800

    Add WhatsApp plugin thumbnail

commit 39bed4f538
Author: linuztx <linuztx@gmail.com>
Date:   Sat Mar 28 10:51:47 2026 +0800

    refactor: rename allowed_users to allowed_numbers across plugin

commit e4991b6e6e
Author: linuztx <linuztx@gmail.com>
Date:   Fri Mar 27 21:58:29 2026 +0800

    improve: move agent instructions from per-message to system prompt

commit 4f1be15fa7
Author: linuztx <linuztx@gmail.com>
Date:   Fri Mar 27 21:00:25 2026 +0800

    improve: add macOS port kill support and bridge process destructor cleanup

commit f5349753d7
Author: linuztx <linuztx@gmail.com>
Date:   Fri Mar 27 17:09:56 2026 +0800

    improve: remove redundant bridge_manager from execute, rely on poll loop finally

commit 9d9dd4bd7f
Author: linuztx <linuztx@gmail.com>
Date:   Fri Mar 27 14:41:14 2026 +0800

    fix: stop bridge and poll loop when plugin is disabled or toggled off

commit 66b0a7d3e0
Author: linuztx <linuztx@gmail.com>
Date:   Fri Mar 27 11:05:58 2026 +0800

    improve: fix allowed users input, auto-strip + prefix, log ignored messages

commit 938e7b9312
Author: linuztx <linuztx@gmail.com>
Date:   Thu Mar 26 23:26:42 2026 +0800

    improve: add line break to allowed users description

commit 4ef64b9121
Author: linuztx <linuztx@gmail.com>
Date:   Thu Mar 26 22:44:55 2026 +0800

    feat: convert markdown to WhatsApp formatting before sending replies

commit f549b49f44
Author: linuztx <linuztx@gmail.com>
Date:   Thu Mar 26 22:34:56 2026 +0800

    improve: add progress update instructions to system context prompt

commit 66e5d51dcf
Author: linuztx <linuztx@gmail.com>
Date:   Thu Mar 26 22:23:32 2026 +0800

    fix: stop typing indicator on agent error or generation failure

commit 3dd01cd04c
Author: linuztx <linuztx@gmail.com>
Date:   Thu Mar 26 18:31:38 2026 +0800

    improve: persistent typing indicator with poll-based refresh

commit 8d0ec86f15
Author: linuztx <linuztx@gmail.com>
Date:   Thu Mar 26 17:11:25 2026 +0800

    Update README.md

commit e664673c1c
Author: linuztx <linuztx@gmail.com>
Date:   Thu Mar 26 16:05:44 2026 +0800

    feat: add agent prefix to self-chat replies for visual distinction

commit 18c5716d10
Author: linuztx <linuztx@gmail.com>
Date:   Thu Mar 26 15:43:01 2026 +0800

    fix: clear typing indicator after sending reply in self-chat mode

commit 7c653c9d56
Author: linuztx <linuztx@gmail.com>
Date:   Thu Mar 26 14:43:06 2026 +0800

    improve: merge WhatsApp Link and Disconnect into single Account field

commit 57c95e6f13
Author: linuztx <linuztx@gmail.com>
Date:   Thu Mar 26 14:11:05 2026 +0800

    feat: add disconnect account option to switch WhatsApp accounts

commit c62695356e
Author: linuztx <linuztx@gmail.com>
Date:   Thu Mar 26 14:00:00 2026 +0800

    improve: move mode description inline and reorder Allow Group after Allowed Users

commit 18a56ea446
Author: linuztx <linuztx@gmail.com>
Date:   Thu Mar 26 13:44:17 2026 +0800

    fix: remove duplicate typing indicator before sending reply

commit 44c90a118f
Author: linuztx <linuztx@gmail.com>
Date:   Thu Mar 26 13:30:06 2026 +0800

    improve: remove sender number from DM prompt

commit 64fe7d0302
Author: linuztx <linuztx@gmail.com>
Date:   Thu Mar 26 13:17:29 2026 +0800

    fix: handle documentWithCaptionMessage wrapper for captioned documents

commit 00b6657185
Author: linuztx <linuztx@gmail.com>
Date:   Thu Mar 26 13:06:40 2026 +0800

    feat: add attachment reader/writer with RFC and download all media types

commit 8041c085d2
Author: linuztx <linuztx@gmail.com>
Date:   Thu Mar 26 11:45:17 2026 +0800

    improve: update group prompt and reply instructions

commit 71a6eb7557
Author: linuztx <linuztx@gmail.com>
Date:   Thu Mar 26 11:26:36 2026 +0800

    feat: reply to specific messages in group chats with quote

commit 6bf63eb9c6
Author: linuztx <linuztx@gmail.com>
Date:   Thu Mar 26 09:57:34 2026 +0800

    feat: detect replies to bot messages in group chats

commit b4492e0759
Author: linuztx <linuztx@gmail.com>
Date:   Thu Mar 26 09:20:27 2026 +0800

    improve: resolve group names and sender LIDs in bridge messages

commit 14e673f165
Author: linuztx <linuztx@gmail.com>
Date:   Thu Mar 26 04:44:50 2026 +0800

    feat: add allow_group toggle to respond only when mentioned in group chats

commit 40f4884319
Author: linuztx <linuztx@gmail.com>
Date:   Thu Mar 26 03:20:02 2026 +0800

    refactor: rename mode value from bot to dedicated

commit 50af7c2bde
Author: linuztx <linuztx@gmail.com>
Date:   Thu Mar 26 02:34:51 2026 +0800

    fix: kill orphaned bridge process on port before starting new one

commit 45b21c093a
Author: linuztx <linuztx@gmail.com>
Date:   Thu Mar 26 02:07:45 2026 +0800

    improve: auto-restart bridge when config changes

commit a12183ba6e
Author: linuztx <linuztx@gmail.com>
Date:   Thu Mar 26 01:39:55 2026 +0800

    feat: add bot and self-chat mode selection for WhatsApp bridge

commit bb8961ab73
Author: linuztx <linuztx@gmail.com>
Date:   Thu Mar 26 00:56:56 2026 +0800

    improve: send typing indicator immediately on message receive

commit 84c12b0c23
Author: linuztx <linuztx@gmail.com>
Date:   Thu Mar 26 00:29:04 2026 +0800

    feat: add WhatsApp integration plugin with Baileys bridge and QR pairing
2026-03-31 09:47:25 +02:00
keyboardstaff
1bd5bc01d6 refactor(chat_branching): ID-based log ↔ history linking for precise branch trimming 2026-03-24 03:04:09 -07:00
linuztx
8fcb778159 fix: prevent empty project override in UI and sync project state on routes 2026-03-23 21:34:28 +08:00
linuztx
820928260c fix(email): reference attachments before text parts and remove unused import 2026-03-23 18:28:42 +08:00
linuztx
67a07e4b96 fix: preserve inline and positional attachments when parsing multipart emails 2026-03-23 14:01:31 +08:00
linuztx
bdb0ed042b fix(email): suppress ui notifications for incoming emails 2026-03-23 13:24:42 +08:00
linuztx
42487055f3 fix(email): use RFC to save inbound attachments into execution runtime 2026-03-23 13:03:37 +08:00
linuztx
85a9e988c2 improve(email): format agent markdown responses as styled HTML emails 2026-03-23 09:54:15 +08:00
frdel
7e1d9ad2a4 refactor: migrate extension system to use deep directory paths based on module and qualname
- Change @extensible decorator to generate extension paths from full module and qualname hierarchies instead of flattened names
- Update extension path format from `{module}_{qualname}_{start|end}` to `_functions/<module>/<qualname>/{start|end}`
- Move all extension files to new deep directory structure under `_functions/` to match new path format
- Replace PathSpec.from_lines(GitWildMatchPattern, ...) with PathSpec.from_lines
2026-03-22 21:48:01 +01:00
frdel
fd3b5253c7 refactor: normalize plugin paths, add README viewer to plugin info modal, and update plugin hub filters
- Normalize plugin paths using files.normalize_a0_path in get_enhanced_plugins_list
- Add collapsible README section to plugin info modal with loading/error states
- Implement loadPluginReadme function to fetch and render plugin documentation
- Update plugin hub pagination from 20 to 24 items per page
- Change popular filter threshold from >0 to >=3 stars
- Add comprehensive README styling with support
2026-03-22 08:05:32 +01:00
frdel
227f2738bb generated logos for builtin plugins 2026-03-19 17:35:03 +01:00
linuztx
46e5127dc3 Merge branch 'development' into email-plugin-improve 2026-03-18 21:00:36 +08:00
linuztx
be2587e815 improve: test connection send test email to self after auth passes 2026-03-18 20:00:58 +08:00
linuztx
5e4b6d3d96 Update plugin.yaml 2026-03-18 19:08:31 +08:00
linuztx
66e107a14c improve: email system prompts 2026-03-18 16:38:24 +08:00
linuztx
4fcd3c3115 improve: email system prompts 2026-03-18 14:38:27 +08:00
linuztx
f2b8ae44a9 fix: maintain full references chain for thread grouping and append quoted previous message 2026-03-18 13:55:38 +08:00
linuztx
f840b8489d fix: reuse background context instead of AgentContext.first() 2026-03-18 00:08:06 +08:00
linuztx
c1119c9d93 fix: prevent sender whitelist spoofing by matching only the parsed email address 2026-03-17 23:51:44 +08:00
linuztx
e8aaba1223 improve: reduce progress email frequency and clarify recipient address 2026-03-17 23:50:10 +08:00
linuztx
9e86275db5 fix: skip self-sent emails to prevent infinite reply loop 2026-03-17 22:43:15 +08:00
linuztx
d91fb6c666 improve: email config UI use project dropdown, toggle, trash icon with confirm, standard button styles 2026-03-17 22:40:57 +08:00
frdel
4b6cc7e2e0 refactor: improve email whitelist matching with proper email extraction
- Extract email address from sender string in `_matches_whitelist`
- Add `_extract_email_from_sender` helper function to handle various sender formats
- Prioritize email in angle brackets to prevent display name spoofing
- Support formats: plain email, "Name <email>", and quoted display names
- Add regex validation for extracted email addresses
- Fallback to original sender string if no valid email found
2026-03-17 10:58:33 +01:00
linuztx
489a8634f1 refactor: remove _read_fw helper, add ChatSummary TypedDict to dispatcher 2026-03-17 02:58:48 +08:00
linuztx
4765c4350b Update plugin.yaml 2026-03-17 00:59:55 +08:00
linuztx
2d2e82ea25 feat: add dispatcher_model setting to choose utility or chat model for email routing 2026-03-17 00:46:02 +08:00
linuztx
ca97b3f72e improve: email config UI add field descriptions and default placeholders 2026-03-17 00:05:10 +08:00
linuztx
1d58eda8ba fix: reset email poll state on process_unread_days config change 2026-03-16 23:54:52 +08:00
linuztx
0eb6b3b4f3 feat: add process_unread_days setting to email handler 2026-03-16 23:50:05 +08:00
linuztx
c5ba82c861 improve: email system prompts 2026-03-16 19:22:29 +08:00
linuztx
62c4d1a35c improve: dispatcher system prompt 2026-03-16 17:01:36 +08:00
linuztx
25a7a25973 refactor: replace email_update tool with response break_loop param 2026-03-16 16:16:47 +08:00
linuztx
d7bf561648 fix: use background context for dispatcher to avoid creating visible chat 2026-03-16 13:56:15 +08:00
linuztx
bde7062650 fix: add 30s timeout to SMTP connections to prevent indefinite blocking 2026-03-16 11:51:41 +08:00
linuztx
3d9f5a846b fix: test connection authenticates only, no email sent to avoid agent self-reply loop 2026-03-16 11:30:58 +08:00
linuztx
96cc2cd198 feat: add test connection button in config UI, restyle add handler button 2026-03-16 11:24:41 +08:00
linuztx
1277c257aa improve: consistent notification titles, & include dispatcher decision reason 2026-03-16 10:46:37 +08:00
linuztx
2b6eb19600 feat(email): send UI notifications on email receive 2026-03-16 10:28:47 +08:00
linuztx
8596eaf6fe fix: cap send retries to prevent infinite loop on persistent SMTP failures 2026-03-16 09:13:52 +08:00
linuztx
3dcffe662c improve: propagate send errors back to agent for retry on SMTP failures 2026-03-16 09:08:32 +08:00
linuztx
4ebb5f472c feat(email): add email_update tool for sending progress emails without ending agent loop 2026-03-15 23:54:11 +08:00
linuztx
3868c85aee refactor: remove intervene_soft/hard dispatch actions, simplify to new_chat and continue 2026-03-15 23:21:02 +08:00
linuztx
1aa1190de1 improve(email): extract body preview func and remove thread_id from dispatcher prompt 2026-03-15 22:22:48 +08:00
linuztx
22e4ad911f improve: include compressed conversation history in dispatcher context 2026-03-15 22:08:59 +08:00
linuztx
2211c4c14f fix(email): prevent orphaned poll tasks and replace deprecated utcnow in cron scheduling 2026-03-15 18:58:19 +08:00
linuztx
c6435b450f fix(email): persist session metadata across restarts by removing underscore key prefix 2026-03-15 18:03:28 +08:00
linuztx
6ab8680bf8 feat(email): add file attachment support for email replies via RFC 2026-03-15 14:49:37 +08:00
linuztx
a3821fbec0 fix(email): prevent email reply prompt from injecting into non-email chats 2026-03-15 13:19:51 +08:00