Open-source AI penetration testing tool to find and fix your app’s vulnerabilities.
Python agentsai-hackingai-penetration-testingai-pentestingai-securityartificial-intelligencebug-bountycode-qualityctf-toolscybersecuritycybersecurity-toolsethical-hackinghackingllm-securityoffensive-securitypenetration-testingpentesting-toolsred-teamingsecuritysecurity-automation
Fix sandbox tool error wrapper
0xallama61b5a02c55d
diff --git a/strix/agents/factory.py b/strix/agents/factory.pyindex fdb44ba8..83a09b3b 100644--- a/strix/agents/factory.py+++ b/strix/agents/factory.py@@ -17,7 +17,6 @@ runtime skill-loading tool.from __future__ import annotations-import copyimport inspectimport jsonimport logging@@ -120,8 +119,7 @@ def _format_tool_error(exc: Exception) -> str:def _function_tool_with_error_result(tool: FunctionTool) -> FunctionTool:- safe_tool = copy.copy(tool)- invoke_tool = safe_tool.on_invoke_tool+ invoke_tool = tool.on_invoke_toolasync def invoke(ctx: Any, raw_input: str) -> Any:try:@@ -130,8 +128,8 @@ def _function_tool_with_error_result(tool: FunctionTool) -> FunctionTool:logger.debug("Tool %s failed; returning error as result", tool.name, exc_info=True)return _format_tool_error(exc)- safe_tool.on_invoke_tool = invoke- return safe_tool+ tool.on_invoke_tool = invoke+ return tooldef _custom_tool_as_function_tool(tool: CustomTool) -> FunctionTool: