Skip to main content

mecha10_cli/services/
mod.rs

1//! Service layer for CLI business logic
2//!
3//! Services contain reusable business logic that can be shared across multiple
4//! command handlers. Each service is responsible for a specific domain:
5//!
6//! - **RedisService**: Redis connection and pub/sub operations
7//! - **ConfigService**: Project configuration management
8//! - **ProjectService**: Project detection and validation
9//! - **SimulationService**: Simulation scene generation
10//! - **ProcessService**: Process lifecycle management
11//! - **DockerService**: Docker container operations
12//! - **ComponentCatalogService**: Component discovery and installation
13//! - **PackageService**: Deployment package creation
14//! - **DeploymentService**: Remote deployment via SSH
15//! - **DiscoveryService**: Network node discovery
16//! - **InitService**: Project initialization logic
17//! - **ProjectTemplateService**: Project template file generation
18//! - **LogsService**: Log file collection and filtering
19//! - **DevService**: Development mode operations
20//! - **DevSession**: Development session lifecycle management
21//! - **ModelService**: AI model management and HuggingFace Hub integration
22//! - **BehaviorGeneratorService**: Custom behavior tree `config.json` scaffolding
23//! - **rl_bundle**: RL project bundle (`configs/rl/` + `configs/simulation/{models,environments}`)
24//!   download for `mecha10 run rl --download-bundle-only` (LAB-2769)
25//! - **catalog_client**: Live template/node catalog fetch from `mecha10-api`
26//!   (`GET /api/templates/catalog`, `GET /api/nodes/catalog`), used by `mecha10 init`'s wizard
27//!   and `mecha10 add <node>`
28//!
29//! Best-effort default config/schema pull for selected framework nodes now lives in
30//! `mecha10_robot_config::pull_node_catalog_configs`, shared with the launcher.
31//!
32//! # Design Principles
33//!
34//! - **Stateless**: Services should be stateless where possible
35//! - **Reusable**: Services should be usable across multiple commands
36//! - **Testable**: Services should have no CLI dependencies
37//! - **Focused**: Each service has a single, clear responsibility
38
39pub mod behavior_generator;
40pub mod binary_manager;
41pub mod build_platforms;
42pub mod catalog_client;
43pub mod component_catalog;
44pub mod config;
45pub mod credentials;
46pub mod deployment;
47pub mod dev;
48pub mod discovery;
49pub mod docker;
50pub mod driver_generator;
51pub mod init_service;
52pub mod latest_build_version;
53pub mod logs;
54pub mod model_service;
55pub mod node_generator;
56pub mod package;
57pub mod process;
58pub mod project;
59pub mod project_template_service;
60pub mod publish_status;
61pub mod redis;
62pub mod rl_bundle;
63pub mod simulation;
64pub mod template_download;
65pub mod topology;
66pub mod train_jobs;
67
68pub use behavior_generator::BehaviorGeneratorService;
69pub use component_catalog::ComponentCatalogService;
70pub use config::ConfigService;
71pub use credentials::CredentialsService;
72pub use deployment::DeploymentService;
73pub use dev::DevService;
74pub use discovery::DiscoveryService;
75pub use docker::DockerService;
76pub use driver_generator::{DriverGeneratorService, DriverType};
77pub use init_service::InitService;
78pub use logs::{LogContentFilters, LogFileFilters, LogsService};
79pub use model_service::ModelService;
80pub use node_generator::NodeGeneratorService;
81pub use package::PackageService;
82pub use process::ProcessService;
83pub use project::ProjectService;
84pub use project_template_service::ProjectTemplateService;
85pub use redis::RedisService;
86pub use simulation::SimulationService;
87pub use template_download::TemplateDownloadService;
88pub use topology::{Topology, TopologyService};
89#[allow(unused_imports)]
90pub use train_jobs::{load_job_catalog, CreateJobRequest, FlowType, JobDefinition, JOB_CATALOG_DIR};