feat: add default root route with server info

This commit is contained in:
Nathan Flurry 2026-01-29 21:51:45 -08:00
parent 2f9e677a19
commit 55655cb28a

View file

@ -124,7 +124,9 @@ pub fn build_router_with_state(shared: Arc<AppState>) -> (Router, Arc<AppState>)
));
}
let mut router = Router::new().nest("/v1", v1_router);
let mut router = Router::new()
.route("/", get(get_root))
.nest("/v1", v1_router);
if ui::is_enabled() {
router = router.merge(ui::router());
@ -3539,6 +3541,12 @@ async fn get_agent_modes(
Ok(Json(AgentModesResponse { modes }))
}
async fn get_root() -> &'static str {
"This is a Sandbox Agent server for orchestrating coding agents.\n\
See https://sandboxagent.dev for more information.\n\
Visit /ui/ for the inspector UI."
}
#[utoipa::path(
get,
path = "/v1/health",