#ifndef CST_METRICS_H #define CST_METRICS_H #ifdef __cplusplus extern "C" { #endif /* Append-only experiment log: /.agent/metrics/.jsonl * (override with CST_METRICS_PATH, disable with CST_METRICS=0). */ typedef struct cst_metrics cst_metrics_t; cst_metrics_t *cst_metrics_open(const char *workspace, const char *session_path); void cst_metrics_close(cst_metrics_t *m); /* Writes one line and frees obj (a cJSON*). NULL-safe. */ void cst_metrics_emit(cst_metrics_t *m, void *obj); const char *cst_metrics_path(const cst_metrics_t *m); #ifdef __cplusplus } #endif #endif