use serde::{Deserialize, Serialize};
use ts_rs::TS;
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, TS)]
pub struct AgentTraceRecord {
pub id: String,
pub finding_id: Option<String>,
pub task_kind: String,
pub runtime_name: String,
pub model: String,
pub prompt_version: Option<String>,
pub conversation_jsonl_path: Option<String>,
#[ts(type = "number")]
pub tokens_in: i64,
#[ts(type = "number")]
pub tokens_out: i64,
#[ts(type = "number")]
pub cost_usd_micros: i64,
#[ts(type = "number")]
pub cache_hits: i64,
#[ts(type = "number")]
pub cache_misses: i64,
#[ts(type = "number | null")]
pub duration_ms: Option<i64>,
#[ts(type = "number")]
pub started_at: i64,
#[ts(type = "number | null")]
pub finished_at: Option<i64>,
pub verifier_blob: Option<String>,
}