pub use ag_runtime::ReasoningLevel;
pub use ag_session::{
AgentKind, AgentModel, AgentSelection, AgentSelectionMetadata,
parse_persisted_session_agent_model, resolve_agent_kind_for_model,
resolve_agent_selection_for_model, resolve_model_for_available_agent_kinds,
resolve_prompt_model_agent_kind, selectable_models_for_agent_kinds,
};
#[derive(Debug, Clone, PartialEq, Eq)]
pub enum AgentCliVersion {
Loading,
Unknown,
Value(String),
}
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct AgentCliInfo {
pub executable_name: &'static str,
pub kind: AgentKind,
pub version: AgentCliVersion,
}
impl AgentCliInfo {
pub fn new(kind: AgentKind, version: Option<String>) -> Self {
Self {
executable_name: kind.executable_name(),
kind,
version: version.map_or(AgentCliVersion::Unknown, AgentCliVersion::Value),
}
}
pub fn loading(kind: AgentKind) -> Self {
Self {
executable_name: kind.executable_name(),
kind,
version: AgentCliVersion::Loading,
}
}
pub fn from_kinds(agent_kinds: &[AgentKind]) -> Vec<Self> {
agent_kinds
.iter()
.copied()
.map(|agent_kind| Self::new(agent_kind, None))
.collect()
}
pub fn loading_from_kinds(agent_kinds: &[AgentKind]) -> Vec<Self> {
agent_kinds.iter().copied().map(Self::loading).collect()
}
}