Entropic 2.14.3
Local-first agentic inference engine
Loading...
Searching...
No Matches
bash.h
Go to the documentation of this file.
1// SPDX-License-Identifier: Apache-2.0
8#pragma once
9
11
12#include <filesystem>
13#include <memory>
14#include <string>
15
16namespace entropic {
17
18class ExecuteTool;
19
44class BashServer : public MCPServerBase {
45public:
54 BashServer(const std::filesystem::path& working_dir,
55 const std::string& data_dir,
56 int timeout = 30);
57
58 ~BashServer() override;
59
67 std::string get_permission_pattern(
68 const std::string& tool_name,
69 const std::string& args_json) const override;
70
77 bool set_working_dir(const std::string& path) override;
78
84 const std::filesystem::path& working_dir() const;
85
91 int timeout() const;
92
93private:
94 std::filesystem::path working_dir_;
95 int timeout_;
96 std::unique_ptr<ExecuteTool> execute_tool_;
97};
98
99} // namespace entropic
Bash MCP server for shell command execution.
Definition bash.h:44
int timeout() const
Get the enforced per-command timeout.
Definition bash.cpp:623
const std::filesystem::path & working_dir() const
Get the working directory.
Definition bash.cpp:613
bool set_working_dir(const std::string &path) override
Set working directory.
Definition bash.cpp:600
~BashServer() override
Destructor.
std::string get_permission_pattern(const std::string &tool_name, const std::string &args_json) const override
Permission pattern: "execute:{base_cmd} *".
Definition bash.cpp:572
Concrete base class for MCP servers (80% logic).
Definition server_base.h:66
Activate model on GPU (WARM → ACTIVE).
@ optional
optional: every escape asks the host's path approver
MCPServerBase concrete base class + ServerResponse.