"""
eaigins-sdk
──────────────────────────────────────────────────────────────────────────
Enterprise AI Control Plane — Python SDK

Governing Autonomous AI Decision Systems (Pavan Kumar, JIVA AI TECH, 2026)

Quick start::

    from eaigins_sdk import ControlPlane, AgentAction
    from eaigins_sdk.policies import AML_POLICIES

    cp = ControlPlane(policies=AML_POLICIES)

    action = AgentAction(
        agent_id        = "my-crewai-agent",
        prompt          = "File the SAR with FinCEN for case CASE-001.",
        tool_name       = "file_sar",
        tool_params     = {"case_id": "CASE-001", "customer_id": "C-88421"},
        context_sources = ["compliance_reports", "kyc_documents"],
        reasoning       = "Investigation complete. SAR threshold met.",
        metadata        = {"regulatory_framework": "BSA"},
    )

    decision = cp.evaluate(action)
    print(decision.decision.value)   # BLOCK
    print(decision.reason)
"""

__version__ = "0.2.0"
__author__  = "Pavan Kumar"
__email__   = "pavan@jivaaitech.com"
__license__ = "MIT"

# ── Core public API ───────────────────────────────────────────────────────────
from .control_plane import ControlPlane
from .models import (
    AgentAction,
    GovernanceDecision,
    GovernanceViolationError,
    ExecutionDecision,
    RiskLevel,
    ThreatType,
    FirewallResult,
    PolicyResult,
    RiskScore,
)
from .policy     import Policy, PolicyGateway
from .firewall   import AIAgentFirewall
from .risk       import RiskEngine
from .provenance import ProvenanceEngine
from .decorators import governed_tool, GovernedMixin

# ── New v0.2 modules ──────────────────────────────────────────────────────────
from .policy_loader    import (
    load_policies_yaml, load_policies_json,
    load_policies_string, load_policies_dict,
    export_policies_json,
)
from .registry         import GovernanceRegistry, TenantScope
from .plugins          import (
    EaignsPlugin, PluginType, PluginRegistry,
    register_plugin, get_plugin, list_plugins,
    get_registry, register_policy_pack,
)
from .observability    import (
    BaseExporter, StructuredLogExporter, OTelExporter,
    PrometheusExporter, WebhookExporter, BufferedExporter,
)
from .classification   import (
    DataClass, DataClassifier, build_classification_policies,
    classify_context_sources,
)

__all__ = [
    # Primary entry point
    "ControlPlane",

    # Core models
    "AgentAction",
    "GovernanceDecision",
    "GovernanceViolationError",
    "ExecutionDecision",
    "RiskLevel",
    "ThreatType",
    "FirewallResult",
    "PolicyResult",
    "RiskScore",

    # Policy
    "Policy",
    "PolicyGateway",

    # Components (for advanced configuration)
    "AIAgentFirewall",
    "RiskEngine",
    "ProvenanceEngine",

    # Decorators
    "governed_tool",
    "GovernedMixin",

    # Version
    "__version__",

    # v0.2 — Policy config files
    "load_policies_yaml", "load_policies_json",
    "load_policies_string", "load_policies_dict",
    "export_policies_json",

    # v0.2 — Multi-tenancy
    "GovernanceRegistry", "TenantScope",

    # v0.2 — Plugins
    "EaignsPlugin", "PluginType", "PluginRegistry",
    "register_plugin", "get_plugin", "list_plugins",
    "get_registry", "register_policy_pack",

    # v0.2 — Observability
    "BaseExporter", "StructuredLogExporter", "OTelExporter",
    "PrometheusExporter", "WebhookExporter", "BufferedExporter",

    # v0.2 — Data Classification
    "DataClass", "DataClassifier", "build_classification_policies",
    "classify_context_sources",
]
