1pub use ag_runtime::ReasoningLevel;
2pub use ag_session::{
3 AgentKind, AgentModel, AgentSelection, AgentSelectionMetadata,
4 parse_persisted_session_agent_model, resolve_agent_kind_for_model,
5 resolve_agent_selection_for_model, resolve_model_for_available_agent_kinds,
6 resolve_prompt_model_agent_kind, selectable_models_for_agent_kinds,
7};
8
9#[derive(Debug, Clone, PartialEq, Eq)]
12pub enum AgentCliVersion {
13 Loading,
16 Unknown,
19 Value(String),
21}
22
23#[derive(Debug, Clone, PartialEq, Eq)]
26pub struct AgentCliInfo {
27 pub executable_name: &'static str,
29 pub kind: AgentKind,
31 pub version: AgentCliVersion,
33}
34
35impl AgentCliInfo {
36 pub fn new(kind: AgentKind, version: Option<String>) -> Self {
38 Self {
39 executable_name: kind.executable_name(),
40 kind,
41 version: version.map_or(AgentCliVersion::Unknown, AgentCliVersion::Value),
42 }
43 }
44
45 pub fn loading(kind: AgentKind) -> Self {
48 Self {
49 executable_name: kind.executable_name(),
50 kind,
51 version: AgentCliVersion::Loading,
52 }
53 }
54
55 pub fn from_kinds(agent_kinds: &[AgentKind]) -> Vec<Self> {
58 agent_kinds
59 .iter()
60 .copied()
61 .map(|agent_kind| Self::new(agent_kind, None))
62 .collect()
63 }
64
65 pub fn loading_from_kinds(agent_kinds: &[AgentKind]) -> Vec<Self> {
68 agent_kinds.iter().copied().map(Self::loading).collect()
69 }
70}