#[cfg(feature = "sr2am_configurator")]
use super::PlanningDecision;
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
pub struct InferenceResult {
pub prompt_hash: u64,
pub timestamp: i64,
pub tree_budget_used: usize,
#[cfg(feature = "sr2am_configurator")]
pub plan_horizon_used: usize,
pub domain: String,
pub output: String,
pub reward: f32,
#[cfg(feature = "sr2am_configurator")]
pub planning_decision: Option<PlanningDecision>,
pub screened: bool,
pub budget_level: u8,
}
#[cfg(feature = "data_gate")]
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(u8)]
pub enum TaskType {
CodeIO,
DslExpr,
GameAction,
OpenEnded,
}
#[cfg(feature = "data_gate")]
#[derive(Debug, Clone)]
pub struct ProposerTask {
pub id: usize,
pub query: String,
pub program: Option<String>,
pub program_input: Option<String>,
pub task_type: TaskType,
}
#[cfg(feature = "data_gate")]
#[repr(u8)]
#[derive(Debug, Clone, PartialEq, Eq)]
pub enum GateDecision {
Admit,
Reject(String),
}
#[cfg(feature = "data_gate")]
pub trait DataGate {
fn admit(&self, task: &ProposerTask) -> GateDecision;
fn leak_rate(&self) -> f32;
}