use std::collections::HashMap;
use std::path::PathBuf;
use std::time::Duration;
use crate::capacity::CapacityControllerConfig;
use crate::compaction::CompactionConfig;
use crate::cycle::CycleConfig;
use crate::features::Features;
use crate::long_horizon::LongHorizonConfig;
use crate::scratchpad::ScratchpadConfig;
use crate::task_type::TaskType;
#[derive(Clone)]
pub struct EngineConfig {
pub model: String,
pub workspace: PathBuf,
pub allow_shell: bool,
pub sandbox_mode: Option<String>,
pub trust_mode: bool,
pub notes_path: PathBuf,
pub mcp_config_path: PathBuf,
pub skills_dir: PathBuf,
pub instructions: Vec<PathBuf>,
pub max_steps: u32,
pub max_subagents: usize,
pub subagent_step_timeout: Duration,
pub features: Features,
pub compaction: CompactionConfig,
pub cycle: CycleConfig,
pub capacity: CapacityControllerConfig,
pub max_spawn_depth: u32,
pub snapshots_enabled: bool,
pub snapshots_max_workspace_gb: f64,
pub subagent_model_overrides: HashMap<String, String>,
pub memory_enabled: bool,
pub memory_path: PathBuf,
pub goal_objective: Option<String>,
pub locale_tag: String,
pub strict_tool_mode: bool,
pub task_type: TaskType,
pub scratchpad: ScratchpadConfig,
pub long_horizon: LongHorizonConfig,
}
impl Default for EngineConfig {
fn default() -> Self {
Self {
model: String::new(),
workspace: PathBuf::from("."),
allow_shell: true,
sandbox_mode: None,
trust_mode: false,
notes_path: PathBuf::from("notes.txt"),
mcp_config_path: PathBuf::from("mcp.json"),
skills_dir: PathBuf::new(),
instructions: Vec::new(),
max_steps: 100,
max_subagents: 0,
subagent_step_timeout: Duration::from_secs(0),
features: Features::with_defaults(),
compaction: CompactionConfig::default(),
cycle: CycleConfig::default(),
capacity: CapacityControllerConfig::default(),
max_spawn_depth: 0,
snapshots_enabled: true,
snapshots_max_workspace_gb: 2.0,
subagent_model_overrides: HashMap::new(),
memory_enabled: false,
memory_path: PathBuf::from("./memory.md"),
goal_objective: None,
locale_tag: "en".to_string(),
strict_tool_mode: false,
task_type: TaskType::default(),
scratchpad: ScratchpadConfig::default(),
long_horizon: LongHorizonConfig::default(),
}
}
}