Skip to main content

Module types

Module types 

Source
Expand description

Shared type definitions for the CLI

This module contains type definitions that are shared across multiple layers of the CLI (commands, handlers, services).

§Organization

  • cli: CLI command types (Clap Args, Commands enum)
  • credentials: Authentication credentials types
  • project: Project configuration types (mecha10.json)
  • simulation: Simulation configuration types (runtime and project-level)

§Design Principles

  • Domain-focused: Types represent domain concepts, not CLI concerns
  • Shared: Only types used in multiple places belong here
  • Serializable: Most types derive Serialize/Deserialize
  • Well-documented: All public types have rustdoc comments

Re-exports§

pub use cli::Cli;
pub use cli::Commands;

Modules§

cli
CLI type definitions
credentials
project
simulation

Structs§

Credentials
Stored credentials for authenticated user
DeviceCodeResponse
Response from device code request
EnvironmentConfig
Configuration for a specific environment
EnvironmentsConfig
Environment-specific configuration
LoggingConfig
Logging configuration for a single environment (environments.<env>.logging).
NodeSpec
Parsed node specification from namespaced string format
NodesConfig
Nodes configuration - map of node identifiers to versions
ProjectConfig
TurnConfig
Resolved TURN server config: relay URL + credentials for a TURN entry in a WebRTC ICE server list. Kept as a standalone type here (rather than reusing mecha10_video::webrtc::connection::TurnServerConfig) since mecha10-cli-core intentionally doesn’t depend on mecha10-video - mecha10-video and the nodes that embed it (camera, video-streamer) are meant to stay lightweight for robot binaries, the same “minimal dependencies” rationale mecha10-node-resolver documents for inlining its own copy of DEFAULT_MECHA10_API_URL instead of depending on this crate.

Enums§

AuthError
Error types for authentication operations
DeviceCodeStatus
Status of a device code authorization
NodeSource
Node source type based on namespace prefix

Functions§

load_project_config
Load full project config from mecha10.json
turn_config
Resolve TURN server config, highest priority first: