"""MCP proxy config, policy, and Runtime Gate primitives.

This package includes the local config/policy foundation, encrypted proxy
identity management, MCP stdio passthrough, local classification with privacy
hashing, Runtime Gate enforcement, and durable local approval evidence storage.
Runtime Gate calls use an in-memory circuit breaker for sustained backend
failures.
"""

from agentveil_mcp_proxy.approval import (
    ApprovalFlowError,
    ApprovalManager,
    ApprovalNotifier,
    ApprovalOutcome,
    ApprovalServer,
    HeadlessPolicy,
    HeadlessPolicyError,
)
from agentveil_mcp_proxy.circuit_breaker import (
    CircuitBreaker,
    CircuitBreakerConfig,
    CircuitBreakerOpenError,
    CircuitState,
)
from agentveil_mcp_proxy.classification import (
    ClassifiedToolCall,
    ToolCallClassifier,
    extract_resource,
    infer_risk_class,
    sha256_jcs,
    sha256_text,
)
from agentveil_mcp_proxy.cli import (
    export_evidence,
    init_proxy,
    load_proxy_config,
    proxy_paths,
    reissue_grant,
    run_proxy,
    vacuum_events,
    verify_evidence,
)
from agentveil_mcp_proxy.evidence import (
    EVIDENCE_EXPORT_SCHEMA_VERSION,
    ApprovalEvidenceCapacityError,
    ApprovalEvidenceDuplicateError,
    ApprovalEvidenceError,
    ApprovalEvidenceNotFoundError,
    ApprovalEvidenceSchemaError,
    ApprovalEvidenceStore,
    ApprovalEvidenceTransitionError,
    ApprovalStatus,
    EvidenceExportError,
    EvidenceProofError,
    EvidenceVerificationError,
    EvidenceVerificationResult,
    PendingApproval,
    RecoveryReport,
    build_evidence_bundle,
    export_evidence_bundle,
    record_hash,
    verify_evidence_bundle,
    verify_evidence_bundle_file,
)
from agentveil_mcp_proxy.passthrough import DownstreamConfig, McpPassthrough, PassthroughError
from agentveil_mcp_proxy.policy import (
    ApprovalConfig,
    AvpConfig,
    DecisionMode,
    FallbackConfig,
    PolicyConfig,
    PolicyDecision,
    PolicyEngine,
    PolicyEvaluation,
    PolicyMatch,
    PolicyReloadResult,
    PolicyRule,
    PolicyRuntime,
    ProxyCircuitBreakerConfig,
    PrivacyConfig,
    ProxyConfig,
    ProxyConfigError,
    RiskClass,
    TimeoutAction,
    ToolCallContext,
    builtin_policy_pack,
    policy_context_hash,
)
from agentveil_mcp_proxy.runtime_gate import (
    RuntimeGateClient,
    RuntimeGateDecision,
    RuntimeGateError,
    RuntimeGateUnavailableError,
    RuntimeGateUntrustedError,
)

__all__ = [
    "ApprovalConfig",
    "ApprovalEvidenceCapacityError",
    "ApprovalEvidenceDuplicateError",
    "ApprovalEvidenceError",
    "ApprovalEvidenceNotFoundError",
    "ApprovalEvidenceSchemaError",
    "ApprovalEvidenceStore",
    "ApprovalEvidenceTransitionError",
    "ApprovalFlowError",
    "ApprovalManager",
    "ApprovalNotifier",
    "ApprovalOutcome",
    "ApprovalServer",
    "ApprovalStatus",
    "AvpConfig",
    "CircuitBreaker",
    "CircuitBreakerConfig",
    "CircuitBreakerOpenError",
    "CircuitState",
    "ClassifiedToolCall",
    "DecisionMode",
    "DownstreamConfig",
    "EVIDENCE_EXPORT_SCHEMA_VERSION",
    "EvidenceExportError",
    "EvidenceProofError",
    "EvidenceVerificationError",
    "EvidenceVerificationResult",
    "FallbackConfig",
    "HeadlessPolicy",
    "HeadlessPolicyError",
    "McpPassthrough",
    "PassthroughError",
    "PendingApproval",
    "PolicyConfig",
    "PolicyDecision",
    "PolicyEngine",
    "PolicyEvaluation",
    "PolicyMatch",
    "PolicyReloadResult",
    "PolicyRule",
    "PolicyRuntime",
    "PrivacyConfig",
    "ProxyConfig",
    "ProxyConfigError",
    "ProxyCircuitBreakerConfig",
    "RecoveryReport",
    "RiskClass",
    "RuntimeGateClient",
    "RuntimeGateDecision",
    "RuntimeGateError",
    "RuntimeGateUnavailableError",
    "RuntimeGateUntrustedError",
    "TimeoutAction",
    "ToolCallClassifier",
    "ToolCallContext",
    "builtin_policy_pack",
    "build_evidence_bundle",
    "export_evidence",
    "export_evidence_bundle",
    "extract_resource",
    "infer_risk_class",
    "init_proxy",
    "load_proxy_config",
    "policy_context_hash",
    "proxy_paths",
    "reissue_grant",
    "record_hash",
    "run_proxy",
    "sha256_jcs",
    "sha256_text",
    "vacuum_events",
    "verify_evidence",
    "verify_evidence_bundle",
    "verify_evidence_bundle_file",
]
