//! `spectra`: the control plane for AI coding agents. //! //! Command definitions and dispatch live in `cli`; each command group has //! its own module there, as in `oxy`. mod cli; // Many small allocations from every thread (events, JSON, templates): mimalloc // serves them from per-thread pages without the arena locks of glibc's. #[global_allocator] static ALLOC: mimalloc::MiMalloc = mimalloc::MiMalloc; fn main() { // Behave like other CLI tools when output is piped into `head`: die // quietly on SIGPIPE instead of panicking on a failed write. #[cfg(unix)] unsafe { libc::signal(libc::SIGPIPE, libc::SIG_DFL); } match cli::run() { Ok(code) => std::process::exit(code), Err(e) => { cli::ui::init(false); eprintln!("{} {e:#}", cli::ui::err("error:")); std::process::exit(1); } } }