feat: add 灵犀 Feishu bot + fix agent schedule system + default all tools

- Add 灵犀学习助手 Feishu bot (lingxi_app_service + lingxi_ws_handler)
- Fix agent_schedule_service missing AgentSchedule import (Celery Beat)
- Fix scene_templates default enable_tools=False → True
- Fix workflow_engine LLM node: empty tools list now = all tools (consistent with agent node)
- Add 创建agent.md guide document

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
renjianbo
2026-05-03 00:20:29 +08:00
parent d3a00ebae5
commit 1c83b6284f
8 changed files with 564 additions and 12 deletions

View File

@@ -1825,23 +1825,20 @@ class WorkflowEngine:
# 如果启用了工具,加载工具定义
tools = []
if enable_tools and tools_config:
if enable_tools:
from app.services.tool_registry import tool_registry
# 从注册表加载工具定义
tools = tool_registry.get_tools_by_names(tools_config)
logger.info(f"[rjb] LLM节点启用工具调用: {len(tools)} 个工具, 工具列表: {tools_config}")
if tools_config:
tools = tool_registry.get_tools_by_names(tools_config)
else:
# 空列表 = 全部工具(与 Agent 节点行为一致)
tools = tool_registry.get_all_tool_schemas()
logger.info(f"[rjb] LLM节点启用工具调用: {len(tools)} 个工具, 工具列表: {tools_config or '全部'}")
if not tools:
logger.warning(
"[rjb] LLM 已 enable_tools 但当前进程 tool_registry 中 0 个匹配 schema"
"将无法发起 function calling常见于 Celery Worker 未加载 tools_bootstrap。配置=%s",
tools_config,
)
elif len(tools) < len(tools_config):
missing = [n for n in tools_config if not tool_registry.get_tool_schema(n)]
logger.warning(
"[rjb] LLM 工具部分缺失 schema缺失=%s(可动手能力不完整)",
missing,
)
# 调用LLM服务
try: