feat(tasks): add skill-templated task graph execution
This commit is contained in:
@ -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(
|
||||
|
||||
Reference in New Issue
Block a user