suna/backend/credentials/__init__.py

61 lines
1.6 KiB
Python
Raw Normal View History

2025-07-29 00:36:07 +08:00
# Credentials Module - Simplified and Clean
2025-07-14 18:36:27 +08:00
2025-07-29 00:36:07 +08:00
from .credential_service import (
CredentialService,
2025-07-14 18:36:27 +08:00
MCPCredential,
MCPRequirement,
CredentialRequest,
2025-07-29 00:36:07 +08:00
CredentialNotFoundError,
CredentialAccessDeniedError,
EncryptionService,
get_credential_service
2025-07-14 18:36:27 +08:00
)
2025-07-29 00:36:07 +08:00
from .profile_service import (
ProfileService,
MCPCredentialProfile,
CredentialMapping,
ProfileRequest,
ProfileNotFoundError,
ProfileAccessDeniedError,
get_profile_service
)
2025-07-14 18:36:27 +08:00
2025-07-29 00:36:07 +08:00
from .utils import (
validate_config_not_empty,
validate_credential_mappings,
get_missing_credentials_advanced,
decode_mcp_qualified_name,
encode_mcp_qualified_name,
extract_config_keys,
sanitize_display_name,
build_custom_qualified_name,
matches_custom_pattern
2025-07-14 18:36:27 +08:00
)
from . import api
__all__ = [
2025-07-29 00:36:07 +08:00
# Services and factory functions
"CredentialService", "get_credential_service",
"ProfileService", "get_profile_service",
"EncryptionService",
# Domain objects
"MCPCredential", "MCPCredentialProfile", "MCPRequirement",
"CredentialRequest", "ProfileRequest", "CredentialMapping",
# Exceptions
"CredentialNotFoundError", "CredentialAccessDeniedError",
"ProfileNotFoundError", "ProfileAccessDeniedError",
# Utilities
"validate_config_not_empty", "validate_credential_mappings",
"get_missing_credentials_advanced", "decode_mcp_qualified_name",
"encode_mcp_qualified_name", "extract_config_keys",
"sanitize_display_name", "build_custom_qualified_name",
"matches_custom_pattern",
# API module
"api"
2025-07-14 18:36:27 +08:00
]