use serde::{Deserialize, Serialize};
use serde_json::Value as JsonValue;
use std::path::PathBuf;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct SessionSpec {
pub kind: SpecKind,
pub project_root: Option<PathBuf>,
pub ctx: Option<JsonValue>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(tag = "kind", rename_all = "snake_case")]
pub enum SpecKind {
Run {
code: String,
},
Advice {
strategy: String,
task: Option<String>,
opts: Option<JsonValue>,
},
Eval {
scenario: ScenarioRef,
strategy: String,
opts: Option<JsonValue>,
auto_card: bool,
},
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(tag = "ref_kind", rename_all = "snake_case")]
pub enum ScenarioRef {
Inline(String),
Name(String),
File(PathBuf),
}