Entropic 2.3.8
Local-first agentic inference engine
Loading...
Searching...
No Matches
permission_manager.h
Go to the documentation of this file.
1// SPDX-License-Identifier: Apache-2.0
17#pragma once
18
19#include <string>
20#include <vector>
21
22namespace entropic {
23
35public:
42 PermissionManager(std::vector<std::string> allow_patterns = {},
43 std::vector<std::string> deny_patterns = {});
44
52 bool is_denied(const std::string& tool_name,
53 const std::string& pattern) const;
54
62 bool is_allowed(const std::string& tool_name,
63 const std::string& pattern) const;
64
71 void add_permission(const std::string& pattern, bool allow);
72
73private:
74 std::vector<std::string> allow_list_;
75 std::vector<std::string> deny_list_;
76
85 static bool pattern_matches(const std::string& tool_name,
86 const std::string& full_pattern,
87 const std::string& permission_pattern);
88};
89
90} // namespace entropic
Permission manager for MCP tool access control.
bool is_denied(const std::string &tool_name, const std::string &pattern) const
Check if a tool call is explicitly denied.
void add_permission(const std::string &pattern, bool allow)
Add a permission pattern at runtime.
bool is_allowed(const std::string &tool_name, const std::string &pattern) const
Check if a tool call is explicitly allowed (skip prompting).
Activate model on GPU (WARM → ACTIVE).