agent-Specialization/server
JOJO e29ccb318e fix(multi-agent): 修复情况2主消息池派发链路
修复多智能体模式下主智能体空闲时收不到子智能体输出推送的一系列 bug:

1. poll_multi_agent_notifications 死锁:原实现先等所有 running 实例
   退出再 drain 消息池,导致 ask_master 在 await 期间永远等不到主对话
   回答。改为池优先:pool 有消息立即派发,不管 running 状态。

2. _dispatch_multi_agent_idle_messages 缺 import:调用
   inject_multi_agent_master_message 但文件顶部从未导入,NameError
   被外层 except 吞掉,task 永远建不起来。

3. dispatch 内调试日志引用 rec 错位:dispatch_ma_idle_sender_user_message
   被放到 create_chat_task 之前,触发 UnboundLocalError,task 同样建不起来。

4. session_data['auto_user_message_payload'] / preceding_user_notices
   payload 漏写 auto_message_type:前端 isMultiAgentMessage() 只认
   auto_message_type.startsWith('multi_agent_'),空字符串走 fallback
   通知渲染。

5. dispatch 第①步重复持久化:对包含 last 的全部消息都调
   inject_multi_agent_master_message 落盘,之后 task 又在 handle_task_with_sender
   再 add_conversation,导致历史里出现两条相同 user 消息(前一条多智能体渲染,
   后一条通知渲染)。前置 N-1 条只持久化一次,最后一条交给后续 task 自己持久化。

6. last 赋值时机错位:last_emit_payload 在 last=parsed_messages[-1] 之前引用,
   UnboundLocalError 再次吃掉后续链路。

7. handle_task_with_sender 多智能体分支漏写 visibility='chat':
   _user_message_ui_defaults('sub_agent') 默认 visibility='compact',
   透传到落盘 metadata 后,前端从后端加载历史时走通知渲染分支。显式
   user_message_metadata['visibility']='chat' 强制走多智能体专用渲染。
2026-07-13 20:05:02 +08:00
..
chat refactor(paths): 统一迁移运行态数据路径到 Astrion 命名空间 2026-07-10 00:35:15 +08:00
status fix(multi-agent): 修复消息渲染、分类、存储与滚动抖动 2026-07-12 23:09:56 +08:00
tasks fix(multi-agent): 修复情况2主消息池派发链路 2026-07-13 20:05:02 +08:00
__init__.py refactor: split web_server into modular architecture 2026-01-22 09:21:53 +08:00
admin.py feat(admin): 管理员密码管理功能,支持搜索用户名/邮箱重置密码 2026-06-10 17:41:21 +08:00
api_auth.py feat: add api admin ui and container status fix 2026-01-25 10:49:52 +08:00
api_v1.py feat: add json-based extensible model registry and dynamic model UI 2026-04-09 20:56:54 +08:00
app_legacy.py fix(multi-agent): 修复消息渲染、分类、存储与滚动抖动 2026-07-12 23:09:56 +08:00
app.py refactor: split web_server into modular architecture 2026-01-22 09:21:53 +08:00
auth_helpers.py fix: persist onboarding prompt status and bump android app to 1.0.20 2026-04-07 20:08:33 +08:00
auth.py feat(docker): support isolated projects in web mode 2026-05-29 19:49:48 +08:00
chat_flow_helpers.py fix(multi-agent): 修复消息渲染、分类、存储与滚动抖动 2026-07-12 23:09:56 +08:00
chat_flow_runner_helpers.py refactor: split terminal and server chat flow modules 2026-03-07 18:38:30 +08:00
chat_flow_runner.py refactor: further split runner and tools mixins 2026-03-07 20:25:58 +08:00
chat_flow_runtime.py refactor: further split runner and tools mixins 2026-03-07 20:25:58 +08:00
chat_flow_stream_loop.py refactor(models): use dynamic api model registry 2026-05-29 00:20:54 +08:00
chat_flow_task_main.py fix(multi-agent): 修复情况2主消息池派发链路 2026-07-13 20:05:02 +08:00
chat_flow_task_runner.py refactor: isolate chat task main pipeline module 2026-03-07 20:32:02 +08:00
chat_flow_task_support.py fix(multi-agent): 修复情况2主消息池派发链路 2026-07-13 20:05:02 +08:00
chat_flow_tool_loop.py fix(multi-agent): 跨事件循环问答、线程安全取消、任务结束汇报格式、工具参数可选 2026-07-12 15:09:16 +08:00
chat_flow.py fix: 修复对话计时器持久化、子智能体工具美化与状态查询,统一后台通知池 2026-06-25 04:16:44 +08:00
context.py fix(multi-agent): 修复消息渲染、分类、存储与滚动抖动 2026-07-12 23:09:56 +08:00
conversation_stats.py feat(memory): refactor proactive memory and conversation recall 2026-05-27 03:09:42 +08:00
conversation.py feat(multi_agent): 提取prompt、恢复任务、优化侧边栏与sleep工具 2026-07-13 14:01:48 +08:00
deep_compression.py fix: 修复对话计时器持久化、子智能体工具美化与状态查询,统一后台通知池 2026-06-25 04:16:44 +08:00
extensions.py refactor: split web_server into modular architecture 2026-01-22 09:21:53 +08:00
files.py feat(input): support file mentions 2026-07-04 22:58:58 +08:00
goal_flow.py fix(ui): refine message visibility and goal approval flow 2026-05-30 16:30:05 +08:00
monitor.py refactor: split web_server into modular architecture 2026-01-22 09:21:53 +08:00
multi_agent.py fix(multi-agent): 修复消息渲染、分类、存储与滚动抖动 2026-07-12 23:09:56 +08:00
security.py feat: add api v1 bearer auth and polling docs 2026-01-24 02:35:07 +08:00
socket_handlers.py fix(multi-agent): 修复消息渲染、分类、存储与滚动抖动 2026-07-12 23:09:56 +08:00
state.py refactor(config): 移除硬编码模型残留,部署级配置外置到 ~/.agents 2026-06-01 16:59:34 +08:00
usage.py refactor: split web_server into modular architecture 2026-01-22 09:21:53 +08:00
utils_common.py refactor(runtime): 运行态数据迁出源码树到 ~/.agents,日志默认关并加轮转,清理实验残留 2026-06-01 13:17:32 +08:00
work_timer.py fix: 修复对话计时器持久化、子智能体工具美化与状态查询,统一后台通知池 2026-06-25 04:16:44 +08:00