//! JSON wrapper for harness-level evaluation metrics (survey §5.2.1).
//!
//! Computes the six operational-substrate dimensions (trajectory
//! efficiency, verification strength, recovery, state consistency, safety,
//! replayability) from a JSONL tail of a session's event log.
/// Compute harness-level metrics from a JSONL string of events (one event
/// per line, as written to the runtime's event journal). Returns the
/// `HarnessMetrics` JSON.
pub fn compute(events_jsonl: &str) -> Result<String, String> {
let metrics = car_eventlog::harness_metrics::compute_from_jsonl(events_jsonl);
serde_json::to_string(&metrics).map_err(|e| e.to_string())
}