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 silent_updates_enabled: bool,
45    pub file_index_enabled: bool,
46    pub file_index_root_count: usize,
47    pub file_index_max_depth: usize,
48    pub file_index_max_file_bytes: u64,
49    pub file_index_scan_interval_ms: u64,
50    pub file_index_scan_timeout_ms: u64,
51    pub file_index_max_files_per_root: usize,
52    pub file_query_timeout_ms: u64,
53    pub semantic_backend_mode: String,
54    pub vector_backend_mode: String,
55    pub rerank_backend_mode: String,
56    pub rerank_model: Option<String>,
57    pub rerank_candidate_multiplier: usize,
58    pub rerank_max_candidates: usize,
59    pub rerank_timeout_ms: u64,
60    pub embedding_provider: Option<String>,
61    pub embedding_base_url: Option<String>,
62    pub embedding_api_key_configured: bool,
63    pub text_embedding_model: String,
64    pub image_embedding_model: String,
65    pub embedding_dimension: u32,
66    pub embedding_batch_size: Option<usize>,
67    pub embedding_timeout_ms: Option<u64>,
68    pub embedding_max_concurrency: Option<usize>,
69    pub model_profiles: ModelProfileRuntimeSummary,
70    pub telemetry: TelemetryStatus,
71}
72
73/// Minimal project status response exposed through the unified API layer.
74#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
75pub struct ProjectStatusResponse {
76    pub project_name: String,
77    pub metadata: ApiMetadata,
78    pub runtime: RuntimeStatus,
79}