"""
a2p SDK - Agent 2 Profile Protocol

Python SDK for the a2p protocol, enabling user-owned profiles
for AI agent interactions.
"""

from a2p.client import (
    A2PClient,
    A2PUserClient,
    ProfileStorage,
    create_agent_client,
    create_user_client,
)
from a2p.core.consent import (
    create_category_policy,
    create_consent_receipt,
    create_default_policy,
    evaluate_access,
    get_matching_policies,
    has_permission,
    is_consent_valid,
    merge_permissions,
    revoke_consent,
)
from a2p.core.profile import (
    add_memory,
    add_policy,
    add_sub_profile,
    archive_memory,
    create_profile,
    export_profile,
    get_filtered_profile,
    import_profile,
    remove_memory,
    remove_policy,
    remove_sub_profile,
    update_identity,
    update_memory,
    update_policy,
    update_preferences,
    update_sub_profile,
    validate_profile,
)
from a2p.core.proposal import (
    add_proposal,
    approve_proposal,
    cleanup_resolved_proposals,
    create_proposal,
    expire_proposals,
    find_similar_memories,
    get_pending_proposals,
    get_proposals_by_agent,
    reject_proposal,
    withdraw_proposal,
)
from a2p.storage.cloud import CloudStorage
from a2p.storage.memory import MemoryStorage
from a2p.storage.solid import SolidStorage
from a2p.types import (
    # Accessibility types
    AccessibilityPreferences,
    AgeContext,
    # Agent types
    AgentA2PSupport,
    AgentCapabilities,
    AgentIdentity,
    AgentOperator,
    AgentProfile,
    AgentTrustMetrics,
    Allergies,
    CaptionSettings,
    # Category types
    CategoryContext,
    CategoryHealth,
    CategoryIdentity,
    CategoryInterests,
    CategoryPreferences,
    CategoryProfessional,
    CategoryRelationships,
    ChatRestrictions,
    CognitiveAccessibility,
    ColorVision,
    # Core types
    Common,
    CommonPreferences,
    CommunicationPreferences,
    ConsentPolicy,
    ConsentProof,
    ConsentReceipt,
    ContentPreferences,
    ContentSafety,
    DietaryRequirements,
    EmergencyContact,
    EmergencyInfo,
    Guardian,
    Guardianship,
    HearingAccessibility,
    Identity,
    MedicalDevices,
    Memories,
    Memory,
    MemoryMetadata,
    MemorySettings,
    MemorySource,
    MobilityAccessibility,
    MotorAccessibility,
    NotificationSettings,
    PhysicalAccessibility,
    PolicyConditions,
    PrivacySettings,
    Profile,
    ProfileSettings,
    Proposal,
    ProposalEvidence,
    ProposalResolution,
    ProposedMemory,
    PublicKey,
    PurchaseControls,
    ReadingAssistance,
    ScreenTime,
    SensoryAccessibility,
    ServiceAnimal,
    SpecialAssistance,
    SubProfile,
    VisionAccessibility,
)
from a2p.utils.id import (
    generate_agent_did,
    generate_memory_id,
    generate_org_did,
    generate_policy_id,
    generate_proposal_id,
    generate_receipt_id,
    generate_request_id,
    generate_session_id,
    generate_user_did,
    is_valid_a2p_did,
    is_valid_agent_did,
    is_valid_did,
    is_valid_user_did,
    parse_did,
    validate_agent_did,
)
from a2p.utils.scope import (
    SCOPE_SENSITIVITY,
    StandardScopes,
    any_scope_matches,
    build_scope,
    filter_scopes,
    get_parent_scopes,
    get_scope_sensitivity,
    parse_scope,
    scope_matches,
)

__version__ = "0.1.0-alpha"
PROTOCOL_VERSION = "0.1.0-alpha"

__all__ = [
    # Version
    "__version__",
    "PROTOCOL_VERSION",
    # Client
    "A2PClient",
    "A2PUserClient",
    "create_agent_client",
    "create_user_client",
    "ProfileStorage",
    # Storage
    "MemoryStorage",
    "CloudStorage",
    "SolidStorage",
    # Profile
    "create_profile",
    "update_identity",
    "update_preferences",
    "add_memory",
    "update_memory",
    "remove_memory",
    "archive_memory",
    "add_sub_profile",
    "update_sub_profile",
    "remove_sub_profile",
    "add_policy",
    "update_policy",
    "remove_policy",
    "get_filtered_profile",
    "validate_profile",
    "export_profile",
    "import_profile",
    # Proposal
    "create_proposal",
    "add_proposal",
    "approve_proposal",
    "reject_proposal",
    "withdraw_proposal",
    "get_pending_proposals",
    "get_proposals_by_agent",
    "expire_proposals",
    "cleanup_resolved_proposals",
    "find_similar_memories",
    # Consent
    "evaluate_access",
    "create_consent_receipt",
    "is_consent_valid",
    "revoke_consent",
    "create_default_policy",
    "create_category_policy",
    "get_matching_policies",
    "has_permission",
    "merge_permissions",
    # ID utilities
    "generate_memory_id",
    "generate_proposal_id",
    "generate_policy_id",
    "generate_receipt_id",
    "generate_session_id",
    "generate_request_id",
    "generate_user_did",
    "generate_agent_did",
    "generate_org_did",
    "is_valid_did",
    "is_valid_a2p_did",
    "is_valid_agent_did",
    "is_valid_user_did",
    "validate_agent_did",
    "parse_did",
    # Scope utilities
    "scope_matches",
    "any_scope_matches",
    "filter_scopes",
    "parse_scope",
    "build_scope",
    "get_parent_scopes",
    "get_scope_sensitivity",
    "StandardScopes",
    "SCOPE_SENSITIVITY",
    # Types
    "Profile",
    "Identity",
    "PublicKey",
    "Common",
    "CommonPreferences",
    "CommunicationPreferences",
    "ContentPreferences",
    "Memories",
    "Memory",
    "MemorySource",
    "MemoryMetadata",
    "SubProfile",
    "ConsentPolicy",
    "PolicyConditions",
    "ConsentReceipt",
    "ConsentProof",
    "Proposal",
    "ProposedMemory",
    "ProposalEvidence",
    "ProposalResolution",
    "ProfileSettings",
    "MemorySettings",
    "NotificationSettings",
    "PrivacySettings",
    "CategoryIdentity",
    "CategoryPreferences",
    "CategoryProfessional",
    "CategoryInterests",
    "CategoryContext",
    "CategoryHealth",
    "CategoryRelationships",
    "AgentProfile",
    "AgentIdentity",
    "AgentOperator",
    "AgentA2PSupport",
    "AgentTrustMetrics",
    "AgentCapabilities",
    # Accessibility types
    "AccessibilityPreferences",
    "VisionAccessibility",
    "HearingAccessibility",
    "MotorAccessibility",
    "CognitiveAccessibility",
    "SensoryAccessibility",
    "PhysicalAccessibility",
    "MobilityAccessibility",
    "ServiceAnimal",
    "MedicalDevices",
    "Allergies",
    "DietaryRequirements",
    "SpecialAssistance",
    "EmergencyInfo",
    "EmergencyContact",
    "ColorVision",
    "CaptionSettings",
    "ReadingAssistance",
    # Guardianship types
    "AgeContext",
    "Guardian",
    "Guardianship",
    "ContentSafety",
    "ChatRestrictions",
    "PurchaseControls",
    "ScreenTime",
]
