Entropic 2.3.8
Local-first agentic inference engine
Loading...
Searching...
No Matches
entropic::ExecuteTool Class Reference

Tool for executing shell commands. More...

Inheritance diagram for entropic::ExecuteTool:
Collaboration diagram for entropic::ExecuteTool:

Public Member Functions

 ExecuteTool (ToolDefinition def, BashServer &server)
 Construct from tool definition with server ref.
 
ServerResponse execute (const std::string &args_json) override
 Execute a shell command.
 
- Public Member Functions inherited from entropic::ToolBase
 ToolBase (ToolDefinition def)
 Construct with a pre-built definition.
 
const std::string & name () const
 Get the tool name.
 
const ToolDefinitiondefinition () const
 Get the full tool definition.
 
virtual std::string anchor_key (const std::string &args_json) const
 Generate anchor key for this tool result.
 
virtual MCPAccessLevel required_access_level () const
 Minimum access level required to execute this tool.
 

Additional Inherited Members

- Protected Attributes inherited from entropic::ToolBase
ToolDefinition definition_
 Tool definition.
 

Detailed Description

Tool for executing shell commands.

Definition at line 85 of file bash.cpp.

Constructor & Destructor Documentation

◆ ExecuteTool()

entropic::ExecuteTool::ExecuteTool ( ToolDefinition  def,
BashServer server 
)
inline

Construct from tool definition with server ref.

Parameters
defTool definition loaded from JSON.
serverOwning BashServer reference.

Definition at line 94 of file bash.cpp.

Member Function Documentation

◆ execute()

ServerResponse entropic::ExecuteTool::execute ( const std::string &  args_json)
overridevirtual

Execute a shell command.

Parameters
args_jsonJSON 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_jsonJSON 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: