"""
AWOOOI API Services

變更紀錄:
- 2026-03-25 Phase 16 R2: 移除 .approval import (已封存至 _archived/)
"""

# Phase 16 R2 (2026-03-25): 以下 import 已封存，原模組移至 _archived/services/approval.py
# 回滾: 將 _archived/services/approval.py 移回，取消下方註解
# from .approval import (
#     RISK_MATRIX,
#     ApprovalAlreadyDecidedError,
#     ApprovalError,
#     ApprovalNotFoundError,
#     ApprovalState,
#     ApprovalStatus,
#     DuplicateSignatureError,
#     InsufficientPermissionError,
#     MultiSigEngine,
#     Signature,
#     TOCTOUConflictError,
#     UserRole,
#     multi_sig_engine,
# )

from .consensus_engine import (
    AgentOpinion,
    AgentType,
    ConsensusEngine,
    ConsensusResult,
    get_consensus_engine,
)
from .dry_run import DryRunEngine, DryRunResult, dry_run_engine
from .graph_rag import (
    BlastRadiusResult,
    DependencyEdge,
    EdgeType,
    FullAnalysisResult,
    HealthStatus,
    NodeType,
    RootCauseResult,
    ServiceNode,
    TopologyGraph,
    create_mock_topology,
    topology_graph,
)

# ADR-027: Incident-Approval 同步架構 (2026-03-26)
from .incident_approval_service import (
    IncidentApprovalService,
    IncidentApprovalSyncError,
    get_incident_approval_service,
    reset_incident_approval_service,
)
from .model_registry import (
    IModelRegistry,
    ModelRegistry,
    get_model,
    get_model_by_complexity,
    get_model_registry,
    reset_model_registry,
)
from .trust_engine import (
    RiskAdjustment,
    RiskLevel,
    TrustRecord,
    TrustScoreManager,
    TrustThresholds,
    normalize_action_pattern,
    trust_engine,
)

__all__ = [
    # Dry-Run
    "DryRunEngine",
    "DryRunResult",
    "dry_run_engine",
    # Phase 16 R2: Multi-Sig 已封存至 _archived/services/approval.py
    # "MultiSigEngine",
    # "multi_sig_engine",
    # "ApprovalState",
    # "Signature",
    # "UserRole",
    # "ApprovalStatus",
    # "RISK_MATRIX",
    # "ApprovalError",
    # "InsufficientPermissionError",
    # "DuplicateSignatureError",
    # "TOCTOUConflictError",
    # "ApprovalNotFoundError",
    # "ApprovalAlreadyDecidedError",
    # Trust Engine
    "TrustScoreManager",
    "trust_engine",
    "TrustRecord",
    "RiskAdjustment",
    "RiskLevel",
    "TrustThresholds",
    "normalize_action_pattern",
    # GraphRAG
    "TopologyGraph",
    "topology_graph",
    "ServiceNode",
    "DependencyEdge",
    "NodeType",
    "EdgeType",
    "HealthStatus",
    "BlastRadiusResult",
    "RootCauseResult",
    "FullAnalysisResult",
    "create_mock_topology",
    # Consensus Engine (Phase 9.4)
    "ConsensusEngine",
    "get_consensus_engine",
    "ConsensusResult",
    "AgentOpinion",
    "AgentType",
    # Model Registry (Phase 12 P1)
    "ModelRegistry",
    "IModelRegistry",
    "get_model_registry",
    "get_model",
    "get_model_by_complexity",
    "reset_model_registry",
    # Incident-Approval Sync (ADR-027)
    "IncidentApprovalService",
    "IncidentApprovalSyncError",
    "get_incident_approval_service",
    "reset_incident_approval_service",
]
