chiguyong
b3f7159fcd
refactor: remove Any from core/ + experts/ type signatures (185 sites)
...
Test / backend-test (pull_request) Has been cancelled
Details
Test / frontend-unit (pull_request) Has been cancelled
Details
Test / api-e2e (pull_request) Has been cancelled
Details
Test / frontend-e2e (pull_request) Has been cancelled
Details
- core/ 105 sites: react.py(34), rewoo.py(30), config_driven.py(14), middleware.py(10), base.py(7), plan_executor.py(8), fallback.py(2)
- experts/ 80 sites: plan.py(15), _phase_executor.py(11), orchestrator.py(11), _debate_runner.py(9), config.py(9), board_orchestrator.py(6), _synthesizer.py(5), board.py(5), _review_gate.py(3), _rollback_handler.py(2), _divergence_detector.py(2), team.py(2)
- Strategy: object > TYPE_CHECKING Protocol > TYPE_CHECKING import
- No recursive TypeAlias (Pydantic v2 RecursionError)
Tests: 1139 passed, 0 regressions
ruff: 0 new errors
2026-07-01 03:39:54 +08:00
chiguyong
ef84e3fd53
feat(experts): add SharedWorkspace state offloading for long-horizon runs
...
U4: ExpertTeam accepts redis_client, passes to SharedWorkspace. After phase
completion, full result is written to workspace and in-memory phase.result
is replaced with a 500-char summary + _ref_key. Dependency output reading
resolves offloaded content from workspace on demand, with graceful fallback
to summary on read failure.
Tests: 8 scenarios (offload creation, short content, dependency resolution,
workspace failure fallback, non-offloaded passthrough, redis_client wiring,
memory dict fallback, pipeline integration) — all pass.
2026-06-24 20:32:10 +08:00
chiguyong
c831e925b6
feat(experts): U4 用户干预通道 + 手动辩论触发
...
建立 @team 执行期间的用户干预通道,支持 /stop、/debate <topic>、
普通文本追加上下文。
ExpertTeam (src/agentkit/experts/team.py):
- 新增 _interventions: asyncio.Queue (maxsize=64) 干预队列
- add_user_intervention(msg): 广播 + 入队
- consume_user_interventions(): 排空并返回待处理干预
- broadcast_user_message 现在同时入队干预队列
TeamOrchestrator (src/agentkit/experts/orchestrator.py):
- 新增 _user_context: list[str] 累积普通文本干预
- 新增 _process_interventions(lead, plan) 在每层执行前调用:
* /stop → 终止执行,广播 plan_update(stopped_by_user)
* /debate <topic> → 动态插入 DEBATE phase(受 MAX_DEBATES 限制)
* 普通文本 → 累积到 _user_context
- _synthesize_results 将 _user_context 追加到 synthesis prompt
WS 路由 (src/agentkit/server/routes/chat.py):
- 模块级 _active_teams dict 跟踪每个 session 的活跃团队
- _execute_team_collab 执行前注册、finally 注销
- WS 消息循环:若 session 有活跃团队,message 路由为干预而非新任务
- 新增 team_intervention_ack 确认消息
测试:tests/unit/experts/test_team_intervention.py(20 测试),
覆盖队列基础、/stop、/debate、普通文本、混合消息、synthesis 影响。
同步更新 test_orchestrator_debate.py 的干预通道兼容性测试
(U4 已实现 consume_user_interventions)。
全部 418 experts 测试 + 325 server 测试通过。
2026-06-24 12:17:09 +08:00
chiguyong
0f8ea6e21e
feat(experts):重写 TeamOrchestrator 为流水线模式 + TeamStatus.PLANNING
2026-06-18 01:39:22 +08:00
chiguyong
bbedfff597
feat: hub-and-spoke experts, tiered tool injection, unified event model (U3/U7/U10)
2026-06-17 10:46:16 +08:00
chiguyong
64d62a2b60
feat: autonomous task execution - connect PlanExecEngine + TeamOrchestrator
...
U1: TeamOrchestrator._execute_phase real execution (Expert.agent.execute)
U2: LLM-based merge strategies (BEST/VOTE/FUSION) with fallback
U3: ReActStepExecutor replacing _LLMStepAgent for tool-enabled steps
U4: SharedWorkspace integration for cross-phase/cross-execution state
U5: GoalPlanner prompt tuning with few-shot and verb pattern matching
U6: Replan-before-fallback in TeamOrchestrator
U7: End-to-end validation tests for multi-step research tasks
U8: WebSocket progress events (step_event_callback + new event types)
Code review fixes: P0 response.strip fix, P1 competitor status check,
milestone real impl, VOTE self-bias fix, confirmation_handler wiring,
ExpertTeam public API, DRY _build_result_summaries, replan tests
Also: geo_server.py refactor (ServerConfig.from_yaml), delete llm_config.yaml
2026-06-15 12:41:32 +08:00
chiguyong
7384ecb03e
feat: Expert Team Mode — plan-execute collaboration with conversation UI
...
Implements B+C hybrid Expert Team Mode with ExpertConfig, CollaborationPlan,
TeamOrchestrator, ExpertTeamRouter, HandoffTransport, SharedWorkspace, and
Expert wrapper. Frontend includes ExpertTeamView, ExpertMessage,
PlanVisualization, team store, and WS event handlers.
Code review fixes: sentinel-based close, per-phase retry, name validation,
Vue component integration, teamState dedup, Redis reset, plan reassign,
event_type validation, hmac timing-safe compare, message dedup,
reactive updatePhases, O(1) phase lookup, iterative DFS, bounded Queue.
232 unit tests passing.
2026-06-14 22:20:14 +08:00