#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
#[cfg(all(target_os = "macos", debug_assertions))]
mod dev_bundle;
fn main() {
if std::env::args().nth(1).as_deref() == Some("--smoke") {
if let Err(error) = app_lib::run_package_smoke() {
eprintln!("agent-hub package smoke failed: {error}");
std::process::exit(1);
}
println!("agent-hub package smoke passed");
return;
}
let context = tauri::generate_context!();
#[cfg(all(target_os = "macos", debug_assertions))]
dev_bundle::relaunch(context.config()).expect("failed to prepare macOS development app");
#[cfg(not(agent_hub_desktop_plugin))]
app_lib::run(context);
#[cfg(agent_hub_desktop_plugin)]
app_lib::builder()
.expect("Failed to initialize app state")
.plugin(agent_hub_product_plugin::init())
.run(context)
.expect("error while running tauri application");
}