bot_forge/planning/
mod.rs1mod plan;
8mod resolver;
9
10pub use crate::planning::plan::{
11 ExecutionNode, ExecutionPlan, NodeKind, PlanPolicy, ResolvedComponent, ResourceClaim,
12 TargetPlatform, UnsupportedComponent,
13};
14pub use crate::planning::resolver::{PlanRequest, build_plan};
15
16use crate::config::load_config_with_overlays;
17use crate::error::ForgeError;
18use crate::model::InstallOptions;
19
20pub fn plan_profile(options: &InstallOptions) -> Result<ExecutionPlan, ForgeError> {
27 let loaded = load_config_with_overlays(options.config_path.as_deref(), &options.overlay_paths)?;
28 build_plan(PlanRequest {
29 document: &loaded.document,
30 origins: &loaded.origins,
31 profile: options.profile.as_str(),
32 target: TargetPlatform::host(),
33 only: &options.only,
34 exclude: &options.exclude,
35 source_root: loaded.path.as_deref().and_then(std::path::Path::parent),
36 })
37}