agent-hub-runtime 0.6.0

AgentHub desktop and companion CLI runtime for Tauri applications
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use super::{PreparedTerminal, TerminalDisplay, TerminalSpec};
use anyhow::Result;

/// Select the backend once for shell and interactive Agent launches.
/// Only an absent Core permits a native fallback.
pub(crate) fn prepare(
    spec: TerminalSpec,
    _agent: Option<&str>,
    _display: Option<&TerminalDisplay>,
) -> Result<PreparedTerminal> {
    #[cfg(feature = "herdr")]
    if let Some(core) = crate::core::herdr::hc::Core::discover() {
        return crate::core::herdr::hc::interactive::prepare(core, spec, _agent, _display);
    }
    Ok(spec.into())
}