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
  • RemoteImageService: Pre-built remote image detection and management
  • SchemaExportService: Renders JSON Schema + Markdown reference docs from this repo’s schemas (docs/schemas/, LAB-1829)
  • BehaviorGeneratorService: Custom behavior tree config.json scaffolding

§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 schema_export::SchemaExportService;
pub use train_jobs::load_job_catalog;
pub use train_jobs::CreateJobRequest;
pub use train_jobs::FlowType;
pub use train_jobs::JobDefinition;
pub use train_jobs::JOB_CATALOG_DIR;

Modules§

behavior_generator
binary_manager
component_catalog
config
credentials
deployment
dev
Development mode service
discovery
docker
driver_generator
init_service
logs
Logs service for managing log file operations
model_service
node_generator
package
process
Process service for managing child processes
project
project_template_service
redis
remote_image
schema_export
Generates docs/schemas/ (LAB-1829) from this repo’s real schemas: the hand-written project-config schema (mecha10_core::schema_validation::get_project_schema, with its behaviors property overridden by the real schemars-derived BehaviorsConfig schema – see [project_schema_with_introspected_behaviors]) and the schemars-derived per-node-type/model-catalog schemas (mecha10_schema_registry). See docs/validate-configs.md for how these schemas are used to validate configs; this module is purely about rendering them as reference docs — it adds no new schema content and hand-writes no field descriptions (those come from the schemas themselves, which pull node-config field docs from packages/nodes/*/src/config.rs’s doc comments via schemars).
simulation
template_download
topology
train_jobs
Job catalog for mecha10 train (LAB-1776).

Structs§

BehaviorGeneratorService
Service for generating custom project-authored behavior trees
ComponentCatalogService
Component catalog service for managing available components
ConfigService
Configuration service for project configuration management
CredentialsService
Service for managing user credentials
DeploymentService
Deployment service for managing remote deployments
DiscoveryService
Discovery service for finding Mecha10 nodes
DockerService
Docker service for managing containers and Docker Compose
DriverGeneratorService
Service for generating custom driver crates
InitService
Service for initializing new Mecha10 projects
ModelService
Model management service
NodeGeneratorService
Service for generating custom node templates
PackageService
Package service for creating deployment packages
ProjectService
Project service for project management operations
ProjectTemplateService
Service for generating project template files
RedisService
Redis service for connection management and operations
RemoteImageService
Service for detecting and managing remote images
SimulationService
Simulation service for managing simulations
TemplateDownloadService
Service for downloading and caching project templates via mecha10-api
Topology
Topology analysis result
TopologyService
Topology service for static analysis

Enums§

DriverType
The kinds of driver mecha10 add driver <name> --type <kind> knows how to scaffold.