use crate::types::Severity;
use serde::{Deserialize, Serialize};
use std::collections::HashMap;
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
#[serde(rename_all = "camelCase")]
pub struct MonitorAlert {
pub timestamp: String,
pub severity: Severity,
pub monitor: String,
pub message: String,
#[serde(skip_serializing_if = "Option::is_none", default)]
pub details: Option<String>,
}
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
#[serde(rename_all = "camelCase")]
pub struct MonitorStatus {
pub running: bool,
#[serde(skip_serializing_if = "Option::is_none", default)]
pub last_check: Option<String>,
pub alerts: Vec<MonitorAlert>,
}
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
#[serde(rename_all = "camelCase")]
pub struct CostEntry {
pub timestamp: String,
pub model: String,
pub input_tokens: u64,
pub output_tokens: u64,
pub estimated_cost_usd: f64,
}
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
#[serde(rename_all = "camelCase")]
pub struct CostReport {
pub hourly: f64,
pub daily: f64,
pub monthly: f64,
pub projection: CostProjection,
pub circuit_breaker_tripped: bool,
pub entries: Vec<CostEntry>,
}
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
#[serde(rename_all = "camelCase")]
pub struct CostProjection {
pub daily: f64,
pub monthly: f64,
}
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
#[serde(rename_all = "camelCase")]
pub struct SkillScanResult {
pub safe: bool,
pub skill_name: String,
pub findings: Vec<String>,
pub dangerous_patterns: Vec<String>,
pub ioc_matches: Vec<String>,
}
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
#[serde(rename_all = "camelCase")]
pub struct BehavioralBaseline {
pub tool_call_frequency: HashMap<String, u64>,
pub typical_tools: Vec<String>,
pub typical_data_paths: Vec<String>,
pub window_minutes: u64,
pub last_updated: String,
}
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
#[serde(rename_all = "camelCase")]
pub struct HardeningAction {
pub id: String,
pub description: String,
pub before: String,
pub after: String,
}
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
#[serde(rename_all = "camelCase")]
pub struct HardeningResult {
pub module: String,
pub applied: Vec<HardeningAction>,
pub skipped: Vec<HardeningAction>,
pub errors: Vec<String>,
}