feat: expose graph orchestration mode, fix pipeline multi-agent, add Feishu tools (Phase 3)

增强编排 + 飞书深度集成:
- Graph 模式:暴露 orchestrator._graph() 到 run() 方法,workflow_integration 支持 graph nodes/edges
- Pipeline 修复:多 Agent 按步骤轮转分配,不再只用 agents[0]
- 4个飞书操作工具: feishu_create_doc / feishu_create_calendar_event / feishu_search_contacts / feishu_send_approval
- 飞书 @mention→Goal:feishu/ orange WS handler 支持 "目标: xxx" 触发自动创建 Goal

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
renjianbo
2026-05-08 20:08:26 +08:00
parent 926ec6c0a1
commit d0b55f2b16
6 changed files with 490 additions and 27 deletions

View File

@@ -8,7 +8,7 @@ logger = logging.getLogger(__name__)
_registered = False
_EXPECTED_BUILTIN = 47
_EXPECTED_BUILTIN = 51
def ensure_builtin_tools_registered() -> None:
@@ -65,6 +65,10 @@ def ensure_builtin_tools_registered() -> None:
main_agent_assign_task,
main_agent_check_progress,
main_agent_notify_user,
feishu_create_doc_tool,
feishu_create_calendar_event_tool,
feishu_search_contacts_tool,
feishu_send_approval_tool,
HTTP_REQUEST_SCHEMA,
FILE_READ_SCHEMA,
FILE_WRITE_SCHEMA,
@@ -112,6 +116,10 @@ def ensure_builtin_tools_registered() -> None:
MAIN_AGENT_ASSIGN_TASK_SCHEMA,
MAIN_AGENT_CHECK_PROGRESS_SCHEMA,
MAIN_AGENT_NOTIFY_USER_SCHEMA,
FEISHU_CREATE_DOC_SCHEMA,
FEISHU_CREATE_CALENDAR_EVENT_SCHEMA,
FEISHU_SEARCH_CONTACTS_SCHEMA,
FEISHU_SEND_APPROVAL_SCHEMA,
)
tool_registry.register_builtin_tool("http_request", http_request_tool, HTTP_REQUEST_SCHEMA)
@@ -161,6 +169,10 @@ def ensure_builtin_tools_registered() -> None:
tool_registry.register_builtin_tool("assign_task", main_agent_assign_task, MAIN_AGENT_ASSIGN_TASK_SCHEMA)
tool_registry.register_builtin_tool("check_progress", main_agent_check_progress, MAIN_AGENT_CHECK_PROGRESS_SCHEMA)
tool_registry.register_builtin_tool("notify_user", main_agent_notify_user, MAIN_AGENT_NOTIFY_USER_SCHEMA)
tool_registry.register_builtin_tool("feishu_create_doc", feishu_create_doc_tool, FEISHU_CREATE_DOC_SCHEMA)
tool_registry.register_builtin_tool("feishu_create_calendar_event", feishu_create_calendar_event_tool, FEISHU_CREATE_CALENDAR_EVENT_SCHEMA)
tool_registry.register_builtin_tool("feishu_search_contacts", feishu_search_contacts_tool, FEISHU_SEARCH_CONTACTS_SCHEMA)
tool_registry.register_builtin_tool("feishu_send_approval", feishu_send_approval_tool, FEISHU_SEND_APPROVAL_SCHEMA)
_registered = True
n = tool_registry.builtin_tool_count()