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
//! Run command arguments
use clap::{Args, Subcommand};
/// Run subcommands
#[derive(Subcommand, Debug)]
pub enum RunCommand {
/// Run robot target (edge/on-robot nodes)
Robot(RunRobotArgs),
/// Run remote target (cloud/remote server nodes)
Remote(RunRemoteArgs),
/// Run rl target (a trained RL policy in production, excludes the simulator)
Rl(RunRlArgs),
}
/// Arguments for `run robot`. Always runs the release-profile binary, so there is no
/// `--release`/`-r` flag here.
#[derive(Args, Debug)]
pub struct RunRobotArgs {
/// Specific nodes to run (comma-separated, default: all target nodes)
#[arg(short, long)]
pub nodes: Option<String>,
}
/// Arguments for `run remote`. Always runs docker compose detached (background), so there is no
/// `--release`/`-r` flag here.
#[derive(Args, Debug)]
pub struct RunRemoteArgs {
/// Specific nodes to run (comma-separated, default: all target nodes)
#[arg(short, long)]
pub nodes: Option<String>,
}
/// Arguments for `run rl`. Always runs docker compose detached (background), so there is no
/// `--release`/`-r` flag here.
#[derive(Args, Debug)]
pub struct RunRlArgs {
/// Specific nodes to run (comma-separated, default: all target nodes)
#[arg(short, long)]
pub nodes: Option<String>,
/// Download-only mode (LAB-2769): download + unpack the robot's latest RL project bundle
/// (`mecha10 build rl`'s LAB-2767/2768 output) into the working directory, then exit - skips
/// starting the `rl` target's Docker Compose stack entirely. This is the training-dispatch
/// path: a Kestra-dispatched trainer host runs this ahead of `rl_task_runner.run` so
/// `AssetResolver`/`local_config` see the real project's `configs/rl/`/`configs/simulation/`
/// files instead of whatever's baked into the `mecha10/trainer` image. Requires `--robot-id`.
#[arg(long)]
pub download_bundle_only: bool,
/// Robot ID whose RL project bundle to download. Required (and only meaningful) together with
/// `--download-bundle-only` - the normal Docker Compose `run rl` path reads the robot ID from
/// the current project's `mecha10.json` instead, since it always runs from within an
/// initialized project directory (unlike the trainer host, which starts from a bare image).
#[arg(long)]
pub robot_id: Option<String>,
}