use rmcp::schemars;
use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, Serialize, Deserialize, schemars::JsonSchema)]
pub struct ExtractionResult {
#[schemars(description = "Extraction results in discovery order")]
pub results: Vec<serde_json::Value>,
#[schemars(description = "Non-fatal per-input errors")]
pub errors: Vec<serde_json::Value>,
#[schemars(description = "Aggregate extraction counts")]
pub summary: ExtractionSummaryOutput,
#[schemars(description = "Final URLs reached after redirects during URL ingestion")]
pub crawl_final_urls: Vec<String>,
#[schemars(description = "Total redirects followed while fetching or crawling URLs")]
pub crawl_redirect_count: usize,
#[schemars(description = "Unique normalized URLs discovered by crawls")]
pub crawl_unique_normalized_urls: Vec<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize, schemars::JsonSchema)]
pub struct ExtractionSummaryOutput {
pub inputs: usize,
pub results: usize,
pub errors: usize,
pub remote_urls: usize,
pub pages_crawled: usize,
pub documents_downloaded: usize,
}
#[derive(Debug, Clone, Serialize, Deserialize, schemars::JsonSchema)]
pub struct DetectMimeTypeOutput {
#[schemars(description = "Detected MIME type string")]
pub mime_type: String,
}
#[derive(Debug, Clone, Serialize, Deserialize, schemars::JsonSchema)]
pub struct ListFormatsOutput {
#[schemars(description = "List of supported document formats")]
pub formats: Vec<serde_json::Value>,
}
#[derive(Debug, Clone, Serialize, Deserialize, schemars::JsonSchema)]
pub struct VersionOutput {
#[schemars(description = "Xberg library version string")]
pub version: String,
}
#[derive(Debug, Clone, Serialize, Deserialize, schemars::JsonSchema)]
pub struct CacheStatsOutput {
#[schemars(description = "Absolute path to the cache directory")]
pub directory: String,
#[schemars(description = "Total number of cached files")]
pub total_files: u64,
#[schemars(description = "Total cache size in megabytes")]
pub total_size_mb: f64,
#[schemars(description = "Available disk space in megabytes")]
pub available_space_mb: f64,
}
#[derive(Debug, Clone, Serialize, Deserialize, schemars::JsonSchema)]
pub struct CacheManifestOutput {
#[schemars(description = "Xberg library version")]
pub xberg_version: String,
#[schemars(description = "Number of model files in the manifest")]
pub model_count: usize,
#[schemars(description = "Total size of all model files in bytes")]
pub total_size_bytes: u64,
#[schemars(description = "Model file entries")]
pub models: Vec<serde_json::Value>,
}