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
//! `tm fleet` — set up and inspect the Architect, the one supervisor per user (#8436).
//!
//! Why: the name must not collide with `tm supervisor` (the unattended
//! auto-resumer) or `tm overseer` (ruling 2026-09-23).
//! What: [`FleetAction`] — `init` and `status`. `add` and `remove` arrive in
//! phase P3 of #8436.
//! Test: `cli_parses_fleet_init`, `cli_parses_fleet_status`.
use clap::Subcommand;
/// Actions for the `fleet` subcommand.
#[derive(Debug, Subcommand)]
pub(crate) enum FleetAction {
/// Set up the Architect project and start its session.
///
/// Creates the project directory with a local git repo and no remote,
/// writes `profile = "supervisor"` to its `.trusty-mpm.toml`, adds its
/// canonical path to `[supervisor] projects` in
/// `~/.trusty-mpm/config.toml` (also when a PM runs this), and starts the
/// session detached as tmux session `tm-architect` (or `--session`) on
/// the `opus` alias. Writes no twin grant. A second run changes nothing
/// and says so. Refuses when another Architect is already set up.
Init {
/// Project directory (default: the Architect recorded in `[supervisor]
/// projects`, else `~/trusty-mpm-projects/architect`).
#[arg(long)]
dir: Option<String>,
/// Set up the project and the grant, but do not start the session.
#[arg(long)]
no_launch: bool,
/// Architect tmux session name (default: the recorded name, else
/// `tm-architect`); the poller runs as `<name>-poll`. Recorded as
/// `[supervisor] session` so later runs and `status` use it (#8878).
#[arg(long)]
session: Option<String>,
},
/// Report whether the Architect is set up and running (read-only).
///
/// Checks the `[supervisor] projects` entry, the project's
/// `profile = "supervisor"`, the Architect's tmux session, and that
/// session's supervisor launch stamp. Exits 1 when any check fails.
/// Also reports whether that session's `claude` is bound (#8878).
Status {
/// Project directory (default: the Architect recorded in `[supervisor]
/// projects`, else `~/trusty-mpm-projects/architect`).
#[arg(long)]
dir: Option<String>,
/// Print the report as JSON.
#[arg(long)]
json: bool,
/// Architect tmux session name (default: the name `init` recorded,
/// else `tm-architect`).
#[arg(long)]
session: Option<String>,
},
}