mod plan;
mod resolver;
pub use crate::planning::plan::{
ExecutionNode, ExecutionPlan, NodeKind, PlanPolicy, ResolvedComponent, ResourceClaim,
TargetPlatform, UnsupportedComponent,
};
pub use crate::planning::resolver::{PlanRequest, build_plan};
use crate::config::load_config_with_overlays;
use crate::error::ForgeError;
use crate::model::InstallOptions;
pub fn plan_profile(options: &InstallOptions) -> Result<ExecutionPlan, ForgeError> {
let loaded = load_config_with_overlays(options.config_path.as_deref(), &options.overlay_paths)?;
build_plan(PlanRequest {
document: &loaded.document,
origins: &loaded.origins,
profile: options.profile.as_str(),
target: TargetPlatform::host(),
only: &options.only,
exclude: &options.exclude,
source_root: loaded.path.as_deref().and_then(std::path::Path::parent),
})
}