eigent/backend/app/permission_policy/__init__.py

61 lines
1.9 KiB
Python

# ========= Copyright 2025-2026 @ Eigent.ai All Rights Reserved. =========
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ========= Copyright 2025-2026 @ Eigent.ai All Rights Reserved. =========
from app.permission_policy.engine import PermissionPolicyEngine
from app.permission_policy.models import (
ACTION_OPERATIONS,
PRESET_PROFILES,
ActionDescriptor,
PermissionProfile,
PermissionProfileName,
PolicyDecision,
PolicyEffect,
PolicyRule,
literal_resource_pattern,
redact_action_arguments,
redact_sensitive_text,
)
from app.permission_policy.runtime import (
ToolPermissionRejectedError,
authorize_tool_checkpoint,
)
from app.permission_policy.service import (
PermissionPolicyService,
PolicyEvaluationResult,
)
from app.permission_policy.tool_actions import (
build_tool_action_descriptor,
operation_for_tool,
)
__all__ = [
"ACTION_OPERATIONS",
"PRESET_PROFILES",
"ActionDescriptor",
"PermissionPolicyEngine",
"PermissionPolicyService",
"PermissionProfile",
"PermissionProfileName",
"PolicyDecision",
"PolicyEffect",
"PolicyEvaluationResult",
"ToolPermissionRejectedError",
"authorize_tool_checkpoint",
"PolicyRule",
"build_tool_action_descriptor",
"operation_for_tool",
"literal_resource_pattern",
"redact_action_arguments",
"redact_sensitive_text",
]