Tool for executing shell commands.
More...
Tool for executing shell commands.
Definition at line 85 of file bash.cpp.
◆ ExecuteTool()
Construct from tool definition with server ref.
- Parameters
-
| def | Tool definition loaded from JSON. |
| server | Owning BashServer reference. |
Definition at line 94 of file bash.cpp.
◆ execute()
| ServerResponse entropic::ExecuteTool::execute |
( |
const std::string & |
args_json | ) |
|
|
overridevirtual |
Execute a shell command.
- Parameters
-
| args_json | JSON with "command" and optional "working_dir". |
- Returns
- ServerResponse with stdout/stderr or error.
Operator approval is the gate.
Security model: the engine's tool-call approval flow gates whether this method runs at all. There is no command-content allowlist or denylist here; the operator approves a specific command value shown in the prompt, and that's what runs. The only validation we do is on working_dir, because that field is concatenated into a shell cd clause and could smuggle commands the operator never saw.
- Parameters
-
| args_json | JSON with "command" and optional "working_dir". |
- Returns
- ServerResponse with output or error.
Implements entropic::ToolBase.
Definition at line 126 of file bash.cpp.
The documentation for this class was generated from the following file: