use cnctd_service_ssh::mcp::SshToolRouter;
use rmcp::ServiceExt;
use tokio::io::{stdin, stdout};
use tracing::info;
#[tokio::main]
async fn main() -> anyhow::Result<()> {
dotenvy::dotenv().ok();
tracing_subscriber::fmt()
.with_target(false)
.with_env_filter(
tracing_subscriber::EnvFilter::try_from_default_env()
.unwrap_or_else(|_| tracing_subscriber::EnvFilter::new("info"))
)
.compact()
.init();
info!("Starting cnctd-service-ssh (stdio mode)");
let router = SshToolRouter::new();
let transport = (stdin(), stdout());
let service = router.serve(transport).await?;
service.waiting().await?;
info!("Shutting down cnctd-service-ssh");
Ok(())
}