Skip to main content

Module services

Module services 

Source
Expand description

Service layer for CLI business logic

Services contain reusable business logic that can be shared across multiple command handlers. Each service is responsible for a specific domain:

  • RedisService: Redis connection and pub/sub operations
  • ConfigService: Project configuration management
  • ProjectService: Project detection and validation
  • SimulationService: Simulation scene generation
  • ProcessService: Process lifecycle management
  • DockerService: Docker container operations
  • ComponentCatalogService: Component discovery and installation
  • PackageService: Deployment package creation
  • DeploymentService: Remote deployment via SSH
  • DiscoveryService: Network node discovery
  • InitService: Project initialization logic
  • ProjectTemplateService: Project template file generation
  • LogsService: Log file collection and filtering
  • DevService: Development mode operations
  • DevSession: Development session lifecycle management
  • ModelService: AI model management and HuggingFace Hub integration
  • BehaviorGeneratorService: Custom behavior tree config.json scaffolding
  • rl_bundle: RL project bundle (configs/rl/ + configs/simulation/{models,environments}) download for mecha10 run rl --download-bundle-only (LAB-2769)
  • catalog_client: Live template/node catalog fetch from mecha10-api (GET /api/templates/catalog, GET /api/nodes/catalog), used by mecha10 init’s wizard and mecha10 add <node>

Best-effort default config/schema pull for selected framework nodes now lives in mecha10_robot_config::pull_node_catalog_configs, shared with the launcher.

§Design Principles

  • Stateless: Services should be stateless where possible
  • Reusable: Services should be usable across multiple commands
  • Testable: Services should have no CLI dependencies
  • Focused: Each service has a single, clear responsibility

Re-exports§

pub use dev::DevService;
pub use logs::LogContentFilters;
pub use logs::LogFileFilters;
pub use logs::LogsService;
pub use process::ProcessService;
pub use train_jobs::load_job_catalog;
pub use train_jobs::CreateJobRequest;
pub use train_jobs::JobDefinition;
pub use train_jobs::JOB_CATALOG_DIR;

Modules§

behavior_generator
binary_manager
build_platforms
Human-readable names for the Rust target triples mecha10 build compiles for.
catalog_client
Live template/node catalog client for mecha10-api
component_catalog
config
credentials
deployment
dev
Development mode service
discovery
docker
driver_generator
init_service
latest_build_version
Latest published build-version lookup
logs
Logs service for managing log file operations
model_service
node_generator
package
process
Process service for managing child processes
project
project_template_service
publish_status
Registry “is this version published?” check
redis
rl_bundle
RL project bundle download (LAB-2769)
simulation
template_download
topology
train_jobs
Job catalog for mecha10 train (LAB-1776).

Structs§

BehaviorGeneratorService
ComponentCatalogService
ConfigService
CredentialsService
DeploymentService
DiscoveryService
DockerService
DriverGeneratorService
InitService
ModelService
NodeGeneratorService
PackageService
ProjectService
ProjectTemplateService
RedisService
SimulationService
TemplateDownloadService
Topology
TopologyService

Enums§

DriverType
FlowType
Which training pipeline flow a job runs as.