"""Approvals module for plugin-shell.

Provides command execution approval system with allowlist management,
command safety analysis, and approval service orchestration.
"""

from elizaos_plugin_shell.approvals.allowlist import (
    add_allowlist_entry,
    ensure_approvals,
    get_approval_file_path,
    get_approval_socket_path,
    load_approvals,
    match_allowlist,
    max_ask,
    min_security,
    normalize_approvals,
    read_approvals_snapshot,
    record_allowlist_use,
    resolve_approvals,
    resolve_approvals_from_file,
    save_approvals,
)
from elizaos_plugin_shell.approvals.analysis import (
    analyze_shell_command,
    classify_command_type,
    detect_patterns,
    evaluate_exec_allowlist,
    evaluate_shell_allowlist,
    get_risk_level,
    is_safe_bin_usage,
    normalize_safe_bins,
    requires_exec_approval,
    resolve_command_from_argv,
    resolve_command_resolution,
    resolve_safe_bins,
)
from elizaos_plugin_shell.approvals.service import (
    ApprovalService,
    CommandCheckResult,
)
from elizaos_plugin_shell.approvals.types import (
    DEFAULT_SAFE_BINS,
    EXEC_APPROVAL_DEFAULTS,
    EXEC_APPROVAL_TIMEOUT_MS,
    ApprovalResult,
    CommandClassification,
    CommandResolution,
    ExecAllowlistAnalysis,
    ExecAllowlistEntry,
    ExecAllowlistEvaluation,
    ExecApprovalDecision,
    ExecApprovalRequest,
    ExecApprovalsAgent,
    ExecApprovalsDefaults,
    ExecApprovalsFile,
    ExecApprovalsResolved,
    ExecApprovalsSnapshot,
    ExecAsk,
    ExecCommandAnalysis,
    ExecCommandSegment,
    ExecHost,
    ExecSecurity,
    RiskLevel,
)

__all__ = [
    # Types
    "ApprovalResult",
    "CommandClassification",
    "CommandResolution",
    "DEFAULT_SAFE_BINS",
    "EXEC_APPROVAL_DEFAULTS",
    "EXEC_APPROVAL_TIMEOUT_MS",
    "ExecAllowlistAnalysis",
    "ExecAllowlistEntry",
    "ExecAllowlistEvaluation",
    "ExecApprovalDecision",
    "ExecApprovalRequest",
    "ExecApprovalsAgent",
    "ExecApprovalsDefaults",
    "ExecApprovalsFile",
    "ExecApprovalsResolved",
    "ExecApprovalsSnapshot",
    "ExecAsk",
    "ExecCommandAnalysis",
    "ExecCommandSegment",
    "ExecHost",
    "ExecSecurity",
    "RiskLevel",
    # Allowlist
    "add_allowlist_entry",
    "ensure_approvals",
    "get_approval_file_path",
    "get_approval_socket_path",
    "load_approvals",
    "match_allowlist",
    "max_ask",
    "min_security",
    "normalize_approvals",
    "read_approvals_snapshot",
    "record_allowlist_use",
    "resolve_approvals",
    "resolve_approvals_from_file",
    "save_approvals",
    # Analysis
    "analyze_shell_command",
    "classify_command_type",
    "detect_patterns",
    "evaluate_exec_allowlist",
    "evaluate_shell_allowlist",
    "get_risk_level",
    "is_safe_bin_usage",
    "normalize_safe_bins",
    "requires_exec_approval",
    "resolve_command_from_argv",
    "resolve_command_resolution",
    "resolve_safe_bins",
    # Service
    "ApprovalService",
    "CommandCheckResult",
]
