feat(tasks): add skill-templated task graph execution

This commit is contained in:
2026-06-23 10:22:58 +08:00
parent 6843d89b2c
commit 53b13e8eac
53 changed files with 4773 additions and 756 deletions

View File

@ -37,6 +37,14 @@ class ToolExecutor:
) -> ToolResult:
"""按工具名执行一次调用。"""
allowed = context.metadata.get("allowed_tool_names") if context is not None else None
if isinstance(allowed, list) and tool_name not in allowed:
return ToolResult(
success=False,
content=f"Tool {tool_name} is not allowed for this node.",
tool_name=tool_name,
error="tool_not_allowed",
)
tool = self.registry.get(tool_name)
if tool is None:
return ToolResult(