feat: integrate WeKnora llmwiki knowledge flow
This commit is contained in:
1 parent
a0a75a9964
commit
e0c09f6704
63 files changed
+7045
-197
No files matched your search
@@ -75,7 +75,11 @@ def get_available_tools(
|
||||
List of available tools.
|
||||
"""
|
||||
config = app_config or get_app_config()
|
||||
tool_configs = [tool for tool in config.tools if groups is None or tool.group in groups]
|
||||
selected_tool_configs = [tool for tool in config.tools if groups is None or tool.group in groups]
|
||||
disabled_tool_names = [tool.name for tool in selected_tool_configs if not tool.enabled]
|
||||
if disabled_tool_names:
|
||||
logger.info("Skipping disabled configured tool(s): %s", disabled_tool_names)
|
||||
tool_configs = [tool for tool in selected_tool_configs if tool.enabled]
|
||||
|
||||
browser_context_config = getattr(config, "browser_context", None)
|
||||
if not getattr(browser_context_config, "enabled", False):
|
||||
@@ -154,9 +158,21 @@ def get_available_tools(
|
||||
# read_peer_delivery —— 圆桌席位「按需读取前序席位完整交付」的只读工具(从 run context
|
||||
# 取网关注入的全文,非圆桌场景为空 → 工具自述「无」)。始终提供(只读、无副作用);圆桌
|
||||
# 总控/报告角色由 run policy 显式排除,避免干扰它们。
|
||||
from deerflow.tools.builtins.roundtable_peers_tool import read_peer_delivery_tool
|
||||
|
||||
builtin_tools.append(read_peer_delivery_tool)
|
||||
from deerflow.tools.builtins.roundtable_peers_tool import read_peer_delivery_tool
|
||||
|
||||
builtin_tools.append(read_peer_delivery_tool)
|
||||
|
||||
# Conditional LLMWiki mode: the tool is absent when no effective WeKnora
|
||||
# address is configured, keeping legacy deployments behavior-identical.
|
||||
try:
|
||||
from deerflow.integrations.weknora.runtime import get_resolved_llmwiki_runtime
|
||||
|
||||
if get_resolved_llmwiki_runtime(config).weknora_enabled:
|
||||
from deerflow.tools.builtins.llmwiki_search_tool import llmwiki_search_tool
|
||||
|
||||
builtin_tools.append(llmwiki_search_tool)
|
||||
except Exception: # noqa: BLE001 - configuration/store failures must not block agent creation
|
||||
logger.debug("Failed to evaluate the conditional LLMWiki search tool", exc_info=True)
|
||||
|
||||
# skill_manage 能创建/修改/删除技能,属于"自我进化"写能力,按 skill_evolution.enabled
|
||||
# 门控。该开关用户可在 per-user 配置里覆盖,所以按"生效配置(含 per-user 覆盖)"判断 ——
|
||||
|
||||
Reference in new issue
Block a user