Skip to main content

relay_knowledge/api/contracts/
status.rs

1use serde::{Deserialize, Serialize};
2
3use super::ApiMetadata;
4use crate::model_provider::ModelProfileRuntimeSummary;
5use crate::observability::TelemetryStatus;
6
7/// Resolved runtime paths and network budgets exposed for diagnostics.
8#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
9pub struct RuntimeStatus {
10    pub config_dir: String,
11    pub data_dir: String,
12    pub state_dir: String,
13    pub cache_dir: String,
14    pub log_dir: String,
15    pub temp_dir: String,
16    pub runtime_dir: String,
17    pub service_dir: String,
18    pub storage_topology: String,
19    pub http_bind: String,
20    pub http_request_timeout_ms: u64,
21    pub http_graceful_shutdown_timeout_ms: u64,
22    pub http_max_request_body_bytes: u64,
23    pub http_proxy_configured: bool,
24    pub http_no_proxy_rules: usize,
25    pub http_ssl_verify: bool,
26    pub qos_max_connections: usize,
27    pub qos_max_in_flight_requests: usize,
28    pub qos_max_queue_depth: usize,
29    pub qos_current_connections: usize,
30    pub qos_current_in_flight_requests: usize,
31    pub qos_current_queued_requests: usize,
32    pub qos_admitted_total: u64,
33    pub qos_queued_total: u64,
34    pub qos_rejected_total: u64,
35    pub qos_timed_out_total: u64,
36    pub qos_cancelled_total: u64,
37    pub qos_dropped_total: u64,
38    pub worker_embedding_endpoint_configured: bool,
39    pub worker_ocr_endpoint_configured: bool,
40    pub worker_vision_endpoint_configured: bool,
41    pub worker_extractor_endpoint_configured: bool,
42    pub worker_max_in_flight: usize,
43    pub code_index_max_in_flight: usize,
44    pub code_index_max_indexed_repositories: usize,
45    pub silent_updates_enabled: bool,
46    pub file_index_enabled: bool,
47    pub file_index_root_count: usize,
48    pub file_index_max_depth: usize,
49    pub file_index_max_file_bytes: u64,
50    pub file_index_scan_interval_ms: u64,
51    pub file_index_scan_timeout_ms: u64,
52    pub file_index_max_files_per_root: usize,
53    pub file_query_timeout_ms: u64,
54    pub semantic_backend_mode: String,
55    pub vector_backend_mode: String,
56    pub rerank_backend_mode: String,
57    pub rerank_model: Option<String>,
58    pub rerank_candidate_multiplier: usize,
59    pub rerank_max_candidates: usize,
60    pub rerank_timeout_ms: u64,
61    pub embedding_provider: Option<String>,
62    pub embedding_base_url: Option<String>,
63    pub embedding_api_key_configured: bool,
64    pub text_embedding_model: String,
65    pub image_embedding_model: String,
66    pub embedding_dimension: u32,
67    pub embedding_batch_size: Option<usize>,
68    pub embedding_timeout_ms: Option<u64>,
69    pub embedding_max_concurrency: Option<usize>,
70    pub model_profiles: ModelProfileRuntimeSummary,
71    pub telemetry: TelemetryStatus,
72}
73
74/// Minimal project status response exposed through the unified API layer.
75#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
76pub struct ProjectStatusResponse {
77    pub project_name: String,
78    pub metadata: ApiMetadata,
79    pub runtime: RuntimeStatus,
80}