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§
Modules§
- cli
- CLI type definitions
- credentials
- project
- simulation
Structs§
- Credentials
- Device
Code Response - Environment
Config - Configuration for a specific environment
- Environments
Config - Per-environment configuration (dev, staging, prod), with the active environment selected via
the
MECHA10_ENVenvironment variable or--envflag. - Logging
Config - Logging configuration for a single environment, controlling whether node logs are written to local disk. Remote/network log shipping is independent of this setting.
- Node
Spec - Parsed node specification from namespaced string format (e.g.
@mecha10/listenerfor a framework node,my-customfor a project node,@someorg/cool-nodefor a future registry node). The legacy@local/*prefix is no longer supported. - Nodes
Config - Map of node identifiers (e.g.
@mecha10/listener,my-custom) to their pinned versions. - Project
Config - Turn
Config - Resolved TURN server config: relay URL + credentials for a TURN entry in a WebRTC ICE
server list. Standalone since
mecha10-cli-coredoesn’t depend onmecha10-video.
Enums§
- Auth
Error - Device
Code Status - Node
Source - Node source type based on namespace prefix
Functions§
- load_
project_ config - Load full project config from mecha10.json
- turn_
config - Resolve TURN server config: an explicit runtime env var wins, then the build-time-baked
default. Returns
Nonewhen neither is present (including empty), so callers can fall through to a runtime API fetch from mecha10-api.