1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
/// ALB-028: Pipeline orchestration subcommands — wraps forjar DAG engine.
///
/// `apr pipeline plan/apply/status/validate` maps to forjar commands,
/// keeping sovereign stack tools decoupled.
#[derive(Subcommand, Debug)]
pub enum PipelineCommands {
/// Show execution plan — validate manifest, display DAG and resource estimates.
Plan {
/// Path to forjar pipeline manifest (YAML)
#[arg(value_name = "MANIFEST")]
manifest: PathBuf,
/// Target specific machine
#[arg(short, long)]
machine: Option<String>,
/// Filter to resources with this tag
#[arg(short, long)]
tag: Option<String>,
/// Show estimated change cost per resource type
#[arg(long)]
cost: bool,
},
/// Execute the pipeline — converge all resources to desired state.
Apply {
/// Path to forjar pipeline manifest (YAML)
#[arg(value_name = "MANIFEST")]
manifest: PathBuf,
/// Target specific machine
#[arg(short, long)]
machine: Option<String>,
/// Filter to resources with this tag
#[arg(short, long)]
tag: Option<String>,
/// Number of parallel SSH sessions (default: 5)
#[arg(short, long)]
parallel: Option<u32>,
/// Continue past failures (best-effort mode)
#[arg(long)]
keep_going: bool,
},
/// Show current pipeline state — converged, pending, or failed resources.
Status {
/// Path to forjar pipeline manifest (YAML)
#[arg(value_name = "MANIFEST")]
manifest: PathBuf,
},
/// Validate pipeline manifest without connecting to machines.
Validate {
/// Path to forjar pipeline manifest (YAML)
#[arg(value_name = "MANIFEST")]
manifest: PathBuf,
},
}