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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
|
//! Directive subcommand - directive management commands for orchestrator tasks.
use clap::Args;
use uuid::Uuid;
/// Common arguments for directive commands.
#[derive(Args, Debug, Clone)]
pub struct DirectiveArgs {
/// API URL
#[arg(long, env = "MAKIMA_API_URL", default_value = "https://api.makima.jp", global = true)]
pub api_url: String,
/// API key for authentication
#[arg(long, env = "MAKIMA_API_KEY", global = true)]
pub api_key: String,
/// Directive ID
#[arg(long, env = "MAKIMA_DIRECTIVE_ID", global = true)]
pub directive_id: Uuid,
}
/// Arguments for listing directives (no directive_id required).
#[derive(Args, Debug, Clone)]
pub struct DirectiveListArgs {
/// API URL
#[arg(long, env = "MAKIMA_API_URL", default_value = "https://api.makima.jp", global = true)]
pub api_url: String,
/// API key for authentication
#[arg(long, env = "MAKIMA_API_KEY", global = true)]
pub api_key: String,
}
/// Arguments for add-step command.
#[derive(Args, Debug)]
pub struct AddStepArgs {
#[command(flatten)]
pub common: DirectiveArgs,
/// Step name
pub name: String,
/// Step description
#[arg(long)]
pub description: Option<String>,
/// Task plan for the step
#[arg(long)]
pub task_plan: Option<String>,
/// Comma-separated UUIDs of dependency steps
#[arg(long)]
pub depends_on: Option<String>,
/// Order index
#[arg(long, default_value = "0")]
pub order_index: i32,
}
/// Arguments for remove-step command.
#[derive(Args, Debug)]
pub struct RemoveStepArgs {
#[command(flatten)]
pub common: DirectiveArgs,
/// Step ID to remove
pub step_id: Uuid,
}
/// Arguments for set-deps command.
#[derive(Args, Debug)]
pub struct SetDepsArgs {
#[command(flatten)]
pub common: DirectiveArgs,
/// Step ID to update
pub step_id: Uuid,
/// Comma-separated UUIDs of dependency steps
pub depends_on: String,
}
/// Arguments for complete-step/fail-step/skip-step commands.
#[derive(Args, Debug)]
pub struct StepActionArgs {
#[command(flatten)]
pub common: DirectiveArgs,
/// Step ID
pub step_id: Uuid,
}
/// Arguments for update-goal command.
#[derive(Args, Debug)]
pub struct UpdateGoalArgs {
#[command(flatten)]
pub common: DirectiveArgs,
/// New goal text
pub goal: String,
}
/// Arguments for batch-add-steps command.
#[derive(Args, Debug)]
pub struct BatchAddStepsArgs {
#[command(flatten)]
pub common: DirectiveArgs,
/// JSON array of steps: [{"name":"...","description":"...","taskPlan":"...","dependsOn":[],"orderIndex":0}]
#[arg(long)]
pub json: String,
}
|