Commit Graph
43 Commits
Author SHA1 Message Date
jxxghp 473c0588cc fix: retain agent streaming flush owners 2026-08-24 10:39:11 +08:00
jxxghp 371383f0a8 refactor: unify host threadpool boundary 2026-08-24 03:28:10 +08:00
jxxghp 508bf0bc38 fix(ci): restore lint and architecture gates 2026-08-22 10:23:18 +08:00
jxxghp 9273d68aa7 feat(telegram): support rich Agent messages 2026-08-22 10:11:18 +08:00
jxxghp 5128ae9e1e refactor: 推进后端分层架构治理 2026-08-18 00:29:14 +08:00
jxxghp d7e610e656 feat(agent): 新增 apply_patch 多文件补丁编辑工具
参考 Codex apply_patch 设计,支持单次调用对多个文本文件执行新增、
更新和删除:补丁以 *** Begin Patch / *** End Patch 包裹,Update 段
用 @@ 分隔 hunk,上下文行须与当前内容精确一致;先整体校验全部文件
操作,通过后才逐个原子写盘,并以校验期 sha256 防止并发修改。

- 工具描述与系统提示词明确 apply_patch / edit_file / write_file 分工:
  跨多文件或增删文件用 apply_patch,单文件单处替换用 edit_file
- 注册进工具工厂与 ALWAYS_INCLUDE 列表,加入策略 inventory 与
  MCP 隐藏列表,流式回调归类为 file_write
- 同步 create-moviepilot-plugin / publish-moviepilot-plugin /
  create-moviepilot-skill 技能的 allowed-tools 与版本
- 新增 tests/test_agent_apply_patch.py 覆盖解析、多文件应用、
  整体拒绝、权限边界与版本冲突场景
2026-08-17 08:01:59 +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 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
InfinityPacer 010899f369 feat(agent): add host policy foundation (#6273) 2026-08-12 10:48:14 +08:00
jxxghp 027330f714 fix: disable notification history saving for agent messages 2026-06-28 15:25:52 +08:00
jxxghp 78ddd6093f Improve streaming tool summary counts 2026-06-21 18:49:27 +08:00
jxxghp c89df496a5 feat(agent): add ToolTag-based tags to all agent tools; implement tags.py for unified tool capability tagging 2026-05-31 18:30:39 +08:00
jxxghp 9076acc52e feat: add managed agent command sessions 2026-05-18 20:17:59 +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 19526146c5 docs: update docstrings for message metadata and reply fields; fix markdown capability check in format instructions; improve streaming card update logic in Feishu 2026-05-13 08:36:27 +08:00
jxxghp fa939dfbe6 fix(agent): reply Feishu agent streams with cards 2026-05-13 06:56:03 +08:00
jxxghp 77aa65bfdc fix(agent): route streaming finalization through channel modules 2026-05-13 00:50:53 +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
jxxghp 2375508616 Restore background dispatch without channel context 2026-04-30 07:04:59 +08:00
jxxghp baebd0ed1a Fix background prompt message leakage 2026-04-30 06:58:43 +08:00
jxxghp 54d6c2ad4a 更新 __init__.py 2026-04-29 15:27:37 +08:00
jxxghp 7fc496cf5b 更新 __init__.py 2026-04-29 07:31:52 +08:00
jxxghp 8789f35228 Improve non-verbose agent tool summaries 2026-04-29 07:07:33 +08:00
jxxghp 6a6bcf59a0 增强 execute_command 工具:支持输出截断、并发限制与进程组清理,新增单元测试 2026-04-27 10:05:25 +08:00
jxxghp 140d224a9a fix agent stream blocking during command execution
Offload synchronous message edits from the event loop and stream subprocess output so long-running commands stay responsive.
2026-04-27 07:57:32 +08:00
jxxghp 4208c79d72 refine tool提示语为更简洁风格,补充last_buffer_char属性及非VERBOSE模式流式输出换行逻辑,新增工具流式分隔符单元测试 2026-04-26 11:15:11 +08:00
jxxghp 75fca971d4 refactor(agent): 重命名 can_edit_message 为 is_auto_flushing 更贴切语义 2026-04-09 23:29:29 +08:00
jxxghp 22f3244bf5 fix(agent): 流式+啰嗦模式下渠道不支持编辑时立即发送工具消息
渠道不支持编辑时没有定时刷新任务,emit 到 buffer 的内容不会被推送。
新增 can_edit_message 属性区分两种模式:支持编辑的继续 emit 到 buffer,
不支持编辑的 take 出 agent 文字与工具消息合并独立发送。
2026-04-09 23:26:39 +08:00
jxxghp aafc4b3a39 fix(agent): start_streaming 始终标记流式状态以支持 buffer 收集
渠道不支持消息编辑时,仍需标记 streaming_enabled 为 True,
以便啰嗦模式下工具调用时能通过 is_streaming 进入流式分支
发送 agent 中间文字和工具消息。只是不启动定时刷新任务。
2026-04-09 23:19:34 +08:00
jxxghp 8960620883 更新 __init__.py 2026-04-04 07:29:41 +08:00
jxxghp f70eaf9363 feat(agent): 添加reset方法支持流式消息原地更新 2026-03-28 23:08:06 +08:00
jxxghp 4b4b808b76 feat: 流式输出消息超长时自动分段发送,消息长度限制纳入渠道能力管理 2026-03-26 01:56:11 +08:00
jxxghp e6e50d7f0a fix: 修复Agent流式输出时回复消息未记录到数据库的问题 2026-03-25 07:01:17 +08:00
jxxghp 17373bc0fe fix: 优化Agent消息排版 2026-03-24 20:21:58 +08:00
jxxghp 40c79b249b 更新 __init__.py 2026-03-23 22:35:08 +08:00
jxxghp b2f6ffddee Merge remote-tracking branch 'origin/v2' into v2 2026-03-23 19:52:34 +08:00
jxxghp c85805b15d feat(agent): Telegram与Agent相互时支持流式输出 2026-03-23 19:52:26 +08:00
jxxghp 63bbec5db4 更新 __init__.py 2026-03-23 19:18:25 +08:00
jxxghp 4bc67dc816 feat(agent): Telegram与Agent相互时支持流式输出 2026-03-23 19:13:51 +08:00
jxxghp ea4e0dd764 feat(agent): upgrade langchain to v1.0+ 2026-03-22 21:07:45 +08:00
jxxghp 1641d432dd feat: 为工具管理器添加参数类型规范化处理,并基于渠道能力动态生成提示词中的格式要求 2026-01-15 20:55:35 +08:00
jxxghp 8016a9539a fix agent 2025-11-01 19:08:05 +08:00