pub mod auto_dream;
pub mod builtin;
pub mod coordinator;
pub mod definition;
pub mod llm_compaction_client;
pub mod mcp_skills;
pub mod proactive;
pub mod prompt;
pub mod repl_commands;
pub mod runtime;
pub mod session;
pub mod summarizer;
pub mod teams;

pub use builtin::builtin_agents;
pub use coordinator::{PermissionDecisionEvent, PermissionSyncManager};
pub use definition::{AgentColor, AgentDefinition, AgentSource, ToolSet};
pub use llm_compaction_client::LlmCompactionClient;
pub use prompt::{build_system_prompt, build_system_prompt_with_memories};
pub use repl_commands::{CommandResult, ReplCommand};
pub use runtime::{
    AgentRuntime, CompactNowResult, NotificationHookSink, QueryTaskResult, RuntimeInitConfig,
    RuntimeInitMeta, TeamMemberSnapshot, TeamSnapshot,
};
pub use session::{AgentSession, SessionConfig};
pub use summarizer::{
    ConversationSummary, SummarizerConfig, SummaryItem, SummaryItemKind, summarize_conversation,
};
pub use teams::{
    AgentHandle, AgentMessage, AgentStatus, AgentWorker, Capability, Envelope, InProcessBackend,
    MessageRouter, RetryDecision, RetryPolicy, RetryTracker, SharedTaskList, SwarmBackend, Task,
    TaskList, TaskStatus, Team, TeamMember, TeamMode, Teammate, TeammateConfig, TeammateState,
    WorkerConfig, WorkerPool, WorkerResult, event_channel, shared_task_list,
};

// Re-exports: allow tui to depend only on crab-agents instead of individual L2 crates.
pub use crab_api::LlmBackend;
pub use crab_api::openai;
pub use crab_config::DefaultShell;
pub use crab_engine::{EffortLevel, QueryConfig};
pub use crab_hooks::{HookExecutor, HookTrigger};
pub use crab_mcp::McpManager;
pub use crab_session::{
    COMPACT_HEURISTIC_USER_PREFIX, COMPACT_SUMMARY_ACK, COMPACT_SUMMARY_USER_PREFIX, Conversation,
    CostAccumulator, FileHistory, SessionHistory, SessionMetadata, Snapshot, SnapshotError,
};
pub use crab_skills::{Skill, SkillRegistry, SkillTrigger};
pub use crab_tools::executor::{PermissionHandler, ToolExecutor};
pub use crab_tools::registry::ToolRegistry;
