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.jsonscaffolding
§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 itsbehaviorsproperty overridden by the realschemars-derivedBehaviorsConfigschema – see [project_schema_with_introspected_behaviors]) and theschemars-derived per-node-type/model-catalog schemas (mecha10_schema_registry). Seedocs/validate-configs.mdfor 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 frompackages/nodes/*/src/config.rs’s doc comments viaschemars). - simulation
- template_
download - topology
- train_
jobs - Job catalog for
mecha10 train(LAB-1776).
Structs§
- Behavior
Generator Service - Service for generating custom project-authored behavior trees
- Component
Catalog Service - Component catalog service for managing available components
- Config
Service - Configuration service for project configuration management
- Credentials
Service - Service for managing user credentials
- Deployment
Service - Deployment service for managing remote deployments
- Discovery
Service - Discovery service for finding Mecha10 nodes
- Docker
Service - Docker service for managing containers and Docker Compose
- Driver
Generator Service - Service for generating custom driver crates
- Init
Service - Service for initializing new Mecha10 projects
- Model
Service - Model management service
- Node
Generator Service - Service for generating custom node templates
- Package
Service - Package service for creating deployment packages
- Project
Service - Project service for project management operations
- Project
Template Service - Service for generating project template files
- Redis
Service - Redis service for connection management and operations
- Remote
Image Service - Service for detecting and managing remote images
- Simulation
Service - Simulation service for managing simulations
- Template
Download Service - Service for downloading and caching project templates via
mecha10-api - Topology
- Topology analysis result
- Topology
Service - Topology service for static analysis
Enums§
- Driver
Type - The kinds of driver
mecha10 add driver <name> --type <kind>knows how to scaffold.