mecha10-core 0.1.0

Mecha10 core runtime and foundational types
Documentation
# @mecha10/core

[![Rust](https://img.shields.io/badge/rust-1.75%2B-orange.svg)](https://www.rust-lang.org)
[![Code Style: rustfmt](https://img.shields.io/badge/code%20style-rustfmt-orange.svg)](https://github.com/rust-lang/rustfmt)
[![cargo-modules](https://img.shields.io/badge/analyzed%20with-cargo--modules-blue.svg)](https://github.com/regexident/cargo-modules)
[![cargo-geiger](https://img.shields.io/badge/safety-cargo--geiger-green.svg)](https://github.com/geiger-rs/cargo-geiger)
[![cargo-deny](https://img.shields.io/badge/audited%20with-cargo--deny-red.svg)](https://github.com/EmbarkStudios/cargo-deny)

Runtime orchestration and node lifecycle management for the Mecha10 framework.

## Features

- **Node Lifecycle** - Start, stop, restart node processes
-**Health Monitoring** - Automatic health checks with configurable intervals
-**Auto-Restart** - Restart crashed nodes (up to 3 attempts)
-**Graceful Shutdown** - SIGTERM handling with timeout fallback
-**State Tracking** - Track node states (Stopped, Starting, Running, Crashed, etc.)
-**Background Tasks** - Async health check loop with tokio

## Status

✅ **Fully Implemented** - 467 lines, production-ready

## Installation

```toml
[dependencies]
mecha10-core = { path = "../core" }
tokio = { version = "1.35", features = ["full"] }
serde = { version = "1.0", features = ["derive"] }
```

## Quick Start

```rust
use mecha10_core::{Runtime, NodeConfig, NodeMode};
use std::collections::HashMap;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let mut runtime = Runtime::new("my-robot").await?;

    // Start a camera node
    runtime.start_node(NodeConfig {
        id: "camera".to_string(),
        executable: "./nodes/camera_node".to_string(),
        args: vec!["--resolution=1080p".to_string()],
        env: HashMap::new(),
        mode: Some(NodeMode::Local),
        auto_restart: true,
        health_check_interval_s: 5,
    }).await?;

    println!("Started {} nodes", runtime.list_nodes().await.len());

    // Run until Ctrl+C
    runtime.run().await?;

    Ok(())
}
```

## API Reference

See full documentation in [packages/core/README.md](README.md)

## Examples

See [QUICKSTART.md](../../QUICKSTART.md) for complete examples.

## License

MIT