pub mod commands;
pub mod config;
pub mod db;
pub mod entities;
pub mod migration;
pub mod orchestrator;
pub mod validation;
pub mod workers;

pub use commands::{
    execute_bitbucket_repo_list, execute_repo_list, execute_run_task, execute_task_list,
};
pub use config::{ContainerConfig, OrchestratorConfig, WorkflowConfig, WorkflowState};
pub use orchestrator::run_task::{run_single_task, RunTaskFlags};
pub use orchestrator::{run_pipeline, TaskExecutionContext};
pub use robson_connector_claude::{
    compose_docker_impl_prompt, compose_impl_prompt, compose_setup_prompt,
    compose_test_correction_prompt, evaluate_task, implement_in_repo, mock_agent,
    parse_setup_output, resolve_claude_executable, ClaudeImplResult, ClaudeSetupResult,
};
pub use robson_connector_docker::{
    connect_docker, generate_project_name, parse_docker_compose, ContainerOutput,
    DockerComposeInfo, DockerSession, ParsedHealthcheck, ServiceConfig,
};
pub use validation::scan_for_misplaced_tests;

// --- Entity re-exports for convenience ---
pub use entities::repo::{
    self as repo_entity, ActiveModel as RepoActiveModel, Entity as RepoEntity, Model as Repo,
};
pub use entities::task::{
    self as task_entity, validate_repo_url, ActiveModel as TaskActiveModel, Entity as TaskEntity,
    Model as Task,
};
pub use entities::task_execution::{
    self as task_execution_entity, ActiveModel as TaskExecutionActiveModel, EngineType,
    Entity as TaskExecutionEntity, Model as TaskExecution, TaskStatus,
};

// --- DB helpers ---
pub use db::{connect as workflow_connect, connect_and_migrate as workflow_connect_and_migrate};

// --- Worker plugins ---
pub use workers::{BitbucketListWorker, RepoListWorker, RunTaskWorker, TaskListWorker};
