"""CAD/CAE-to-.aieng converter framework (Phase 20).

This package contains the general converter contract and reference
implementations. Converters are read-only with respect to engineering
decisions: they convert source CAD/CAE artifacts into structured `.aieng`
resources and explicitly record what is missing or uncertain. They do not
run solvers, meshers, optimizers, or CAD edits.

See `docs/cad_cae_conversion_contract.md` for the full contract.
"""
from __future__ import annotations

from .base import (
    CAPABILITY_LEVEL_NAMES,
    CONVERTER_CLAIM_POLICY,
    Converter,
    ConverterCapabilityProfile,
    ConverterError,
    ConversionResult,
    CoverageCategory,
    EmittedResource,
    SupportedLevel,
    UncertaintyNote,
    UnsupportedItem,
)
from .registry import available_converters, get_converter, register_converter

# Sampling (Issue #38) — candidate parameter generation
from .optimization_sampler import (
    genetic_sample,
    sample_candidates,
    sample_candidates_package,
)

# Batch execution (Issue #39) + batch evaluation (Issue #40)
from .design_study_batch import (
    discover_candidate_ids,
    discover_executed_candidate_ids,
    run_design_study_batch,
    run_design_study_evaluation_batch,
)

# Advisory recommendation / explanation (Issue #41)
from .optimization_recommendation import explain_recommendation

# Study summary report (Issue #43)
from .optimization_report import build_optimization_report

# Phase 2 iterative loop (#60): convergence (#61) + local-refinement proposer (#62)
from .optimization_convergence import evaluate_convergence, record_iteration_and_check
from .optimization_proposer import propose_next_candidates

# SLSQP optimizer proposer (#65)
from .optimization_proposer_slsqp import propose_slsqp_candidates

__all__ = [
    "CAPABILITY_LEVEL_NAMES",
    "CONVERTER_CLAIM_POLICY",
    "Converter",
    "ConverterCapabilityProfile",
    "ConverterError",
    "ConversionResult",
    "CoverageCategory",
    "EmittedResource",
    "SupportedLevel",
    "UncertaintyNote",
    "UnsupportedItem",
    "available_converters",
    "get_converter",
    "register_converter",
    "genetic_sample",
    "sample_candidates",
    "sample_candidates_package",
    "discover_candidate_ids",
    "discover_executed_candidate_ids",
    "run_design_study_batch",
    "run_design_study_evaluation_batch",
    "explain_recommendation",
    "build_optimization_report",
    "evaluate_convergence",
    "record_iteration_and_check",
    "propose_next_candidates",
    "propose_slsqp_candidates",
]
