File bug directly (#6413)

Co-authored-by: Douwe Osinga <douwe@squareup.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Douwe Osinga
2026-01-12 12:13:01 -05:00
committed by GitHub
parent 26c5a6c1dd
commit 5a460fd3b1
10 changed files with 359 additions and 112 deletions
+3 -1
View File
@@ -7,7 +7,7 @@ use goose::conversation::Conversation;
use goose::model::ModelConfig;
use goose::permission::permission_confirmation::PrincipalType;
use goose::providers::base::{ConfigKey, ModelInfo, ProviderMetadata, ProviderType};
use goose::session::{Session, SessionInsights, SessionType};
use goose::session::{Session, SessionInsights, SessionType, SystemInfo};
use rmcp::model::{
Annotations, Content, EmbeddedResource, Icon, ImageContent, JsonObject, RawAudioContent,
RawEmbeddedResource, RawImageContent, RawResource, RawTextContent, ResourceContents, Role,
@@ -327,6 +327,7 @@ derive_utoipa!(Icon as IconSchema);
#[openapi(
paths(
super::routes::status::status,
super::routes::status::system_info,
super::routes::status::diagnostics,
super::routes::mcp_ui_proxy::mcp_ui_proxy,
super::routes::config_management::backup_config,
@@ -483,6 +484,7 @@ derive_utoipa!(Icon as IconSchema);
Session,
SessionInsights,
SessionType,
SystemInfo,
Conversation,
IconSchema,
goose::session::extension_data::ExtensionData,
+12 -2
View File
@@ -1,8 +1,8 @@
use axum::body::Body;
use axum::http::HeaderValue;
use axum::response::IntoResponse;
use axum::{extract::Path, http::StatusCode, routing::get, Router};
use goose::session::generate_diagnostics;
use axum::{extract::Path, http::StatusCode, routing::get, Json, Router};
use goose::session::{generate_diagnostics, get_system_info, SystemInfo};
#[utoipa::path(get, path = "/status",
responses(
@@ -13,6 +13,15 @@ async fn status() -> String {
"ok".to_string()
}
#[utoipa::path(get, path = "/system_info",
responses(
(status = 200, description = "System information", body = SystemInfo),
)
)]
async fn system_info() -> Json<SystemInfo> {
Json(get_system_info())
}
#[utoipa::path(get, path = "/diagnostics/{session_id}",
responses(
(status = 200, description = "Diagnostics zip file", content_type = "application/zip", body = Vec<u8>),
@@ -42,5 +51,6 @@ async fn diagnostics(Path(session_id): Path<String>) -> impl IntoResponse {
pub fn routes() -> Router {
Router::new()
.route("/status", get(status))
.route("/system_info", get(system_info))
.route("/diagnostics/{session_id}", get(diagnostics))
}