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
//! Command handlers (orchestration layer)
//!
//! Handlers are responsible for orchestrating services to implement command logic.
//! They sit between the CLI interface (commands) and business logic (services).
//!
//! # Responsibilities
//!
//! - Orchestrate service calls in the correct order
//! - Handle user interaction (prompts, progress bars)
//! - Format and present output to the user
//! - Handle errors and provide user-friendly messages
//!
//! # Design Principles
//!
//! - **Thin layer**: Handlers should delegate to services, not contain business logic
//! - **UI concerns**: Handlers manage all user interaction
//! - **Error handling**: Convert service errors to user-friendly messages
//! - **No state**: Handlers receive CliContext and command args only
//! ```
/// Generates a command handler that dispatches to `$inner` for the single `Remote` variant of
/// `$cmd`. `ps` and `stop` are both pass-through dispatchers over a one-variant command enum
/// today; once a second variant lands here, hand-write the `match` instead of forcing it through
/// this macro.