noether-cli 0.6.0

Noether CLI: ACLI-compliant command-line interface for stage management, composition graph execution, and LLM-powered compose
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use crate::output::{acli_error, acli_ok};
use noether_engine::trace::JsonFileTraceStore;

pub fn cmd_trace(trace_store: &JsonFileTraceStore, composition_id: &str) {
    match trace_store.get(composition_id) {
        Some(trace) => {
            let json = serde_json::to_value(trace).unwrap();
            println!("{}", acli_ok(json));
        }
        None => {
            eprintln!(
                "{}",
                acli_error(&format!("trace {composition_id} not found"))
            );
            std::process::exit(1);
        }
    }
}