Commit Graph
190 Commits
Author SHA1 Message Date
jxxghp 415335b215 refactor: unify message channel shutdown convergence 2026-08-24 14:08:06 +08:00
jxxghp 009631b8ee refactor: unify capability shutdown convergence 2026-08-24 13:48:11 +08:00
jxxghp ecbd39a0bb fix: isolate telegram typing lifecycle 2026-08-24 08:51:49 +08:00
jxxghp e1230c0277 refactor: unify message ingress forwarding 2026-08-24 03:01:17 +08:00
jxxghp 061a92eab0 refactor: route chat and subtitle settings through runtime 2026-08-23 03:17:40 +08:00
jxxghp 9273d68aa7 feat(telegram): support rich Agent messages 2026-08-22 10:11:18 +08:00
jxxghp 8472bcff43 refactor: 收口 V3 分层架构与插件兼容边界 2026-08-18 13:22:02 +08:00
jxxghp 5128ae9e1e refactor: 推进后端分层架构治理 2026-08-18 00:29:14 +08:00
jxxghp 54f093a099 Merge remote-tracking branch 'origin/v3' into v3
# Conflicts:
#	app/api/endpoints/agent.py
#	app/api/endpoints/anthropic.py
#	app/api/endpoints/openai.py
#	app/chain/__init__.py
#	app/chain/message.py
#	app/chain/site.py
#	app/chain/subscribe.py
#	app/chain/transfer.py
#	app/modules/discord/__init__.py
#	app/modules/qqbot/__init__.py
#	app/modules/slack/__init__.py
#	app/modules/telegram/__init__.py
#	app/modules/wechat/__init__.py
#	app/runtime/extensions/module_manager.py
#	app/runtime/extensions/service_registry.py
#	tests/test_agent_interaction.py
#	tests/test_slash_command_interactions.py
#	tests/test_web_agent_stream.py
2026-08-16 19:44:43 +08:00
jxxghp 240a4dffe6 refactor(schemas): 统一 message/notification 命名边界,旧名收敛至兼容映射表
- notification 域:渠道能力(MessageChannel→NotificationChannel、ChannelCapability* 迁入 notification.py)
- message 域:消息收发(Notification→Message、NotificationType→MessageType、CommingMessage→IncomingMessage、NotificationHistoryItem→MessageHistoryItem、NotificationClear*→MessageClear*)
- Agent 工具契约:send_notification_message→send_message、notification_callback→message_callback
- 源码不保留旧名物理别名,旧导入经 app/runtime/compat/manifest.py SYMBOL_ALIASES 惰性解析
- API 路径与持久化键冻结不变,前端零改动
- 新增兼容守护测试与 docs/rules/07 命名边界规范
2026-08-16 19:32:20 +08:00
jxxghp 7e851dbfa7 refactor(chain): 处理链功能域 mixin 化,清理未使用导入并根治兼容层循环导入
- ChainBase 拆分为 RecognitionMixin/MessageProcessingMixin/NotificationMixin
- TransferChain 拆分为 7 个功能 mixin(_mixins.py),SubscribeChain 音乐订阅域拆出 _music.py
- 斜杠命令交互四件套收敛为 InteractionChainMixin 委托,会话管理器移至 application 层,chain 层不再 re-export
- 模块基础类收敛到 app/modules/_base(notification/mediaserver 语义重命名)
- 清理 app/chain/__init__.py 24 个未使用导入,修正 49 处测试 patch 目标到实际命名空间
- 兼容层 legacy 符号不再并入 __all__,根治 schemas 初始化反向拉起 application.transfer 的循环导入
- 修复 bangumi 集数为字符串时 set_bangumi_info 抛 TypeError
- 新增重复代码等架构门禁测试;capability 清单校验排除下划线内部目录
2026-08-16 16:30:16 +08:00
InfinityPacer 24671f8f18 refactor(runtime): lazily activate host modules (#6331) 2026-08-16 16:07:38 +08:00
jxxghp 96118e73e7 refactor(string): split utilities by responsibility 2026-08-15 08:03:55 +08:00
jxxghp 369d7d6448 refactor: reorganize backend module boundaries 2026-08-14 19:53:33 +08:00
jxxghp 7b3444c366 refactor backend module architecture 2026-08-14 15:45:38 +08:00
jxxghp 87b1caf3ff fix(agent): grant channel owners admin access 2026-08-14 00:01:37 +08:00
InfinityPacer 3aed078bbb fix(agent): bind channel admin identity (#6294) 2026-08-13 14:53:59 +08:00
InfinityPacer 591a1d420d fix(agent): close secret confirmation delivery gaps (#6285) 2026-08-13 08:20:14 +08:00
InfinityPacer 893269f8c1 fix(modules): serialize configuration reload lifecycle (#6122) 2026-07-15 17:28:49 +08:00
InfinityPacer f814c271cc refactor(runtime): tighten resource cleanup and test isolation (#6116) 2026-07-14 16:03:29 +08:00
qqcomeup 8c0afac5d1 feat: support prompt-bound plugin input replies (#6087) 2026-07-09 12:52:22 +08:00
qqcomeup 0fbf05d72f fix: handle Telegram urllib3 header formatter compatibility (#6074) 2026-07-07 19:58:49 +08:00
qqcomeup 827ed8330c feat: add plugin-scoped text input sessions (#6068) 2026-07-07 05:15:18 +08:00
jxxghp 73d5c95f4e Fix Telegram edit fallback 2026-06-29 22:48:13 +08:00
jxxghp f9ea0118d9 Handle Telegramify 1.2 compatibility 2026-06-22 20:16:37 +08:00
jxxghp 683e07a102 Add Telegram parse mode support 2026-06-21 10:20:30 +08:00
InfinityPacer e02cebe16c fix(tests): stabilize messaging shutdown (#5979) 2026-06-21 07:37:47 +08:00
jxxghp 846eed6821 feat: add fallback to caption editing when text edit fails in Telegram bot 2026-06-17 19:45:08 +08:00
jxxghp 6453935584 更新 telegram.py 2026-05-31 22:10:36 +08:00
jxxghp 13b2163788 chore: add noqa for specific lines, update docstring, improve logging and variable naming 2026-05-31 17:49:05 +08:00
jxxghp ec588037a0 fix: restrict message commands to channel admins 2026-05-24 08:00:54 +08:00
jxxghp efdb4d1b28 fix: delay transient typing indicators 2026-05-23 00:41:12 +08:00
jxxghp a74f04a149 fix: simplify message typing lifecycle 2026-05-23 00:11:56 +08:00
jxxghp f7b78721c3 fix: 统一消息 typing 生命周期 2026-05-22 22:59:20 +08:00
jxxghp 2b5528c0ac fix: keep agent typing status while queued 2026-05-22 16:46:25 +08:00
jxxghp b2a18f9ae4 feat(message-processing-status): unified processing status indicator for Telegram, Slack, Discord, Feishu
- Add ChannelCapability.PROCESSING_STATUS and capability detection for supported channels
- Implement mark_message_processing_started/finished in Telegram, Slack, Discord, Feishu modules
  - Telegram: manage typing lifecycle with max duration and explicit stop
  - Slack: add/remove reaction as processing indicator
  - Discord: start/stop typing indicator with async task management
  - Feishu: add/remove reaction for processing status
- Refactor message chain to invoke processing status hooks for supported channels
- Ensure processing status is properly finished on sync and async message handling paths
- Add tests for processing status lifecycle and capability detection across channels
2026-05-15 12:45:41 +08:00
jxxghp 6fb6996d81 fix: ensure stop_streaming waits for inflight initial flush before final edit; improve message edit/delete return types and logging
- Update stop_streaming logic to await inflight initial flush task, preventing duplicate message sends on stream stop
- Change message edit/delete methods to return Optional[bool] for clearer channel mismatch handling
- Refine Feishu logging to include message_id instead of full data object
- Suppress allowed_objects warnings in __init__.py
- Add test to verify stop_streaming waits for inflight flush before final edit
- Update .pylintrc to use 'E' for error enabling
2026-05-13 10:11:31 +08:00
jxxghp d86d24fc4f feat(feishu): enhance message handling with file and voice support, add reaction management 2026-05-13 00:34:03 +08:00
DDSRemandClaude Sonnet 4.6 b172a6d08f fix(telegram): handle caption messages in group chat mention detection (#5761)
* fix(telegram): handle caption messages in group chat @mention detection

Telegram media messages (photos, videos, etc.) store their text in
`message.caption` and mention entities in `message.caption_entities`,
not `message.text` / `message.entities`. The previous code only checked
`message.text`, so commands and @mentions sent with media were silently
skipped with "No text..." in the debug log.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(telegram): use correct entity field pairing and UTF-16 offsets for mention detection

- Explicitly pair message.entities with text messages and caption_entities
  with media messages, avoiding false fallthrough on empty entity lists
- Decode mention text via UTF-16-LE encoding to respect Telegram's UTF-16
  based offset/length values, fixing incorrect slicing when emojis are present

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-12 20:57:31 +08:00
jxxghp 7bc032d17c Revert Telegram duplicate edit fix 2026-04-27 07:36:13 +08:00
jxxghp 2df476dbff Fix Telegram duplicate message edits 2026-04-27 07:17:58 +08:00
jxxghp 8c78627647 feat: add skills marketplace management 2026-04-22 14:55:00 +08:00
jxxghp 13c3c082b8 Improve agent image capability routing 2026-04-15 08:55:32 +08:00
jxxghp 7a5e513f25 feat(agent): support file attachments and local file replies 2026-04-14 15:22:01 +08:00
jxxghp e5f97cd299 feat(agent): add voice message support with TTS/STT for Telegram and WeChat
- Integrate voice message handling: detect and extract audio references from Telegram and WeChat messages, route to agent with voice reply preference.
- Add voice provider abstraction and OpenAI-based TTS/STT implementation.
- Implement agent tool `send_voice_message` for generating and sending voice replies, with fallback to text if voice is unavailable.
- Extend agent prompt and context to support voice reply instructions.
- Update notification and message schemas to support audio fields.
- Add Telegram and WeChat voice sending logic, including audio file conversion and temporary media upload for WeChat.
- Add tests for voice helper and agent voice routing.
2026-04-12 12:30:02 +08:00
jxxghp bf2d2cbd03 Fix Telegram agent image download path 2026-04-11 21:11:03 +08:00
jxxghp edf3946558 Fix forwarded image payload parsing for agent channels 2026-04-11 20:55:14 +08:00
jxxghp 6c5fae56d9 Add agent image support for Telegram and Slack 2026-04-11 20:40:02 +08:00
DDSRemandCursor Agent a4f2c574b0 fix(telegram): pass disable_web_page_preview through edit_message_text
Interactive plugin flows edit existing messages; the flag was only applied
on send_message, so link previews stayed enabled after edits.

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2026-04-11 08:31:15 +08:00
DDSRemandClaude Opus 4.6 c68450fc7f refactor(telegram): 显式传递 disable_web_page_preview 参数避免 @retry 下修改 kwargs
将 disable_web_page_preview 从修改 kwargs 字典改为显式传参给 send_message,
避免在 @retry 重试时因共享 kwargs 字典导致潜在问题。

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-02 08:53:10 +08:00