EnerOS v0.43.0 Release Notes
- Release Date: 2026-06-27
- Codename: DevEx
- Support Status: Stable
- Total Crates: 52
- Test Cases: 6600+
- Contributors: 28
Version Overview
EnerOS v0.43.0 is the third release of the “Mature Optimization” phase, focusing on the comprehensive improvement of Developer Experience. After v0.41.0 established the performance baseline and v0.42.0 perfected security auditing, this release turns its attention to the efficiency and experience of developers’ daily workflows, covering four directions: CLI tools, debugging tools, hot reload, and project scaffolding.
The success of an operating system depends not only on the power of the kernel, but also on the prosperity of the application ecosystem built around it. The prerequisite for ecosystem prosperity is that developers can quickly get started, develop efficiently, and debug smoothly. The goal of v0.43.0 is to enable a developer who has never encountered EnerOS to complete environment setup and run their first Agent within 5 minutes, and to complete a usable power dispatching Agent within 30 minutes.
This release completely refactors eneros-cli, adding 40+ subcommands covering the full lifecycle of project creation, development, debugging, deployment, and operations. The new eneros-dev crate provides hot reload capability, where code changes take effect without restarting the service, greatly shortening the development-testing cycle. Project scaffolding supports 12 templates, covering typical business scenarios such as generation, transmission, distribution, dispatching, and marketing.
Key Metrics
| Metric | Value | Description |
|---|---|---|
| Crate count | 52 | Added eneros-dev and 2 other crates |
| Test cases | 6600+ | Including 320+ CLI tests |
| CLI subcommands | 40+ | Full lifecycle coverage |
| Scaffolding templates | 12 | Full business scenario coverage |
| Hot reload latency | < 200ms | Code change to effective |
| First Agent onboarding time | < 5 minutes | From installation to running |
New Features
1. CLI Tool Enhancement
eneros-cli is completely refactored, expanding from the original 8 basic commands to 40+ subcommands, organized into six command groups by function: project, development, debugging, deployment, operations, and security. All commands support JSON output format for scripted integration.
Command Structure
eneros-cli
├── project # Project management
│ ├── new # Create new project (template support)
│ ├── build # Build project
│ ├── test # Run tests
│ └── package # Package release
├── dev # Development assistance
│ ├── run # Local run (with hot reload)
│ ├── watch # File watching
│ ├── fmt # Code formatting
│ └── lint # Code checking
├── debug # Debugging tools
│ ├── agent # Agent debugger
│ ├── topology # Topology visualization
│ ├── trace # Distributed tracing
│ └── profile # Performance analysis
├── deploy # Deployment management
│ ├── push # Push image
│ ├── rollout # Rolling release
│ └── rollback # Version rollback
├── ops # Operations management
│ ├── health # Health check
│ ├── logs # Log query
│ ├── metrics # Metrics viewing
│ └── shell # Interactive shell
└── security # Security management
├── audit # Security audit
├── trust # Certificate management
└── rbac # Permission management
Usage Example
# Create new project
eneros-cli project new my-dispatch-agent --template economic-dispatch
# Local run (with hot reload)
eneros-cli dev run --hot-reload
# Debug Agent
eneros-cli debug agent --agent dispatch --breakpoint step-3
# Performance analysis
eneros-cli debug profile --duration 60s --output profile.flamegraph
# JSON output (for scripting)
eneros-cli ops health --output json | jq '.status'
CLI Programmatic Invocation
use eneros_cli::{Cli, Command, OutputFormat};
let cli = Cli::new();
// Programmatic CLI invocation
let result = cli.run(Command::HealthCheck {
full: true,
output: OutputFormat::Json,
}).await?;
let status: HealthStatus = serde_json::from_str(&result.stdout)?;
println!("Cluster status: {}", status.overall);
2. Debugging Tools
Added the eneros-debug module, providing four debugging capabilities: Agent debugger, topology visualization, distributed tracing, and performance analysis. The Agent debugger supports breakpoints, single-step execution, variable inspection, and backtracking, bringing the Agent development debugging experience on par with mainstream IDEs.
Agent Debugger
use eneros_debug::{AgentDebugger, Breakpoint, DebugSession};
let mut debugger = AgentDebugger::connect("agent://dispatch-1").await?;
// Set breakpoints
debugger.set_breakpoint(Breakpoint::at_step("economic_dispatch", 3)).await?;
debugger.set_breakpoint(Breakpoint::on_event("constraint_violation")).await?;
// Start debug session
let mut session = debugger.start_session().await?;
while let Some(event) = session.next_event().await {
match event {
DebugEvent::BreakpointHit { step, context } => {
println!("Breakpoint hit: {}", step);
println!("Context variables: {:?}", context.variables);
println!("Topology snapshot: {} nodes", context.topology.node_count());
// Single step execution
session.step_over().await?;
}
DebugEvent::ConstraintViolated { command, violation } => {
println!("Constraint violated: {} - {}", command, violation);
session.continue_().await?;
}
DebugEvent::Completed { result } => {
println!("Agent completed: {:?}", result);
break;
}
}
}
Performance Analysis
use eneros_debug::profiler::{Profiler, ProfileConfig};
let profiler = Profiler::new(ProfileConfig {
duration: Duration::from_secs(60),
sample_rate: 1000, // 1000 Hz sampling
cpu_profiling: true,
memory_profiling: true,
allocation_tracking: true,
});
let report = profiler.profile_agent("dispatch-1").await?;
// Generate flame graph
report.flamegraph("reports/dispatch-flame.svg")?;
// Output hotspot functions
for hotspot in report.top_hotspots(10) {
println!(
"{}: {:.2}% ({} calls)",
hotspot.function, hotspot.cpu_pct, hotspot.call_count
);
}
Debugging Capabilities Overview
| Tool | Capability | Applicable Scenarios |
|---|---|---|
| Agent debugger | Breakpoints, single step, variable inspection | Agent logic debugging |
| Topology visualization | Graph structure rendering, path highlighting | Topology problem location |
| Distributed tracing | Cross-Agent call chain | Performance bottleneck analysis |
| Performance analysis | CPU/memory flame graphs | Performance optimization |
| Time-series replay | Historical data replay | Fault retrospective |
| Constraint diagnostics | Constraint violation tracing | Constraint configuration debugging |
3. Hot Reload
Added the eneros-dev crate, providing code hot reload capability. After developers modify Rust code, the hot reload engine automatically detects changes, incrementally compiles, and loads new modules without restarting the service. Based on hot-lib-reloader, combined with dylib linking strategy, hot reload latency < 200ms.
Configuration Example
use eneros_dev::{HotReloader, ReloadConfig, WatchPattern};
let reloader = HotReloader::new(ReloadConfig {
watch_paths: vec!["src/".into(), "agents/".into()],
watch_patterns: vec![
WatchPattern::glob("**/*.rs"),
WatchPattern::glob("**/Cargo.toml"),
],
reload_delay: Duration::from_millis(100), // Debounce
rebuild_args: vec!["build".into(), "--lib".into()],
})?;
// Register reload callback
reloader.on_reload(|event| {
println!("Module reloaded: {} (took {}ms)", event.module, event.duration_ms);
// Re-register Agents, refresh routes, etc.
}).await?;
reloader.start().await?;
Hot Reload Applicable Scope
| Component | Hot Reload Support | Description |
|---|---|---|
| Agent business logic | Supported | dylib dynamic loading |
| Constraint rules | Supported | Runtime registration |
| Topology configuration | Supported | Configuration hot update |
| Kernel data structures | Not supported | Restart required |
| System call ABI | Not supported | Restart required |
| Device drivers | Not supported | Restart required |
4. Project Scaffolding
Project scaffolding provides 12 business scenario templates. Each template contains a complete project structure, example code, test cases, and deployment configuration. Developers can quickly create projects based on templates.
Template List
| Template Name | Scenario | Included Components |
|---|---|---|
| economic-dispatch | Economic dispatch | DispatchAgent + OPF + constraints |
| load-forecast | Load forecasting | ForecastAgent + time-series model |
| fault-diagnosis | Fault diagnosis | DiagnosisAgent + protection coordination |
| scada-gateway | SCADA gateway | IEC 104 + Modbus adapter |
| topology-analyzer | Topology analysis | Topology engine + N-1 verification |
| trading-agent | Electricity trading | TradingAgent + market interface |
| new-energy | New energy management | Wind/solar forecasting + output control |
| ev-charging | EV charging | Load management + billing |
| microgrid | Microgrid | Island detection + grid-connected/off-grid switching |
| demand-response | Demand response | Load aggregation + response strategy |
| digital-twin | Digital twin | Twin engine + state estimation |
| compliance-report | Compliance report | Audit + compliance scanning |
Usage Example
# Create project from template
eneros-cli project new my-dispatch --template economic-dispatch
# Generated project structure
# my-dispatch/
# ├── Cargo.toml
# ├── src/
# │ ├── main.rs
# │ ├── agent.rs # DispatchAgent implementation
# │ ├── constraints.rs # Constraint definitions
# │ └── config.rs
# ├── tests/
# │ ├── integration.rs
# │ └── fixtures/
# ├── deploy/
# │ ├── Dockerfile
# │ └── eneros.toml
# └── README.md
// Generated Agent skeleton
use eneros_agent::{Agent, AgentContext, AgentResult};
pub struct DispatchAgent {
bus_id: BusId,
}
impl Agent for DispatchAgent {
async fn run(&mut self, ctx: &mut AgentContext) -> AgentResult<()> {
let island = ctx.syscall(GetIsland { bus: self.bus_id }).await?;
let generators = ctx.syscall(ListGenerators { island_id: island.id }).await?;
// TODO: Implement economic dispatch logic
let dispatch = self.economic_dispatch(&generators, &island.load)?;
ctx.syscall(ApplyDispatch(dispatch)).await?;
Ok(())
}
}
Improvements
Error Message Enhancement
All crate error types implement Display, source chain, and Diagnostic trait. CLI errors display complete call stacks and remediation recommendations.
// Error output example
// Error: Power flow computation did not converge
//
// Caused by:
// 0: Newton-Raphson did not converge after 20 iterations (residual: 0.0023 > tolerance: 0.000001)
// 1: Node 47 initial voltage estimate deviation too large (0.78 p.u., recommended range 0.95-1.05)
//
// Recommendation: Check the initial conditions of node 47, or increase the max_iter parameter
Structured Logging
All crates output JSON structured logs by default, supporting fine-grained control via RUST_LOG. Added eneros-cli logs command supporting cross-node log aggregation query and filtering.
IDE Integration
Released VS Code extension eneros-devtools, providing syntax highlighting, code completion, topology preview, and Agent debugging integration.
Bug Fixes
- BG-401: CLI garbled color output in PowerShell, detected terminal capability and downgraded
- BG-405: Hot reload file lock conflict on Windows, changed to rename + replace strategy
- BG-409: Agent debugger breakpoint failure in async context, fixed poll-driven breakpoint detection
- BG-413: Scaffolding-generated Cargo.toml missing workspace inheritance configuration, fixed
- BG-417: Performance analysis unstable sampling frequency on ARM platform, switched to perf_event_open
Breaking Changes
BC-221: eneros-cli Command Renaming
Some commands renamed to unify naming conventions. Old commands retain aliases until v0.45.0.
| Old Command | New Command | Description |
|---|---|---|
eneros run | eneros-cli dev run | Moved to dev group |
eneros test | eneros-cli project test | Moved to project group |
eneros deploy | eneros-cli deploy rollout | More explicit verb |
eneros health | eneros-cli ops health | Moved to ops group |
BC-222: Agent::run Adds AgentResult Return Type
The return type of the run method in the Agent trait changed from Result<()> to AgentResult<()> to carry richer Agent execution results.
Dependency Upgrades
| Dependency | Old Version | New Version | Description |
|---|---|---|---|
| hot-lib-reloader | 0.6 | 0.7 | Hot reload engine |
| clap | 4.4 | 4.5 | CLI framework |
| indicatif | 0.17 | 0.17.5 | Progress bar |
| comfy-table | 7.0 | 7.1 | Terminal table |
| dialoguer | 0.11 | 0.11.2 | Interactive input |
Upgrade Guide
Upgrade from v0.42.0
cargo update
cargo test --workspace
Install new CLI tool:
cargo install eneros-cli --version 0.43
Migrate old commands (optional, old commands still available):
eneros-cli dev run # Replaces eneros run
eneros-cli project test # Replaces eneros test
Install VS Code extension:
code --install-extension eneros.eneros-devtools
Related Documentation
- CLI Command Reference - All CLI commands detailed
- Debugging Guide - Agent debugging and performance analysis
- Hot Reload Configuration - Hot reload usage guide
- Project Templates - Scaffolding template description