added sandbox and bash tool

This commit is contained in:
2026-02-20 20:00:52 -07:00
parent 8b62f946ca
commit 93ce413c9b
10 changed files with 419 additions and 11 deletions
+27
View File
@@ -0,0 +1,27 @@
from tools.bash import bash
TOOL_SCHEMAS = [
{
"name": "bash",
"description": "Execute a bash command in the isolated sandbox environment. Use this to run shell commands, install packages, run scripts, etc.",
"input_schema": {
"type": "object",
"properties": {
"command": {
"type": "string",
"description": "The bash command to execute (e.g., 'ls -la', 'python script.py', 'pip install requests')",
}
},
"required": ["command"],
},
}
]
async def dispatch_tool(tool_name: str, tool_input: dict, sandbox) -> str:
"""Route tool calls to implementations."""
if tool_name == "bash":
return await bash(command=tool_input["command"], sandbox=sandbox)
return f"Unknown tool: {tool_name}"