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//! - **RemoteImageService**: Pre-built remote image detection and management
23//! - **SchemaExportService**: Renders JSON Schema + Markdown reference docs from
24//! this repo's schemas (`docs/schemas/`, LAB-1829)
25//! - **BehaviorGeneratorService**: Custom behavior tree `config.json` scaffolding
26//!
27//! # Design Principles
28//!
29//! - **Stateless**: Services should be stateless where possible
30//! - **Reusable**: Services should be usable across multiple commands
31//! - **Testable**: Services should have no CLI dependencies
32//! - **Focused**: Each service has a single, clear responsibility
33
34// Service modules
35pub mod behavior_generator;
36pub mod binary_manager;
37pub mod component_catalog;
38pub mod config;
39pub mod credentials;
40pub mod deployment;
41pub mod dev;
42pub mod discovery;
43pub mod docker;
44pub mod driver_generator;
45pub mod init_service;
46pub mod logs;
47pub mod model_service;
48pub mod node_generator;
49pub mod package;
50pub mod process;
51pub mod project;
52pub mod project_template_service;
53pub mod redis;
54pub mod remote_image;
55pub mod schema_export;
56pub mod simulation;
57pub mod template_download;
58pub mod topology;
59pub mod train_jobs;
60
61// Re-exports
62pub use behavior_generator::BehaviorGeneratorService;
63pub use component_catalog::ComponentCatalogService;
64pub use config::ConfigService;
65pub use credentials::CredentialsService;
66pub use deployment::DeploymentService;
67pub use dev::DevService;
68pub use discovery::DiscoveryService;
69pub use docker::DockerService;
70pub use driver_generator::{DriverGeneratorService, DriverType};
71pub use init_service::InitService;
72pub use logs::{LogContentFilters, LogFileFilters, LogsService};
73pub use model_service::ModelService;
74pub use node_generator::NodeGeneratorService;
75pub use package::PackageService;
76pub use process::ProcessService;
77pub use project::ProjectService;
78pub use project_template_service::ProjectTemplateService;
79pub use redis::RedisService;
80pub use remote_image::RemoteImageService;
81pub use schema_export::SchemaExportService;
82pub use simulation::SimulationService;
83pub use template_download::TemplateDownloadService;
84pub use topology::{Topology, TopologyService};
85#[allow(unused_imports)] // part of the public service API surface
86pub use train_jobs::{load_job_catalog, CreateJobRequest, FlowType, JobDefinition, JOB_CATALOG_DIR};