From 84877e514611cb5173a15922ac6613a8816052dc Mon Sep 17 00:00:00 2001 From: jgrusewski Date: Thu, 5 Mar 2026 00:05:18 +0100 Subject: [PATCH] feat: add auth gRPC service + migrate dashboard from REST/WS to grpc-web Backend (Rust): - Create proto/auth.proto with Login and RefreshToken RPCs - Implement AuthGrpcService in services/api with JWT issuance - Register as unauthenticated service in main.rs (pre-auth) - Update JWT issuer from foxhunt-api-gateway to foxhunt-api Dashboard (TypeScript): - Install @connectrpc/connect-web + @bufbuild/protobuf - Generate TypeScript proto clients via buf (src/gen/) - Create grpc.ts transport with JWT interceptor - Rewrite all useApi hooks to typed gRPC calls - Replace WebSocket with useGrpcStream server-streaming hooks - Migrate all 6 pages + 6 components to grpc-web - Delete api.ts, websocket.ts, useWebSocket.ts Co-Authored-By: Claude Opus 4.6 --- proto/auth.proto | 35 + services/api/build.rs | 17 + services/api/src/auth/grpc_login.rs | 201 + services/api/src/auth/jwt/service.rs | 6 +- services/api/src/auth/mod.rs | 1 + services/api/src/lib.rs | 7 + services/api/src/main.rs | 10 +- web-dashboard/buf.gen.yaml | 7 + web-dashboard/package-lock.json | 238 + web-dashboard/package.json | 8 +- .../src/components/common/StatusBar.tsx | 20 +- .../src/components/ml/TrainingProgress.tsx | 60 +- .../src/components/risk/EmergencyControls.tsx | 8 +- .../src/components/trading/OrderForm.tsx | 28 +- .../src/components/trading/OrdersTable.tsx | 97 +- .../src/components/trading/PositionsTable.tsx | 67 +- web-dashboard/src/gen/auth_pb.ts | 139 + web-dashboard/src/gen/broker_gateway_pb.ts | 948 ++++ web-dashboard/src/gen/config_pb.ts | 1432 ++++++ web-dashboard/src/gen/data_acquisition_pb.ts | 697 +++ web-dashboard/src/gen/fxt_trading_pb.ts | 3900 +++++++++++++++++ web-dashboard/src/gen/health_pb.ts | 120 + web-dashboard/src/gen/ml_pb.ts | 1597 +++++++ web-dashboard/src/gen/ml_training_pb.ts | 2929 +++++++++++++ web-dashboard/src/gen/monitoring_pb.ts | 2342 ++++++++++ web-dashboard/src/gen/risk_pb.ts | 1435 ++++++ web-dashboard/src/gen/trading_agent_pb.ts | 2922 ++++++++++++ web-dashboard/src/gen/trading_pb.ts | 2375 ++++++++++ web-dashboard/src/hooks/useApi.ts | 207 +- web-dashboard/src/hooks/useAuth.ts | 30 +- web-dashboard/src/hooks/useGrpcStream.ts | 109 + web-dashboard/src/hooks/useWebSocket.ts | 49 - web-dashboard/src/lib/api.ts | 100 - web-dashboard/src/lib/grpc.ts | 80 + web-dashboard/src/lib/types.ts | 78 +- web-dashboard/src/lib/websocket.ts | 143 - .../src/pages/BacktestingDashboard.tsx | 146 +- web-dashboard/src/pages/ConfigDashboard.tsx | 32 +- web-dashboard/src/pages/LoginPage.tsx | 16 +- web-dashboard/src/pages/MLDashboard.tsx | 59 +- .../src/pages/PerformanceDashboard.tsx | 50 +- web-dashboard/src/pages/RiskDashboard.tsx | 66 +- web-dashboard/src/pages/TradingDashboard.tsx | 54 +- web-dashboard/vite.config.ts | 14 +- 44 files changed, 22151 insertions(+), 728 deletions(-) create mode 100644 proto/auth.proto create mode 100644 services/api/src/auth/grpc_login.rs create mode 100644 web-dashboard/buf.gen.yaml create mode 100644 web-dashboard/src/gen/auth_pb.ts create mode 100644 web-dashboard/src/gen/broker_gateway_pb.ts create mode 100644 web-dashboard/src/gen/config_pb.ts create mode 100644 web-dashboard/src/gen/data_acquisition_pb.ts create mode 100644 web-dashboard/src/gen/fxt_trading_pb.ts create mode 100644 web-dashboard/src/gen/health_pb.ts create mode 100644 web-dashboard/src/gen/ml_pb.ts create mode 100644 web-dashboard/src/gen/ml_training_pb.ts create mode 100644 web-dashboard/src/gen/monitoring_pb.ts create mode 100644 web-dashboard/src/gen/risk_pb.ts create mode 100644 web-dashboard/src/gen/trading_agent_pb.ts create mode 100644 web-dashboard/src/gen/trading_pb.ts create mode 100644 web-dashboard/src/hooks/useGrpcStream.ts delete mode 100644 web-dashboard/src/hooks/useWebSocket.ts delete mode 100644 web-dashboard/src/lib/api.ts create mode 100644 web-dashboard/src/lib/grpc.ts delete mode 100644 web-dashboard/src/lib/websocket.ts diff --git a/proto/auth.proto b/proto/auth.proto new file mode 100644 index 000000000..4a570f85a --- /dev/null +++ b/proto/auth.proto @@ -0,0 +1,35 @@ +syntax = "proto3"; + +package auth; + +// Authentication service — token issuance and refresh. +// This service is exposed WITHOUT the auth interceptor (pre-authentication). +service AuthService { + // Authenticate with username/password, receive JWT tokens. + rpc Login(LoginRequest) returns (LoginResponse); + + // Exchange a refresh token for a new access token. + rpc RefreshToken(RefreshTokenRequest) returns (RefreshTokenResponse); +} + +message LoginRequest { + string username = 1; + string password = 2; +} + +message LoginResponse { + string access_token = 1; + string refresh_token = 2; + // Unix timestamp (seconds) when the access token expires. + int64 expires_at = 3; +} + +message RefreshTokenRequest { + string refresh_token = 1; +} + +message RefreshTokenResponse { + string access_token = 1; + string refresh_token = 2; + int64 expires_at = 3; +} diff --git a/services/api/build.rs b/services/api/build.rs index b82355483..f0236307c 100644 --- a/services/api/build.rs +++ b/services/api/build.rs @@ -179,6 +179,22 @@ fn main() -> Result<(), Box> { &["../../proto"], )?; + // Compile Auth Service proto (package: auth) — server only (no client needed) + config + .clone() + .build_server(true) + .build_client(false) + .file_descriptor_set_path(out_dir.join("auth_descriptor.bin")) + .compile_well_known_types(true) + .extern_path(".google.protobuf", "::prost_types") + .type_attribute(".", "#[derive(serde::Serialize, serde::Deserialize)]") + .server_mod_attribute(".", "#[allow(unused_qualifications)]") + .client_mod_attribute(".", "#[allow(unused_qualifications)]") + .compile_protos( + &["../../proto/auth.proto"], + &["../../proto"], + )?; + println!("cargo:rerun-if-changed=../../proto/fxt_trading.proto"); println!("cargo:rerun-if-changed=../../proto/trading.proto"); println!("cargo:rerun-if-changed=../../proto/risk.proto"); @@ -189,6 +205,7 @@ fn main() -> Result<(), Box> { println!("cargo:rerun-if-changed=../../proto/broker_gateway.proto"); println!("cargo:rerun-if-changed=../../proto/data_acquisition.proto"); println!("cargo:rerun-if-changed=../../proto/ml.proto"); + println!("cargo:rerun-if-changed=../../proto/auth.proto"); Ok(()) } diff --git a/services/api/src/auth/grpc_login.rs b/services/api/src/auth/grpc_login.rs new file mode 100644 index 000000000..1a289f1e8 --- /dev/null +++ b/services/api/src/auth/grpc_login.rs @@ -0,0 +1,201 @@ +//! gRPC AuthService implementation — Login and RefreshToken RPCs. +//! +//! This service is exposed WITHOUT the auth interceptor since it handles +//! pre-authentication token issuance. + +use std::sync::Arc; +use std::time::{SystemTime, UNIX_EPOCH}; + +use jsonwebtoken::{decode, encode, Algorithm, DecodingKey, EncodingKey, Header, Validation}; +use tonic::{Request, Response, Status}; +use tracing::{error, info, warn}; +use uuid::Uuid; + +use crate::auth::jwt::service::{JwtClaims, JwtConfig}; +use crate::auth_proto::auth_service_server::AuthService; +use crate::auth_proto::{ + LoginRequest, LoginResponse, RefreshTokenRequest, RefreshTokenResponse, +}; + +/// Access token lifetime: 1 hour (seconds). +const ACCESS_TOKEN_EXPIRY_SECS: u64 = 3600; + +/// Refresh token lifetime: 24 hours (seconds). +const REFRESH_TOKEN_EXPIRY_SECS: u64 = 86400; + +/// gRPC implementation of `auth.AuthService`. +pub struct AuthGrpcService { + jwt_config: Arc, +} + +impl AuthGrpcService { + /// Create a new `AuthGrpcService` backed by the given JWT configuration. + pub fn new(jwt_config: Arc) -> Self { + Self { jwt_config } + } + + /// Validate user credentials. + /// + /// Checks the `USER_CREDENTIALS` environment variable (format: `user:pass`) + /// first, then falls back to a hard-coded development user (`admin` / `admin`). + fn validate_credentials(username: &str, password: &str) -> Result<(), Status> { + // Check USER_CREDENTIALS env var (format: "user:pass") + if let Ok(creds) = std::env::var("USER_CREDENTIALS") { + if let Some((env_user, env_pass)) = creds.split_once(':') { + if username == env_user && password == env_pass { + return Ok(()); + } + } + // Env var set but credentials don't match + return Err(Status::unauthenticated("invalid credentials")); + } + + // Development fallback: admin/admin + if username == "admin" && password == "admin" { + warn!("Login accepted using hard-coded dev credentials (set USER_CREDENTIALS for production)"); + return Ok(()); + } + + Err(Status::unauthenticated("invalid credentials")) + } + + /// Build and sign a JWT token (access or refresh). + fn issue_token( + &self, + subject: &str, + token_type: &str, + session_id: &str, + expiry_secs: u64, + ) -> Result<(String, u64), Status> { + let now = SystemTime::now() + .duration_since(UNIX_EPOCH) + .map_err(|e| { + error!("System time error: {}", e); + Status::internal("system time error") + })? + .as_secs(); + + let exp = now.checked_add(expiry_secs).ok_or_else(|| { + error!("Overflow computing token expiry"); + Status::internal("token expiry overflow") + })?; + + let claims = JwtClaims { + jti: Uuid::new_v4().to_string(), + sub: subject.to_string(), + iat: now, + exp, + iss: self.jwt_config.jwt_issuer.clone(), + aud: self.jwt_config.jwt_audience.clone(), + roles: vec!["user".to_string()], + permissions: vec![], + token_type: token_type.to_string(), + session_id: Some(session_id.to_string()), + }; + + let header = Header::new(Algorithm::HS256); + let key = EncodingKey::from_secret(self.jwt_config.jwt_secret.as_bytes()); + let token = encode(&header, &claims, &key).map_err(|e| { + error!("Failed to encode JWT: {}", e); + Status::internal("failed to issue token") + })?; + + Ok((token, exp)) + } + + /// Decode and validate a refresh token, returning its claims. + fn decode_refresh_token(&self, token: &str) -> Result { + if token.is_empty() { + return Err(Status::invalid_argument("refresh token is empty")); + } + + if token.len() > 8192 { + return Err(Status::invalid_argument("refresh token too long")); + } + + let key = DecodingKey::from_secret(self.jwt_config.jwt_secret.as_bytes()); + + let mut validation = Validation::new(Algorithm::HS256); + validation.set_issuer(&[&self.jwt_config.jwt_issuer]); + validation.set_audience(&[&self.jwt_config.jwt_audience]); + validation.validate_exp = true; + validation.validate_nbf = false; + validation.leeway = 10; + validation.validate_aud = true; + + let token_data = decode::(token, &key, &validation).map_err(|e| { + warn!("Refresh token decode failed: {}", e); + Status::unauthenticated("invalid refresh token") + })?; + + if token_data.claims.token_type != "refresh" { + return Err(Status::unauthenticated( + "token is not a refresh token", + )); + } + + if token_data.claims.sub.is_empty() { + return Err(Status::unauthenticated("refresh token has empty subject")); + } + + Ok(token_data.claims) + } +} + +#[tonic::async_trait] +impl AuthService for AuthGrpcService { + async fn login( + &self, + request: Request, + ) -> Result, Status> { + let req = request.into_inner(); + + if req.username.is_empty() || req.password.is_empty() { + return Err(Status::invalid_argument( + "username and password are required", + )); + } + + Self::validate_credentials(&req.username, &req.password)?; + + let session_id = Uuid::new_v4().to_string(); + + let (access_token, expires_at) = + self.issue_token(&req.username, "access", &session_id, ACCESS_TOKEN_EXPIRY_SECS)?; + let (refresh_token, _) = + self.issue_token(&req.username, "refresh", &session_id, REFRESH_TOKEN_EXPIRY_SECS)?; + + info!(user = %req.username, "Login successful, tokens issued"); + + Ok(Response::new(LoginResponse { + access_token, + refresh_token, + expires_at: i64::try_from(expires_at).unwrap_or(i64::MAX), + })) + } + + async fn refresh_token( + &self, + request: Request, + ) -> Result, Status> { + let req = request.into_inner(); + let claims = self.decode_refresh_token(&req.refresh_token)?; + + let session_id = claims + .session_id + .unwrap_or_else(|| Uuid::new_v4().to_string()); + + let (access_token, expires_at) = + self.issue_token(&claims.sub, "access", &session_id, ACCESS_TOKEN_EXPIRY_SECS)?; + let (refresh_token, _) = + self.issue_token(&claims.sub, "refresh", &session_id, REFRESH_TOKEN_EXPIRY_SECS)?; + + info!(user = %claims.sub, "Token refreshed successfully"); + + Ok(Response::new(RefreshTokenResponse { + access_token, + refresh_token, + expires_at: i64::try_from(expires_at).unwrap_or(i64::MAX), + })) + } +} diff --git a/services/api/src/auth/jwt/service.rs b/services/api/src/auth/jwt/service.rs index 53b769d76..7dddaa8f3 100644 --- a/services/api/src/auth/jwt/service.rs +++ b/services/api/src/auth/jwt/service.rs @@ -103,7 +103,7 @@ impl JwtConfig { Ok(Self { jwt_secret, - jwt_issuer: "foxhunt-api-gateway".to_string(), + jwt_issuer: "foxhunt-api".to_string(), jwt_audience: "foxhunt-services".to_string(), }) } @@ -454,7 +454,7 @@ mod tests { .await .expect("Should create config with valid JWT_SECRET"); - assert_eq!(config.jwt_issuer, "foxhunt-api-gateway"); + assert_eq!(config.jwt_issuer, "foxhunt-api"); assert_eq!(config.jwt_audience, "foxhunt-services"); assert!(config.jwt_secret.len() >= 64); @@ -484,7 +484,7 @@ mod tests { match result { Ok(config) => { // Verify config was loaded successfully - assert_eq!(config.jwt_issuer, "foxhunt-api-gateway"); + assert_eq!(config.jwt_issuer, "foxhunt-api"); assert_eq!(config.jwt_audience, "foxhunt-services"); assert!(config.jwt_secret.len() >= 64); diff --git a/services/api/src/auth/mod.rs b/services/api/src/auth/mod.rs index b1912a138..13b31aa06 100644 --- a/services/api/src/auth/mod.rs +++ b/services/api/src/auth/mod.rs @@ -17,6 +17,7 @@ //! - Authorization: <100ns (in-memory cache) //! - Rate limiting: <50ns (atomic counters) +pub mod grpc_login; pub mod interceptor; pub mod jwt; #[cfg(feature = "mfa")] diff --git a/services/api/src/lib.rs b/services/api/src/lib.rs index fc8cbf9f5..893142fa4 100644 --- a/services/api/src/lib.rs +++ b/services/api/src/lib.rs @@ -39,6 +39,8 @@ pub const DATA_ACQUISITION_FILE_DESCRIPTOR_SET: &[u8] = tonic::include_file_descriptor_set!("data_acquisition_descriptor"); pub const ML_FILE_DESCRIPTOR_SET: &[u8] = tonic::include_file_descriptor_set!("ml_descriptor"); +pub const AUTH_FILE_DESCRIPTOR_SET: &[u8] = + tonic::include_file_descriptor_set!("auth_descriptor"); // Include generated protobuf code FIRST (needed by other modules) pub mod foxhunt { @@ -91,6 +93,11 @@ pub mod ml_inference { tonic::include_proto!("ml"); } +// Auth Service proto (server-only, unauthenticated) +pub mod auth_proto { + tonic::include_proto!("auth"); +} + // Error module MUST come before modules that use it pub mod error; diff --git a/services/api/src/main.rs b/services/api/src/main.rs index edf3323bd..bb516b5d8 100644 --- a/services/api/src/main.rs +++ b/services/api/src/main.rs @@ -470,6 +470,7 @@ async fn main() -> Result<()> { }; // Build gRPC server with all services + use api::auth_proto::auth_service_server::AuthServiceServer; use api::foxhunt::tli::{ backtesting_service_server::BacktestingServiceServer, trading_service_server::TradingServiceServer, @@ -633,13 +634,18 @@ async fn main() -> Result<()> { .register_encoded_file_descriptor_set(api::BROKER_GATEWAY_FILE_DESCRIPTOR_SET) .register_encoded_file_descriptor_set(api::DATA_ACQUISITION_FILE_DESCRIPTOR_SET) .register_encoded_file_descriptor_set(api::ML_FILE_DESCRIPTOR_SET) + .register_encoded_file_descriptor_set(api::AUTH_FILE_DESCRIPTOR_SET) .build_v1() .map_err(|e| anyhow::anyhow!("Failed to build reflection service: {}", e))?; - // Add health + reflection services + // Create unauthenticated auth service (Login / RefreshToken -- pre-authentication) + let auth_grpc_service = api::auth::grpc_login::AuthGrpcService::new(Arc::new(jwt_config)); + + // Add health + reflection services, then unauthenticated auth service let mut router = server_builder .add_service(health_service) - .add_service(reflection_service); + .add_service(reflection_service) + .add_service(AuthServiceServer::new(auth_grpc_service)); // Always add trading service (required) with authentication router = router.add_service(TradingServiceServer::with_interceptor( diff --git a/web-dashboard/buf.gen.yaml b/web-dashboard/buf.gen.yaml new file mode 100644 index 000000000..09442dbc6 --- /dev/null +++ b/web-dashboard/buf.gen.yaml @@ -0,0 +1,7 @@ +version: v2 +plugins: + - local: protoc-gen-es + out: src/gen + opt: target=ts +inputs: + - directory: ../proto diff --git a/web-dashboard/package-lock.json b/web-dashboard/package-lock.json index 7dab949ad..e6bf5dc32 100644 --- a/web-dashboard/package-lock.json +++ b/web-dashboard/package-lock.json @@ -8,6 +8,9 @@ "name": "web-dashboard", "version": "0.0.0", "dependencies": { + "@bufbuild/protobuf": "^2.11.0", + "@connectrpc/connect": "^2.1.1", + "@connectrpc/connect-web": "^2.1.1", "@tailwindcss/vite": "^4.2.0", "@tanstack/react-query": "^5.90.21", "lightweight-charts": "^5.1.0", @@ -19,6 +22,8 @@ "zustand": "^5.0.11" }, "devDependencies": { + "@bufbuild/buf": "^1.66.0", + "@bufbuild/protoc-gen-es": "^2.11.0", "@eslint/js": "^9.39.1", "@types/node": "^24.10.1", "@types/react": "^19.2.7", @@ -315,6 +320,226 @@ "node": ">=6.9.0" } }, + "node_modules/@bufbuild/buf": { + "version": "1.66.0", + "resolved": "https://registry.npmjs.org/@bufbuild/buf/-/buf-1.66.0.tgz", + "integrity": "sha512-JSZT6OT8uKG2frScYNOS3Y4E+7wg1KSPQMKfLlbZZFnBoXwMqDdsxQF7O5ucameU+3DKRs+yQFI8tNQjFJ5T2g==", + "dev": true, + "hasInstallScript": true, + "license": "Apache-2.0", + "bin": { + "buf": "bin/buf", + "protoc-gen-buf-breaking": "bin/protoc-gen-buf-breaking", + "protoc-gen-buf-lint": "bin/protoc-gen-buf-lint" + }, + "engines": { + "node": ">=12" + }, + "optionalDependencies": { + "@bufbuild/buf-darwin-arm64": "1.66.0", + "@bufbuild/buf-darwin-x64": "1.66.0", + "@bufbuild/buf-linux-aarch64": "1.66.0", + "@bufbuild/buf-linux-armv7": "1.66.0", + "@bufbuild/buf-linux-x64": "1.66.0", + "@bufbuild/buf-win32-arm64": "1.66.0", + "@bufbuild/buf-win32-x64": "1.66.0" + } + }, + "node_modules/@bufbuild/buf-darwin-arm64": { + "version": "1.66.0", + "resolved": "https://registry.npmjs.org/@bufbuild/buf-darwin-arm64/-/buf-darwin-arm64-1.66.0.tgz", + "integrity": "sha512-C9orXX4SSVYKEumWFEO2T6xKrXsrvij0uS8kR20sHt9MYuFke14y6DfnAvXINPZrNpDiyOTldG7BPQtR40poRw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@bufbuild/buf-darwin-x64": { + "version": "1.66.0", + "resolved": "https://registry.npmjs.org/@bufbuild/buf-darwin-x64/-/buf-darwin-x64-1.66.0.tgz", + "integrity": "sha512-5I33S9UbimoBNCpOdMsmJHcW9NfxzKW5PsVrSyajpo+LL22Lfyha2ZO3JNhT/k3ZlGVvtpDAS9pRS0ouNKmGgA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@bufbuild/buf-linux-aarch64": { + "version": "1.66.0", + "resolved": "https://registry.npmjs.org/@bufbuild/buf-linux-aarch64/-/buf-linux-aarch64-1.66.0.tgz", + "integrity": "sha512-KFz9HukP3ACKfSe0fo+XbxndQR0kKCVLVfUkoc6qPUTrKn9lACnah6HlUtBlwanK95vg+MIMvy0DWoLYUX9cuA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@bufbuild/buf-linux-armv7": { + "version": "1.66.0", + "resolved": "https://registry.npmjs.org/@bufbuild/buf-linux-armv7/-/buf-linux-armv7-1.66.0.tgz", + "integrity": "sha512-W56iEZtnqB4ww9JCyhIipPrwZVe/zQ5I0pmWrJF8Daw67qvRYtvP3NSxtF5f0yAoB0tQAXDoqIiB/Ypl1UOz0g==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@bufbuild/buf-linux-x64": { + "version": "1.66.0", + "resolved": "https://registry.npmjs.org/@bufbuild/buf-linux-x64/-/buf-linux-x64-1.66.0.tgz", + "integrity": "sha512-6AYYyc2O32jnDjjHbyW9Oqcehd+PMw+34qVo+wGfaEgGwC+fyoL2oxcEmzsPyEvhY4mkYJRXaCb8p90Ndzd2vQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@bufbuild/buf-win32-arm64": { + "version": "1.66.0", + "resolved": "https://registry.npmjs.org/@bufbuild/buf-win32-arm64/-/buf-win32-arm64-1.66.0.tgz", + "integrity": "sha512-S+CD5NZ6q0HCI0g0PTVypjSQ63LsLm1Svd7yG1MjKz9mQ83Vl6rYXuzmYYVi2cww7w5tDew8sYASZETewvEuxg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@bufbuild/buf-win32-x64": { + "version": "1.66.0", + "resolved": "https://registry.npmjs.org/@bufbuild/buf-win32-x64/-/buf-win32-x64-1.66.0.tgz", + "integrity": "sha512-uSPoWRaX8Qd5pHZt6zzRuZXr4Sdbqe4Pm1PmMax/SGUPacVpH1v9AGX1/BTgx+g+b4vLS5T4SGxTl9ngkQaY3Q==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@bufbuild/protobuf": { + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/@bufbuild/protobuf/-/protobuf-2.11.0.tgz", + "integrity": "sha512-sBXGT13cpmPR5BMgHE6UEEfEaShh5Ror6rfN3yEK5si7QVrtZg8LEPQb0VVhiLRUslD2yLnXtnRzG035J/mZXQ==", + "license": "(Apache-2.0 AND BSD-3-Clause)" + }, + "node_modules/@bufbuild/protoc-gen-es": { + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/@bufbuild/protoc-gen-es/-/protoc-gen-es-2.11.0.tgz", + "integrity": "sha512-VzQuwEQDXipbZ1soWUuAWm1Z0C3B/IDWGeysnbX6ogJ6As91C2mdvAND/ekQ4YIWgen4d5nqLfIBOWLqCCjYUA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@bufbuild/protobuf": "2.11.0", + "@bufbuild/protoplugin": "2.11.0" + }, + "bin": { + "protoc-gen-es": "bin/protoc-gen-es" + }, + "engines": { + "node": ">=20" + }, + "peerDependencies": { + "@bufbuild/protobuf": "2.11.0" + }, + "peerDependenciesMeta": { + "@bufbuild/protobuf": { + "optional": true + } + } + }, + "node_modules/@bufbuild/protoplugin": { + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/@bufbuild/protoplugin/-/protoplugin-2.11.0.tgz", + "integrity": "sha512-lyZVNFUHArIOt4W0+dwYBe5GBwbKzbOy8ObaloEqsw9Mmiwv2O48TwddDoHN4itylC+BaEGqFdI1W8WQt2vWJQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@bufbuild/protobuf": "2.11.0", + "@typescript/vfs": "^1.6.2", + "typescript": "5.4.5" + } + }, + "node_modules/@bufbuild/protoplugin/node_modules/typescript": { + "version": "5.4.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz", + "integrity": "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/@connectrpc/connect": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@connectrpc/connect/-/connect-2.1.1.tgz", + "integrity": "sha512-JzhkaTvM73m2K1URT6tv53k2RwngSmCXLZJgK580qNQOXRzZRR/BCMfZw3h+90JpnG6XksP5bYT+cz0rpUzUWQ==", + "license": "Apache-2.0", + "peerDependencies": { + "@bufbuild/protobuf": "^2.7.0" + } + }, + "node_modules/@connectrpc/connect-web": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@connectrpc/connect-web/-/connect-web-2.1.1.tgz", + "integrity": "sha512-J8317Q2MaFRCT1jzVR1o06bZhDIBmU0UAzWx6xOIXzOq8+k71/+k7MUF7AwcBUX+34WIvbm5syRgC5HXQA8fOg==", + "license": "Apache-2.0", + "peerDependencies": { + "@bufbuild/protobuf": "^2.7.0", + "@connectrpc/connect": "2.1.1" + } + }, "node_modules/@esbuild/aix-ppc64": { "version": "0.27.3", "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.27.3.tgz", @@ -2087,6 +2312,19 @@ "url": "https://opencollective.com/eslint" } }, + "node_modules/@typescript/vfs": { + "version": "1.6.4", + "resolved": "https://registry.npmjs.org/@typescript/vfs/-/vfs-1.6.4.tgz", + "integrity": "sha512-PJFXFS4ZJKiJ9Qiuix6Dz/OwEIqHD7Dme1UwZhTK11vR+5dqW2ACbdndWQexBzCx+CPuMe5WBYQWCsFyGlQLlQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "^4.4.3" + }, + "peerDependencies": { + "typescript": "*" + } + }, "node_modules/@vitejs/plugin-react": { "version": "5.1.4", "resolved": "https://registry.npmjs.org/@vitejs/plugin-react/-/plugin-react-5.1.4.tgz", diff --git a/web-dashboard/package.json b/web-dashboard/package.json index 5e1c1aa03..66cb5ee47 100644 --- a/web-dashboard/package.json +++ b/web-dashboard/package.json @@ -7,9 +7,13 @@ "dev": "vite", "build": "tsc -b && vite build", "lint": "eslint .", - "preview": "vite preview" + "preview": "vite preview", + "generate": "buf generate" }, "dependencies": { + "@bufbuild/protobuf": "^2.11.0", + "@connectrpc/connect": "^2.1.1", + "@connectrpc/connect-web": "^2.1.1", "@tailwindcss/vite": "^4.2.0", "@tanstack/react-query": "^5.90.21", "lightweight-charts": "^5.1.0", @@ -21,6 +25,8 @@ "zustand": "^5.0.11" }, "devDependencies": { + "@bufbuild/buf": "^1.66.0", + "@bufbuild/protoc-gen-es": "^2.11.0", "@eslint/js": "^9.39.1", "@types/node": "^24.10.1", "@types/react": "^19.2.7", diff --git a/web-dashboard/src/components/common/StatusBar.tsx b/web-dashboard/src/components/common/StatusBar.tsx index 29eb47210..7134b6c46 100644 --- a/web-dashboard/src/components/common/StatusBar.tsx +++ b/web-dashboard/src/components/common/StatusBar.tsx @@ -1,12 +1,9 @@ -import { useWebSocket } from '../../hooks/useWebSocket'; import { useAuth } from '../../hooks/useAuth'; import { getTokenClaims } from '../../lib/auth'; -import { wsManager } from '../../lib/websocket'; - -const EMPTY_TOPICS: string[] = []; +import { useMetricsStream } from '../../hooks/useGrpcStream'; export function StatusBar() { - const { connected } = useWebSocket(EMPTY_TOPICS); + const { connected } = useMetricsStream(); const { authenticated, logout } = useAuth(); const claims = authenticated ? getTokenClaims() : null; @@ -20,18 +17,7 @@ export function StatusBar() { }`} aria-hidden="true" /> - WS: {connected ? 'Connected' : ( - <> - Disconnected - - - )} + gRPC: {connected ? 'Connected' : 'Disconnected'} {authenticated && claims && ( User: {claims.sub} diff --git a/web-dashboard/src/components/ml/TrainingProgress.tsx b/web-dashboard/src/components/ml/TrainingProgress.tsx index a3043908e..ae2450aa6 100644 --- a/web-dashboard/src/components/ml/TrainingProgress.tsx +++ b/web-dashboard/src/components/ml/TrainingProgress.tsx @@ -1,17 +1,33 @@ -import type { TrainingJob } from '../../lib/types'; +import type { TrainingJobSummary } from '../../gen/ml_training_pb'; +import { TrainingStatus } from '../../gen/ml_training_pb'; interface Props { - jobs?: TrainingJob[]; + jobs?: TrainingJobSummary[]; loading?: boolean; } +function statusStr(status: TrainingStatus): string { + switch (status) { + case TrainingStatus.PENDING: return 'queued'; + case TrainingStatus.RUNNING: return 'running'; + case TrainingStatus.COMPLETED: return 'completed'; + case TrainingStatus.FAILED: return 'failed'; + case TrainingStatus.STOPPED: return 'stopped'; + default: return 'unknown'; + } +} + export function TrainingProgress({ jobs = [], loading }: Props) { + const runningCount = jobs.filter( + (j) => j.status === TrainingStatus.RUNNING, + ).length; + return (
Training Jobs - {jobs.filter((j) => j.status === 'running').length} running + {runningCount} running
@@ -27,37 +43,40 @@ export function TrainingProgress({ jobs = [], loading }: Props) {
)} {jobs.map((job) => ( -
+
- {job.model_type} + {job.modelType} - {job.job_id.slice(0, 8)} + {job.jobId.slice(0, 8)}
- {/* Progress bar */} + {/* Progress bar — use description or a placeholder since proto doesn't have progress field */}
- - Epoch {job.epoch}/{job.total_epochs} - - Loss: {job.loss.toFixed(4)} - {(job.progress * 100).toFixed(0)}% + {job.modelType} + {job.description || statusStr(job.status)}
))} @@ -66,18 +85,19 @@ export function TrainingProgress({ jobs = [], loading }: Props) { ); } -function StatusBadge({ status }: { status: TrainingJob['status'] }) { - const styles = { +function StatusBadge({ status }: { status: TrainingStatus }) { + const label = statusStr(status); + const styles: Record = { queued: 'text-[var(--color-text-secondary)] bg-slate-500/10', running: 'text-[var(--color-accent)] bg-blue-500/10', completed: 'text-[var(--color-green)] bg-green-500/10', failed: 'text-[var(--color-red)] bg-red-500/10', stopped: 'text-[var(--color-yellow)] bg-yellow-500/10', - }[status]; + }; return ( - - {status} + + {label} ); } diff --git a/web-dashboard/src/components/risk/EmergencyControls.tsx b/web-dashboard/src/components/risk/EmergencyControls.tsx index 221adb77d..913959cf7 100644 --- a/web-dashboard/src/components/risk/EmergencyControls.tsx +++ b/web-dashboard/src/components/risk/EmergencyControls.tsx @@ -1,15 +1,15 @@ import { useState } from 'react'; -import { useApiPost } from '../../hooks/useApi'; +import { useEmergencyStop } from '../../hooks/useApi'; export function EmergencyControls() { const [confirmText, setConfirmText] = useState(''); const [showConfirm, setShowConfirm] = useState(false); - const emergencyStop = useApiPost('/risk/emergency-stop'); + const emergencyStop = useEmergencyStop(); function handleEmergencyStop() { if (confirmText === 'STOP') { - emergencyStop.mutate({}); + emergencyStop.mutate({ reason: 'Manual emergency stop from dashboard' }); setShowConfirm(false); setConfirmText(''); emergencyStop.reset(); @@ -26,7 +26,7 @@ export function EmergencyControls() { {!showConfirm ? (
diff --git a/web-dashboard/src/gen/auth_pb.ts b/web-dashboard/src/gen/auth_pb.ts new file mode 100644 index 000000000..3b3c8b8df --- /dev/null +++ b/web-dashboard/src/gen/auth_pb.ts @@ -0,0 +1,139 @@ +// @generated by protoc-gen-es v2.11.0 with parameter "target=ts" +// @generated from file auth.proto (package auth, syntax proto3) +/* eslint-disable */ + +import type { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2"; +import { fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv2"; +import type { Message } from "@bufbuild/protobuf"; + +/** + * Describes the file auth.proto. + */ +export const file_auth: GenFile = /*@__PURE__*/ + fileDesc("CgphdXRoLnByb3RvEgRhdXRoIjIKDExvZ2luUmVxdWVzdBIQCgh1c2VybmFtZRgBIAEoCRIQCghwYXNzd29yZBgCIAEoCSJQCg1Mb2dpblJlc3BvbnNlEhQKDGFjY2Vzc190b2tlbhgBIAEoCRIVCg1yZWZyZXNoX3Rva2VuGAIgASgJEhIKCmV4cGlyZXNfYXQYAyABKAMiLAoTUmVmcmVzaFRva2VuUmVxdWVzdBIVCg1yZWZyZXNoX3Rva2VuGAEgASgJIlcKFFJlZnJlc2hUb2tlblJlc3BvbnNlEhQKDGFjY2Vzc190b2tlbhgBIAEoCRIVCg1yZWZyZXNoX3Rva2VuGAIgASgJEhIKCmV4cGlyZXNfYXQYAyABKAMyhgEKC0F1dGhTZXJ2aWNlEjAKBUxvZ2luEhIuYXV0aC5Mb2dpblJlcXVlc3QaEy5hdXRoLkxvZ2luUmVzcG9uc2USRQoMUmVmcmVzaFRva2VuEhkuYXV0aC5SZWZyZXNoVG9rZW5SZXF1ZXN0GhouYXV0aC5SZWZyZXNoVG9rZW5SZXNwb25zZWIGcHJvdG8z"); + +/** + * @generated from message auth.LoginRequest + */ +export type LoginRequest = Message<"auth.LoginRequest"> & { + /** + * @generated from field: string username = 1; + */ + username: string; + + /** + * @generated from field: string password = 2; + */ + password: string; +}; + +/** + * Describes the message auth.LoginRequest. + * Use `create(LoginRequestSchema)` to create a new message. + */ +export const LoginRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_auth, 0); + +/** + * @generated from message auth.LoginResponse + */ +export type LoginResponse = Message<"auth.LoginResponse"> & { + /** + * @generated from field: string access_token = 1; + */ + accessToken: string; + + /** + * @generated from field: string refresh_token = 2; + */ + refreshToken: string; + + /** + * Unix timestamp (seconds) when the access token expires. + * + * @generated from field: int64 expires_at = 3; + */ + expiresAt: bigint; +}; + +/** + * Describes the message auth.LoginResponse. + * Use `create(LoginResponseSchema)` to create a new message. + */ +export const LoginResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_auth, 1); + +/** + * @generated from message auth.RefreshTokenRequest + */ +export type RefreshTokenRequest = Message<"auth.RefreshTokenRequest"> & { + /** + * @generated from field: string refresh_token = 1; + */ + refreshToken: string; +}; + +/** + * Describes the message auth.RefreshTokenRequest. + * Use `create(RefreshTokenRequestSchema)` to create a new message. + */ +export const RefreshTokenRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_auth, 2); + +/** + * @generated from message auth.RefreshTokenResponse + */ +export type RefreshTokenResponse = Message<"auth.RefreshTokenResponse"> & { + /** + * @generated from field: string access_token = 1; + */ + accessToken: string; + + /** + * @generated from field: string refresh_token = 2; + */ + refreshToken: string; + + /** + * @generated from field: int64 expires_at = 3; + */ + expiresAt: bigint; +}; + +/** + * Describes the message auth.RefreshTokenResponse. + * Use `create(RefreshTokenResponseSchema)` to create a new message. + */ +export const RefreshTokenResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_auth, 3); + +/** + * Authentication service — token issuance and refresh. + * This service is exposed WITHOUT the auth interceptor (pre-authentication). + * + * @generated from service auth.AuthService + */ +export const AuthService: GenService<{ + /** + * Authenticate with username/password, receive JWT tokens. + * + * @generated from rpc auth.AuthService.Login + */ + login: { + methodKind: "unary"; + input: typeof LoginRequestSchema; + output: typeof LoginResponseSchema; + }, + /** + * Exchange a refresh token for a new access token. + * + * @generated from rpc auth.AuthService.RefreshToken + */ + refreshToken: { + methodKind: "unary"; + input: typeof RefreshTokenRequestSchema; + output: typeof RefreshTokenResponseSchema; + }, +}> = /*@__PURE__*/ + serviceDesc(file_auth, 0); + diff --git a/web-dashboard/src/gen/broker_gateway_pb.ts b/web-dashboard/src/gen/broker_gateway_pb.ts new file mode 100644 index 000000000..8fa50b5f6 --- /dev/null +++ b/web-dashboard/src/gen/broker_gateway_pb.ts @@ -0,0 +1,948 @@ +// Broker Gateway Service - FIX Order Routing Protocol +// +// This service handles all broker communication via FIX 4.2/4.4 protocol +// for order routing, execution management, and account state synchronization. + +// @generated by protoc-gen-es v2.11.0 with parameter "target=ts" +// @generated from file broker_gateway.proto (package broker_gateway, syntax proto3) +/* eslint-disable */ + +import type { GenEnum, GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2"; +import { enumDesc, fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv2"; +import type { Message } from "@bufbuild/protobuf"; + +/** + * Describes the file broker_gateway.proto. + */ +export const file_broker_gateway: GenFile = /*@__PURE__*/ + fileDesc("ChRicm9rZXJfZ2F0ZXdheS5wcm90bxIOYnJva2VyX2dhdGV3YXki2wIKEVJvdXRlT3JkZXJSZXF1ZXN0Eg4KBnN5bWJvbBgBIAEoCRInCgRzaWRlGAIgASgOMhkuYnJva2VyX2dhdGV3YXkuT3JkZXJTaWRlEhAKCHF1YW50aXR5GAMgASgBEi0KCm9yZGVyX3R5cGUYBCABKA4yGS5icm9rZXJfZ2F0ZXdheS5PcmRlclR5cGUSEgoFcHJpY2UYBSABKAFIAIgBARIXCgpzdG9wX3ByaWNlGAYgASgBSAGIAQESEgoKYWNjb3VudF9pZBgHIAEoCRJBCghtZXRhZGF0YRgIIAMoCzIvLmJyb2tlcl9nYXRld2F5LlJvdXRlT3JkZXJSZXF1ZXN0Lk1ldGFkYXRhRW50cnkaLwoNTWV0YWRhdGFFbnRyeRILCgNrZXkYASABKAkSDQoFdmFsdWUYAiABKAk6AjgBQggKBl9wcmljZUINCgtfc3RvcF9wcmljZSKaAQoSUm91dGVPcmRlclJlc3BvbnNlEhcKD2Jyb2tlcl9vcmRlcl9pZBgBIAEoCRIXCg9jbGllbnRfb3JkZXJfaWQYAiABKAkSKwoGc3RhdHVzGAMgASgOMhsuYnJva2VyX2dhdGV3YXkuT3JkZXJTdGF0dXMSFAoMc3VibWl0dGVkX2F0GAQgASgDEg8KB21lc3NhZ2UYBSABKAkiQQoSQ2FuY2VsT3JkZXJSZXF1ZXN0EhcKD2NsaWVudF9vcmRlcl9pZBgBIAEoCRISCgphY2NvdW50X2lkGAIgASgJImgKE0NhbmNlbE9yZGVyUmVzcG9uc2US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2VyX2dhdGV3YXkuU3RyZWFtRXhlY3V0aW9uc1JlcXVlc3QaHi5icm9rZXJfZ2F0ZXdheS5FeGVjdXRpb25FdmVudDABElYKC0hlYWx0aENoZWNrEiIuYnJva2VyX2dhdGV3YXkuSGVhbHRoQ2hlY2tSZXF1ZXN0GiMuYnJva2VyX2dhdGV3YXkuSGVhbHRoQ2hlY2tSZXNwb25zZRJqChJTdHJlYW1BY2NvdW50U3RhdGUSKS5icm9rZXJfZ2F0ZXdheS5TdHJlYW1BY2NvdW50U3RhdGVSZXF1ZXN0GicuYnJva2VyX2dhdGV3YXkuR2V0QWNjb3VudFN0YXRlUmVzcG9uc2UwARJtChNTdHJlYW1TZXNzaW9uU3RhdHVzEiouYnJva2VyX2dhdGV3YXkuU3RyZWFtU2Vzc2lvblN0YXR1c1JlcXVlc3QaKC5icm9rZXJfZ2F0ZXdheS5HZXRTZXNzaW9uU3RhdHVzUmVzcG9uc2UwAWIGcHJvdG8z"); + +/** + * @generated from message broker_gateway.RouteOrderRequest + */ +export type RouteOrderRequest = Message<"broker_gateway.RouteOrderRequest"> & { + /** + * ES, NQ, etc. + * + * @generated from field: string symbol = 1; + */ + symbol: string; + + /** + * BUY, SELL + * + * @generated from field: broker_gateway.OrderSide side = 2; + */ + side: OrderSide; + + /** + * Number of contracts + * + * @generated from field: double quantity = 3; + */ + quantity: number; + + /** + * MARKET, LIMIT, STOP, STOP_LIMIT + * + * @generated from field: broker_gateway.OrderType order_type = 4; + */ + orderType: OrderType; + + /** + * Limit price (required for LIMIT orders) + * + * @generated from field: optional double price = 5; + */ + price?: number; + + /** + * Stop price (required for STOP orders) + * + * @generated from field: optional double stop_price = 6; + */ + stopPrice?: number; + + /** + * AMP account identifier + * + * @generated from field: string account_id = 7; + */ + accountId: string; + + /** + * Strategy, model_name, etc. + * + * @generated from field: map metadata = 8; + */ + metadata: { [key: string]: string }; +}; + +/** + * Describes the message broker_gateway.RouteOrderRequest. + * Use `create(RouteOrderRequestSchema)` to create a new message. + */ +export const RouteOrderRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_broker_gateway, 0); + +/** + * @generated from message broker_gateway.RouteOrderResponse + */ +export type RouteOrderResponse = Message<"broker_gateway.RouteOrderResponse"> & { + /** + * Broker-assigned OrderID (Tag 37, filled after ack) + * + * @generated from field: string broker_order_id = 1; + */ + brokerOrderId: string; + + /** + * Our ClOrdID (Tag 11) + * + * @generated from field: string client_order_id = 2; + */ + clientOrderId: string; + + /** + * PENDING_SUBMIT, SUBMITTED, etc. + * + * @generated from field: broker_gateway.OrderStatus status = 3; + */ + status: OrderStatus; + + /** + * Timestamp (nanoseconds) + * + * @generated from field: int64 submitted_at = 4; + */ + submittedAt: bigint; + + /** + * Success/error message + * + * @generated from field: string message = 5; + */ + message: string; +}; + +/** + * Describes the message broker_gateway.RouteOrderResponse. + * Use `create(RouteOrderResponseSchema)` to create a new message. + */ +export const RouteOrderResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_broker_gateway, 1); + +/** + * @generated from message broker_gateway.CancelOrderRequest + */ +export type CancelOrderRequest = Message<"broker_gateway.CancelOrderRequest"> & { + /** + * Order to cancel + * + * @generated from field: string client_order_id = 1; + */ + clientOrderId: string; + + /** + * Account verification + * + * @generated from field: string account_id = 2; + */ + accountId: string; +}; + +/** + * Describes the message broker_gateway.CancelOrderRequest. + * Use `create(CancelOrderRequestSchema)` to create a new message. + */ +export const CancelOrderRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_broker_gateway, 2); + +/** + * @generated from message broker_gateway.CancelOrderResponse + */ +export type CancelOrderResponse = Message<"broker_gateway.CancelOrderResponse"> & { + /** + * @generated from field: bool success = 1; + */ + success: boolean; + + /** + * @generated from field: string message = 2; + */ + message: string; + + /** + * CANCEL_PENDING, CANCELLED, etc. + * + * @generated from field: broker_gateway.OrderStatus new_status = 3; + */ + newStatus: OrderStatus; +}; + +/** + * Describes the message broker_gateway.CancelOrderResponse. + * Use `create(CancelOrderResponseSchema)` to create a new message. + */ +export const CancelOrderResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_broker_gateway, 3); + +/** + * @generated from message broker_gateway.GetAccountStateRequest + */ +export type GetAccountStateRequest = Message<"broker_gateway.GetAccountStateRequest"> & { + /** + * @generated from field: string account_id = 1; + */ + accountId: string; +}; + +/** + * Describes the message broker_gateway.GetAccountStateRequest. + * Use `create(GetAccountStateRequestSchema)` to create a new message. + */ +export const GetAccountStateRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_broker_gateway, 4); + +/** + * @generated from message broker_gateway.GetAccountStateResponse + */ +export type GetAccountStateResponse = Message<"broker_gateway.GetAccountStateResponse"> & { + /** + * @generated from field: string account_id = 1; + */ + accountId: string; + + /** + * @generated from field: double cash_balance = 2; + */ + cashBalance: number; + + /** + * @generated from field: double equity = 3; + */ + equity: number; + + /** + * @generated from field: double margin_used = 4; + */ + marginUsed: number; + + /** + * @generated from field: double margin_available = 5; + */ + marginAvailable: number; + + /** + * @generated from field: double buying_power = 6; + */ + buyingPower: number; + + /** + * @generated from field: double unrealized_pnl = 7; + */ + unrealizedPnl: number; + + /** + * @generated from field: double realized_pnl = 8; + */ + realizedPnl: number; + + /** + * Timestamp (nanoseconds) + * + * @generated from field: int64 last_updated = 9; + */ + lastUpdated: bigint; +}; + +/** + * Describes the message broker_gateway.GetAccountStateResponse. + * Use `create(GetAccountStateResponseSchema)` to create a new message. + */ +export const GetAccountStateResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_broker_gateway, 5); + +/** + * @generated from message broker_gateway.GetPositionsRequest + */ +export type GetPositionsRequest = Message<"broker_gateway.GetPositionsRequest"> & { + /** + * @generated from field: string account_id = 1; + */ + accountId: string; + + /** + * Filter by symbol (optional) + * + * @generated from field: optional string symbol = 2; + */ + symbol?: string; +}; + +/** + * Describes the message broker_gateway.GetPositionsRequest. + * Use `create(GetPositionsRequestSchema)` to create a new message. + */ +export const GetPositionsRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_broker_gateway, 6); + +/** + * @generated from message broker_gateway.GetPositionsResponse + */ +export type GetPositionsResponse = Message<"broker_gateway.GetPositionsResponse"> & { + /** + * @generated from field: repeated broker_gateway.Position positions = 1; + */ + positions: Position[]; + + /** + * @generated from field: double total_equity = 2; + */ + totalEquity: number; + + /** + * @generated from field: double total_exposure = 3; + */ + totalExposure: number; + + /** + * @generated from field: double leverage_ratio = 4; + */ + leverageRatio: number; + + /** + * @generated from field: int64 timestamp = 5; + */ + timestamp: bigint; +}; + +/** + * Describes the message broker_gateway.GetPositionsResponse. + * Use `create(GetPositionsResponseSchema)` to create a new message. + */ +export const GetPositionsResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_broker_gateway, 7); + +/** + * @generated from message broker_gateway.Position + */ +export type Position = Message<"broker_gateway.Position"> & { + /** + * @generated from field: string symbol = 1; + */ + symbol: string; + + /** + * Positive = long, negative = short + * + * @generated from field: double quantity = 2; + */ + quantity: number; + + /** + * @generated from field: double average_price = 3; + */ + averagePrice: number; + + /** + * @generated from field: double market_value = 4; + */ + marketValue: number; + + /** + * @generated from field: double unrealized_pnl = 5; + */ + unrealizedPnl: number; +}; + +/** + * Describes the message broker_gateway.Position. + * Use `create(PositionSchema)` to create a new message. + */ +export const PositionSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_broker_gateway, 8); + +/** + * @generated from message broker_gateway.GetSessionStatusRequest + */ +export type GetSessionStatusRequest = Message<"broker_gateway.GetSessionStatusRequest"> & { + /** + * Optional: default to active session + * + * @generated from field: optional string session_id = 1; + */ + sessionId?: string; +}; + +/** + * Describes the message broker_gateway.GetSessionStatusRequest. + * Use `create(GetSessionStatusRequestSchema)` to create a new message. + */ +export const GetSessionStatusRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_broker_gateway, 9); + +/** + * @generated from message broker_gateway.GetSessionStatusResponse + */ +export type GetSessionStatusResponse = Message<"broker_gateway.GetSessionStatusResponse"> & { + /** + * @generated from field: string session_id = 1; + */ + sessionId: string; + + /** + * @generated from field: broker_gateway.SessionState state = 2; + */ + state: SessionState; + + /** + * Current outgoing sequence + * + * @generated from field: int64 sender_seq_num = 3; + */ + senderSeqNum: bigint; + + /** + * Expected incoming sequence + * + * @generated from field: int64 target_seq_num = 4; + */ + targetSeqNum: bigint; + + /** + * Timestamp (nanoseconds) + * + * @generated from field: int64 last_heartbeat_sent = 5; + */ + lastHeartbeatSent: bigint; + + /** + * Timestamp (nanoseconds) + * + * @generated from field: int64 last_heartbeat_received = 6; + */ + lastHeartbeatReceived: bigint; + + /** + * Round-trip time in milliseconds + * + * @generated from field: double heartbeat_rtt_ms = 7; + */ + heartbeatRttMs: number; + + /** + * Timestamp (nanoseconds) + * + * @generated from field: int64 connected_at = 8; + */ + connectedAt: bigint; + + /** + * Additional session info + * + * @generated from field: map details = 9; + */ + details: { [key: string]: string }; +}; + +/** + * Describes the message broker_gateway.GetSessionStatusResponse. + * Use `create(GetSessionStatusResponseSchema)` to create a new message. + */ +export const GetSessionStatusResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_broker_gateway, 10); + +/** + * @generated from message broker_gateway.StreamExecutionsRequest + */ +export type StreamExecutionsRequest = Message<"broker_gateway.StreamExecutionsRequest"> & { + /** + * Filter by account + * + * @generated from field: optional string account_id = 1; + */ + accountId?: string; + + /** + * Filter by symbol + * + * @generated from field: optional string symbol = 2; + */ + symbol?: string; +}; + +/** + * Describes the message broker_gateway.StreamExecutionsRequest. + * Use `create(StreamExecutionsRequestSchema)` to create a new message. + */ +export const StreamExecutionsRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_broker_gateway, 11); + +/** + * @generated from message broker_gateway.ExecutionEvent + */ +export type ExecutionEvent = Message<"broker_gateway.ExecutionEvent"> & { + /** + * ExecID (Tag 17) + * + * @generated from field: string execution_id = 1; + */ + executionId: string; + + /** + * OrderID (Tag 37) + * + * @generated from field: string broker_order_id = 2; + */ + brokerOrderId: string; + + /** + * ClOrdID (Tag 11) + * + * @generated from field: string client_order_id = 3; + */ + clientOrderId: string; + + /** + * @generated from field: string symbol = 4; + */ + symbol: string; + + /** + * @generated from field: broker_gateway.OrderSide side = 5; + */ + side: OrderSide; + + /** + * NEW, TRADE, CANCELED, REJECTED + * + * @generated from field: broker_gateway.ExecutionType exec_type = 6; + */ + execType: ExecutionType; + + /** + * Order status after this execution + * + * @generated from field: broker_gateway.OrderStatus order_status = 7; + */ + orderStatus: OrderStatus; + + /** + * Quantity filled (Tag 32) + * + * @generated from field: double last_qty = 8; + */ + lastQty: number; + + /** + * Fill price (Tag 31) + * + * @generated from field: double last_price = 9; + */ + lastPrice: number; + + /** + * Total filled (Tag 14) + * + * @generated from field: double cum_qty = 10; + */ + cumQty: number; + + /** + * Average fill price (Tag 6) + * + * @generated from field: double avg_price = 11; + */ + avgPrice: number; + + /** + * Execution timestamp + * + * @generated from field: int64 transact_time = 12; + */ + transactTime: bigint; + + /** + * Reject reason (if applicable) + * + * @generated from field: optional string text = 13; + */ + text?: string; +}; + +/** + * Describes the message broker_gateway.ExecutionEvent. + * Use `create(ExecutionEventSchema)` to create a new message. + */ +export const ExecutionEventSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_broker_gateway, 12); + +/** + * @generated from message broker_gateway.HealthCheckRequest + */ +export type HealthCheckRequest = Message<"broker_gateway.HealthCheckRequest"> & { +}; + +/** + * Describes the message broker_gateway.HealthCheckRequest. + * Use `create(HealthCheckRequestSchema)` to create a new message. + */ +export const HealthCheckRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_broker_gateway, 13); + +/** + * @generated from message broker_gateway.HealthCheckResponse + */ +export type HealthCheckResponse = Message<"broker_gateway.HealthCheckResponse"> & { + /** + * @generated from field: bool healthy = 1; + */ + healthy: boolean; + + /** + * @generated from field: string message = 2; + */ + message: string; + + /** + * @generated from field: map details = 3; + */ + details: { [key: string]: string }; +}; + +/** + * Describes the message broker_gateway.HealthCheckResponse. + * Use `create(HealthCheckResponseSchema)` to create a new message. + */ +export const HealthCheckResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_broker_gateway, 14); + +/** + * @generated from message broker_gateway.StreamAccountStateRequest + */ +export type StreamAccountStateRequest = Message<"broker_gateway.StreamAccountStateRequest"> & { + /** + * 0 = server default (3s) + * + * @generated from field: uint32 interval_seconds = 1; + */ + intervalSeconds: number; +}; + +/** + * Describes the message broker_gateway.StreamAccountStateRequest. + * Use `create(StreamAccountStateRequestSchema)` to create a new message. + */ +export const StreamAccountStateRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_broker_gateway, 15); + +/** + * @generated from message broker_gateway.StreamSessionStatusRequest + */ +export type StreamSessionStatusRequest = Message<"broker_gateway.StreamSessionStatusRequest"> & { + /** + * 0 = server default (5s) + * + * @generated from field: uint32 interval_seconds = 1; + */ + intervalSeconds: number; +}; + +/** + * Describes the message broker_gateway.StreamSessionStatusRequest. + * Use `create(StreamSessionStatusRequestSchema)` to create a new message. + */ +export const StreamSessionStatusRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_broker_gateway, 16); + +/** + * @generated from enum broker_gateway.OrderSide + */ +export enum OrderSide { + /** + * @generated from enum value: ORDER_SIDE_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * @generated from enum value: ORDER_SIDE_BUY = 1; + */ + BUY = 1, + + /** + * @generated from enum value: ORDER_SIDE_SELL = 2; + */ + SELL = 2, +} + +/** + * Describes the enum broker_gateway.OrderSide. + */ +export const OrderSideSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_broker_gateway, 0); + +/** + * @generated from enum broker_gateway.OrderType + */ +export enum OrderType { + /** + * @generated from enum value: ORDER_TYPE_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * @generated from enum value: ORDER_TYPE_MARKET = 1; + */ + MARKET = 1, + + /** + * @generated from enum value: ORDER_TYPE_LIMIT = 2; + */ + LIMIT = 2, + + /** + * @generated from enum value: ORDER_TYPE_STOP = 3; + */ + STOP = 3, + + /** + * @generated from enum value: ORDER_TYPE_STOP_LIMIT = 4; + */ + STOP_LIMIT = 4, +} + +/** + * Describes the enum broker_gateway.OrderType. + */ +export const OrderTypeSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_broker_gateway, 1); + +/** + * @generated from enum broker_gateway.OrderStatus + */ +export enum OrderStatus { + /** + * @generated from enum value: ORDER_STATUS_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * @generated from enum value: ORDER_STATUS_PENDING_SUBMIT = 1; + */ + PENDING_SUBMIT = 1, + + /** + * @generated from enum value: ORDER_STATUS_SUBMITTED = 2; + */ + SUBMITTED = 2, + + /** + * @generated from enum value: ORDER_STATUS_PARTIALLY_FILLED = 3; + */ + PARTIALLY_FILLED = 3, + + /** + * @generated from enum value: ORDER_STATUS_FILLED = 4; + */ + FILLED = 4, + + /** + * @generated from enum value: ORDER_STATUS_CANCEL_PENDING = 5; + */ + CANCEL_PENDING = 5, + + /** + * @generated from enum value: ORDER_STATUS_CANCELLED = 6; + */ + CANCELLED = 6, + + /** + * @generated from enum value: ORDER_STATUS_REJECTED = 7; + */ + REJECTED = 7, +} + +/** + * Describes the enum broker_gateway.OrderStatus. + */ +export const OrderStatusSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_broker_gateway, 2); + +/** + * @generated from enum broker_gateway.ExecutionType + */ +export enum ExecutionType { + /** + * @generated from enum value: EXECUTION_TYPE_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * Order accepted + * + * @generated from enum value: EXECUTION_TYPE_NEW = 1; + */ + NEW = 1, + + /** + * Partial or full fill + * + * @generated from enum value: EXECUTION_TYPE_TRADE = 2; + */ + TRADE = 2, + + /** + * Order canceled + * + * @generated from enum value: EXECUTION_TYPE_CANCELED = 3; + */ + CANCELED = 3, + + /** + * Order rejected + * + * @generated from enum value: EXECUTION_TYPE_REJECTED = 4; + */ + REJECTED = 4, +} + +/** + * Describes the enum broker_gateway.ExecutionType. + */ +export const ExecutionTypeSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_broker_gateway, 3); + +/** + * @generated from enum broker_gateway.SessionState + */ +export enum SessionState { + /** + * @generated from enum value: SESSION_STATE_DISCONNECTED = 0; + */ + DISCONNECTED = 0, + + /** + * @generated from enum value: SESSION_STATE_CONNECTED = 1; + */ + CONNECTED = 1, + + /** + * @generated from enum value: SESSION_STATE_LOGGING_IN = 2; + */ + LOGGING_IN = 2, + + /** + * @generated from enum value: SESSION_STATE_ACTIVE = 3; + */ + ACTIVE = 3, + + /** + * @generated from enum value: SESSION_STATE_LOGGING_OUT = 4; + */ + LOGGING_OUT = 4, +} + +/** + * Describes the enum broker_gateway.SessionState. + */ +export const SessionStateSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_broker_gateway, 4); + +/** + * @generated from service broker_gateway.BrokerGatewayService + */ +export const BrokerGatewayService: GenService<{ + /** + * Route order to broker via FIX protocol + * + * @generated from rpc broker_gateway.BrokerGatewayService.RouteOrder + */ + routeOrder: { + methodKind: "unary"; + input: typeof RouteOrderRequestSchema; + output: typeof RouteOrderResponseSchema; + }, + /** + * Cancel existing order + * + * @generated from rpc broker_gateway.BrokerGatewayService.CancelOrder + */ + cancelOrder: { + methodKind: "unary"; + input: typeof CancelOrderRequestSchema; + output: typeof CancelOrderResponseSchema; + }, + /** + * Get current account state (balance, margin, positions) + * + * @generated from rpc broker_gateway.BrokerGatewayService.GetAccountState + */ + getAccountState: { + methodKind: "unary"; + input: typeof GetAccountStateRequestSchema; + output: typeof GetAccountStateResponseSchema; + }, + /** + * Get all positions for account + * + * @generated from rpc broker_gateway.BrokerGatewayService.GetPositions + */ + getPositions: { + methodKind: "unary"; + input: typeof GetPositionsRequestSchema; + output: typeof GetPositionsResponseSchema; + }, + /** + * Get FIX session status + * + * @generated from rpc broker_gateway.BrokerGatewayService.GetSessionStatus + */ + getSessionStatus: { + methodKind: "unary"; + input: typeof GetSessionStatusRequestSchema; + output: typeof GetSessionStatusResponseSchema; + }, + /** + * Stream real-time executions from broker + * + * @generated from rpc broker_gateway.BrokerGatewayService.StreamExecutions + */ + streamExecutions: { + methodKind: "server_streaming"; + input: typeof StreamExecutionsRequestSchema; + output: typeof ExecutionEventSchema; + }, + /** + * Health check + * + * @generated from rpc broker_gateway.BrokerGatewayService.HealthCheck + */ + healthCheck: { + methodKind: "unary"; + input: typeof HealthCheckRequestSchema; + output: typeof HealthCheckResponseSchema; + }, + /** + * Server-streaming: polls GetAccountState at gateway level + * + * @generated from rpc broker_gateway.BrokerGatewayService.StreamAccountState + */ + streamAccountState: { + methodKind: "server_streaming"; + input: typeof StreamAccountStateRequestSchema; + output: typeof GetAccountStateResponseSchema; + }, + /** + * Server-streaming: polls GetSessionStatus at gateway level + * + * @generated from rpc broker_gateway.BrokerGatewayService.StreamSessionStatus + */ + streamSessionStatus: { + methodKind: "server_streaming"; + input: typeof StreamSessionStatusRequestSchema; + output: typeof GetSessionStatusResponseSchema; + }, +}> = /*@__PURE__*/ + serviceDesc(file_broker_gateway, 0); + diff --git a/web-dashboard/src/gen/config_pb.ts b/web-dashboard/src/gen/config_pb.ts new file mode 100644 index 000000000..049166194 --- /dev/null +++ b/web-dashboard/src/gen/config_pb.ts @@ -0,0 +1,1432 @@ +// @generated by protoc-gen-es v2.11.0 with parameter "target=ts" +// @generated from file config.proto (package config, syntax proto3) +/* eslint-disable */ + +import type { GenEnum, GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2"; +import { enumDesc, fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv2"; +import type { Message } from "@bufbuild/protobuf"; + +/** + * Describes the file config.proto. + */ +export const file_config: GenFile = /*@__PURE__*/ + fileDesc("Cgxjb25maWcucHJvdG8SBmNvbmZpZyKBAQoXR2V0Q29uZmlndXJhdGlvblJlcXVlc3QSFQoIY2F0ZWdvcnkYASABKAlIAIgBARIQCgNrZXkYAiABKAlIAYgBARIYCgtlbnZpcm9ubWVudBgDIAEoCUgCiAEBQgsKCV9jYXRlZ29y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AoVVmFsaWRhdGVDb25maWd1cmF0aW9uEiQuY29uZmlnLlZhbGlkYXRlQ29uZmlndXJhdGlvblJlcXVlc3QaJS5jb25maWcuVmFsaWRhdGVDb25maWd1cmF0aW9uUmVzcG9uc2USagoXR2V0Q29uZmlndXJhdGlvbkhpc3RvcnkSJi5jb25maWcuR2V0Q29uZmlndXJhdGlvbkhpc3RvcnlSZXF1ZXN0GicuY29uZmlnLkdldENvbmZpZ3VyYXRpb25IaXN0b3J5UmVzcG9uc2USZAoVUm9sbGJhY2tDb25maWd1cmF0aW9uEiQuY29uZmlnLlJvbGxiYWNrQ29uZmlndXJhdGlvblJlcXVlc3QaJS5jb25maWcuUm9sbGJhY2tDb25maWd1cmF0aW9uUmVzcG9uc2USXgoTRXhwb3J0Q29uZmlndXJhdGlvbhIiLmNvbmZpZy5FeHBvcnRDb25maWd1cmF0aW9uUmVxdWVzdBojLmNvbmZpZy5FeHBvcnRDb25maWd1cmF0aW9uUmVzcG9uc2USXgoTSW1wb3J0Q29uZmlndXJhdGlvbhIiLmNvbmZpZy5JbXBvcnRDb25maWd1cmF0aW9uUmVxdWVzdBojLmNvbmZpZy5JbXBvcnRDb25maWd1cmF0aW9uUmVzcG9uc2USUgoPR2V0Q29uZmlnU2NoZW1hEh4uY29uZmlnLkdldENvbmZpZ1NjaGVtYVJlcXVlc3QaHy5jb25maWcuR2V0Q29uZmlnU2NoZW1hUmVzcG9uc2USWwoSVXBkYXRlQ29uZmlnU2NoZW1hEiEuY29uZmlnLlVwZGF0ZUNvbmZpZ1NjaGVtYVJlcXVlc3QaIi5jb25maWcuVXBkYXRlQ29uZmlnU2NoZW1hUmVzcG9uc2ViBnByb3RvMw"); + +/** + * Configuration CRUD Messages + * + * @generated from message config.GetConfigurationRequest + */ +export type GetConfigurationRequest = Message<"config.GetConfigurationRequest"> & { + /** + * @generated from field: optional string category = 1; + */ + category?: string; + + /** + * @generated from field: optional string key = 2; + */ + key?: string; + + /** + * @generated from field: optional string environment = 3; + */ + environment?: string; +}; + +/** + * Describes the message config.GetConfigurationRequest. + * Use `create(GetConfigurationRequestSchema)` to create a new message. + */ +export const GetConfigurationRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_config, 0); + +/** + * @generated from message config.GetConfigurationResponse + */ +export type GetConfigurationResponse = Message<"config.GetConfigurationResponse"> & { + /** + * @generated from field: repeated config.ConfigurationSetting settings = 1; + */ + settings: ConfigurationSetting[]; +}; + +/** + * Describes the message config.GetConfigurationResponse. + * Use `create(GetConfigurationResponseSchema)` to create a new message. + */ +export const GetConfigurationResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_config, 1); + +/** + * @generated from message config.UpdateConfigurationRequest + */ +export type UpdateConfigurationRequest = Message<"config.UpdateConfigurationRequest"> & { + /** + * @generated from field: string category = 1; + */ + category: string; + + /** + * @generated from field: string key = 2; + */ + key: string; + + /** + * @generated from field: string value = 3; + */ + value: string; + + /** + * @generated from field: string changed_by = 4; + */ + changedBy: string; + + /** + * @generated from field: optional string change_reason = 5; + */ + changeReason?: string; + + /** + * @generated from field: optional string environment = 6; + */ + environment?: string; +}; + +/** + * Describes the message config.UpdateConfigurationRequest. + * Use `create(UpdateConfigurationRequestSchema)` to create a new message. + */ +export const UpdateConfigurationRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_config, 2); + +/** + * @generated from message config.UpdateConfigurationResponse + */ +export type UpdateConfigurationResponse = Message<"config.UpdateConfigurationResponse"> & { + /** + * @generated from field: bool success = 1; + */ + success: boolean; + + /** + * @generated from field: string message = 2; + */ + message: string; + + /** + * @generated from field: optional config.ValidationResult validation_result = 3; + */ + validationResult?: ValidationResult; + + /** + * @generated from field: int64 timestamp = 4; + */ + timestamp: bigint; +}; + +/** + * Describes the message config.UpdateConfigurationResponse. + * Use `create(UpdateConfigurationResponseSchema)` to create a new message. + */ +export const UpdateConfigurationResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_config, 3); + +/** + * @generated from message config.DeleteConfigurationRequest + */ +export type DeleteConfigurationRequest = Message<"config.DeleteConfigurationRequest"> & { + /** + * @generated from field: string category = 1; + */ + category: string; + + /** + * @generated from field: string key = 2; + */ + key: string; + + /** + * @generated from field: string deleted_by = 3; + */ + deletedBy: string; + + /** + * @generated from field: optional string delete_reason = 4; + */ + deleteReason?: string; +}; + +/** + * Describes the message config.DeleteConfigurationRequest. + * Use `create(DeleteConfigurationRequestSchema)` to create a new message. + */ +export const DeleteConfigurationRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_config, 4); + +/** + * @generated from message config.DeleteConfigurationResponse + */ +export type DeleteConfigurationResponse = Message<"config.DeleteConfigurationResponse"> & { + /** + * @generated from field: bool success = 1; + */ + success: boolean; + + /** + * @generated from field: string message = 2; + */ + message: string; + + /** + * @generated from field: int64 timestamp = 3; + */ + timestamp: bigint; +}; + +/** + * Describes the message config.DeleteConfigurationResponse. + * Use `create(DeleteConfigurationResponseSchema)` to create a new message. + */ +export const DeleteConfigurationResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_config, 5); + +/** + * @generated from message config.ListCategoriesRequest + */ +export type ListCategoriesRequest = Message<"config.ListCategoriesRequest"> & { + /** + * @generated from field: optional string parent_category = 1; + */ + parentCategory?: string; +}; + +/** + * Describes the message config.ListCategoriesRequest. + * Use `create(ListCategoriesRequestSchema)` to create a new message. + */ +export const ListCategoriesRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_config, 6); + +/** + * @generated from message config.ListCategoriesResponse + */ +export type ListCategoriesResponse = Message<"config.ListCategoriesResponse"> & { + /** + * @generated from field: repeated config.ConfigurationCategory categories = 1; + */ + categories: ConfigurationCategory[]; +}; + +/** + * Describes the message config.ListCategoriesResponse. + * Use `create(ListCategoriesResponseSchema)` to create a new message. + */ +export const ListCategoriesResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_config, 7); + +/** + * Streaming Messages + * + * @generated from message config.StreamConfigChangesRequest + */ +export type StreamConfigChangesRequest = Message<"config.StreamConfigChangesRequest"> & { + /** + * @generated from field: repeated string categories = 1; + */ + categories: string[]; + + /** + * @generated from field: repeated string keys = 2; + */ + keys: string[]; +}; + +/** + * Describes the message config.StreamConfigChangesRequest. + * Use `create(StreamConfigChangesRequestSchema)` to create a new message. + */ +export const StreamConfigChangesRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_config, 8); + +/** + * Validation Messages + * + * @generated from message config.ValidateConfigurationRequest + */ +export type ValidateConfigurationRequest = Message<"config.ValidateConfigurationRequest"> & { + /** + * @generated from field: string category = 1; + */ + category: string; + + /** + * @generated from field: string key = 2; + */ + key: string; + + /** + * @generated from field: string value = 3; + */ + value: string; +}; + +/** + * Describes the message config.ValidateConfigurationRequest. + * Use `create(ValidateConfigurationRequestSchema)` to create a new message. + */ +export const ValidateConfigurationRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_config, 9); + +/** + * @generated from message config.ValidateConfigurationResponse + */ +export type ValidateConfigurationResponse = Message<"config.ValidateConfigurationResponse"> & { + /** + * @generated from field: bool is_valid = 1; + */ + isValid: boolean; + + /** + * @generated from field: config.ValidationResult validation_result = 2; + */ + validationResult?: ValidationResult; +}; + +/** + * Describes the message config.ValidateConfigurationResponse. + * Use `create(ValidateConfigurationResponseSchema)` to create a new message. + */ +export const ValidateConfigurationResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_config, 10); + +/** + * History Messages + * + * @generated from message config.GetConfigurationHistoryRequest + */ +export type GetConfigurationHistoryRequest = Message<"config.GetConfigurationHistoryRequest"> & { + /** + * @generated from field: optional string category = 1; + */ + category?: string; + + /** + * @generated from field: optional string key = 2; + */ + key?: string; + + /** + * @generated from field: optional int64 start_time = 3; + */ + startTime?: bigint; + + /** + * @generated from field: optional int64 end_time = 4; + */ + endTime?: bigint; + + /** + * @generated from field: optional int32 limit = 5; + */ + limit?: number; +}; + +/** + * Describes the message config.GetConfigurationHistoryRequest. + * Use `create(GetConfigurationHistoryRequestSchema)` to create a new message. + */ +export const GetConfigurationHistoryRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_config, 11); + +/** + * @generated from message config.GetConfigurationHistoryResponse + */ +export type GetConfigurationHistoryResponse = Message<"config.GetConfigurationHistoryResponse"> & { + /** + * @generated from field: repeated config.ConfigurationHistoryEntry history = 1; + */ + history: ConfigurationHistoryEntry[]; +}; + +/** + * Describes the message config.GetConfigurationHistoryResponse. + * Use `create(GetConfigurationHistoryResponseSchema)` to create a new message. + */ +export const GetConfigurationHistoryResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_config, 12); + +/** + * @generated from message config.RollbackConfigurationRequest + */ +export type RollbackConfigurationRequest = Message<"config.RollbackConfigurationRequest"> & { + /** + * @generated from field: string category = 1; + */ + category: string; + + /** + * @generated from field: string key = 2; + */ + key: string; + + /** + * @generated from field: int64 rollback_to_timestamp = 3; + */ + rollbackToTimestamp: bigint; + + /** + * @generated from field: string rolled_back_by = 4; + */ + rolledBackBy: string; + + /** + * @generated from field: optional string rollback_reason = 5; + */ + rollbackReason?: string; +}; + +/** + * Describes the message config.RollbackConfigurationRequest. + * Use `create(RollbackConfigurationRequestSchema)` to create a new message. + */ +export const RollbackConfigurationRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_config, 13); + +/** + * @generated from message config.RollbackConfigurationResponse + */ +export type RollbackConfigurationResponse = Message<"config.RollbackConfigurationResponse"> & { + /** + * @generated from field: bool success = 1; + */ + success: boolean; + + /** + * @generated from field: string message = 2; + */ + message: string; + + /** + * @generated from field: config.ConfigurationSetting restored_setting = 3; + */ + restoredSetting?: ConfigurationSetting; + + /** + * @generated from field: int64 timestamp = 4; + */ + timestamp: bigint; +}; + +/** + * Describes the message config.RollbackConfigurationResponse. + * Use `create(RollbackConfigurationResponseSchema)` to create a new message. + */ +export const RollbackConfigurationResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_config, 14); + +/** + * Import/Export Messages + * + * @generated from message config.ExportConfigurationRequest + */ +export type ExportConfigurationRequest = Message<"config.ExportConfigurationRequest"> & { + /** + * @generated from field: repeated string categories = 1; + */ + categories: string[]; + + /** + * @generated from field: optional string environment = 2; + */ + environment?: string; + + /** + * @generated from field: config.ExportFormat format = 3; + */ + format: ExportFormat; +}; + +/** + * Describes the message config.ExportConfigurationRequest. + * Use `create(ExportConfigurationRequestSchema)` to create a new message. + */ +export const ExportConfigurationRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_config, 15); + +/** + * @generated from message config.ExportConfigurationResponse + */ +export type ExportConfigurationResponse = Message<"config.ExportConfigurationResponse"> & { + /** + * @generated from field: string exported_data = 1; + */ + exportedData: string; + + /** + * @generated from field: config.ExportFormat format = 2; + */ + format: ExportFormat; + + /** + * @generated from field: int32 settings_count = 3; + */ + settingsCount: number; + + /** + * @generated from field: int64 exported_at = 4; + */ + exportedAt: bigint; +}; + +/** + * Describes the message config.ExportConfigurationResponse. + * Use `create(ExportConfigurationResponseSchema)` to create a new message. + */ +export const ExportConfigurationResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_config, 16); + +/** + * @generated from message config.ImportConfigurationRequest + */ +export type ImportConfigurationRequest = Message<"config.ImportConfigurationRequest"> & { + /** + * @generated from field: string imported_data = 1; + */ + importedData: string; + + /** + * @generated from field: config.ExportFormat format = 2; + */ + format: ExportFormat; + + /** + * @generated from field: string imported_by = 3; + */ + importedBy: string; + + /** + * @generated from field: bool dry_run = 4; + */ + dryRun: boolean; + + /** + * @generated from field: bool overwrite_existing = 5; + */ + overwriteExisting: boolean; +}; + +/** + * Describes the message config.ImportConfigurationRequest. + * Use `create(ImportConfigurationRequestSchema)` to create a new message. + */ +export const ImportConfigurationRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_config, 17); + +/** + * @generated from message config.ImportConfigurationResponse + */ +export type ImportConfigurationResponse = Message<"config.ImportConfigurationResponse"> & { + /** + * @generated from field: bool success = 1; + */ + success: boolean; + + /** + * @generated from field: string message = 2; + */ + message: string; + + /** + * @generated from field: repeated config.ImportResult import_results = 3; + */ + importResults: ImportResult[]; + + /** + * @generated from field: int32 imported_count = 4; + */ + importedCount: number; + + /** + * @generated from field: int32 skipped_count = 5; + */ + skippedCount: number; + + /** + * @generated from field: int32 error_count = 6; + */ + errorCount: number; +}; + +/** + * Describes the message config.ImportConfigurationResponse. + * Use `create(ImportConfigurationResponseSchema)` to create a new message. + */ +export const ImportConfigurationResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_config, 18); + +/** + * Schema Messages + * + * @generated from message config.GetConfigSchemaRequest + */ +export type GetConfigSchemaRequest = Message<"config.GetConfigSchemaRequest"> & { + /** + * @generated from field: optional string category = 1; + */ + category?: string; +}; + +/** + * Describes the message config.GetConfigSchemaRequest. + * Use `create(GetConfigSchemaRequestSchema)` to create a new message. + */ +export const GetConfigSchemaRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_config, 19); + +/** + * @generated from message config.GetConfigSchemaResponse + */ +export type GetConfigSchemaResponse = Message<"config.GetConfigSchemaResponse"> & { + /** + * @generated from field: repeated config.ConfigurationSchema schemas = 1; + */ + schemas: ConfigurationSchema[]; +}; + +/** + * Describes the message config.GetConfigSchemaResponse. + * Use `create(GetConfigSchemaResponseSchema)` to create a new message. + */ +export const GetConfigSchemaResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_config, 20); + +/** + * @generated from message config.UpdateConfigSchemaRequest + */ +export type UpdateConfigSchemaRequest = Message<"config.UpdateConfigSchemaRequest"> & { + /** + * @generated from field: string schema_name = 1; + */ + schemaName: string; + + /** + * @generated from field: string schema_definition = 2; + */ + schemaDefinition: string; + + /** + * @generated from field: string updated_by = 3; + */ + updatedBy: string; +}; + +/** + * Describes the message config.UpdateConfigSchemaRequest. + * Use `create(UpdateConfigSchemaRequestSchema)` to create a new message. + */ +export const UpdateConfigSchemaRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_config, 21); + +/** + * @generated from message config.UpdateConfigSchemaResponse + */ +export type UpdateConfigSchemaResponse = Message<"config.UpdateConfigSchemaResponse"> & { + /** + * @generated from field: bool success = 1; + */ + success: boolean; + + /** + * @generated from field: string message = 2; + */ + message: string; + + /** + * @generated from field: int64 timestamp = 3; + */ + timestamp: bigint; +}; + +/** + * Describes the message config.UpdateConfigSchemaResponse. + * Use `create(UpdateConfigSchemaResponseSchema)` to create a new message. + */ +export const UpdateConfigSchemaResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_config, 22); + +/** + * Complete configuration setting with metadata and validation rules + * + * @generated from message config.ConfigurationSetting + */ +export type ConfigurationSetting = Message<"config.ConfigurationSetting"> & { + /** + * Unique setting identifier + * + * @generated from field: int64 id = 1; + */ + id: bigint; + + /** + * Configuration category (e.g., "trading.limits") + * + * @generated from field: string category = 2; + */ + category: string; + + /** + * Configuration key (e.g., "max_position_size") + * + * @generated from field: string key = 3; + */ + key: string; + + /** + * Current configuration value + * + * @generated from field: string value = 4; + */ + value: string; + + /** + * Data type (string, number, boolean, etc.) + * + * @generated from field: config.ConfigDataType data_type = 5; + */ + dataType: ConfigDataType; + + /** + * Whether changes trigger hot-reload + * + * @generated from field: bool hot_reload = 6; + */ + hotReload: boolean; + + /** + * Human-readable description + * + * @generated from field: string description = 7; + */ + description: string; + + /** + * Default value if not set + * + * @generated from field: optional string default_value = 8; + */ + defaultValue?: string; + + /** + * Whether this setting is required + * + * @generated from field: bool required = 9; + */ + required: boolean; + + /** + * Whether value contains sensitive data + * + * @generated from field: bool sensitive = 10; + */ + sensitive: boolean; + + /** + * Validation rule expression + * + * @generated from field: optional string validation_rule = 11; + */ + validationRule?: string; + + /** + * Environment-specific override + * + * @generated from field: optional string environment_override = 12; + */ + environmentOverride?: string; + + /** + * Minimum numeric value + * + * @generated from field: optional double min_value = 13; + */ + minValue?: number; + + /** + * Maximum numeric value + * + * @generated from field: optional double max_value = 14; + */ + maxValue?: number; + + /** + * Allowed enum values (comma-separated) + * + * @generated from field: optional string enum_values = 15; + */ + enumValues?: string; + + /** + * Dependencies on other settings + * + * @generated from field: repeated string depends_on = 16; + */ + dependsOn: string[]; + + /** + * Tags for categorization + * + * @generated from field: repeated string tags = 17; + */ + tags: string[]; + + /** + * Display order in UI + * + * @generated from field: int32 display_order = 18; + */ + displayOrder: number; + + /** + * Creation timestamp + * + * @generated from field: int64 created_at = 19; + */ + createdAt: bigint; + + /** + * Last modification timestamp + * + * @generated from field: int64 modified_at = 20; + */ + modifiedAt: bigint; +}; + +/** + * Describes the message config.ConfigurationSetting. + * Use `create(ConfigurationSettingSchema)` to create a new message. + */ +export const ConfigurationSettingSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_config, 23); + +/** + * @generated from message config.ConfigurationCategory + */ +export type ConfigurationCategory = Message<"config.ConfigurationCategory"> & { + /** + * @generated from field: int64 id = 1; + */ + id: bigint; + + /** + * @generated from field: string name = 2; + */ + name: string; + + /** + * @generated from field: string description = 3; + */ + description: string; + + /** + * @generated from field: optional int64 parent_id = 4; + */ + parentId?: bigint; + + /** + * @generated from field: int32 display_order = 5; + */ + displayOrder: number; + + /** + * @generated from field: optional string icon = 6; + */ + icon?: string; + + /** + * @generated from field: int64 created_at = 7; + */ + createdAt: bigint; + + /** + * @generated from field: repeated config.ConfigurationCategory children = 8; + */ + children: ConfigurationCategory[]; +}; + +/** + * Describes the message config.ConfigurationCategory. + * Use `create(ConfigurationCategorySchema)` to create a new message. + */ +export const ConfigurationCategorySchema: GenMessage = /*@__PURE__*/ + messageDesc(file_config, 24); + +/** + * @generated from message config.ConfigurationHistoryEntry + */ +export type ConfigurationHistoryEntry = Message<"config.ConfigurationHistoryEntry"> & { + /** + * @generated from field: int64 id = 1; + */ + id: bigint; + + /** + * @generated from field: int64 setting_id = 2; + */ + settingId: bigint; + + /** + * @generated from field: optional string old_value = 3; + */ + oldValue?: string; + + /** + * @generated from field: string new_value = 4; + */ + newValue: string; + + /** + * @generated from field: optional string change_reason = 5; + */ + changeReason?: string; + + /** + * @generated from field: string changed_by = 6; + */ + changedBy: string; + + /** + * @generated from field: int64 changed_at = 7; + */ + changedAt: bigint; + + /** + * @generated from field: string change_source = 8; + */ + changeSource: string; + + /** + * @generated from field: optional config.ValidationResult validation_result = 9; + */ + validationResult?: ValidationResult; + + /** + * @generated from field: optional int64 rollback_id = 10; + */ + rollbackId?: bigint; +}; + +/** + * Describes the message config.ConfigurationHistoryEntry. + * Use `create(ConfigurationHistoryEntrySchema)` to create a new message. + */ +export const ConfigurationHistoryEntrySchema: GenMessage = /*@__PURE__*/ + messageDesc(file_config, 25); + +/** + * @generated from message config.ConfigurationSchema + */ +export type ConfigurationSchema = Message<"config.ConfigurationSchema"> & { + /** + * @generated from field: int64 id = 1; + */ + id: bigint; + + /** + * @generated from field: string name = 2; + */ + name: string; + + /** + * @generated from field: string schema_definition = 3; + */ + schemaDefinition: string; + + /** + * @generated from field: string description = 4; + */ + description: string; + + /** + * @generated from field: int64 created_at = 5; + */ + createdAt: bigint; +}; + +/** + * Describes the message config.ConfigurationSchema. + * Use `create(ConfigurationSchemaSchema)` to create a new message. + */ +export const ConfigurationSchemaSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_config, 26); + +/** + * @generated from message config.ValidationResult + */ +export type ValidationResult = Message<"config.ValidationResult"> & { + /** + * @generated from field: bool is_valid = 1; + */ + isValid: boolean; + + /** + * @generated from field: repeated config.ValidationError errors = 2; + */ + errors: ValidationError[]; + + /** + * @generated from field: repeated config.ValidationWarning warnings = 3; + */ + warnings: ValidationWarning[]; +}; + +/** + * Describes the message config.ValidationResult. + * Use `create(ValidationResultSchema)` to create a new message. + */ +export const ValidationResultSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_config, 27); + +/** + * @generated from message config.ValidationError + */ +export type ValidationError = Message<"config.ValidationError"> & { + /** + * @generated from field: string field = 1; + */ + field: string; + + /** + * @generated from field: string message = 2; + */ + message: string; + + /** + * @generated from field: string error_code = 3; + */ + errorCode: string; +}; + +/** + * Describes the message config.ValidationError. + * Use `create(ValidationErrorSchema)` to create a new message. + */ +export const ValidationErrorSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_config, 28); + +/** + * @generated from message config.ValidationWarning + */ +export type ValidationWarning = Message<"config.ValidationWarning"> & { + /** + * @generated from field: string field = 1; + */ + field: string; + + /** + * @generated from field: string message = 2; + */ + message: string; + + /** + * @generated from field: string warning_code = 3; + */ + warningCode: string; +}; + +/** + * Describes the message config.ValidationWarning. + * Use `create(ValidationWarningSchema)` to create a new message. + */ +export const ValidationWarningSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_config, 29); + +/** + * @generated from message config.ImportResult + */ +export type ImportResult = Message<"config.ImportResult"> & { + /** + * @generated from field: string category = 1; + */ + category: string; + + /** + * @generated from field: string key = 2; + */ + key: string; + + /** + * @generated from field: config.ImportStatus status = 3; + */ + status: ImportStatus; + + /** + * @generated from field: optional string error_message = 4; + */ + errorMessage?: string; +}; + +/** + * Describes the message config.ImportResult. + * Use `create(ImportResultSchema)` to create a new message. + */ +export const ImportResultSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_config, 30); + +/** + * Event Messages + * + * @generated from message config.ConfigChangeEvent + */ +export type ConfigChangeEvent = Message<"config.ConfigChangeEvent"> & { + /** + * @generated from field: int64 setting_id = 1; + */ + settingId: bigint; + + /** + * @generated from field: string category = 2; + */ + category: string; + + /** + * @generated from field: string key = 3; + */ + key: string; + + /** + * @generated from field: string old_value = 4; + */ + oldValue: string; + + /** + * @generated from field: string new_value = 5; + */ + newValue: string; + + /** + * @generated from field: string changed_by = 6; + */ + changedBy: string; + + /** + * @generated from field: int64 timestamp = 7; + */ + timestamp: bigint; + + /** + * @generated from field: config.ConfigChangeType change_type = 8; + */ + changeType: ConfigChangeType; + + /** + * @generated from field: bool hot_reload = 9; + */ + hotReload: boolean; +}; + +/** + * Describes the message config.ConfigChangeEvent. + * Use `create(ConfigChangeEventSchema)` to create a new message. + */ +export const ConfigChangeEventSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_config, 31); + +/** + * Data types for configuration values + * + * @generated from enum config.ConfigDataType + */ +export enum ConfigDataType { + /** + * Default/unknown type + * + * @generated from enum value: CONFIG_DATA_TYPE_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * Text string value + * + * @generated from enum value: CONFIG_DATA_TYPE_STRING = 1; + */ + STRING = 1, + + /** + * Numeric value (int or float) + * + * @generated from enum value: CONFIG_DATA_TYPE_NUMBER = 2; + */ + NUMBER = 2, + + /** + * Boolean true/false value + * + * @generated from enum value: CONFIG_DATA_TYPE_BOOLEAN = 3; + */ + BOOLEAN = 3, + + /** + * JSON object or array + * + * @generated from enum value: CONFIG_DATA_TYPE_JSON = 4; + */ + JSON = 4, + + /** + * Encrypted sensitive value + * + * @generated from enum value: CONFIG_DATA_TYPE_ENCRYPTED = 5; + */ + ENCRYPTED = 5, +} + +/** + * Describes the enum config.ConfigDataType. + */ +export const ConfigDataTypeSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_config, 0); + +/** + * @generated from enum config.ExportFormat + */ +export enum ExportFormat { + /** + * @generated from enum value: EXPORT_FORMAT_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * @generated from enum value: EXPORT_FORMAT_JSON = 1; + */ + JSON = 1, + + /** + * @generated from enum value: EXPORT_FORMAT_YAML = 2; + */ + YAML = 2, + + /** + * @generated from enum value: EXPORT_FORMAT_TOML = 3; + */ + TOML = 3, + + /** + * @generated from enum value: EXPORT_FORMAT_ENV = 4; + */ + ENV = 4, +} + +/** + * Describes the enum config.ExportFormat. + */ +export const ExportFormatSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_config, 1); + +/** + * @generated from enum config.ImportStatus + */ +export enum ImportStatus { + /** + * @generated from enum value: IMPORT_STATUS_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * @generated from enum value: IMPORT_STATUS_SUCCESS = 1; + */ + SUCCESS = 1, + + /** + * @generated from enum value: IMPORT_STATUS_SKIPPED = 2; + */ + SKIPPED = 2, + + /** + * @generated from enum value: IMPORT_STATUS_ERROR = 3; + */ + ERROR = 3, + + /** + * @generated from enum value: IMPORT_STATUS_VALIDATION_FAILED = 4; + */ + VALIDATION_FAILED = 4, +} + +/** + * Describes the enum config.ImportStatus. + */ +export const ImportStatusSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_config, 2); + +/** + * @generated from enum config.ConfigChangeType + */ +export enum ConfigChangeType { + /** + * @generated from enum value: CONFIG_CHANGE_TYPE_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * @generated from enum value: CONFIG_CHANGE_TYPE_CREATED = 1; + */ + CREATED = 1, + + /** + * @generated from enum value: CONFIG_CHANGE_TYPE_UPDATED = 2; + */ + UPDATED = 2, + + /** + * @generated from enum value: CONFIG_CHANGE_TYPE_DELETED = 3; + */ + DELETED = 3, + + /** + * @generated from enum value: CONFIG_CHANGE_TYPE_ROLLBACK = 4; + */ + ROLLBACK = 4, +} + +/** + * Describes the enum config.ConfigChangeType. + */ +export const ConfigChangeTypeSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_config, 3); + +/** + * Configuration Service provides centralized, PostgreSQL-based configuration management with hot-reload capabilities. + * This service supports real-time configuration updates, validation, history tracking, and import/export functionality + * for all trading system components with comprehensive audit trails and rollback capabilities. + * + * @generated from service config.ConfigService + */ +export const ConfigService: GenService<{ + /** + * Configuration CRUD Operations + * Get configuration settings by category, key, or environment + * + * @generated from rpc config.ConfigService.GetConfiguration + */ + getConfiguration: { + methodKind: "unary"; + input: typeof GetConfigurationRequestSchema; + output: typeof GetConfigurationResponseSchema; + }, + /** + * Update configuration value with validation and audit logging + * + * @generated from rpc config.ConfigService.UpdateConfiguration + */ + updateConfiguration: { + methodKind: "unary"; + input: typeof UpdateConfigurationRequestSchema; + output: typeof UpdateConfigurationResponseSchema; + }, + /** + * Delete configuration setting with audit trail + * + * @generated from rpc config.ConfigService.DeleteConfiguration + */ + deleteConfiguration: { + methodKind: "unary"; + input: typeof DeleteConfigurationRequestSchema; + output: typeof DeleteConfigurationResponseSchema; + }, + /** + * List available configuration categories + * + * @generated from rpc config.ConfigService.ListCategories + */ + listCategories: { + methodKind: "unary"; + input: typeof ListCategoriesRequestSchema; + output: typeof ListCategoriesResponseSchema; + }, + /** + * Real-time Configuration Streaming + * Stream real-time configuration changes with hot-reload support + * + * @generated from rpc config.ConfigService.StreamConfigChanges + */ + streamConfigChanges: { + methodKind: "server_streaming"; + input: typeof StreamConfigChangesRequestSchema; + output: typeof ConfigChangeEventSchema; + }, + /** + * Configuration Management Operations + * Validate configuration value against schema and rules + * + * @generated from rpc config.ConfigService.ValidateConfiguration + */ + validateConfiguration: { + methodKind: "unary"; + input: typeof ValidateConfigurationRequestSchema; + output: typeof ValidateConfigurationResponseSchema; + }, + /** + * Get configuration change history with audit details + * + * @generated from rpc config.ConfigService.GetConfigurationHistory + */ + getConfigurationHistory: { + methodKind: "unary"; + input: typeof GetConfigurationHistoryRequestSchema; + output: typeof GetConfigurationHistoryResponseSchema; + }, + /** + * Rollback configuration to previous value + * + * @generated from rpc config.ConfigService.RollbackConfiguration + */ + rollbackConfiguration: { + methodKind: "unary"; + input: typeof RollbackConfigurationRequestSchema; + output: typeof RollbackConfigurationResponseSchema; + }, + /** + * Export configuration data in various formats + * + * @generated from rpc config.ConfigService.ExportConfiguration + */ + exportConfiguration: { + methodKind: "unary"; + input: typeof ExportConfigurationRequestSchema; + output: typeof ExportConfigurationResponseSchema; + }, + /** + * Import configuration data with validation + * + * @generated from rpc config.ConfigService.ImportConfiguration + */ + importConfiguration: { + methodKind: "unary"; + input: typeof ImportConfigurationRequestSchema; + output: typeof ImportConfigurationResponseSchema; + }, + /** + * Schema Management Operations + * Get configuration schema definitions + * + * @generated from rpc config.ConfigService.GetConfigSchema + */ + getConfigSchema: { + methodKind: "unary"; + input: typeof GetConfigSchemaRequestSchema; + output: typeof GetConfigSchemaResponseSchema; + }, + /** + * Update configuration schema with validation rules + * + * @generated from rpc config.ConfigService.UpdateConfigSchema + */ + updateConfigSchema: { + methodKind: "unary"; + input: typeof UpdateConfigSchemaRequestSchema; + output: typeof UpdateConfigSchemaResponseSchema; + }, +}> = /*@__PURE__*/ + serviceDesc(file_config, 0); + diff --git a/web-dashboard/src/gen/data_acquisition_pb.ts b/web-dashboard/src/gen/data_acquisition_pb.ts new file mode 100644 index 000000000..ec5a6bab6 --- /dev/null +++ b/web-dashboard/src/gen/data_acquisition_pb.ts @@ -0,0 +1,697 @@ +// @generated by protoc-gen-es v2.11.0 with parameter "target=ts" +// @generated from file data_acquisition.proto (package data_acquisition, syntax proto3) +/* eslint-disable */ + +import type { GenEnum, GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2"; +import { enumDesc, fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv2"; +import type { Message } from "@bufbuild/protobuf"; + +/** + * Describes the file data_acquisition.proto. + */ +export const file_data_acquisition: GenFile = /*@__PURE__*/ + fileDesc("ChZkYXRhX2FjcXVpc2l0aW9uLnByb3RvEhBkYXRhX2FjcXVpc2l0aW9uIjcKG1N0cmVhbURvd25sb2FkU3RhdHVzUmVxdWVzdBIYChBpbnRlcnZhbF9zZWNvbmRzGAEgASgNIogCChdTY2hlZHVsZURvd25sb2FkUmVxdWVzdBIPCgdkYXRhc2V0GAEgASgJEg8KB3N5bWJvbHMYAiADKAkSEgoKc3RhcnRfZGF0ZRgDIAEoCRIQCghlbmRfZGF0ZRgEIAEoCRIOCgZzY2hlbWEYBSABKAkSEwoLZGVzY3JpcHRpb24YBiABKAkSQQoEdGFncxgHIAMoCzIzLmRhdGFfYWNxdWlzaXRpb24uU2NoZWR1bGVEb3dubG9hZFJlcXVlc3QuVGFnc0VudHJ5EhAKCHByaW9yaXR5GAggASgNGisKCVRhZ3NFbnRyeRILCgNrZXkYASABKAkSDQoFdmFsdWUYAiABKAk6AjgBIokBChhTY2hlZHVsZURvd25sb2FkUmVzcG9uc2USDgoGam9iX2lkGAEgASgJEjAKBnN0YXR1cxgCIAEoDjIgLmRhdGFfYWNx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Y2tSZXF1ZXN0GiUuZGF0YV9hY3F1aXNpdGlvbi5IZWFsdGhDaGVja1Jlc3BvbnNlEnMKFFN0cmVhbURvd25sb2FkU3RhdHVzEi0uZGF0YV9hY3F1aXNpdGlvbi5TdHJlYW1Eb3dubG9hZFN0YXR1c1JlcXVlc3QaKi5kYXRhX2FjcXVpc2l0aW9uLkxpc3REb3dubG9hZEpvYnNSZXNwb25zZTABYgZwcm90bzM"); + +/** + * @generated from message data_acquisition.StreamDownloadStatusRequest + */ +export type StreamDownloadStatusRequest = Message<"data_acquisition.StreamDownloadStatusRequest"> & { + /** + * 0 = server default (5s) + * + * @generated from field: uint32 interval_seconds = 1; + */ + intervalSeconds: number; +}; + +/** + * Describes the message data_acquisition.StreamDownloadStatusRequest. + * Use `create(StreamDownloadStatusRequestSchema)` to create a new message. + */ +export const StreamDownloadStatusRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_data_acquisition, 0); + +/** + * Request to schedule a new data download + * + * @generated from message data_acquisition.ScheduleDownloadRequest + */ +export type ScheduleDownloadRequest = Message<"data_acquisition.ScheduleDownloadRequest"> & { + /** + * Databento dataset (e.g., "GLBX.MDP3" for CME futures) + * + * @generated from field: string dataset = 1; + */ + dataset: string; + + /** + * List of symbols to download (e.g., ["ES.FUT", "NQ.FUT"]) + * + * @generated from field: repeated string symbols = 2; + */ + symbols: string[]; + + /** + * Start date in YYYY-MM-DD format + * + * @generated from field: string start_date = 3; + */ + startDate: string; + + /** + * End date in YYYY-MM-DD format + * + * @generated from field: string end_date = 4; + */ + endDate: string; + + /** + * Schema type (e.g., "ohlcv-1m", "mbp-10", "trades") + * + * @generated from field: string schema = 5; + */ + schema: string; + + /** + * Optional description for this download + * + * @generated from field: string description = 6; + */ + description: string; + + /** + * Optional tags for categorization + * + * @generated from field: map tags = 7; + */ + tags: { [key: string]: string }; + + /** + * Priority level (1=low, 5=high) + * + * @generated from field: uint32 priority = 8; + */ + priority: number; +}; + +/** + * Describes the message data_acquisition.ScheduleDownloadRequest. + * Use `create(ScheduleDownloadRequestSchema)` to create a new message. + */ +export const ScheduleDownloadRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_data_acquisition, 1); + +/** + * @generated from message data_acquisition.ScheduleDownloadResponse + */ +export type ScheduleDownloadResponse = Message<"data_acquisition.ScheduleDownloadResponse"> & { + /** + * Unique job identifier + * + * @generated from field: string job_id = 1; + */ + jobId: string; + + /** + * Initial job status + * + * @generated from field: data_acquisition.DownloadStatus status = 2; + */ + status: DownloadStatus; + + /** + * Estimated cost in USD + * + * @generated from field: double estimated_cost_usd = 3; + */ + estimatedCostUsd: number; + + /** + * Human-readable message + * + * @generated from field: string message = 4; + */ + message: string; +}; + +/** + * Describes the message data_acquisition.ScheduleDownloadResponse. + * Use `create(ScheduleDownloadResponseSchema)` to create a new message. + */ +export const ScheduleDownloadResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_data_acquisition, 2); + +/** + * @generated from message data_acquisition.GetDownloadStatusRequest + */ +export type GetDownloadStatusRequest = Message<"data_acquisition.GetDownloadStatusRequest"> & { + /** + * @generated from field: string job_id = 1; + */ + jobId: string; +}; + +/** + * Describes the message data_acquisition.GetDownloadStatusRequest. + * Use `create(GetDownloadStatusRequestSchema)` to create a new message. + */ +export const GetDownloadStatusRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_data_acquisition, 3); + +/** + * @generated from message data_acquisition.GetDownloadStatusResponse + */ +export type GetDownloadStatusResponse = Message<"data_acquisition.GetDownloadStatusResponse"> & { + /** + * @generated from field: data_acquisition.DownloadJobDetails job_details = 1; + */ + jobDetails?: DownloadJobDetails; +}; + +/** + * Describes the message data_acquisition.GetDownloadStatusResponse. + * Use `create(GetDownloadStatusResponseSchema)` to create a new message. + */ +export const GetDownloadStatusResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_data_acquisition, 4); + +/** + * @generated from message data_acquisition.CancelDownloadRequest + */ +export type CancelDownloadRequest = Message<"data_acquisition.CancelDownloadRequest"> & { + /** + * @generated from field: string job_id = 1; + */ + jobId: string; + + /** + * Optional cancellation reason + * + * @generated from field: string reason = 2; + */ + reason: string; +}; + +/** + * Describes the message data_acquisition.CancelDownloadRequest. + * Use `create(CancelDownloadRequestSchema)` to create a new message. + */ +export const CancelDownloadRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_data_acquisition, 5); + +/** + * @generated from message data_acquisition.CancelDownloadResponse + */ +export type CancelDownloadResponse = Message<"data_acquisition.CancelDownloadResponse"> & { + /** + * @generated from field: bool success = 1; + */ + success: boolean; + + /** + * @generated from field: string message = 2; + */ + message: string; +}; + +/** + * Describes the message data_acquisition.CancelDownloadResponse. + * Use `create(CancelDownloadResponseSchema)` to create a new message. + */ +export const CancelDownloadResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_data_acquisition, 6); + +/** + * @generated from message data_acquisition.ListDownloadJobsRequest + */ +export type ListDownloadJobsRequest = Message<"data_acquisition.ListDownloadJobsRequest"> & { + /** + * @generated from field: uint32 page = 1; + */ + page: number; + + /** + * @generated from field: uint32 page_size = 2; + */ + pageSize: number; + + /** + * @generated from field: data_acquisition.DownloadStatus status_filter = 3; + */ + statusFilter: DownloadStatus; + + /** + * Unix timestamp + * + * @generated from field: int64 start_time = 4; + */ + startTime: bigint; + + /** + * Unix timestamp + * + * @generated from field: int64 end_time = 5; + */ + endTime: bigint; +}; + +/** + * Describes the message data_acquisition.ListDownloadJobsRequest. + * Use `create(ListDownloadJobsRequestSchema)` to create a new message. + */ +export const ListDownloadJobsRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_data_acquisition, 7); + +/** + * @generated from message data_acquisition.ListDownloadJobsResponse + */ +export type ListDownloadJobsResponse = Message<"data_acquisition.ListDownloadJobsResponse"> & { + /** + * @generated from field: repeated data_acquisition.DownloadJobSummary jobs = 1; + */ + jobs: DownloadJobSummary[]; + + /** + * @generated from field: uint32 total_count = 2; + */ + totalCount: number; + + /** + * @generated from field: uint32 page = 3; + */ + page: number; + + /** + * @generated from field: uint32 page_size = 4; + */ + pageSize: number; +}; + +/** + * Describes the message data_acquisition.ListDownloadJobsResponse. + * Use `create(ListDownloadJobsResponseSchema)` to create a new message. + */ +export const ListDownloadJobsResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_data_acquisition, 8); + +/** + * @generated from message data_acquisition.HealthCheckRequest + */ +export type HealthCheckRequest = Message<"data_acquisition.HealthCheckRequest"> & { +}; + +/** + * Describes the message data_acquisition.HealthCheckRequest. + * Use `create(HealthCheckRequestSchema)` to create a new message. + */ +export const HealthCheckRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_data_acquisition, 9); + +/** + * @generated from message data_acquisition.HealthCheckResponse + */ +export type HealthCheckResponse = Message<"data_acquisition.HealthCheckResponse"> & { + /** + * @generated from field: bool healthy = 1; + */ + healthy: boolean; + + /** + * @generated from field: string message = 2; + */ + message: string; + + /** + * @generated from field: map details = 3; + */ + details: { [key: string]: string }; +}; + +/** + * Describes the message data_acquisition.HealthCheckResponse. + * Use `create(HealthCheckResponseSchema)` to create a new message. + */ +export const HealthCheckResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_data_acquisition, 10); + +/** + * @generated from message data_acquisition.DownloadJobDetails + */ +export type DownloadJobDetails = Message<"data_acquisition.DownloadJobDetails"> & { + /** + * @generated from field: string job_id = 1; + */ + jobId: string; + + /** + * @generated from field: data_acquisition.DownloadStatus status = 2; + */ + status: DownloadStatus; + + /** + * @generated from field: string dataset = 3; + */ + dataset: string; + + /** + * @generated from field: repeated string symbols = 4; + */ + symbols: string[]; + + /** + * @generated from field: string start_date = 5; + */ + startDate: string; + + /** + * @generated from field: string end_date = 6; + */ + endDate: string; + + /** + * @generated from field: string schema = 7; + */ + schema: string; + + /** + * @generated from field: string description = 8; + */ + description: string; + + /** + * @generated from field: map tags = 9; + */ + tags: { [key: string]: string }; + + /** + * @generated from field: uint32 priority = 10; + */ + priority: number; + + /** + * Progress tracking + * + * 0.0 to 100.0 + * + * @generated from field: float progress_percentage = 11; + */ + progressPercentage: number; + + /** + * @generated from field: uint64 bytes_downloaded = 12; + */ + bytesDownloaded: bigint; + + /** + * @generated from field: uint64 total_bytes = 13; + */ + totalBytes: bigint; + + /** + * Cost tracking + * + * @generated from field: double estimated_cost_usd = 14; + */ + estimatedCostUsd: number; + + /** + * @generated from field: double actual_cost_usd = 15; + */ + actualCostUsd: number; + + /** + * Quality metrics + * + * @generated from field: uint64 records_count = 16; + */ + recordsCount: bigint; + + /** + * @generated from field: uint64 invalid_records = 17; + */ + invalidRecords: bigint; + + /** + * 0.0 to 1.0 + * + * @generated from field: double data_quality_score = 18; + */ + dataQualityScore: number; + + /** + * Storage paths + * + * @generated from field: string local_path = 19; + */ + localPath: string; + + /** + * @generated from field: string minio_path = 20; + */ + minioPath: string; + + /** + * Timestamps + * + * Unix timestamp + * + * @generated from field: int64 created_at = 21; + */ + createdAt: bigint; + + /** + * @generated from field: int64 started_at = 22; + */ + startedAt: bigint; + + /** + * @generated from field: int64 completed_at = 23; + */ + completedAt: bigint; + + /** + * Error information + * + * @generated from field: string error_message = 24; + */ + errorMessage: string; + + /** + * @generated from field: uint32 retry_count = 25; + */ + retryCount: number; + + /** + * Metadata + * + * @generated from field: string created_by = 26; + */ + createdBy: string; +}; + +/** + * Describes the message data_acquisition.DownloadJobDetails. + * Use `create(DownloadJobDetailsSchema)` to create a new message. + */ +export const DownloadJobDetailsSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_data_acquisition, 11); + +/** + * @generated from message data_acquisition.DownloadJobSummary + */ +export type DownloadJobSummary = Message<"data_acquisition.DownloadJobSummary"> & { + /** + * @generated from field: string job_id = 1; + */ + jobId: string; + + /** + * @generated from field: data_acquisition.DownloadStatus status = 2; + */ + status: DownloadStatus; + + /** + * @generated from field: string dataset = 3; + */ + dataset: string; + + /** + * @generated from field: repeated string symbols = 4; + */ + symbols: string[]; + + /** + * @generated from field: string start_date = 5; + */ + startDate: string; + + /** + * @generated from field: string end_date = 6; + */ + endDate: string; + + /** + * @generated from field: float progress_percentage = 7; + */ + progressPercentage: number; + + /** + * @generated from field: double actual_cost_usd = 8; + */ + actualCostUsd: number; + + /** + * @generated from field: int64 created_at = 9; + */ + createdAt: bigint; + + /** + * @generated from field: int64 completed_at = 10; + */ + completedAt: bigint; +}; + +/** + * Describes the message data_acquisition.DownloadJobSummary. + * Use `create(DownloadJobSummarySchema)` to create a new message. + */ +export const DownloadJobSummarySchema: GenMessage = /*@__PURE__*/ + messageDesc(file_data_acquisition, 12); + +/** + * @generated from enum data_acquisition.DownloadStatus + */ +export enum DownloadStatus { + /** + * @generated from enum value: DOWNLOAD_STATUS_UNKNOWN = 0; + */ + DOWNLOAD_STATUS_UNKNOWN = 0, + + /** + * Queued, waiting to start + * + * @generated from enum value: PENDING = 1; + */ + PENDING = 1, + + /** + * Actively downloading from Databento + * + * @generated from enum value: DOWNLOADING = 2; + */ + DOWNLOADING = 2, + + /** + * Validating data quality + * + * @generated from enum value: VALIDATING = 3; + */ + VALIDATING = 3, + + /** + * Uploading to MinIO + * + * @generated from enum value: UPLOADING = 4; + */ + UPLOADING = 4, + + /** + * Successfully completed + * + * @generated from enum value: COMPLETED = 5; + */ + COMPLETED = 5, + + /** + * Failed with errors + * + * @generated from enum value: FAILED = 6; + */ + FAILED = 6, + + /** + * Cancelled by user + * + * @generated from enum value: CANCELLED = 7; + */ + CANCELLED = 7, +} + +/** + * Describes the enum data_acquisition.DownloadStatus. + */ +export const DownloadStatusSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_data_acquisition, 0); + +/** + * Data Acquisition Service provides automated Databento data downloading and storage. + * This service handles scheduled downloads, cost tracking, quality validation, and automatic MinIO upload. + * + * @generated from service data_acquisition.DataAcquisitionService + */ +export const DataAcquisitionService: GenService<{ + /** + * Download Management + * Schedule a new data download from Databento + * + * @generated from rpc data_acquisition.DataAcquisitionService.ScheduleDownload + */ + scheduleDownload: { + methodKind: "unary"; + input: typeof ScheduleDownloadRequestSchema; + output: typeof ScheduleDownloadResponseSchema; + }, + /** + * Get status of a download job + * + * @generated from rpc data_acquisition.DataAcquisitionService.GetDownloadStatus + */ + getDownloadStatus: { + methodKind: "unary"; + input: typeof GetDownloadStatusRequestSchema; + output: typeof GetDownloadStatusResponseSchema; + }, + /** + * Cancel a running or pending download job + * + * @generated from rpc data_acquisition.DataAcquisitionService.CancelDownload + */ + cancelDownload: { + methodKind: "unary"; + input: typeof CancelDownloadRequestSchema; + output: typeof CancelDownloadResponseSchema; + }, + /** + * List all download jobs with optional filters + * + * @generated from rpc data_acquisition.DataAcquisitionService.ListDownloadJobs + */ + listDownloadJobs: { + methodKind: "unary"; + input: typeof ListDownloadJobsRequestSchema; + output: typeof ListDownloadJobsResponseSchema; + }, + /** + * Service Health and Status + * Check service health and resource availability + * + * @generated from rpc data_acquisition.DataAcquisitionService.HealthCheck + */ + healthCheck: { + methodKind: "unary"; + input: typeof HealthCheckRequestSchema; + output: typeof HealthCheckResponseSchema; + }, + /** + * Server-streaming: polls ListDownloadJobs at gateway level + * + * @generated from rpc data_acquisition.DataAcquisitionService.StreamDownloadStatus + */ + streamDownloadStatus: { + methodKind: "server_streaming"; + input: typeof StreamDownloadStatusRequestSchema; + output: typeof ListDownloadJobsResponseSchema; + }, +}> = /*@__PURE__*/ + serviceDesc(file_data_acquisition, 0); + diff --git a/web-dashboard/src/gen/fxt_trading_pb.ts b/web-dashboard/src/gen/fxt_trading_pb.ts new file mode 100644 index 000000000..9811dce55 --- /dev/null +++ b/web-dashboard/src/gen/fxt_trading_pb.ts @@ -0,0 +1,3900 @@ +// @generated by protoc-gen-es v2.11.0 with parameter "target=ts" +// @generated from file fxt_trading.proto (package foxhunt.tli, syntax proto3) +/* eslint-disable */ + +import type { GenEnum, GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2"; +import { enumDesc, fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv2"; +import type { Message } from "@bufbuild/protobuf"; + +/** + * Describes the file fxt_trading.proto. + */ +export const file_fxt_trading: GenFile = /*@__PURE__*/ + fileDesc("ChFmeHRfdHJhZGluZy5wcm90bxILZm94aHVudC50bGki/gEKElN1Ym1pdE9yZGVyUmVxdWVzdBIOCgZzeW1ib2wYASABKAkSJAoEc2lkZRgCIAEoDjIWLmZveGh1bnQudGxpLk9yZGVyU2lkZRIqCgpvcmRlcl90eXBlGAMgASgOMhYuZm94aHVudC50bGkuT3JkZXJUeXBlEhAKCHF1YW50aXR5GAQgASgBEhIKBXByaWNlGAUgASgBSACIAQESFwoKc3RvcF9wcmljZRgGIAEoAUgBiAEBEhUKDXRpbWVfaW5fZm9yY2UYByABKAkSFwoPY2xpZW50X29yZGVyX2lkGAggASgJQggKBl9wcmljZUINCgtfc3RvcF9wcmljZSJnChNTdWJtaXRPcmRlclJlc3BvbnNlEg8KB3N1Y2Nlc3MYASABKAgSEAoIb3JkZXJfaWQYAiABKAkSDwoHbWVzc2FnZRgDIAEoCRIcChR0aW1lc3RhbXBfdW5peF9uYW5vcxgEIAEoAyI2ChJDYW5jZWxPcmRlclJlcXVlc3QSEAoIb3JkZXJfaWQYASABKAkSDgoGc3ltYm9sGAIgASgJIlUKE0NhbmNlbE9yZGVyUmVzcG9uc2USDwoHc3VjY2VzcxgBIAEoCBIPCgdtZXNzYWdlGAIgASgJEhwKFHRpbWVzdGFtcF91bml4X25hbm9zGAMgASgDIikKFUdldE9yZGVyU3RhdHVzUmVxdWVzdBIQCghvcmRlcl9pZBgBIAEoCSLSAgoWR2V0T3JkZXJTdGF0dXNSZXNwb25zZRIQCghvcmRlcl9pZBgBIAEoCRIOCgZzeW1ib2wYAiABKAkSJAoEc2lkZRgDIAEoDjIWLmZveGh1bnQudGxpLk9yZGVyU2lkZRIqCgpvcmRlcl90eXBlGAQgASgOMhYuZm94aHVudC50bGkuT3JkZXJUeXBlEhAKCHF1YW50aXR5GAUgASgBEhcKD2ZpbGxlZF9xdWFudGl0eRgGIAEoARIaChJyZW1haW5pbmdf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9uc2ViBnByb3RvMw"); + +/** + * Order submission request + * + * @generated from message foxhunt.tli.SubmitOrderRequest + */ +export type SubmitOrderRequest = Message<"foxhunt.tli.SubmitOrderRequest"> & { + /** + * @generated from field: string symbol = 1; + */ + symbol: string; + + /** + * @generated from field: foxhunt.tli.OrderSide side = 2; + */ + side: OrderSide; + + /** + * @generated from field: foxhunt.tli.OrderType order_type = 3; + */ + orderType: OrderType; + + /** + * @generated from field: double quantity = 4; + */ + quantity: number; + + /** + * @generated from field: optional double price = 5; + */ + price?: number; + + /** + * @generated from field: optional double stop_price = 6; + */ + stopPrice?: number; + + /** + * @generated from field: string time_in_force = 7; + */ + timeInForce: string; + + /** + * @generated from field: string client_order_id = 8; + */ + clientOrderId: string; +}; + +/** + * Describes the message foxhunt.tli.SubmitOrderRequest. + * Use `create(SubmitOrderRequestSchema)` to create a new message. + */ +export const SubmitOrderRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_fxt_trading, 0); + +/** + * Order submission response + * + * @generated from message foxhunt.tli.SubmitOrderResponse + */ +export type SubmitOrderResponse = Message<"foxhunt.tli.SubmitOrderResponse"> & { + /** + * @generated from field: bool success = 1; + */ + success: boolean; + + /** + * @generated from field: string order_id = 2; + */ + orderId: string; + + /** + * @generated from field: string message = 3; + */ + message: string; + + /** + * @generated from field: int64 timestamp_unix_nanos = 4; + */ + timestampUnixNanos: bigint; +}; + +/** + * Describes the message foxhunt.tli.SubmitOrderResponse. + * Use `create(SubmitOrderResponseSchema)` to create a new message. + */ +export const SubmitOrderResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_fxt_trading, 1); + +/** + * Order cancellation request + * + * @generated from message foxhunt.tli.CancelOrderRequest + */ +export type CancelOrderRequest = Message<"foxhunt.tli.CancelOrderRequest"> & { + /** + * @generated from field: string order_id = 1; + */ + orderId: string; + + /** + * @generated from field: string symbol = 2; + */ + symbol: string; +}; + +/** + * Describes the message foxhunt.tli.CancelOrderRequest. + * Use `create(CancelOrderRequestSchema)` to create a new message. + */ +export const CancelOrderRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_fxt_trading, 2); + +/** + * Order cancellation response + * + * @generated from message foxhunt.tli.CancelOrderResponse + */ +export type CancelOrderResponse = Message<"foxhunt.tli.CancelOrderResponse"> & { + /** + * @generated from field: bool success = 1; + */ + success: boolean; + + /** + * @generated from field: string message = 2; + */ + message: string; + + /** + * @generated from field: int64 timestamp_unix_nanos = 3; + */ + timestampUnixNanos: bigint; +}; + +/** + * Describes the message foxhunt.tli.CancelOrderResponse. + * Use `create(CancelOrderResponseSchema)` to create a new message. + */ +export const CancelOrderResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_fxt_trading, 3); + +/** + * Order status request + * + * @generated from message foxhunt.tli.GetOrderStatusRequest + */ +export type GetOrderStatusRequest = Message<"foxhunt.tli.GetOrderStatusRequest"> & { + /** + * @generated from field: string order_id = 1; + */ + orderId: string; +}; + +/** + * Describes the message foxhunt.tli.GetOrderStatusRequest. + * Use `create(GetOrderStatusRequestSchema)` to create a new message. + */ +export const GetOrderStatusRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_fxt_trading, 4); + +/** + * Order status response + * + * @generated from message foxhunt.tli.GetOrderStatusResponse + */ +export type GetOrderStatusResponse = Message<"foxhunt.tli.GetOrderStatusResponse"> & { + /** + * @generated from field: string order_id = 1; + */ + orderId: string; + + /** + * @generated from field: string symbol = 2; + */ + symbol: string; + + /** + * @generated from field: foxhunt.tli.OrderSide side = 3; + */ + side: OrderSide; + + /** + * @generated from field: foxhunt.tli.OrderType order_type = 4; + */ + orderType: OrderType; + + /** + * @generated from field: double quantity = 5; + */ + quantity: number; + + /** + * @generated from field: double filled_quantity = 6; + */ + filledQuantity: number; + + /** + * @generated from field: double remaining_quantity = 7; + */ + remainingQuantity: number; + + /** + * @generated from field: double average_price = 8; + */ + averagePrice: number; + + /** + * @generated from field: foxhunt.tli.OrderStatus status = 9; + */ + status: OrderStatus; + + /** + * @generated from field: int64 created_at_unix_nanos = 10; + */ + createdAtUnixNanos: bigint; + + /** + * @generated from field: int64 updated_at_unix_nanos = 11; + */ + updatedAtUnixNanos: bigint; +}; + +/** + * Describes the message foxhunt.tli.GetOrderStatusResponse. + * Use `create(GetOrderStatusResponseSchema)` to create a new message. + */ +export const GetOrderStatusResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_fxt_trading, 5); + +/** + * Account information request + * + * @generated from message foxhunt.tli.GetAccountInfoRequest + */ +export type GetAccountInfoRequest = Message<"foxhunt.tli.GetAccountInfoRequest"> & { + /** + * @generated from field: string account_id = 1; + */ + accountId: string; +}; + +/** + * Describes the message foxhunt.tli.GetAccountInfoRequest. + * Use `create(GetAccountInfoRequestSchema)` to create a new message. + */ +export const GetAccountInfoRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_fxt_trading, 6); + +/** + * Account information response + * + * @generated from message foxhunt.tli.GetAccountInfoResponse + */ +export type GetAccountInfoResponse = Message<"foxhunt.tli.GetAccountInfoResponse"> & { + /** + * @generated from field: string account_id = 1; + */ + accountId: string; + + /** + * @generated from field: double total_value = 2; + */ + totalValue: number; + + /** + * @generated from field: double cash_balance = 3; + */ + cashBalance: number; + + /** + * @generated from field: double buying_power = 4; + */ + buyingPower: number; + + /** + * @generated from field: double maintenance_margin = 5; + */ + maintenanceMargin: number; + + /** + * @generated from field: double day_trading_buying_power = 6; + */ + dayTradingBuyingPower: number; +}; + +/** + * Describes the message foxhunt.tli.GetAccountInfoResponse. + * Use `create(GetAccountInfoResponseSchema)` to create a new message. + */ +export const GetAccountInfoResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_fxt_trading, 7); + +/** + * Positions request + * + * @generated from message foxhunt.tli.GetPositionsRequest + */ +export type GetPositionsRequest = Message<"foxhunt.tli.GetPositionsRequest"> & { + /** + * Filter by symbol if provided + * + * @generated from field: optional string symbol = 1; + */ + symbol?: string; +}; + +/** + * Describes the message foxhunt.tli.GetPositionsRequest. + * Use `create(GetPositionsRequestSchema)` to create a new message. + */ +export const GetPositionsRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_fxt_trading, 8); + +/** + * Positions response + * + * @generated from message foxhunt.tli.GetPositionsResponse + */ +export type GetPositionsResponse = Message<"foxhunt.tli.GetPositionsResponse"> & { + /** + * @generated from field: repeated foxhunt.tli.Position positions = 1; + */ + positions: Position[]; +}; + +/** + * Describes the message foxhunt.tli.GetPositionsResponse. + * Use `create(GetPositionsResponseSchema)` to create a new message. + */ +export const GetPositionsResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_fxt_trading, 9); + +/** + * Position information + * + * @generated from message foxhunt.tli.Position + */ +export type Position = Message<"foxhunt.tli.Position"> & { + /** + * @generated from field: string symbol = 1; + */ + symbol: string; + + /** + * @generated from field: double quantity = 2; + */ + quantity: number; + + /** + * @generated from field: double market_price = 3; + */ + marketPrice: number; + + /** + * @generated from field: double market_value = 4; + */ + marketValue: number; + + /** + * @generated from field: double average_cost = 5; + */ + averageCost: number; + + /** + * @generated from field: double unrealized_pnl = 6; + */ + unrealizedPnl: number; + + /** + * @generated from field: double realized_pnl = 7; + */ + realizedPnl: number; +}; + +/** + * Describes the message foxhunt.tli.Position. + * Use `create(PositionSchema)` to create a new message. + */ +export const PositionSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_fxt_trading, 10); + +/** + * Market data subscription request + * + * @generated from message foxhunt.tli.SubscribeMarketDataRequest + */ +export type SubscribeMarketDataRequest = Message<"foxhunt.tli.SubscribeMarketDataRequest"> & { + /** + * @generated from field: repeated string symbols = 1; + */ + symbols: string[]; + + /** + * @generated from field: repeated foxhunt.tli.MarketDataType data_types = 2; + */ + dataTypes: MarketDataType[]; +}; + +/** + * Describes the message foxhunt.tli.SubscribeMarketDataRequest. + * Use `create(SubscribeMarketDataRequestSchema)` to create a new message. + */ +export const SubscribeMarketDataRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_fxt_trading, 11); + +/** + * Market data event + * + * @generated from message foxhunt.tli.MarketDataEvent + */ +export type MarketDataEvent = Message<"foxhunt.tli.MarketDataEvent"> & { + /** + * @generated from oneof foxhunt.tli.MarketDataEvent.event + */ + event: { + /** + * @generated from field: foxhunt.tli.TickData tick = 1; + */ + value: TickData; + case: "tick"; + } | { + /** + * @generated from field: foxhunt.tli.QuoteData quote = 2; + */ + value: QuoteData; + case: "quote"; + } | { + /** + * @generated from field: foxhunt.tli.TradeData trade = 3; + */ + value: TradeData; + case: "trade"; + } | { + /** + * @generated from field: foxhunt.tli.BarData bar = 4; + */ + value: BarData; + case: "bar"; + } | { case: undefined; value?: undefined }; +}; + +/** + * Describes the message foxhunt.tli.MarketDataEvent. + * Use `create(MarketDataEventSchema)` to create a new message. + */ +export const MarketDataEventSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_fxt_trading, 12); + +/** + * Tick data + * + * @generated from message foxhunt.tli.TickData + */ +export type TickData = Message<"foxhunt.tli.TickData"> & { + /** + * @generated from field: string symbol = 1; + */ + symbol: string; + + /** + * @generated from field: int64 timestamp_unix_nanos = 2; + */ + timestampUnixNanos: bigint; + + /** + * @generated from field: double price = 3; + */ + price: number; + + /** + * @generated from field: uint64 size = 4; + */ + size: bigint; + + /** + * @generated from field: string exchange = 5; + */ + exchange: string; +}; + +/** + * Describes the message foxhunt.tli.TickData. + * Use `create(TickDataSchema)` to create a new message. + */ +export const TickDataSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_fxt_trading, 13); + +/** + * Quote data + * + * @generated from message foxhunt.tli.QuoteData + */ +export type QuoteData = Message<"foxhunt.tli.QuoteData"> & { + /** + * @generated from field: string symbol = 1; + */ + symbol: string; + + /** + * @generated from field: int64 timestamp_unix_nanos = 2; + */ + timestampUnixNanos: bigint; + + /** + * @generated from field: double bid_price = 3; + */ + bidPrice: number; + + /** + * @generated from field: uint64 bid_size = 4; + */ + bidSize: bigint; + + /** + * @generated from field: double ask_price = 5; + */ + askPrice: number; + + /** + * @generated from field: uint64 ask_size = 6; + */ + askSize: bigint; + + /** + * @generated from field: string exchange = 7; + */ + exchange: string; +}; + +/** + * Describes the message foxhunt.tli.QuoteData. + * Use `create(QuoteDataSchema)` to create a new message. + */ +export const QuoteDataSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_fxt_trading, 14); + +/** + * Trade data + * + * @generated from message foxhunt.tli.TradeData + */ +export type TradeData = Message<"foxhunt.tli.TradeData"> & { + /** + * @generated from field: string symbol = 1; + */ + symbol: string; + + /** + * @generated from field: int64 timestamp_unix_nanos = 2; + */ + timestampUnixNanos: bigint; + + /** + * @generated from field: double price = 3; + */ + price: number; + + /** + * @generated from field: uint64 size = 4; + */ + size: bigint; + + /** + * @generated from field: string trade_id = 5; + */ + tradeId: string; + + /** + * @generated from field: string exchange = 6; + */ + exchange: string; +}; + +/** + * Describes the message foxhunt.tli.TradeData. + * Use `create(TradeDataSchema)` to create a new message. + */ +export const TradeDataSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_fxt_trading, 15); + +/** + * Bar data + * + * @generated from message foxhunt.tli.BarData + */ +export type BarData = Message<"foxhunt.tli.BarData"> & { + /** + * @generated from field: string symbol = 1; + */ + symbol: string; + + /** + * @generated from field: int64 timestamp_unix_nanos = 2; + */ + timestampUnixNanos: bigint; + + /** + * @generated from field: string timeframe = 3; + */ + timeframe: string; + + /** + * @generated from field: double open = 4; + */ + open: number; + + /** + * @generated from field: double high = 5; + */ + high: number; + + /** + * @generated from field: double low = 6; + */ + low: number; + + /** + * @generated from field: double close = 7; + */ + close: number; + + /** + * @generated from field: uint64 volume = 8; + */ + volume: bigint; + + /** + * @generated from field: optional double vwap = 9; + */ + vwap?: number; +}; + +/** + * Describes the message foxhunt.tli.BarData. + * Use `create(BarDataSchema)` to create a new message. + */ +export const BarDataSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_fxt_trading, 16); + +/** + * Order updates subscription request + * + * @generated from message foxhunt.tli.SubscribeOrderUpdatesRequest + */ +export type SubscribeOrderUpdatesRequest = Message<"foxhunt.tli.SubscribeOrderUpdatesRequest"> & { + /** + * @generated from field: optional string account_id = 1; + */ + accountId?: string; +}; + +/** + * Describes the message foxhunt.tli.SubscribeOrderUpdatesRequest. + * Use `create(SubscribeOrderUpdatesRequestSchema)` to create a new message. + */ +export const SubscribeOrderUpdatesRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_fxt_trading, 17); + +/** + * Order update event + * + * @generated from message foxhunt.tli.OrderUpdateEvent + */ +export type OrderUpdateEvent = Message<"foxhunt.tli.OrderUpdateEvent"> & { + /** + * @generated from field: string order_id = 1; + */ + orderId: string; + + /** + * @generated from field: string symbol = 2; + */ + symbol: string; + + /** + * @generated from field: foxhunt.tli.OrderStatus status = 3; + */ + status: OrderStatus; + + /** + * @generated from field: double filled_quantity = 4; + */ + filledQuantity: number; + + /** + * @generated from field: double remaining_quantity = 5; + */ + remainingQuantity: number; + + /** + * @generated from field: double last_fill_price = 6; + */ + lastFillPrice: number; + + /** + * @generated from field: uint64 last_fill_quantity = 7; + */ + lastFillQuantity: bigint; + + /** + * @generated from field: int64 timestamp_unix_nanos = 8; + */ + timestampUnixNanos: bigint; + + /** + * @generated from field: string message = 9; + */ + message: string; +}; + +/** + * Describes the message foxhunt.tli.OrderUpdateEvent. + * Use `create(OrderUpdateEventSchema)` to create a new message. + */ +export const OrderUpdateEventSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_fxt_trading, 18); + +/** + * Monitoring messages + * + * @generated from message foxhunt.tli.GetMetricsRequest + */ +export type GetMetricsRequest = Message<"foxhunt.tli.GetMetricsRequest"> & { + /** + * @generated from field: repeated string metric_names = 1; + */ + metricNames: string[]; + + /** + * @generated from field: optional int64 start_time_unix_nanos = 2; + */ + startTimeUnixNanos?: bigint; + + /** + * @generated from field: optional int64 end_time_unix_nanos = 3; + */ + endTimeUnixNanos?: bigint; +}; + +/** + * Describes the message foxhunt.tli.GetMetricsRequest. + * Use `create(GetMetricsRequestSchema)` to create a new message. + */ +export const GetMetricsRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_fxt_trading, 19); + +/** + * @generated from message foxhunt.tli.GetMetricsResponse + */ +export type GetMetricsResponse = Message<"foxhunt.tli.GetMetricsResponse"> & { + /** + * @generated from field: repeated foxhunt.tli.Metric metrics = 1; + */ + metrics: Metric[]; + + /** + * @generated from field: int64 timestamp_unix_nanos = 2; + */ + timestampUnixNanos: bigint; +}; + +/** + * Describes the message foxhunt.tli.GetMetricsResponse. + * Use `create(GetMetricsResponseSchema)` to create a new message. + */ +export const GetMetricsResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_fxt_trading, 20); + +/** + * @generated from message foxhunt.tli.Metric + */ +export type Metric = Message<"foxhunt.tli.Metric"> & { + /** + * @generated from field: string name = 1; + */ + name: string; + + /** + * @generated from field: double value = 2; + */ + value: number; + + /** + * @generated from field: string unit = 3; + */ + unit: string; + + /** + * @generated from field: map labels = 4; + */ + labels: { [key: string]: string }; + + /** + * @generated from field: int64 timestamp_unix_nanos = 5; + */ + timestampUnixNanos: bigint; +}; + +/** + * Describes the message foxhunt.tli.Metric. + * Use `create(MetricSchema)` to create a new message. + */ +export const MetricSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_fxt_trading, 21); + +/** + * @generated from message foxhunt.tli.GetLatencyRequest + */ +export type GetLatencyRequest = Message<"foxhunt.tli.GetLatencyRequest"> & { + /** + * @generated from field: optional string service_name = 1; + */ + serviceName?: string; + + /** + * @generated from field: optional string operation = 2; + */ + operation?: string; + + /** + * @generated from field: optional int64 start_time_unix_nanos = 3; + */ + startTimeUnixNanos?: bigint; + + /** + * @generated from field: optional int64 end_time_unix_nanos = 4; + */ + endTimeUnixNanos?: bigint; +}; + +/** + * Describes the message foxhunt.tli.GetLatencyRequest. + * Use `create(GetLatencyRequestSchema)` to create a new message. + */ +export const GetLatencyRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_fxt_trading, 22); + +/** + * @generated from message foxhunt.tli.GetLatencyResponse + */ +export type GetLatencyResponse = Message<"foxhunt.tli.GetLatencyResponse"> & { + /** + * @generated from field: double p50_micros = 1; + */ + p50Micros: number; + + /** + * @generated from field: double p95_micros = 2; + */ + p95Micros: number; + + /** + * @generated from field: double p99_micros = 3; + */ + p99Micros: number; + + /** + * @generated from field: double p999_micros = 4; + */ + p999Micros: number; + + /** + * @generated from field: double avg_micros = 5; + */ + avgMicros: number; + + /** + * @generated from field: double max_micros = 6; + */ + maxMicros: number; + + /** + * @generated from field: double min_micros = 7; + */ + minMicros: number; + + /** + * @generated from field: uint64 sample_count = 8; + */ + sampleCount: bigint; +}; + +/** + * Describes the message foxhunt.tli.GetLatencyResponse. + * Use `create(GetLatencyResponseSchema)` to create a new message. + */ +export const GetLatencyResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_fxt_trading, 23); + +/** + * @generated from message foxhunt.tli.GetThroughputRequest + */ +export type GetThroughputRequest = Message<"foxhunt.tli.GetThroughputRequest"> & { + /** + * @generated from field: optional string service_name = 1; + */ + serviceName?: string; + + /** + * @generated from field: optional string operation = 2; + */ + operation?: string; + + /** + * @generated from field: optional int64 start_time_unix_nanos = 3; + */ + startTimeUnixNanos?: bigint; + + /** + * @generated from field: optional int64 end_time_unix_nanos = 4; + */ + endTimeUnixNanos?: bigint; +}; + +/** + * Describes the message foxhunt.tli.GetThroughputRequest. + * Use `create(GetThroughputRequestSchema)` to create a new message. + */ +export const GetThroughputRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_fxt_trading, 24); + +/** + * @generated from message foxhunt.tli.GetThroughputResponse + */ +export type GetThroughputResponse = Message<"foxhunt.tli.GetThroughputResponse"> & { + /** + * @generated from field: double requests_per_second = 1; + */ + requestsPerSecond: number; + + /** + * @generated from field: double bytes_per_second = 2; + */ + bytesPerSecond: number; + + /** + * @generated from field: uint64 total_requests = 3; + */ + totalRequests: bigint; + + /** + * @generated from field: uint64 total_bytes = 4; + */ + totalBytes: bigint; + + /** + * @generated from field: uint64 error_count = 5; + */ + errorCount: bigint; + + /** + * @generated from field: double error_rate = 6; + */ + errorRate: number; +}; + +/** + * Describes the message foxhunt.tli.GetThroughputResponse. + * Use `create(GetThroughputResponseSchema)` to create a new message. + */ +export const GetThroughputResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_fxt_trading, 25); + +/** + * @generated from message foxhunt.tli.SubscribeMetricsRequest + */ +export type SubscribeMetricsRequest = Message<"foxhunt.tli.SubscribeMetricsRequest"> & { + /** + * @generated from field: repeated string metric_names = 1; + */ + metricNames: string[]; + + /** + * @generated from field: uint32 interval_seconds = 2; + */ + intervalSeconds: number; +}; + +/** + * Describes the message foxhunt.tli.SubscribeMetricsRequest. + * Use `create(SubscribeMetricsRequestSchema)` to create a new message. + */ +export const SubscribeMetricsRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_fxt_trading, 26); + +/** + * @generated from message foxhunt.tli.MetricsEvent + */ +export type MetricsEvent = Message<"foxhunt.tli.MetricsEvent"> & { + /** + * @generated from field: repeated foxhunt.tli.Metric metrics = 1; + */ + metrics: Metric[]; + + /** + * @generated from field: int64 timestamp_unix_nanos = 2; + */ + timestampUnixNanos: bigint; +}; + +/** + * Describes the message foxhunt.tli.MetricsEvent. + * Use `create(MetricsEventSchema)` to create a new message. + */ +export const MetricsEventSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_fxt_trading, 27); + +/** + * Configuration messages + * + * @generated from message foxhunt.tli.UpdateParametersRequest + */ +export type UpdateParametersRequest = Message<"foxhunt.tli.UpdateParametersRequest"> & { + /** + * @generated from field: map parameters = 1; + */ + parameters: { [key: string]: string }; + + /** + * @generated from field: bool persist = 2; + */ + persist: boolean; +}; + +/** + * Describes the message foxhunt.tli.UpdateParametersRequest. + * Use `create(UpdateParametersRequestSchema)` to create a new message. + */ +export const UpdateParametersRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_fxt_trading, 28); + +/** + * @generated from message foxhunt.tli.UpdateParametersResponse + */ +export type UpdateParametersResponse = Message<"foxhunt.tli.UpdateParametersResponse"> & { + /** + * @generated from field: bool success = 1; + */ + success: boolean; + + /** + * @generated from field: string message = 2; + */ + message: string; + + /** + * @generated from field: repeated string updated_keys = 3; + */ + updatedKeys: string[]; +}; + +/** + * Describes the message foxhunt.tli.UpdateParametersResponse. + * Use `create(UpdateParametersResponseSchema)` to create a new message. + */ +export const UpdateParametersResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_fxt_trading, 29); + +/** + * @generated from message foxhunt.tli.GetConfigRequest + */ +export type GetConfigRequest = Message<"foxhunt.tli.GetConfigRequest"> & { + /** + * Empty to get all config + * + * @generated from field: repeated string keys = 1; + */ + keys: string[]; +}; + +/** + * Describes the message foxhunt.tli.GetConfigRequest. + * Use `create(GetConfigRequestSchema)` to create a new message. + */ +export const GetConfigRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_fxt_trading, 30); + +/** + * @generated from message foxhunt.tli.GetConfigResponse + */ +export type GetConfigResponse = Message<"foxhunt.tli.GetConfigResponse"> & { + /** + * @generated from field: map config = 1; + */ + config: { [key: string]: string }; + + /** + * @generated from field: int64 version = 2; + */ + version: bigint; + + /** + * @generated from field: int64 last_updated_unix_nanos = 3; + */ + lastUpdatedUnixNanos: bigint; +}; + +/** + * Describes the message foxhunt.tli.GetConfigResponse. + * Use `create(GetConfigResponseSchema)` to create a new message. + */ +export const GetConfigResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_fxt_trading, 31); + +/** + * @generated from message foxhunt.tli.SubscribeConfigRequest + */ +export type SubscribeConfigRequest = Message<"foxhunt.tli.SubscribeConfigRequest"> & { + /** + * Empty to watch all config changes + * + * @generated from field: repeated string keys = 1; + */ + keys: string[]; +}; + +/** + * Describes the message foxhunt.tli.SubscribeConfigRequest. + * Use `create(SubscribeConfigRequestSchema)` to create a new message. + */ +export const SubscribeConfigRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_fxt_trading, 32); + +/** + * @generated from message foxhunt.tli.ConfigEvent + */ +export type ConfigEvent = Message<"foxhunt.tli.ConfigEvent"> & { + /** + * @generated from field: string key = 1; + */ + key: string; + + /** + * @generated from field: string value = 2; + */ + value: string; + + /** + * @generated from field: string old_value = 3; + */ + oldValue: string; + + /** + * @generated from field: int64 timestamp_unix_nanos = 4; + */ + timestampUnixNanos: bigint; +}; + +/** + * Describes the message foxhunt.tli.ConfigEvent. + * Use `create(ConfigEventSchema)` to create a new message. + */ +export const ConfigEventSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_fxt_trading, 33); + +/** + * @generated from message foxhunt.tli.GetSystemStatusRequest + */ +export type GetSystemStatusRequest = Message<"foxhunt.tli.GetSystemStatusRequest"> & { + /** + * Empty to get all services + * + * @generated from field: repeated string service_names = 1; + */ + serviceNames: string[]; +}; + +/** + * Describes the message foxhunt.tli.GetSystemStatusRequest. + * Use `create(GetSystemStatusRequestSchema)` to create a new message. + */ +export const GetSystemStatusRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_fxt_trading, 34); + +/** + * @generated from message foxhunt.tli.GetSystemStatusResponse + */ +export type GetSystemStatusResponse = Message<"foxhunt.tli.GetSystemStatusResponse"> & { + /** + * @generated from field: foxhunt.tli.SystemStatus overall_status = 1; + */ + overallStatus: SystemStatus; + + /** + * @generated from field: repeated foxhunt.tli.ServiceStatus services = 2; + */ + services: ServiceStatus[]; + + /** + * @generated from field: int64 timestamp_unix_nanos = 3; + */ + timestampUnixNanos: bigint; +}; + +/** + * Describes the message foxhunt.tli.GetSystemStatusResponse. + * Use `create(GetSystemStatusResponseSchema)` to create a new message. + */ +export const GetSystemStatusResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_fxt_trading, 35); + +/** + * @generated from message foxhunt.tli.ServiceStatus + */ +export type ServiceStatus = Message<"foxhunt.tli.ServiceStatus"> & { + /** + * @generated from field: string name = 1; + */ + name: string; + + /** + * @generated from field: foxhunt.tli.SystemStatus status = 2; + */ + status: SystemStatus; + + /** + * @generated from field: string message = 3; + */ + message: string; + + /** + * @generated from field: int64 last_check_unix_nanos = 4; + */ + lastCheckUnixNanos: bigint; + + /** + * @generated from field: map details = 5; + */ + details: { [key: string]: string }; +}; + +/** + * Describes the message foxhunt.tli.ServiceStatus. + * Use `create(ServiceStatusSchema)` to create a new message. + */ +export const ServiceStatusSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_fxt_trading, 36); + +/** + * @generated from message foxhunt.tli.SubscribeSystemStatusRequest + */ +export type SubscribeSystemStatusRequest = Message<"foxhunt.tli.SubscribeSystemStatusRequest"> & { + /** + * @generated from field: repeated string service_names = 1; + */ + serviceNames: string[]; +}; + +/** + * Describes the message foxhunt.tli.SubscribeSystemStatusRequest. + * Use `create(SubscribeSystemStatusRequestSchema)` to create a new message. + */ +export const SubscribeSystemStatusRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_fxt_trading, 37); + +/** + * @generated from message foxhunt.tli.SystemStatusEvent + */ +export type SystemStatusEvent = Message<"foxhunt.tli.SystemStatusEvent"> & { + /** + * @generated from field: string service_name = 1; + */ + serviceName: string; + + /** + * @generated from field: foxhunt.tli.SystemStatus status = 2; + */ + status: SystemStatus; + + /** + * @generated from field: foxhunt.tli.SystemStatus previous_status = 3; + */ + previousStatus: SystemStatus; + + /** + * @generated from field: string message = 4; + */ + message: string; + + /** + * @generated from field: int64 timestamp_unix_nanos = 5; + */ + timestampUnixNanos: bigint; +}; + +/** + * Describes the message foxhunt.tli.SystemStatusEvent. + * Use `create(SystemStatusEventSchema)` to create a new message. + */ +export const SystemStatusEventSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_fxt_trading, 38); + +/** + * VaR calculation request + * + * @generated from message foxhunt.tli.GetVaRRequest + */ +export type GetVaRRequest = Message<"foxhunt.tli.GetVaRRequest"> & { + /** + * @generated from field: repeated string symbols = 1; + */ + symbols: string[]; + + /** + * e.g., 0.95, 0.99 + * + * @generated from field: double confidence_level = 2; + */ + confidenceLevel: number; + + /** + * @generated from field: uint32 lookback_days = 3; + */ + lookbackDays: number; + + /** + * @generated from field: foxhunt.tli.VaRMethodology methodology = 4; + */ + methodology: VaRMethodology; +}; + +/** + * Describes the message foxhunt.tli.GetVaRRequest. + * Use `create(GetVaRRequestSchema)` to create a new message. + */ +export const GetVaRRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_fxt_trading, 39); + +/** + * VaR calculation response + * + * @generated from message foxhunt.tli.GetVaRResponse + */ +export type GetVaRResponse = Message<"foxhunt.tli.GetVaRResponse"> & { + /** + * @generated from field: double portfolio_var = 1; + */ + portfolioVar: number; + + /** + * @generated from field: repeated foxhunt.tli.SymbolVaR symbol_vars = 2; + */ + symbolVars: SymbolVaR[]; + + /** + * @generated from field: int64 timestamp_unix_nanos = 3; + */ + timestampUnixNanos: bigint; + + /** + * @generated from field: string methodology_used = 4; + */ + methodologyUsed: string; +}; + +/** + * Describes the message foxhunt.tli.GetVaRResponse. + * Use `create(GetVaRResponseSchema)` to create a new message. + */ +export const GetVaRResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_fxt_trading, 40); + +/** + * @generated from message foxhunt.tli.SymbolVaR + */ +export type SymbolVaR = Message<"foxhunt.tli.SymbolVaR"> & { + /** + * @generated from field: string symbol = 1; + */ + symbol: string; + + /** + * @generated from field: double var_amount = 2; + */ + varAmount: number; + + /** + * @generated from field: double contribution_percent = 3; + */ + contributionPercent: number; +}; + +/** + * Describes the message foxhunt.tli.SymbolVaR. + * Use `create(SymbolVaRSchema)` to create a new message. + */ +export const SymbolVaRSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_fxt_trading, 41); + +/** + * Position risk analysis + * + * @generated from message foxhunt.tli.GetPositionRiskRequest + */ +export type GetPositionRiskRequest = Message<"foxhunt.tli.GetPositionRiskRequest"> & { + /** + * Empty for all positions + * + * @generated from field: optional string symbol = 1; + */ + symbol?: string; +}; + +/** + * Describes the message foxhunt.tli.GetPositionRiskRequest. + * Use `create(GetPositionRiskRequestSchema)` to create a new message. + */ +export const GetPositionRiskRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_fxt_trading, 42); + +/** + * @generated from message foxhunt.tli.GetPositionRiskResponse + */ +export type GetPositionRiskResponse = Message<"foxhunt.tli.GetPositionRiskResponse"> & { + /** + * @generated from field: repeated foxhunt.tli.PositionRisk positions = 1; + */ + positions: PositionRisk[]; + + /** + * @generated from field: double total_exposure = 2; + */ + totalExposure: number; + + /** + * @generated from field: double concentration_risk = 3; + */ + concentrationRisk: number; + + /** + * @generated from field: int64 timestamp_unix_nanos = 4; + */ + timestampUnixNanos: bigint; +}; + +/** + * Describes the message foxhunt.tli.GetPositionRiskResponse. + * Use `create(GetPositionRiskResponseSchema)` to create a new message. + */ +export const GetPositionRiskResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_fxt_trading, 43); + +/** + * @generated from message foxhunt.tli.PositionRisk + */ +export type PositionRisk = Message<"foxhunt.tli.PositionRisk"> & { + /** + * @generated from field: string symbol = 1; + */ + symbol: string; + + /** + * @generated from field: double position_size = 2; + */ + positionSize: number; + + /** + * @generated from field: double market_value = 3; + */ + marketValue: number; + + /** + * @generated from field: double var_contribution = 4; + */ + varContribution: number; + + /** + * @generated from field: double concentration_percent = 5; + */ + concentrationPercent: number; + + /** + * @generated from field: foxhunt.tli.RiskLevel risk_level = 6; + */ + riskLevel: RiskLevel; +}; + +/** + * Describes the message foxhunt.tli.PositionRisk. + * Use `create(PositionRiskSchema)` to create a new message. + */ +export const PositionRiskSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_fxt_trading, 44); + +/** + * Order validation request + * + * @generated from message foxhunt.tli.ValidateOrderRequest + */ +export type ValidateOrderRequest = Message<"foxhunt.tli.ValidateOrderRequest"> & { + /** + * @generated from field: string symbol = 1; + */ + symbol: string; + + /** + * @generated from field: foxhunt.tli.OrderSide side = 2; + */ + side: OrderSide; + + /** + * @generated from field: double quantity = 3; + */ + quantity: number; + + /** + * @generated from field: double price = 4; + */ + price: number; + + /** + * @generated from field: string account_id = 5; + */ + accountId: string; +}; + +/** + * Describes the message foxhunt.tli.ValidateOrderRequest. + * Use `create(ValidateOrderRequestSchema)` to create a new message. + */ +export const ValidateOrderRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_fxt_trading, 45); + +/** + * @generated from message foxhunt.tli.ValidateOrderResponse + */ +export type ValidateOrderResponse = Message<"foxhunt.tli.ValidateOrderResponse"> & { + /** + * @generated from field: bool approved = 1; + */ + approved: boolean; + + /** + * @generated from field: string reason = 2; + */ + reason: string; + + /** + * @generated from field: repeated foxhunt.tli.RiskViolation violations = 3; + */ + violations: RiskViolation[]; + + /** + * @generated from field: double projected_exposure = 4; + */ + projectedExposure: number; + + /** + * @generated from field: double margin_impact = 5; + */ + marginImpact: number; +}; + +/** + * Describes the message foxhunt.tli.ValidateOrderResponse. + * Use `create(ValidateOrderResponseSchema)` to create a new message. + */ +export const ValidateOrderResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_fxt_trading, 46); + +/** + * @generated from message foxhunt.tli.RiskViolation + */ +export type RiskViolation = Message<"foxhunt.tli.RiskViolation"> & { + /** + * @generated from field: foxhunt.tli.ViolationType type = 1; + */ + type: ViolationType; + + /** + * @generated from field: string description = 2; + */ + description: string; + + /** + * @generated from field: double limit_value = 3; + */ + limitValue: number; + + /** + * @generated from field: double current_value = 4; + */ + currentValue: number; + + /** + * @generated from field: foxhunt.tli.RiskSeverity severity = 5; + */ + severity: RiskSeverity; +}; + +/** + * Describes the message foxhunt.tli.RiskViolation. + * Use `create(RiskViolationSchema)` to create a new message. + */ +export const RiskViolationSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_fxt_trading, 47); + +/** + * Risk metrics request + * + * @generated from message foxhunt.tli.GetRiskMetricsRequest + */ +export type GetRiskMetricsRequest = Message<"foxhunt.tli.GetRiskMetricsRequest"> & { + /** + * @generated from field: optional string portfolio_id = 1; + */ + portfolioId?: string; + + /** + * @generated from field: optional int64 start_time_unix_nanos = 2; + */ + startTimeUnixNanos?: bigint; + + /** + * @generated from field: optional int64 end_time_unix_nanos = 3; + */ + endTimeUnixNanos?: bigint; +}; + +/** + * Describes the message foxhunt.tli.GetRiskMetricsRequest. + * Use `create(GetRiskMetricsRequestSchema)` to create a new message. + */ +export const GetRiskMetricsRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_fxt_trading, 48); + +/** + * @generated from message foxhunt.tli.GetRiskMetricsResponse + */ +export type GetRiskMetricsResponse = Message<"foxhunt.tli.GetRiskMetricsResponse"> & { + /** + * @generated from field: double sharpe_ratio = 1; + */ + sharpeRatio: number; + + /** + * @generated from field: double max_drawdown = 2; + */ + maxDrawdown: number; + + /** + * @generated from field: double current_drawdown = 3; + */ + currentDrawdown: number; + + /** + * @generated from field: double volatility = 4; + */ + volatility: number; + + /** + * @generated from field: double beta = 5; + */ + beta: number; + + /** + * @generated from field: double alpha = 6; + */ + alpha: number; + + /** + * @generated from field: double value_at_risk = 7; + */ + valueAtRisk: number; + + /** + * @generated from field: double expected_shortfall = 8; + */ + expectedShortfall: number; + + /** + * @generated from field: int64 timestamp_unix_nanos = 9; + */ + timestampUnixNanos: bigint; +}; + +/** + * Describes the message foxhunt.tli.GetRiskMetricsResponse. + * Use `create(GetRiskMetricsResponseSchema)` to create a new message. + */ +export const GetRiskMetricsResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_fxt_trading, 49); + +/** + * Risk alerts subscription + * + * @generated from message foxhunt.tli.SubscribeRiskAlertsRequest + */ +export type SubscribeRiskAlertsRequest = Message<"foxhunt.tli.SubscribeRiskAlertsRequest"> & { + /** + * @generated from field: repeated foxhunt.tli.RiskSeverity min_severity = 1; + */ + minSeverity: RiskSeverity[]; + + /** + * Empty for all symbols + * + * @generated from field: repeated string symbols = 2; + */ + symbols: string[]; +}; + +/** + * Describes the message foxhunt.tli.SubscribeRiskAlertsRequest. + * Use `create(SubscribeRiskAlertsRequestSchema)` to create a new message. + */ +export const SubscribeRiskAlertsRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_fxt_trading, 50); + +/** + * @generated from message foxhunt.tli.RiskAlertEvent + */ +export type RiskAlertEvent = Message<"foxhunt.tli.RiskAlertEvent"> & { + /** + * @generated from field: string alert_id = 1; + */ + alertId: string; + + /** + * @generated from field: foxhunt.tli.RiskSeverity severity = 2; + */ + severity: RiskSeverity; + + /** + * @generated from field: string symbol = 3; + */ + symbol: string; + + /** + * @generated from field: string message = 4; + */ + message: string; + + /** + * @generated from field: double threshold_value = 5; + */ + thresholdValue: number; + + /** + * @generated from field: double current_value = 6; + */ + currentValue: number; + + /** + * @generated from field: int64 timestamp_unix_nanos = 7; + */ + timestampUnixNanos: bigint; + + /** + * @generated from field: bool requires_action = 8; + */ + requiresAction: boolean; +}; + +/** + * Describes the message foxhunt.tli.RiskAlertEvent. + * Use `create(RiskAlertEventSchema)` to create a new message. + */ +export const RiskAlertEventSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_fxt_trading, 51); + +/** + * Emergency stop + * + * @generated from message foxhunt.tli.EmergencyStopRequest + */ +export type EmergencyStopRequest = Message<"foxhunt.tli.EmergencyStopRequest"> & { + /** + * @generated from field: foxhunt.tli.EmergencyStopType stop_type = 1; + */ + stopType: EmergencyStopType; + + /** + * @generated from field: string reason = 2; + */ + reason: string; + + /** + * Empty for all + * + * @generated from field: repeated string symbols = 3; + */ + symbols: string[]; + + /** + * @generated from field: bool confirm = 4; + */ + confirm: boolean; +}; + +/** + * Describes the message foxhunt.tli.EmergencyStopRequest. + * Use `create(EmergencyStopRequestSchema)` to create a new message. + */ +export const EmergencyStopRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_fxt_trading, 52); + +/** + * @generated from message foxhunt.tli.EmergencyStopResponse + */ +export type EmergencyStopResponse = Message<"foxhunt.tli.EmergencyStopResponse"> & { + /** + * @generated from field: bool success = 1; + */ + success: boolean; + + /** + * @generated from field: string message = 2; + */ + message: string; + + /** + * @generated from field: uint32 orders_cancelled = 3; + */ + ordersCancelled: number; + + /** + * @generated from field: uint32 positions_closed = 4; + */ + positionsClosed: number; + + /** + * @generated from field: int64 timestamp_unix_nanos = 5; + */ + timestampUnixNanos: bigint; +}; + +/** + * Describes the message foxhunt.tli.EmergencyStopResponse. + * Use `create(EmergencyStopResponseSchema)` to create a new message. + */ +export const EmergencyStopResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_fxt_trading, 53); + +/** + * Start backtest request + * + * @generated from message foxhunt.tli.StartBacktestRequest + */ +export type StartBacktestRequest = Message<"foxhunt.tli.StartBacktestRequest"> & { + /** + * @generated from field: string strategy_name = 1; + */ + strategyName: string; + + /** + * @generated from field: repeated string symbols = 2; + */ + symbols: string[]; + + /** + * @generated from field: int64 start_date_unix_nanos = 3; + */ + startDateUnixNanos: bigint; + + /** + * @generated from field: int64 end_date_unix_nanos = 4; + */ + endDateUnixNanos: bigint; + + /** + * @generated from field: double initial_capital = 5; + */ + initialCapital: number; + + /** + * @generated from field: map parameters = 6; + */ + parameters: { [key: string]: string }; + + /** + * @generated from field: bool save_results = 7; + */ + saveResults: boolean; + + /** + * @generated from field: string description = 8; + */ + description: string; +}; + +/** + * Describes the message foxhunt.tli.StartBacktestRequest. + * Use `create(StartBacktestRequestSchema)` to create a new message. + */ +export const StartBacktestRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_fxt_trading, 54); + +/** + * @generated from message foxhunt.tli.StartBacktestResponse + */ +export type StartBacktestResponse = Message<"foxhunt.tli.StartBacktestResponse"> & { + /** + * @generated from field: bool success = 1; + */ + success: boolean; + + /** + * @generated from field: string backtest_id = 2; + */ + backtestId: string; + + /** + * @generated from field: string message = 3; + */ + message: string; + + /** + * @generated from field: int64 estimated_duration_seconds = 4; + */ + estimatedDurationSeconds: bigint; +}; + +/** + * Describes the message foxhunt.tli.StartBacktestResponse. + * Use `create(StartBacktestResponseSchema)` to create a new message. + */ +export const StartBacktestResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_fxt_trading, 55); + +/** + * Backtest status + * + * @generated from message foxhunt.tli.GetBacktestStatusRequest + */ +export type GetBacktestStatusRequest = Message<"foxhunt.tli.GetBacktestStatusRequest"> & { + /** + * @generated from field: string backtest_id = 1; + */ + backtestId: string; +}; + +/** + * Describes the message foxhunt.tli.GetBacktestStatusRequest. + * Use `create(GetBacktestStatusRequestSchema)` to create a new message. + */ +export const GetBacktestStatusRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_fxt_trading, 56); + +/** + * @generated from message foxhunt.tli.GetBacktestStatusResponse + */ +export type GetBacktestStatusResponse = Message<"foxhunt.tli.GetBacktestStatusResponse"> & { + /** + * @generated from field: string backtest_id = 1; + */ + backtestId: string; + + /** + * @generated from field: foxhunt.tli.BacktestStatus status = 2; + */ + status: BacktestStatus; + + /** + * @generated from field: double progress_percentage = 3; + */ + progressPercentage: number; + + /** + * @generated from field: string current_date = 4; + */ + currentDate: string; + + /** + * @generated from field: uint64 trades_executed = 5; + */ + tradesExecuted: bigint; + + /** + * @generated from field: double current_pnl = 6; + */ + currentPnl: number; + + /** + * @generated from field: int64 started_at_unix_nanos = 7; + */ + startedAtUnixNanos: bigint; + + /** + * @generated from field: optional int64 completed_at_unix_nanos = 8; + */ + completedAtUnixNanos?: bigint; + + /** + * @generated from field: optional string error_message = 9; + */ + errorMessage?: string; +}; + +/** + * Describes the message foxhunt.tli.GetBacktestStatusResponse. + * Use `create(GetBacktestStatusResponseSchema)` to create a new message. + */ +export const GetBacktestStatusResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_fxt_trading, 57); + +/** + * Backtest results + * + * @generated from message foxhunt.tli.GetBacktestResultsRequest + */ +export type GetBacktestResultsRequest = Message<"foxhunt.tli.GetBacktestResultsRequest"> & { + /** + * @generated from field: string backtest_id = 1; + */ + backtestId: string; + + /** + * @generated from field: bool include_trades = 2; + */ + includeTrades: boolean; + + /** + * @generated from field: bool include_metrics = 3; + */ + includeMetrics: boolean; +}; + +/** + * Describes the message foxhunt.tli.GetBacktestResultsRequest. + * Use `create(GetBacktestResultsRequestSchema)` to create a new message. + */ +export const GetBacktestResultsRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_fxt_trading, 58); + +/** + * @generated from message foxhunt.tli.GetBacktestResultsResponse + */ +export type GetBacktestResultsResponse = Message<"foxhunt.tli.GetBacktestResultsResponse"> & { + /** + * @generated from field: string backtest_id = 1; + */ + backtestId: string; + + /** + * @generated from field: foxhunt.tli.BacktestMetrics metrics = 2; + */ + metrics?: BacktestMetrics; + + /** + * @generated from field: repeated foxhunt.tli.Trade trades = 3; + */ + trades: Trade[]; + + /** + * @generated from field: repeated foxhunt.tli.EquityCurvePoint equity_curve = 4; + */ + equityCurve: EquityCurvePoint[]; + + /** + * @generated from field: repeated foxhunt.tli.DrawdownPeriod drawdown_periods = 5; + */ + drawdownPeriods: DrawdownPeriod[]; +}; + +/** + * Describes the message foxhunt.tli.GetBacktestResultsResponse. + * Use `create(GetBacktestResultsResponseSchema)` to create a new message. + */ +export const GetBacktestResultsResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_fxt_trading, 59); + +/** + * @generated from message foxhunt.tli.BacktestMetrics + */ +export type BacktestMetrics = Message<"foxhunt.tli.BacktestMetrics"> & { + /** + * @generated from field: double total_return = 1; + */ + totalReturn: number; + + /** + * @generated from field: double annualized_return = 2; + */ + annualizedReturn: number; + + /** + * @generated from field: double sharpe_ratio = 3; + */ + sharpeRatio: number; + + /** + * @generated from field: double sortino_ratio = 4; + */ + sortinoRatio: number; + + /** + * @generated from field: double max_drawdown = 5; + */ + maxDrawdown: number; + + /** + * @generated from field: double volatility = 6; + */ + volatility: number; + + /** + * @generated from field: double win_rate = 7; + */ + winRate: number; + + /** + * @generated from field: double profit_factor = 8; + */ + profitFactor: number; + + /** + * @generated from field: uint64 total_trades = 9; + */ + totalTrades: bigint; + + /** + * @generated from field: uint64 winning_trades = 10; + */ + winningTrades: bigint; + + /** + * @generated from field: uint64 losing_trades = 11; + */ + losingTrades: bigint; + + /** + * @generated from field: double avg_win = 12; + */ + avgWin: number; + + /** + * @generated from field: double avg_loss = 13; + */ + avgLoss: number; + + /** + * @generated from field: double largest_win = 14; + */ + largestWin: number; + + /** + * @generated from field: double largest_loss = 15; + */ + largestLoss: number; + + /** + * @generated from field: double calmar_ratio = 16; + */ + calmarRatio: number; + + /** + * @generated from field: int64 backtest_duration_nanos = 17; + */ + backtestDurationNanos: bigint; +}; + +/** + * Describes the message foxhunt.tli.BacktestMetrics. + * Use `create(BacktestMetricsSchema)` to create a new message. + */ +export const BacktestMetricsSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_fxt_trading, 60); + +/** + * @generated from message foxhunt.tli.Trade + */ +export type Trade = Message<"foxhunt.tli.Trade"> & { + /** + * @generated from field: string trade_id = 1; + */ + tradeId: string; + + /** + * @generated from field: string symbol = 2; + */ + symbol: string; + + /** + * @generated from field: foxhunt.tli.OrderSide side = 3; + */ + side: OrderSide; + + /** + * @generated from field: double quantity = 4; + */ + quantity: number; + + /** + * @generated from field: double entry_price = 5; + */ + entryPrice: number; + + /** + * @generated from field: double exit_price = 6; + */ + exitPrice: number; + + /** + * @generated from field: int64 entry_time_unix_nanos = 7; + */ + entryTimeUnixNanos: bigint; + + /** + * @generated from field: int64 exit_time_unix_nanos = 8; + */ + exitTimeUnixNanos: bigint; + + /** + * @generated from field: double pnl = 9; + */ + pnl: number; + + /** + * @generated from field: double return_percent = 10; + */ + returnPercent: number; + + /** + * @generated from field: string entry_signal = 11; + */ + entrySignal: string; + + /** + * @generated from field: string exit_signal = 12; + */ + exitSignal: string; +}; + +/** + * Describes the message foxhunt.tli.Trade. + * Use `create(TradeSchema)` to create a new message. + */ +export const TradeSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_fxt_trading, 61); + +/** + * @generated from message foxhunt.tli.EquityCurvePoint + */ +export type EquityCurvePoint = Message<"foxhunt.tli.EquityCurvePoint"> & { + /** + * @generated from field: int64 timestamp_unix_nanos = 1; + */ + timestampUnixNanos: bigint; + + /** + * @generated from field: double equity = 2; + */ + equity: number; + + /** + * @generated from field: double drawdown = 3; + */ + drawdown: number; + + /** + * @generated from field: double benchmark_equity = 4; + */ + benchmarkEquity: number; +}; + +/** + * Describes the message foxhunt.tli.EquityCurvePoint. + * Use `create(EquityCurvePointSchema)` to create a new message. + */ +export const EquityCurvePointSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_fxt_trading, 62); + +/** + * @generated from message foxhunt.tli.DrawdownPeriod + */ +export type DrawdownPeriod = Message<"foxhunt.tli.DrawdownPeriod"> & { + /** + * @generated from field: int64 start_time_unix_nanos = 1; + */ + startTimeUnixNanos: bigint; + + /** + * @generated from field: int64 end_time_unix_nanos = 2; + */ + endTimeUnixNanos: bigint; + + /** + * @generated from field: double peak_value = 3; + */ + peakValue: number; + + /** + * @generated from field: double trough_value = 4; + */ + troughValue: number; + + /** + * @generated from field: double drawdown_percent = 5; + */ + drawdownPercent: number; + + /** + * @generated from field: uint32 duration_days = 6; + */ + durationDays: number; +}; + +/** + * Describes the message foxhunt.tli.DrawdownPeriod. + * Use `create(DrawdownPeriodSchema)` to create a new message. + */ +export const DrawdownPeriodSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_fxt_trading, 63); + +/** + * List backtests + * + * @generated from message foxhunt.tli.ListBacktestsRequest + */ +export type ListBacktestsRequest = Message<"foxhunt.tli.ListBacktestsRequest"> & { + /** + * @generated from field: uint32 limit = 1; + */ + limit: number; + + /** + * @generated from field: uint32 offset = 2; + */ + offset: number; + + /** + * @generated from field: optional string strategy_name = 3; + */ + strategyName?: string; + + /** + * @generated from field: optional foxhunt.tli.BacktestStatus status_filter = 4; + */ + statusFilter?: BacktestStatus; +}; + +/** + * Describes the message foxhunt.tli.ListBacktestsRequest. + * Use `create(ListBacktestsRequestSchema)` to create a new message. + */ +export const ListBacktestsRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_fxt_trading, 64); + +/** + * @generated from message foxhunt.tli.ListBacktestsResponse + */ +export type ListBacktestsResponse = Message<"foxhunt.tli.ListBacktestsResponse"> & { + /** + * @generated from field: repeated foxhunt.tli.BacktestSummary backtests = 1; + */ + backtests: BacktestSummary[]; + + /** + * @generated from field: uint32 total_count = 2; + */ + totalCount: number; +}; + +/** + * Describes the message foxhunt.tli.ListBacktestsResponse. + * Use `create(ListBacktestsResponseSchema)` to create a new message. + */ +export const ListBacktestsResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_fxt_trading, 65); + +/** + * @generated from message foxhunt.tli.BacktestSummary + */ +export type BacktestSummary = Message<"foxhunt.tli.BacktestSummary"> & { + /** + * @generated from field: string backtest_id = 1; + */ + backtestId: string; + + /** + * @generated from field: string strategy_name = 2; + */ + strategyName: string; + + /** + * @generated from field: repeated string symbols = 3; + */ + symbols: string[]; + + /** + * @generated from field: foxhunt.tli.BacktestStatus status = 4; + */ + status: BacktestStatus; + + /** + * @generated from field: double total_return = 5; + */ + totalReturn: number; + + /** + * @generated from field: double sharpe_ratio = 6; + */ + sharpeRatio: number; + + /** + * @generated from field: double max_drawdown = 7; + */ + maxDrawdown: number; + + /** + * @generated from field: int64 created_at_unix_nanos = 8; + */ + createdAtUnixNanos: bigint; + + /** + * @generated from field: int64 start_date_unix_nanos = 9; + */ + startDateUnixNanos: bigint; + + /** + * @generated from field: int64 end_date_unix_nanos = 10; + */ + endDateUnixNanos: bigint; + + /** + * @generated from field: string description = 11; + */ + description: string; +}; + +/** + * Describes the message foxhunt.tli.BacktestSummary. + * Use `create(BacktestSummarySchema)` to create a new message. + */ +export const BacktestSummarySchema: GenMessage = /*@__PURE__*/ + messageDesc(file_fxt_trading, 66); + +/** + * Backtest progress subscription + * + * @generated from message foxhunt.tli.SubscribeBacktestProgressRequest + */ +export type SubscribeBacktestProgressRequest = Message<"foxhunt.tli.SubscribeBacktestProgressRequest"> & { + /** + * @generated from field: string backtest_id = 1; + */ + backtestId: string; +}; + +/** + * Describes the message foxhunt.tli.SubscribeBacktestProgressRequest. + * Use `create(SubscribeBacktestProgressRequestSchema)` to create a new message. + */ +export const SubscribeBacktestProgressRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_fxt_trading, 67); + +/** + * @generated from message foxhunt.tli.BacktestProgressEvent + */ +export type BacktestProgressEvent = Message<"foxhunt.tli.BacktestProgressEvent"> & { + /** + * @generated from field: string backtest_id = 1; + */ + backtestId: string; + + /** + * @generated from field: double progress_percentage = 2; + */ + progressPercentage: number; + + /** + * @generated from field: string current_date = 3; + */ + currentDate: string; + + /** + * @generated from field: uint64 trades_executed = 4; + */ + tradesExecuted: bigint; + + /** + * @generated from field: double current_pnl = 5; + */ + currentPnl: number; + + /** + * @generated from field: double current_equity = 6; + */ + currentEquity: number; + + /** + * @generated from field: foxhunt.tli.BacktestStatus status = 7; + */ + status: BacktestStatus; + + /** + * @generated from field: int64 timestamp_unix_nanos = 8; + */ + timestampUnixNanos: bigint; +}; + +/** + * Describes the message foxhunt.tli.BacktestProgressEvent. + * Use `create(BacktestProgressEventSchema)` to create a new message. + */ +export const BacktestProgressEventSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_fxt_trading, 68); + +/** + * Stop backtest + * + * @generated from message foxhunt.tli.StopBacktestRequest + */ +export type StopBacktestRequest = Message<"foxhunt.tli.StopBacktestRequest"> & { + /** + * @generated from field: string backtest_id = 1; + */ + backtestId: string; + + /** + * @generated from field: bool save_partial_results = 2; + */ + savePartialResults: boolean; +}; + +/** + * Describes the message foxhunt.tli.StopBacktestRequest. + * Use `create(StopBacktestRequestSchema)` to create a new message. + */ +export const StopBacktestRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_fxt_trading, 69); + +/** + * @generated from message foxhunt.tli.StopBacktestResponse + */ +export type StopBacktestResponse = Message<"foxhunt.tli.StopBacktestResponse"> & { + /** + * @generated from field: bool success = 1; + */ + success: boolean; + + /** + * @generated from field: string message = 2; + */ + message: string; + + /** + * @generated from field: bool results_saved = 3; + */ + resultsSaved: boolean; +}; + +/** + * Describes the message foxhunt.tli.StopBacktestResponse. + * Use `create(StopBacktestResponseSchema)` to create a new message. + */ +export const StopBacktestResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_fxt_trading, 70); + +/** + * Submit ML-powered order request + * + * @generated from message foxhunt.tli.SubmitMLOrderRequest + */ +export type SubmitMLOrderRequest = Message<"foxhunt.tli.SubmitMLOrderRequest"> & { + /** + * Trading symbol (e.g., "ES.FUT") + * + * @generated from field: string symbol = 1; + */ + symbol: string; + + /** + * Trading account identifier + * + * @generated from field: string account_id = 2; + */ + accountId: string; + + /** + * Optional model filter: "DQN", "MAMBA2", "PPO", "TFT", or null for ensemble + * + * @generated from field: optional string model_filter = 3; + */ + modelFilter?: string; +}; + +/** + * Describes the message foxhunt.tli.SubmitMLOrderRequest. + * Use `create(SubmitMLOrderRequestSchema)` to create a new message. + */ +export const SubmitMLOrderRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_fxt_trading, 71); + +/** + * Submit ML-powered order response + * + * @generated from message foxhunt.tli.SubmitMLOrderResponse + */ +export type SubmitMLOrderResponse = Message<"foxhunt.tli.SubmitMLOrderResponse"> & { + /** + * Order ID if executed + * + * @generated from field: string order_id = 1; + */ + orderId: string; + + /** + * Trading symbol + * + * @generated from field: string symbol = 2; + */ + symbol: string; + + /** + * "Ensemble" or specific model name + * + * @generated from field: string model_used = 3; + */ + modelUsed: string; + + /** + * Action taken: BUY, SELL, HOLD + * + * @generated from field: string predicted_action = 4; + */ + predictedAction: string; + + /** + * Prediction confidence (0.0-1.0) + * + * @generated from field: double confidence = 5; + */ + confidence: number; + + /** + * Order quantity + * + * @generated from field: int32 quantity = 6; + */ + quantity: number; + + /** + * True if order was submitted + * + * @generated from field: bool executed = 7; + */ + executed: boolean; + + /** + * Status message + * + * @generated from field: string message = 8; + */ + message: string; +}; + +/** + * Describes the message foxhunt.tli.SubmitMLOrderResponse. + * Use `create(SubmitMLOrderResponseSchema)` to create a new message. + */ +export const SubmitMLOrderResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_fxt_trading, 72); + +/** + * Get ML predictions request + * + * @generated from message foxhunt.tli.GetMLPredictionsRequest + */ +export type GetMLPredictionsRequest = Message<"foxhunt.tli.GetMLPredictionsRequest"> & { + /** + * Trading symbol to filter by + * + * @generated from field: string symbol = 1; + */ + symbol: string; + + /** + * Optional model filter + * + * @generated from field: optional string model_filter = 2; + */ + modelFilter?: string; + + /** + * Maximum predictions to return (default: 10) + * + * @generated from field: optional int32 limit = 3; + */ + limit?: number; +}; + +/** + * Describes the message foxhunt.tli.GetMLPredictionsRequest. + * Use `create(GetMLPredictionsRequestSchema)` to create a new message. + */ +export const GetMLPredictionsRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_fxt_trading, 73); + +/** + * Get ML predictions response + * + * @generated from message foxhunt.tli.GetMLPredictionsResponse + */ +export type GetMLPredictionsResponse = Message<"foxhunt.tli.GetMLPredictionsResponse"> & { + /** + * List of predictions with outcomes + * + * @generated from field: repeated foxhunt.tli.MLPrediction predictions = 1; + */ + predictions: MLPrediction[]; +}; + +/** + * Describes the message foxhunt.tli.GetMLPredictionsResponse. + * Use `create(GetMLPredictionsResponseSchema)` to create a new message. + */ +export const GetMLPredictionsResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_fxt_trading, 74); + +/** + * Single ML prediction with outcome + * + * @generated from message foxhunt.tli.MLPrediction + */ +export type MLPrediction = Message<"foxhunt.tli.MLPrediction"> & { + /** + * Prediction timestamp (ISO 8601) + * + * @generated from field: string timestamp = 1; + */ + timestamp: string; + + /** + * Model identifier + * + * @generated from field: string model_id = 2; + */ + modelId: string; + + /** + * Trading symbol + * + * @generated from field: string symbol = 3; + */ + symbol: string; + + /** + * Predicted action: BUY, SELL, HOLD + * + * @generated from field: string predicted_action = 4; + */ + predictedAction: string; + + /** + * Prediction confidence (0.0-1.0) + * + * @generated from field: double confidence = 5; + */ + confidence: number; + + /** + * Actual return if outcome known + * + * @generated from field: optional double actual_return = 6; + */ + actualReturn?: number; +}; + +/** + * Describes the message foxhunt.tli.MLPrediction. + * Use `create(MLPredictionSchema)` to create a new message. + */ +export const MLPredictionSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_fxt_trading, 75); + +/** + * Get ML performance request + * + * @generated from message foxhunt.tli.GetMLPerformanceRequest + */ +export type GetMLPerformanceRequest = Message<"foxhunt.tli.GetMLPerformanceRequest"> & { + /** + * Optional model filter + * + * @generated from field: optional string model_filter = 1; + */ + modelFilter?: string; +}; + +/** + * Describes the message foxhunt.tli.GetMLPerformanceRequest. + * Use `create(GetMLPerformanceRequestSchema)` to create a new message. + */ +export const GetMLPerformanceRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_fxt_trading, 76); + +/** + * Get ML performance response + * + * @generated from message foxhunt.tli.GetMLPerformanceResponse + */ +export type GetMLPerformanceResponse = Message<"foxhunt.tli.GetMLPerformanceResponse"> & { + /** + * Performance metrics per model + * + * @generated from field: repeated foxhunt.tli.ModelPerformance models = 1; + */ + models: ModelPerformance[]; + + /** + * Ensemble confidence threshold + * + * @generated from field: double ensemble_threshold = 2; + */ + ensembleThreshold: number; + + /** + * Number of active models + * + * @generated from field: int32 active_models = 3; + */ + activeModels: number; + + /** + * Total number of models + * + * @generated from field: int32 total_models = 4; + */ + totalModels: number; +}; + +/** + * Describes the message foxhunt.tli.GetMLPerformanceResponse. + * Use `create(GetMLPerformanceResponseSchema)` to create a new message. + */ +export const GetMLPerformanceResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_fxt_trading, 77); + +/** + * Performance metrics for a single model + * + * @generated from message foxhunt.tli.ModelPerformance + */ +export type ModelPerformance = Message<"foxhunt.tli.ModelPerformance"> & { + /** + * Model identifier + * + * @generated from field: string model_id = 1; + */ + modelId: string; + + /** + * Accuracy rate (0.0-1.0) + * + * @generated from field: double accuracy = 2; + */ + accuracy: number; + + /** + * Total predictions made + * + * @generated from field: int64 total_predictions = 3; + */ + totalPredictions: bigint; + + /** + * Risk-adjusted return + * + * @generated from field: double sharpe_ratio = 4; + */ + sharpeRatio: number; + + /** + * Average return per prediction + * + * @generated from field: double avg_return = 5; + */ + avgReturn: number; + + /** + * Maximum drawdown + * + * @generated from field: double max_drawdown = 6; + */ + maxDrawdown: number; +}; + +/** + * Describes the message foxhunt.tli.ModelPerformance. + * Use `create(ModelPerformanceSchema)` to create a new message. + */ +export const ModelPerformanceSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_fxt_trading, 78); + +/** + * Request to get current regime state + * + * @generated from message foxhunt.tli.GetRegimeStateRequest + */ +export type GetRegimeStateRequest = Message<"foxhunt.tli.GetRegimeStateRequest"> & { + /** + * Trading symbol to query + * + * @generated from field: string symbol = 1; + */ + symbol: string; +}; + +/** + * Describes the message foxhunt.tli.GetRegimeStateRequest. + * Use `create(GetRegimeStateRequestSchema)` to create a new message. + */ +export const GetRegimeStateRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_fxt_trading, 79); + +/** + * Response containing current regime state + * + * @generated from message foxhunt.tli.GetRegimeStateResponse + */ +export type GetRegimeStateResponse = Message<"foxhunt.tli.GetRegimeStateResponse"> & { + /** + * Trading symbol + * + * @generated from field: string symbol = 1; + */ + symbol: string; + + /** + * Current regime: TRENDING, RANGING, VOLATILE, CRISIS + * + * @generated from field: string current_regime = 2; + */ + currentRegime: string; + + /** + * Regime confidence (0.0-1.0) + * + * @generated from field: double confidence = 3; + */ + confidence: number; + + /** + * CUSUM S+ statistic + * + * @generated from field: double cusum_s_plus = 4; + */ + cusumSPlus: number; + + /** + * CUSUM S- statistic + * + * @generated from field: double cusum_s_minus = 5; + */ + cusumSMinus: number; + + /** + * Average Directional Index + * + * @generated from field: double adx = 6; + */ + adx: number; + + /** + * Regime stability score (0.0-1.0) + * + * @generated from field: double stability = 7; + */ + stability: number; + + /** + * Transition entropy (0.0-1.0) + * + * @generated from field: double entropy = 8; + */ + entropy: number; + + /** + * Last update timestamp + * + * @generated from field: int64 updated_at_unix_nanos = 9; + */ + updatedAtUnixNanos: bigint; +}; + +/** + * Describes the message foxhunt.tli.GetRegimeStateResponse. + * Use `create(GetRegimeStateResponseSchema)` to create a new message. + */ +export const GetRegimeStateResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_fxt_trading, 80); + +/** + * Request to get regime transition history + * + * @generated from message foxhunt.tli.GetRegimeTransitionsRequest + */ +export type GetRegimeTransitionsRequest = Message<"foxhunt.tli.GetRegimeTransitionsRequest"> & { + /** + * Trading symbol to query + * + * @generated from field: string symbol = 1; + */ + symbol: string; + + /** + * Maximum transitions to return (default: 100) + * + * @generated from field: int32 limit = 2; + */ + limit: number; +}; + +/** + * Describes the message foxhunt.tli.GetRegimeTransitionsRequest. + * Use `create(GetRegimeTransitionsRequestSchema)` to create a new message. + */ +export const GetRegimeTransitionsRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_fxt_trading, 81); + +/** + * Response containing regime transition history + * + * @generated from message foxhunt.tli.GetRegimeTransitionsResponse + */ +export type GetRegimeTransitionsResponse = Message<"foxhunt.tli.GetRegimeTransitionsResponse"> & { + /** + * List of regime transitions + * + * @generated from field: repeated foxhunt.tli.RegimeTransition transitions = 1; + */ + transitions: RegimeTransition[]; +}; + +/** + * Describes the message foxhunt.tli.GetRegimeTransitionsResponse. + * Use `create(GetRegimeTransitionsResponseSchema)` to create a new message. + */ +export const GetRegimeTransitionsResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_fxt_trading, 82); + +/** + * Single regime transition record + * + * @generated from message foxhunt.tli.RegimeTransition + */ +export type RegimeTransition = Message<"foxhunt.tli.RegimeTransition"> & { + /** + * Previous regime + * + * @generated from field: string from_regime = 1; + */ + fromRegime: string; + + /** + * New regime + * + * @generated from field: string to_regime = 2; + */ + toRegime: string; + + /** + * Duration in previous regime (bars) + * + * @generated from field: int32 duration_bars = 3; + */ + durationBars: number; + + /** + * Transition probability from matrix + * + * @generated from field: double transition_probability = 4; + */ + transitionProbability: number; + + /** + * Transition timestamp + * + * @generated from field: int64 timestamp_unix_nanos = 5; + */ + timestampUnixNanos: bigint; +}; + +/** + * Describes the message foxhunt.tli.RegimeTransition. + * Use `create(RegimeTransitionSchema)` to create a new message. + */ +export const RegimeTransitionSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_fxt_trading, 83); + +/** + * Order direction for trading operations + * + * @generated from enum foxhunt.tli.OrderSide + */ +export enum OrderSide { + /** + * Default/unknown side + * + * @generated from enum value: ORDER_SIDE_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * Buy order (long position) + * + * @generated from enum value: ORDER_SIDE_BUY = 1; + */ + BUY = 1, + + /** + * Sell order (short position) + * + * @generated from enum value: ORDER_SIDE_SELL = 2; + */ + SELL = 2, +} + +/** + * Describes the enum foxhunt.tli.OrderSide. + */ +export const OrderSideSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_fxt_trading, 0); + +/** + * Order execution type + * + * @generated from enum foxhunt.tli.OrderType + */ +export enum OrderType { + /** + * Default/unknown type + * + * @generated from enum value: ORDER_TYPE_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * Execute immediately at market price + * + * @generated from enum value: ORDER_TYPE_MARKET = 1; + */ + MARKET = 1, + + /** + * Execute only at specified price or better + * + * @generated from enum value: ORDER_TYPE_LIMIT = 2; + */ + LIMIT = 2, + + /** + * Market order triggered at stop price + * + * @generated from enum value: ORDER_TYPE_STOP = 3; + */ + STOP = 3, + + /** + * Limit order triggered at stop price + * + * @generated from enum value: ORDER_TYPE_STOP_LIMIT = 4; + */ + STOP_LIMIT = 4, +} + +/** + * Describes the enum foxhunt.tli.OrderType. + */ +export const OrderTypeSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_fxt_trading, 1); + +/** + * Current lifecycle status of orders + * + * @generated from enum foxhunt.tli.OrderStatus + */ +export enum OrderStatus { + /** + * Default/unknown status + * + * @generated from enum value: ORDER_STATUS_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * Order created and submitted + * + * @generated from enum value: ORDER_STATUS_NEW = 1; + */ + NEW = 1, + + /** + * Order partially executed + * + * @generated from enum value: ORDER_STATUS_PARTIALLY_FILLED = 2; + */ + PARTIALLY_FILLED = 2, + + /** + * Order completely executed + * + * @generated from enum value: ORDER_STATUS_FILLED = 3; + */ + FILLED = 3, + + /** + * Order cancelled + * + * @generated from enum value: ORDER_STATUS_CANCELLED = 4; + */ + CANCELLED = 4, + + /** + * Order rejected by exchange or system + * + * @generated from enum value: ORDER_STATUS_REJECTED = 5; + */ + REJECTED = 5, + + /** + * Cancellation request pending + * + * @generated from enum value: ORDER_STATUS_PENDING_CANCEL = 6; + */ + PENDING_CANCEL = 6, +} + +/** + * Describes the enum foxhunt.tli.OrderStatus. + */ +export const OrderStatusSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_fxt_trading, 2); + +/** + * @generated from enum foxhunt.tli.MarketDataType + */ +export enum MarketDataType { + /** + * @generated from enum value: MARKET_DATA_TYPE_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * @generated from enum value: MARKET_DATA_TYPE_TICKS = 1; + */ + TICKS = 1, + + /** + * @generated from enum value: MARKET_DATA_TYPE_QUOTES = 2; + */ + QUOTES = 2, + + /** + * @generated from enum value: MARKET_DATA_TYPE_TRADES = 3; + */ + TRADES = 3, + + /** + * @generated from enum value: MARKET_DATA_TYPE_BARS = 4; + */ + BARS = 4, +} + +/** + * Describes the enum foxhunt.tli.MarketDataType. + */ +export const MarketDataTypeSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_fxt_trading, 3); + +/** + * @generated from enum foxhunt.tli.SystemStatus + */ +export enum SystemStatus { + /** + * @generated from enum value: SYSTEM_STATUS_UNKNOWN = 0; + */ + UNKNOWN = 0, + + /** + * @generated from enum value: SYSTEM_STATUS_HEALTHY = 1; + */ + HEALTHY = 1, + + /** + * @generated from enum value: SYSTEM_STATUS_DEGRADED = 2; + */ + DEGRADED = 2, + + /** + * @generated from enum value: SYSTEM_STATUS_UNHEALTHY = 3; + */ + UNHEALTHY = 3, + + /** + * @generated from enum value: SYSTEM_STATUS_CRITICAL = 4; + */ + CRITICAL = 4, +} + +/** + * Describes the enum foxhunt.tli.SystemStatus. + */ +export const SystemStatusSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_fxt_trading, 4); + +/** + * Additional enums for risk and backtesting + * + * @generated from enum foxhunt.tli.VaRMethodology + */ +export enum VaRMethodology { + /** + * @generated from enum value: VAR_METHODOLOGY_UNSPECIFIED = 0; + */ + VAR_METHODOLOGY_UNSPECIFIED = 0, + + /** + * @generated from enum value: VAR_METHODOLOGY_HISTORICAL = 1; + */ + VAR_METHODOLOGY_HISTORICAL = 1, + + /** + * @generated from enum value: VAR_METHODOLOGY_MONTE_CARLO = 2; + */ + VAR_METHODOLOGY_MONTE_CARLO = 2, + + /** + * @generated from enum value: VAR_METHODOLOGY_PARAMETRIC = 3; + */ + VAR_METHODOLOGY_PARAMETRIC = 3, + + /** + * @generated from enum value: VAR_METHODOLOGY_EXPECTED_SHORTFALL = 4; + */ + VAR_METHODOLOGY_EXPECTED_SHORTFALL = 4, +} + +/** + * Describes the enum foxhunt.tli.VaRMethodology. + */ +export const VaRMethodologySchema: GenEnum = /*@__PURE__*/ + enumDesc(file_fxt_trading, 5); + +/** + * @generated from enum foxhunt.tli.RiskLevel + */ +export enum RiskLevel { + /** + * @generated from enum value: RISK_LEVEL_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * @generated from enum value: RISK_LEVEL_LOW = 1; + */ + LOW = 1, + + /** + * @generated from enum value: RISK_LEVEL_MEDIUM = 2; + */ + MEDIUM = 2, + + /** + * @generated from enum value: RISK_LEVEL_HIGH = 3; + */ + HIGH = 3, + + /** + * @generated from enum value: RISK_LEVEL_CRITICAL = 4; + */ + CRITICAL = 4, +} + +/** + * Describes the enum foxhunt.tli.RiskLevel. + */ +export const RiskLevelSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_fxt_trading, 6); + +/** + * @generated from enum foxhunt.tli.ViolationType + */ +export enum ViolationType { + /** + * @generated from enum value: VIOLATION_TYPE_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * @generated from enum value: VIOLATION_TYPE_POSITION_LIMIT = 1; + */ + POSITION_LIMIT = 1, + + /** + * @generated from enum value: VIOLATION_TYPE_CONCENTRATION = 2; + */ + CONCENTRATION = 2, + + /** + * @generated from enum value: VIOLATION_TYPE_VAR_LIMIT = 3; + */ + VAR_LIMIT = 3, + + /** + * @generated from enum value: VIOLATION_TYPE_MARGIN = 4; + */ + MARGIN = 4, + + /** + * @generated from enum value: VIOLATION_TYPE_DRAWDOWN = 5; + */ + DRAWDOWN = 5, +} + +/** + * Describes the enum foxhunt.tli.ViolationType. + */ +export const ViolationTypeSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_fxt_trading, 7); + +/** + * @generated from enum foxhunt.tli.RiskSeverity + */ +export enum RiskSeverity { + /** + * @generated from enum value: RISK_SEVERITY_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * @generated from enum value: RISK_SEVERITY_INFO = 1; + */ + INFO = 1, + + /** + * @generated from enum value: RISK_SEVERITY_WARNING = 2; + */ + WARNING = 2, + + /** + * @generated from enum value: RISK_SEVERITY_CRITICAL = 3; + */ + CRITICAL = 3, + + /** + * @generated from enum value: RISK_SEVERITY_EMERGENCY = 4; + */ + EMERGENCY = 4, +} + +/** + * Describes the enum foxhunt.tli.RiskSeverity. + */ +export const RiskSeveritySchema: GenEnum = /*@__PURE__*/ + enumDesc(file_fxt_trading, 8); + +/** + * @generated from enum foxhunt.tli.EmergencyStopType + */ +export enum EmergencyStopType { + /** + * @generated from enum value: EMERGENCY_STOP_TYPE_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * @generated from enum value: EMERGENCY_STOP_TYPE_CANCEL_ORDERS = 1; + */ + CANCEL_ORDERS = 1, + + /** + * @generated from enum value: EMERGENCY_STOP_TYPE_CLOSE_POSITIONS = 2; + */ + CLOSE_POSITIONS = 2, + + /** + * @generated from enum value: EMERGENCY_STOP_TYPE_FULL_SHUTDOWN = 3; + */ + FULL_SHUTDOWN = 3, +} + +/** + * Describes the enum foxhunt.tli.EmergencyStopType. + */ +export const EmergencyStopTypeSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_fxt_trading, 9); + +/** + * @generated from enum foxhunt.tli.BacktestStatus + */ +export enum BacktestStatus { + /** + * @generated from enum value: BACKTEST_STATUS_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * @generated from enum value: BACKTEST_STATUS_QUEUED = 1; + */ + QUEUED = 1, + + /** + * @generated from enum value: BACKTEST_STATUS_RUNNING = 2; + */ + RUNNING = 2, + + /** + * @generated from enum value: BACKTEST_STATUS_COMPLETED = 3; + */ + COMPLETED = 3, + + /** + * @generated from enum value: BACKTEST_STATUS_FAILED = 4; + */ + FAILED = 4, + + /** + * @generated from enum value: BACKTEST_STATUS_CANCELLED = 5; + */ + CANCELLED = 5, + + /** + * @generated from enum value: BACKTEST_STATUS_PAUSED = 6; + */ + PAUSED = 6, +} + +/** + * Describes the enum foxhunt.tli.BacktestStatus. + */ +export const BacktestStatusSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_fxt_trading, 10); + +/** + * TLI Trading Service provides a unified client interface for all HFT trading operations. + * This service integrates trading, risk management, monitoring, and configuration capabilities + * into a single comprehensive API for the Terminal Line Interface (TLI) client application. + * + * @generated from service foxhunt.tli.TradingService + */ +export const TradingService: GenService<{ + /** + * Core Trading Operations + * Submit a new trading order with validation + * + * @generated from rpc foxhunt.tli.TradingService.SubmitOrder + */ + submitOrder: { + methodKind: "unary"; + input: typeof SubmitOrderRequestSchema; + output: typeof SubmitOrderResponseSchema; + }, + /** + * Cancel an existing order by ID + * + * @generated from rpc foxhunt.tli.TradingService.CancelOrder + */ + cancelOrder: { + methodKind: "unary"; + input: typeof CancelOrderRequestSchema; + output: typeof CancelOrderResponseSchema; + }, + /** + * Get current status of a specific order + * + * @generated from rpc foxhunt.tli.TradingService.GetOrderStatus + */ + getOrderStatus: { + methodKind: "unary"; + input: typeof GetOrderStatusRequestSchema; + output: typeof GetOrderStatusResponseSchema; + }, + /** + * Get account information and balances + * + * @generated from rpc foxhunt.tli.TradingService.GetAccountInfo + */ + getAccountInfo: { + methodKind: "unary"; + input: typeof GetAccountInfoRequestSchema; + output: typeof GetAccountInfoResponseSchema; + }, + /** + * Get current portfolio positions + * + * @generated from rpc foxhunt.tli.TradingService.GetPositions + */ + getPositions: { + methodKind: "unary"; + input: typeof GetPositionsRequestSchema; + output: typeof GetPositionsResponseSchema; + }, + /** + * Subscribe to real-time market data feeds + * + * @generated from rpc foxhunt.tli.TradingService.SubscribeMarketData + */ + subscribeMarketData: { + methodKind: "server_streaming"; + input: typeof SubscribeMarketDataRequestSchema; + output: typeof MarketDataEventSchema; + }, + /** + * Subscribe to real-time order status updates + * + * @generated from rpc foxhunt.tli.TradingService.SubscribeOrderUpdates + */ + subscribeOrderUpdates: { + methodKind: "server_streaming"; + input: typeof SubscribeOrderUpdatesRequestSchema; + output: typeof OrderUpdateEventSchema; + }, + /** + * Integrated Risk Management + * Calculate portfolio Value at Risk (VaR) + * + * @generated from rpc foxhunt.tli.TradingService.GetVaR + */ + getVaR: { + methodKind: "unary"; + input: typeof GetVaRRequestSchema; + output: typeof GetVaRResponseSchema; + }, + /** + * Analyze position-level risk exposure + * + * @generated from rpc foxhunt.tli.TradingService.GetPositionRisk + */ + getPositionRisk: { + methodKind: "unary"; + input: typeof GetPositionRiskRequestSchema; + output: typeof GetPositionRiskResponseSchema; + }, + /** + * Validate order against risk limits before submission + * + * @generated from rpc foxhunt.tli.TradingService.ValidateOrder + */ + validateOrder: { + methodKind: "unary"; + input: typeof ValidateOrderRequestSchema; + output: typeof ValidateOrderResponseSchema; + }, + /** + * Get comprehensive portfolio risk metrics + * + * @generated from rpc foxhunt.tli.TradingService.GetRiskMetrics + */ + getRiskMetrics: { + methodKind: "unary"; + input: typeof GetRiskMetricsRequestSchema; + output: typeof GetRiskMetricsResponseSchema; + }, + /** + * Subscribe to real-time risk alerts and violations + * + * @generated from rpc foxhunt.tli.TradingService.SubscribeRiskAlerts + */ + subscribeRiskAlerts: { + methodKind: "server_streaming"; + input: typeof SubscribeRiskAlertsRequestSchema; + output: typeof RiskAlertEventSchema; + }, + /** + * Emergency stop with immediate trading halt + * + * @generated from rpc foxhunt.tli.TradingService.EmergencyStop + */ + emergencyStop: { + methodKind: "unary"; + input: typeof EmergencyStopRequestSchema; + output: typeof EmergencyStopResponseSchema; + }, + /** + * Integrated System Monitoring + * Get system performance metrics + * + * @generated from rpc foxhunt.tli.TradingService.GetMetrics + */ + getMetrics: { + methodKind: "unary"; + input: typeof GetMetricsRequestSchema; + output: typeof GetMetricsResponseSchema; + }, + /** + * Get latency performance statistics + * + * @generated from rpc foxhunt.tli.TradingService.GetLatency + */ + getLatency: { + methodKind: "unary"; + input: typeof GetLatencyRequestSchema; + output: typeof GetLatencyResponseSchema; + }, + /** + * Get throughput and capacity metrics + * + * @generated from rpc foxhunt.tli.TradingService.GetThroughput + */ + getThroughput: { + methodKind: "unary"; + input: typeof GetThroughputRequestSchema; + output: typeof GetThroughputResponseSchema; + }, + /** + * Subscribe to real-time performance metrics + * + * @generated from rpc foxhunt.tli.TradingService.SubscribeMetrics + */ + subscribeMetrics: { + methodKind: "server_streaming"; + input: typeof SubscribeMetricsRequestSchema; + output: typeof MetricsEventSchema; + }, + /** + * Integrated Configuration Management + * Update system parameters and settings + * + * @generated from rpc foxhunt.tli.TradingService.UpdateParameters + */ + updateParameters: { + methodKind: "unary"; + input: typeof UpdateParametersRequestSchema; + output: typeof UpdateParametersResponseSchema; + }, + /** + * Get current configuration values + * + * @generated from rpc foxhunt.tli.TradingService.GetConfig + */ + getConfig: { + methodKind: "unary"; + input: typeof GetConfigRequestSchema; + output: typeof GetConfigResponseSchema; + }, + /** + * Subscribe to configuration changes + * + * @generated from rpc foxhunt.tli.TradingService.SubscribeConfig + */ + subscribeConfig: { + methodKind: "server_streaming"; + input: typeof SubscribeConfigRequestSchema; + output: typeof ConfigEventSchema; + }, + /** + * Integrated System Health Monitoring + * Get overall system health and service status + * + * @generated from rpc foxhunt.tli.TradingService.GetSystemStatus + */ + getSystemStatus: { + methodKind: "unary"; + input: typeof GetSystemStatusRequestSchema; + output: typeof GetSystemStatusResponseSchema; + }, + /** + * Subscribe to system status changes and alerts + * + * @generated from rpc foxhunt.tli.TradingService.SubscribeSystemStatus + */ + subscribeSystemStatus: { + methodKind: "server_streaming"; + input: typeof SubscribeSystemStatusRequestSchema; + output: typeof SystemStatusEventSchema; + }, + /** + * ML Trading Operations + * Submit ML-powered trading order with ensemble predictions + * + * @generated from rpc foxhunt.tli.TradingService.SubmitMLOrder + */ + submitMLOrder: { + methodKind: "unary"; + input: typeof SubmitMLOrderRequestSchema; + output: typeof SubmitMLOrderResponseSchema; + }, + /** + * Get ML prediction history with outcomes + * + * @generated from rpc foxhunt.tli.TradingService.GetMLPredictions + */ + getMLPredictions: { + methodKind: "unary"; + input: typeof GetMLPredictionsRequestSchema; + output: typeof GetMLPredictionsResponseSchema; + }, + /** + * Get ML model performance metrics + * + * @generated from rpc foxhunt.tli.TradingService.GetMLPerformance + */ + getMLPerformance: { + methodKind: "unary"; + input: typeof GetMLPerformanceRequestSchema; + output: typeof GetMLPerformanceResponseSchema; + }, + /** + * Wave D: Regime Detection Operations + * Get current regime state for a symbol + * + * @generated from rpc foxhunt.tli.TradingService.GetRegimeState + */ + getRegimeState: { + methodKind: "unary"; + input: typeof GetRegimeStateRequestSchema; + output: typeof GetRegimeStateResponseSchema; + }, + /** + * Get regime transition history for a symbol + * + * @generated from rpc foxhunt.tli.TradingService.GetRegimeTransitions + */ + getRegimeTransitions: { + methodKind: "unary"; + input: typeof GetRegimeTransitionsRequestSchema; + output: typeof GetRegimeTransitionsResponseSchema; + }, +}> = /*@__PURE__*/ + serviceDesc(file_fxt_trading, 0); + +/** + * Backtesting Service provides comprehensive strategy backtesting capabilities for the TLI. + * This service allows users to test trading strategies against historical data with detailed + * performance analytics, risk metrics, and trade-by-trade analysis. + * + * @generated from service foxhunt.tli.BacktestingService + */ +export const BacktestingService: GenService<{ + /** + * Backtest Execution Management + * Start a new strategy backtest with historical data + * + * @generated from rpc foxhunt.tli.BacktestingService.StartBacktest + */ + startBacktest: { + methodKind: "unary"; + input: typeof StartBacktestRequestSchema; + output: typeof StartBacktestResponseSchema; + }, + /** + * Get current status of a running backtest + * + * @generated from rpc foxhunt.tli.BacktestingService.GetBacktestStatus + */ + getBacktestStatus: { + methodKind: "unary"; + input: typeof GetBacktestStatusRequestSchema; + output: typeof GetBacktestStatusResponseSchema; + }, + /** + * Get comprehensive backtest results and analytics + * + * @generated from rpc foxhunt.tli.BacktestingService.GetBacktestResults + */ + getBacktestResults: { + methodKind: "unary"; + input: typeof GetBacktestResultsRequestSchema; + output: typeof GetBacktestResultsResponseSchema; + }, + /** + * List historical backtest runs with filtering + * + * @generated from rpc foxhunt.tli.BacktestingService.ListBacktests + */ + listBacktests: { + methodKind: "unary"; + input: typeof ListBacktestsRequestSchema; + output: typeof ListBacktestsResponseSchema; + }, + /** + * Subscribe to real-time backtest progress updates + * + * @generated from rpc foxhunt.tli.BacktestingService.SubscribeBacktestProgress + */ + subscribeBacktestProgress: { + methodKind: "server_streaming"; + input: typeof SubscribeBacktestProgressRequestSchema; + output: typeof BacktestProgressEventSchema; + }, + /** + * Stop a running backtest and optionally save partial results + * + * @generated from rpc foxhunt.tli.BacktestingService.StopBacktest + */ + stopBacktest: { + methodKind: "unary"; + input: typeof StopBacktestRequestSchema; + output: typeof StopBacktestResponseSchema; + }, +}> = /*@__PURE__*/ + serviceDesc(file_fxt_trading, 1); + diff --git a/web-dashboard/src/gen/health_pb.ts b/web-dashboard/src/gen/health_pb.ts new file mode 100644 index 000000000..245aed9a3 --- /dev/null +++ b/web-dashboard/src/gen/health_pb.ts @@ -0,0 +1,120 @@ +// @generated by protoc-gen-es v2.11.0 with parameter "target=ts" +// @generated from file health.proto (package grpc.health.v1, syntax proto3) +/* eslint-disable */ + +import type { GenEnum, GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2"; +import { enumDesc, fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv2"; +import type { Message } from "@bufbuild/protobuf"; + +/** + * Describes the file health.proto. + */ +export const file_health: GenFile = /*@__PURE__*/ + fileDesc("CgxoZWFsdGgucHJvdG8SDmdycGMuaGVhbHRoLnYxIiUKEkhlYWx0aENoZWNrUmVxdWVzdBIPCgdzZXJ2aWNlGAEgASgJIkQKE0hlYWx0aENoZWNrUmVzcG9uc2USLQoGc3RhdHVzGAEgASgOMh0uZ3JwYy5oZWFsdGgudjEuU2VydmluZ1N0YXR1cypPCg1TZXJ2aW5nU3RhdHVzEgsKB1VOS05PV04QABILCgdTRVJWSU5HEAESDwoLTk9UX1NFUlZJTkcQAhITCg9TRVJWSUNFX1VOS05PV04QAzKuAQoGSGVhbHRoElAKBUNoZWNrEiIuZ3JwYy5oZWFsdGgudjEuSGVhbHRoQ2hlY2tSZXF1ZXN0GiMuZ3JwYy5oZWFsdGgudjEuSGVhbHRoQ2hlY2tSZXNwb25zZRJSCgVXYXRjaBIiLmdycGMuaGVhbHRoLnYxLkhlYWx0aENoZWNrUmVxdWVzdBojLmdycGMuaGVhbHRoLnYxLkhlYWx0aENoZWNrUmVzcG9uc2UwAWIGcHJvdG8z"); + +/** + * Health check request + * + * @generated from message grpc.health.v1.HealthCheckRequest + */ +export type HealthCheckRequest = Message<"grpc.health.v1.HealthCheckRequest"> & { + /** + * Service name to check (empty for overall service health) + * + * @generated from field: string service = 1; + */ + service: string; +}; + +/** + * Describes the message grpc.health.v1.HealthCheckRequest. + * Use `create(HealthCheckRequestSchema)` to create a new message. + */ +export const HealthCheckRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_health, 0); + +/** + * Health check response + * + * @generated from message grpc.health.v1.HealthCheckResponse + */ +export type HealthCheckResponse = Message<"grpc.health.v1.HealthCheckResponse"> & { + /** + * Health status + * + * @generated from field: grpc.health.v1.ServingStatus status = 1; + */ + status: ServingStatus; +}; + +/** + * Describes the message grpc.health.v1.HealthCheckResponse. + * Use `create(HealthCheckResponseSchema)` to create a new message. + */ +export const HealthCheckResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_health, 1); + +/** + * Serving status enum + * + * @generated from enum grpc.health.v1.ServingStatus + */ +export enum ServingStatus { + /** + * @generated from enum value: UNKNOWN = 0; + */ + UNKNOWN = 0, + + /** + * @generated from enum value: SERVING = 1; + */ + SERVING = 1, + + /** + * @generated from enum value: NOT_SERVING = 2; + */ + NOT_SERVING = 2, + + /** + * Used when the requested service is unknown + * + * @generated from enum value: SERVICE_UNKNOWN = 3; + */ + SERVICE_UNKNOWN = 3, +} + +/** + * Describes the enum grpc.health.v1.ServingStatus. + */ +export const ServingStatusSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_health, 0); + +/** + * Health check service definition + * + * @generated from service grpc.health.v1.Health + */ +export const Health: GenService<{ + /** + * Check the health status of the service + * + * @generated from rpc grpc.health.v1.Health.Check + */ + check: { + methodKind: "unary"; + input: typeof HealthCheckRequestSchema; + output: typeof HealthCheckResponseSchema; + }, + /** + * Watch for health status changes + * + * @generated from rpc grpc.health.v1.Health.Watch + */ + watch: { + methodKind: "server_streaming"; + input: typeof HealthCheckRequestSchema; + output: typeof HealthCheckResponseSchema; + }, +}> = /*@__PURE__*/ + serviceDesc(file_health, 0); + diff --git a/web-dashboard/src/gen/ml_pb.ts b/web-dashboard/src/gen/ml_pb.ts new file mode 100644 index 000000000..d7a4283d2 --- /dev/null +++ b/web-dashboard/src/gen/ml_pb.ts @@ -0,0 +1,1597 @@ +// @generated by protoc-gen-es v2.11.0 with parameter "target=ts" +// @generated from file ml.proto (package ml, syntax proto3) +/* eslint-disable */ + +import type { GenEnum, GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2"; +import { enumDesc, fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv2"; +import type { Message } from "@bufbuild/protobuf"; + +/** + * Describes the file ml.proto. + */ +export const file_ml: GenFile = /*@__PURE__*/ + fileDesc("CghtbC5wcm90bxICbWwiSAoYU3RyZWFtTW9kZWxTdGF0dXNSZXF1ZXN0EhIKCm1vZGVsX25hbWUYASABKAkSGAoQaW50ZXJ2YWxfc2Vjb25kcxgCIAEoDSLXAQoUR2V0UHJlZGljdGlvblJlcXVlc3QSEgoKbW9kZWxfbmFtZRgBIAEoCRIOCgZzeW1ib2wYAiABKAkSHAoPaG9yaXpvbl9taW51dGVzGAMgASgFSACIAQESOAoIZmVhdHVyZXMYBCADKAsyJi5tbC5HZXRQcmVkaWN0aW9uUmVxdWVzdC5GZWF0dXJlc0VudHJ5Gi8KDUZlYXR1cmVzRW50cnkSCwoDa2V5GAEgASgJEg0KBXZhbHVlGAIgASgBOgI4AUISChBfaG9yaXpvbl9taW51dGVzImIKFUdldFByZWRpY3Rpb25SZXNwb25zZRIiCgpwcmVkaWN0aW9uGAEgASgLMg4ubWwuUHJlZGljdGlvbhISCgpjb25maWRlbmNlGAIgASgBEhEKCXRpbWVzdGFtcBgDIAEoAyKEAQoYU3RyZWFtUHJlZGljdGlvbnNSZXF1ZXN0EhMKC21vZGVsX25hbWVzGAEgAygJEg8KB3N5bWJvbHMYAiADKAkSJQoYdXBkYXRlX2ZyZXF1ZW5jeV9zZWNvbmRzGAMgASgFSACIAQFCGwoZX3VwZGF0ZV9mcmVxdWVuY3lfc2Vjb25kcyJvChZHZXRFbnNlbWJsZVZvdGVSZXF1ZXN0Eg4KBnN5bWJvbBgBIAEoCRIcCg9ob3Jpem9uX21pbnV0ZXMYAiABKAVIAIgBARITCgttb2RlbF9uYW1lcxgDIAMoCUISChBfaG9yaXpvbl9taW51dGVzIpoBChdHZXRFbnNlbWJsZVZvdGVSZXNwb25zZRInCg1lbnNlbWJsZV92b3RlGAEgASgLMhAubWwuRW5zZW1ibGVWb3RlEicKEGluZGl2aWR1YW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1c1JlcXVlc3QaGi5tbC5HZXRNb2RlbFN0YXR1c1Jlc3BvbnNlElMKEkdldEF2YWlsYWJsZU1vZGVscxIdLm1sLkdldEF2YWlsYWJsZU1vZGVsc1JlcXVlc3QaHi5tbC5HZXRBdmFpbGFibGVNb2RlbHNSZXNwb25zZRJBCgxSZXRyYWluTW9kZWwSFy5tbC5SZXRyYWluTW9kZWxSZXF1ZXN0GhgubWwuUmV0cmFpbk1vZGVsUmVzcG9uc2USVgoTR2V0TW9kZWxQZXJmb3JtYW5jZRIeLm1sLkdldE1vZGVsUGVyZm9ybWFuY2VSZXF1ZXN0Gh8ubWwuR2V0TW9kZWxQZXJmb3JtYW5jZVJlc3BvbnNlEkwKElN0cmVhbU1vZGVsTWV0cmljcxIdLm1sLlN0cmVhbU1vZGVsTWV0cmljc1JlcXVlc3QaFS5tbC5Nb2RlbE1ldHJpY3NFdmVudDABElkKFEdldEZlYXR1cmVJbXBvcnRhbmNlEh8ubWwuR2V0RmVhdHVyZUltcG9ydGFuY2VSZXF1ZXN0GiAubWwuR2V0RmVhdHVyZUltcG9ydGFuY2VSZXNwb25zZRJSChRTdHJlYW1TaWduYWxTdHJlbmd0aBIfLm1sLlN0cmVhbVNpZ25hbFN0cmVuZ3RoUmVxdWVzdBoXLm1sLlNpZ25hbFN0cmVuZ3RoRXZlbnQwARJPChFTdHJlYW1Nb2RlbFN0YXR1cxIcLm1sLlN0cmVhbU1vZGVsU3RhdHVzUmVxdWVzdBoaLm1sLkdldE1vZGVsU3RhdHVzUmVzcG9uc2UwAWIGcHJvdG8z"); + +/** + * @generated from message ml.StreamModelStatusRequest + */ +export type StreamModelStatusRequest = Message<"ml.StreamModelStatusRequest"> & { + /** + * empty = all models + * + * @generated from field: string model_name = 1; + */ + modelName: string; + + /** + * 0 = server default (5s) + * + * @generated from field: uint32 interval_seconds = 2; + */ + intervalSeconds: number; +}; + +/** + * Describes the message ml.StreamModelStatusRequest. + * Use `create(StreamModelStatusRequestSchema)` to create a new message. + */ +export const StreamModelStatusRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_ml, 0); + +/** + * Request for model prediction + * + * @generated from message ml.GetPredictionRequest + */ +export type GetPredictionRequest = Message<"ml.GetPredictionRequest"> & { + /** + * Model to use (e.g., "mamba2", "tlob-transformer") + * + * @generated from field: string model_name = 1; + */ + modelName: string; + + /** + * Trading symbol to predict + * + * @generated from field: string symbol = 2; + */ + symbol: string; + + /** + * Prediction horizon in minutes + * + * @generated from field: optional int32 horizon_minutes = 3; + */ + horizonMinutes?: number; + + /** + * Input features for prediction + * + * @generated from field: map features = 4; + */ + features: { [key: string]: number }; +}; + +/** + * Describes the message ml.GetPredictionRequest. + * Use `create(GetPredictionRequestSchema)` to create a new message. + */ +export const GetPredictionRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_ml, 1); + +/** + * Response containing model prediction + * + * @generated from message ml.GetPredictionResponse + */ +export type GetPredictionResponse = Message<"ml.GetPredictionResponse"> & { + /** + * Model prediction with details + * + * @generated from field: ml.Prediction prediction = 1; + */ + prediction?: Prediction; + + /** + * Prediction confidence (0.0 to 1.0) + * + * @generated from field: double confidence = 2; + */ + confidence: number; + + /** + * Prediction timestamp (nanoseconds) + * + * @generated from field: int64 timestamp = 3; + */ + timestamp: bigint; +}; + +/** + * Describes the message ml.GetPredictionResponse. + * Use `create(GetPredictionResponseSchema)` to create a new message. + */ +export const GetPredictionResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_ml, 2); + +/** + * @generated from message ml.StreamPredictionsRequest + */ +export type StreamPredictionsRequest = Message<"ml.StreamPredictionsRequest"> & { + /** + * @generated from field: repeated string model_names = 1; + */ + modelNames: string[]; + + /** + * @generated from field: repeated string symbols = 2; + */ + symbols: string[]; + + /** + * @generated from field: optional int32 update_frequency_seconds = 3; + */ + updateFrequencySeconds?: number; +}; + +/** + * Describes the message ml.StreamPredictionsRequest. + * Use `create(StreamPredictionsRequestSchema)` to create a new message. + */ +export const StreamPredictionsRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_ml, 3); + +/** + * @generated from message ml.GetEnsembleVoteRequest + */ +export type GetEnsembleVoteRequest = Message<"ml.GetEnsembleVoteRequest"> & { + /** + * @generated from field: string symbol = 1; + */ + symbol: string; + + /** + * @generated from field: optional int32 horizon_minutes = 2; + */ + horizonMinutes?: number; + + /** + * @generated from field: repeated string model_names = 3; + */ + modelNames: string[]; +}; + +/** + * Describes the message ml.GetEnsembleVoteRequest. + * Use `create(GetEnsembleVoteRequestSchema)` to create a new message. + */ +export const GetEnsembleVoteRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_ml, 4); + +/** + * @generated from message ml.GetEnsembleVoteResponse + */ +export type GetEnsembleVoteResponse = Message<"ml.GetEnsembleVoteResponse"> & { + /** + * @generated from field: ml.EnsembleVote ensemble_vote = 1; + */ + ensembleVote?: EnsembleVote; + + /** + * @generated from field: repeated ml.ModelVote individual_votes = 2; + */ + individualVotes: ModelVote[]; + + /** + * @generated from field: double overall_confidence = 3; + */ + overallConfidence: number; + + /** + * @generated from field: int64 timestamp = 4; + */ + timestamp: bigint; +}; + +/** + * Describes the message ml.GetEnsembleVoteResponse. + * Use `create(GetEnsembleVoteResponseSchema)` to create a new message. + */ +export const GetEnsembleVoteResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_ml, 5); + +/** + * Model Management Messages + * + * @generated from message ml.GetModelStatusRequest + */ +export type GetModelStatusRequest = Message<"ml.GetModelStatusRequest"> & { + /** + * @generated from field: optional string model_name = 1; + */ + modelName?: string; +}; + +/** + * Describes the message ml.GetModelStatusRequest. + * Use `create(GetModelStatusRequestSchema)` to create a new message. + */ +export const GetModelStatusRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_ml, 6); + +/** + * @generated from message ml.GetModelStatusResponse + */ +export type GetModelStatusResponse = Message<"ml.GetModelStatusResponse"> & { + /** + * @generated from field: repeated ml.ModelStatus model_statuses = 1; + */ + modelStatuses: ModelStatus[]; +}; + +/** + * Describes the message ml.GetModelStatusResponse. + * Use `create(GetModelStatusResponseSchema)` to create a new message. + */ +export const GetModelStatusResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_ml, 7); + +/** + * @generated from message ml.GetAvailableModelsRequest + */ +export type GetAvailableModelsRequest = Message<"ml.GetAvailableModelsRequest"> & { +}; + +/** + * Describes the message ml.GetAvailableModelsRequest. + * Use `create(GetAvailableModelsRequestSchema)` to create a new message. + */ +export const GetAvailableModelsRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_ml, 8); + +/** + * @generated from message ml.GetAvailableModelsResponse + */ +export type GetAvailableModelsResponse = Message<"ml.GetAvailableModelsResponse"> & { + /** + * @generated from field: repeated ml.ModelInfo available_models = 1; + */ + availableModels: ModelInfo[]; +}; + +/** + * Describes the message ml.GetAvailableModelsResponse. + * Use `create(GetAvailableModelsResponseSchema)` to create a new message. + */ +export const GetAvailableModelsResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_ml, 9); + +/** + * @generated from message ml.RetrainModelRequest + */ +export type RetrainModelRequest = Message<"ml.RetrainModelRequest"> & { + /** + * @generated from field: string model_name = 1; + */ + modelName: string; + + /** + * @generated from field: optional int64 start_time = 2; + */ + startTime?: bigint; + + /** + * @generated from field: optional int64 end_time = 3; + */ + endTime?: bigint; + + /** + * @generated from field: map parameters = 4; + */ + parameters: { [key: string]: string }; +}; + +/** + * Describes the message ml.RetrainModelRequest. + * Use `create(RetrainModelRequestSchema)` to create a new message. + */ +export const RetrainModelRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_ml, 10); + +/** + * @generated from message ml.RetrainModelResponse + */ +export type RetrainModelResponse = Message<"ml.RetrainModelResponse"> & { + /** + * @generated from field: bool success = 1; + */ + success: boolean; + + /** + * @generated from field: string message = 2; + */ + message: string; + + /** + * @generated from field: optional string job_id = 3; + */ + jobId?: string; + + /** + * @generated from field: int64 started_at = 4; + */ + startedAt: bigint; +}; + +/** + * Describes the message ml.RetrainModelResponse. + * Use `create(RetrainModelResponseSchema)` to create a new message. + */ +export const RetrainModelResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_ml, 11); + +/** + * Performance Messages + * + * @generated from message ml.GetModelPerformanceRequest + */ +export type GetModelPerformanceRequest = Message<"ml.GetModelPerformanceRequest"> & { + /** + * @generated from field: string model_name = 1; + */ + modelName: string; + + /** + * @generated from field: optional int64 start_time = 2; + */ + startTime?: bigint; + + /** + * @generated from field: optional int64 end_time = 3; + */ + endTime?: bigint; +}; + +/** + * Describes the message ml.GetModelPerformanceRequest. + * Use `create(GetModelPerformanceRequestSchema)` to create a new message. + */ +export const GetModelPerformanceRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_ml, 12); + +/** + * @generated from message ml.GetModelPerformanceResponse + */ +export type GetModelPerformanceResponse = Message<"ml.GetModelPerformanceResponse"> & { + /** + * @generated from field: ml.ModelPerformance performance = 1; + */ + performance?: ModelPerformance; +}; + +/** + * Describes the message ml.GetModelPerformanceResponse. + * Use `create(GetModelPerformanceResponseSchema)` to create a new message. + */ +export const GetModelPerformanceResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_ml, 13); + +/** + * @generated from message ml.StreamModelMetricsRequest + */ +export type StreamModelMetricsRequest = Message<"ml.StreamModelMetricsRequest"> & { + /** + * @generated from field: repeated string model_names = 1; + */ + modelNames: string[]; + + /** + * @generated from field: optional int32 update_frequency_seconds = 2; + */ + updateFrequencySeconds?: number; +}; + +/** + * Describes the message ml.StreamModelMetricsRequest. + * Use `create(StreamModelMetricsRequestSchema)` to create a new message. + */ +export const StreamModelMetricsRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_ml, 14); + +/** + * Feature Analysis Messages + * + * @generated from message ml.GetFeatureImportanceRequest + */ +export type GetFeatureImportanceRequest = Message<"ml.GetFeatureImportanceRequest"> & { + /** + * @generated from field: string model_name = 1; + */ + modelName: string; + + /** + * @generated from field: optional string symbol = 2; + */ + symbol?: string; +}; + +/** + * Describes the message ml.GetFeatureImportanceRequest. + * Use `create(GetFeatureImportanceRequestSchema)` to create a new message. + */ +export const GetFeatureImportanceRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_ml, 15); + +/** + * @generated from message ml.GetFeatureImportanceResponse + */ +export type GetFeatureImportanceResponse = Message<"ml.GetFeatureImportanceResponse"> & { + /** + * @generated from field: repeated ml.FeatureImportance feature_importances = 1; + */ + featureImportances: FeatureImportance[]; + + /** + * @generated from field: string model_name = 2; + */ + modelName: string; + + /** + * @generated from field: int64 calculated_at = 3; + */ + calculatedAt: bigint; +}; + +/** + * Describes the message ml.GetFeatureImportanceResponse. + * Use `create(GetFeatureImportanceResponseSchema)` to create a new message. + */ +export const GetFeatureImportanceResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_ml, 16); + +/** + * @generated from message ml.StreamSignalStrengthRequest + */ +export type StreamSignalStrengthRequest = Message<"ml.StreamSignalStrengthRequest"> & { + /** + * @generated from field: repeated string symbols = 1; + */ + symbols: string[]; + + /** + * @generated from field: optional int32 update_frequency_seconds = 2; + */ + updateFrequencySeconds?: number; +}; + +/** + * Describes the message ml.StreamSignalStrengthRequest. + * Use `create(StreamSignalStrengthRequestSchema)` to create a new message. + */ +export const StreamSignalStrengthRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_ml, 17); + +/** + * Complete prediction information from a model + * + * @generated from message ml.Prediction + */ +export type Prediction = Message<"ml.Prediction"> & { + /** + * Model that generated prediction + * + * @generated from field: string model_name = 1; + */ + modelName: string; + + /** + * Trading symbol + * + * @generated from field: string symbol = 2; + */ + symbol: string; + + /** + * Type of prediction (buy/sell/hold/price direction) + * + * @generated from field: ml.PredictionType prediction_type = 3; + */ + predictionType: PredictionType; + + /** + * Predicted value (price change, probability, etc.) + * + * @generated from field: double value = 4; + */ + value: number; + + /** + * Model confidence in prediction (0.0 to 1.0) + * + * @generated from field: double confidence = 5; + */ + confidence: number; + + /** + * Prediction time horizon + * + * @generated from field: int32 horizon_minutes = 6; + */ + horizonMinutes: number; + + /** + * Input features used for prediction + * + * @generated from field: repeated ml.Feature features = 7; + */ + features: Feature[]; + + /** + * Prediction generation timestamp (nanoseconds) + * + * @generated from field: int64 timestamp = 8; + */ + timestamp: bigint; +}; + +/** + * Describes the message ml.Prediction. + * Use `create(PredictionSchema)` to create a new message. + */ +export const PredictionSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_ml, 18); + +/** + * @generated from message ml.EnsembleVote + */ +export type EnsembleVote = Message<"ml.EnsembleVote"> & { + /** + * @generated from field: string symbol = 1; + */ + symbol: string; + + /** + * @generated from field: ml.PredictionType consensus_prediction = 2; + */ + consensusPrediction: PredictionType; + + /** + * @generated from field: double consensus_confidence = 3; + */ + consensusConfidence: number; + + /** + * @generated from field: int32 votes_buy = 4; + */ + votesBuy: number; + + /** + * @generated from field: int32 votes_sell = 5; + */ + votesSell: number; + + /** + * @generated from field: int32 votes_hold = 6; + */ + votesHold: number; + + /** + * @generated from field: int32 total_models = 7; + */ + totalModels: number; + + /** + * @generated from field: ml.SignalStrength signal_strength = 8; + */ + signalStrength: SignalStrength; +}; + +/** + * Describes the message ml.EnsembleVote. + * Use `create(EnsembleVoteSchema)` to create a new message. + */ +export const EnsembleVoteSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_ml, 19); + +/** + * @generated from message ml.ModelVote + */ +export type ModelVote = Message<"ml.ModelVote"> & { + /** + * @generated from field: string model_name = 1; + */ + modelName: string; + + /** + * @generated from field: ml.PredictionType prediction = 2; + */ + prediction: PredictionType; + + /** + * @generated from field: double confidence = 3; + */ + confidence: number; + + /** + * @generated from field: double weight = 4; + */ + weight: number; +}; + +/** + * Describes the message ml.ModelVote. + * Use `create(ModelVoteSchema)` to create a new message. + */ +export const ModelVoteSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_ml, 20); + +/** + * @generated from message ml.ModelStatus + */ +export type ModelStatus = Message<"ml.ModelStatus"> & { + /** + * @generated from field: string model_name = 1; + */ + modelName: string; + + /** + * @generated from field: ml.ModelState state = 2; + */ + state: ModelState; + + /** + * @generated from field: optional string error_message = 3; + */ + errorMessage?: string; + + /** + * @generated from field: int64 last_updated = 4; + */ + lastUpdated: bigint; + + /** + * @generated from field: int64 last_prediction = 5; + */ + lastPrediction: bigint; + + /** + * @generated from field: ml.ModelHealth health = 6; + */ + health: ModelHealth; + + /** + * @generated from field: map metadata = 7; + */ + metadata: { [key: string]: string }; +}; + +/** + * Describes the message ml.ModelStatus. + * Use `create(ModelStatusSchema)` to create a new message. + */ +export const ModelStatusSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_ml, 21); + +/** + * @generated from message ml.ModelInfo + */ +export type ModelInfo = Message<"ml.ModelInfo"> & { + /** + * @generated from field: string model_name = 1; + */ + modelName: string; + + /** + * @generated from field: string model_type = 2; + */ + modelType: string; + + /** + * @generated from field: string description = 3; + */ + description: string; + + /** + * @generated from field: repeated string supported_symbols = 4; + */ + supportedSymbols: string[]; + + /** + * @generated from field: repeated int32 supported_horizons = 5; + */ + supportedHorizons: number[]; + + /** + * @generated from field: ml.ModelCapabilities capabilities = 6; + */ + capabilities?: ModelCapabilities; + + /** + * @generated from field: map parameters = 7; + */ + parameters: { [key: string]: string }; +}; + +/** + * Describes the message ml.ModelInfo. + * Use `create(ModelInfoSchema)` to create a new message. + */ +export const ModelInfoSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_ml, 22); + +/** + * @generated from message ml.ModelPerformance + */ +export type ModelPerformance = Message<"ml.ModelPerformance"> & { + /** + * @generated from field: string model_name = 1; + */ + modelName: string; + + /** + * @generated from field: double accuracy = 2; + */ + accuracy: number; + + /** + * @generated from field: double precision = 3; + */ + precision: number; + + /** + * @generated from field: double recall = 4; + */ + recall: number; + + /** + * @generated from field: double f1_score = 5; + */ + f1Score: number; + + /** + * @generated from field: double sharpe_ratio = 6; + */ + sharpeRatio: number; + + /** + * @generated from field: double win_rate = 7; + */ + winRate: number; + + /** + * @generated from field: double avg_return = 8; + */ + avgReturn: number; + + /** + * @generated from field: double max_drawdown = 9; + */ + maxDrawdown: number; + + /** + * @generated from field: int32 total_predictions = 10; + */ + totalPredictions: number; + + /** + * @generated from field: int64 performance_period_start = 11; + */ + performancePeriodStart: bigint; + + /** + * @generated from field: int64 performance_period_end = 12; + */ + performancePeriodEnd: bigint; + + /** + * @generated from field: repeated ml.DailyPerformance daily_performance = 13; + */ + dailyPerformance: DailyPerformance[]; +}; + +/** + * Describes the message ml.ModelPerformance. + * Use `create(ModelPerformanceSchema)` to create a new message. + */ +export const ModelPerformanceSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_ml, 23); + +/** + * @generated from message ml.DailyPerformance + */ +export type DailyPerformance = Message<"ml.DailyPerformance"> & { + /** + * @generated from field: string date = 1; + */ + date: string; + + /** + * @generated from field: double accuracy = 2; + */ + accuracy: number; + + /** + * @generated from field: double return_pct = 3; + */ + returnPct: number; + + /** + * @generated from field: int32 predictions_count = 4; + */ + predictionsCount: number; + + /** + * @generated from field: double sharpe_ratio = 5; + */ + sharpeRatio: number; +}; + +/** + * Describes the message ml.DailyPerformance. + * Use `create(DailyPerformanceSchema)` to create a new message. + */ +export const DailyPerformanceSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_ml, 24); + +/** + * @generated from message ml.FeatureImportance + */ +export type FeatureImportance = Message<"ml.FeatureImportance"> & { + /** + * @generated from field: string feature_name = 1; + */ + featureName: string; + + /** + * @generated from field: double importance_score = 2; + */ + importanceScore: number; + + /** + * @generated from field: ml.FeatureType feature_type = 3; + */ + featureType: FeatureType; + + /** + * @generated from field: double contribution_pct = 4; + */ + contributionPct: number; +}; + +/** + * Describes the message ml.FeatureImportance. + * Use `create(FeatureImportanceSchema)` to create a new message. + */ +export const FeatureImportanceSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_ml, 25); + +/** + * @generated from message ml.Feature + */ +export type Feature = Message<"ml.Feature"> & { + /** + * @generated from field: string name = 1; + */ + name: string; + + /** + * @generated from field: double value = 2; + */ + value: number; + + /** + * @generated from field: ml.FeatureType feature_type = 3; + */ + featureType: FeatureType; + + /** + * @generated from field: double normalized_value = 4; + */ + normalizedValue: number; +}; + +/** + * Describes the message ml.Feature. + * Use `create(FeatureSchema)` to create a new message. + */ +export const FeatureSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_ml, 26); + +/** + * @generated from message ml.ModelCapabilities + */ +export type ModelCapabilities = Message<"ml.ModelCapabilities"> & { + /** + * @generated from field: bool supports_streaming = 1; + */ + supportsStreaming: boolean; + + /** + * @generated from field: bool supports_retraining = 2; + */ + supportsRetraining: boolean; + + /** + * @generated from field: bool supports_feature_importance = 3; + */ + supportsFeatureImportance: boolean; + + /** + * @generated from field: bool supports_confidence_intervals = 4; + */ + supportsConfidenceIntervals: boolean; + + /** + * @generated from field: repeated string supported_asset_classes = 5; + */ + supportedAssetClasses: string[]; +}; + +/** + * Describes the message ml.ModelCapabilities. + * Use `create(ModelCapabilitiesSchema)` to create a new message. + */ +export const ModelCapabilitiesSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_ml, 27); + +/** + * Event Messages + * + * @generated from message ml.PredictionEvent + */ +export type PredictionEvent = Message<"ml.PredictionEvent"> & { + /** + * @generated from field: string model_name = 1; + */ + modelName: string; + + /** + * @generated from field: string symbol = 2; + */ + symbol: string; + + /** + * @generated from field: ml.Prediction prediction = 3; + */ + prediction?: Prediction; + + /** + * @generated from field: ml.PredictionEventType event_type = 4; + */ + eventType: PredictionEventType; + + /** + * @generated from field: int64 timestamp = 5; + */ + timestamp: bigint; +}; + +/** + * Describes the message ml.PredictionEvent. + * Use `create(PredictionEventSchema)` to create a new message. + */ +export const PredictionEventSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_ml, 28); + +/** + * @generated from message ml.ModelMetricsEvent + */ +export type ModelMetricsEvent = Message<"ml.ModelMetricsEvent"> & { + /** + * @generated from field: string model_name = 1; + */ + modelName: string; + + /** + * @generated from field: ml.ModelMetrics metrics = 2; + */ + metrics?: ModelMetrics; + + /** + * @generated from field: int64 timestamp = 3; + */ + timestamp: bigint; +}; + +/** + * Describes the message ml.ModelMetricsEvent. + * Use `create(ModelMetricsEventSchema)` to create a new message. + */ +export const ModelMetricsEventSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_ml, 29); + +/** + * @generated from message ml.SignalStrengthEvent + */ +export type SignalStrengthEvent = Message<"ml.SignalStrengthEvent"> & { + /** + * @generated from field: string symbol = 1; + */ + symbol: string; + + /** + * @generated from field: ml.SignalStrength signal_strength = 2; + */ + signalStrength: SignalStrength; + + /** + * @generated from field: repeated ml.ModelSignal model_signals = 3; + */ + modelSignals: ModelSignal[]; + + /** + * @generated from field: int64 timestamp = 4; + */ + timestamp: bigint; +}; + +/** + * Describes the message ml.SignalStrengthEvent. + * Use `create(SignalStrengthEventSchema)` to create a new message. + */ +export const SignalStrengthEventSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_ml, 30); + +/** + * @generated from message ml.ModelMetrics + */ +export type ModelMetrics = Message<"ml.ModelMetrics"> & { + /** + * @generated from field: string model_name = 1; + */ + modelName: string; + + /** + * @generated from field: double cpu_usage = 2; + */ + cpuUsage: number; + + /** + * @generated from field: double memory_usage_mb = 3; + */ + memoryUsageMb: number; + + /** + * @generated from field: double gpu_usage = 4; + */ + gpuUsage: number; + + /** + * @generated from field: double predictions_per_second = 5; + */ + predictionsPerSecond: number; + + /** + * @generated from field: double avg_inference_time_ms = 6; + */ + avgInferenceTimeMs: number; + + /** + * @generated from field: int32 queue_size = 7; + */ + queueSize: number; + + /** + * @generated from field: ml.ModelHealth health = 8; + */ + health: ModelHealth; +}; + +/** + * Describes the message ml.ModelMetrics. + * Use `create(ModelMetricsSchema)` to create a new message. + */ +export const ModelMetricsSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_ml, 31); + +/** + * @generated from message ml.ModelSignal + */ +export type ModelSignal = Message<"ml.ModelSignal"> & { + /** + * @generated from field: string model_name = 1; + */ + modelName: string; + + /** + * @generated from field: double signal_strength = 2; + */ + signalStrength: number; + + /** + * @generated from field: ml.PredictionType direction = 3; + */ + direction: PredictionType; + + /** + * @generated from field: double confidence = 4; + */ + confidence: number; +}; + +/** + * Describes the message ml.ModelSignal. + * Use `create(ModelSignalSchema)` to create a new message. + */ +export const ModelSignalSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_ml, 32); + +/** + * Types of predictions that ML models can generate + * + * @generated from enum ml.PredictionType + */ +export enum PredictionType { + /** + * Default/unknown prediction type + * + * @generated from enum value: PREDICTION_TYPE_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * Recommendation to buy (go long) + * + * @generated from enum value: PREDICTION_TYPE_BUY = 1; + */ + BUY = 1, + + /** + * Recommendation to sell (go short) + * + * @generated from enum value: PREDICTION_TYPE_SELL = 2; + */ + SELL = 2, + + /** + * Recommendation to hold position + * + * @generated from enum value: PREDICTION_TYPE_HOLD = 3; + */ + HOLD = 3, + + /** + * Price expected to increase + * + * @generated from enum value: PREDICTION_TYPE_PRICE_UP = 4; + */ + PRICE_UP = 4, + + /** + * Price expected to decrease + * + * @generated from enum value: PREDICTION_TYPE_PRICE_DOWN = 5; + */ + PRICE_DOWN = 5, + + /** + * High volatility expected + * + * @generated from enum value: PREDICTION_TYPE_VOLATILITY_HIGH = 6; + */ + VOLATILITY_HIGH = 6, + + /** + * Low volatility expected + * + * @generated from enum value: PREDICTION_TYPE_VOLATILITY_LOW = 7; + */ + VOLATILITY_LOW = 7, +} + +/** + * Describes the enum ml.PredictionType. + */ +export const PredictionTypeSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_ml, 0); + +/** + * Current operational state of ML models + * + * @generated from enum ml.ModelState + */ +export enum ModelState { + /** + * Default/unknown state + * + * @generated from enum value: MODEL_STATE_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * Model is loading from storage + * + * @generated from enum value: MODEL_STATE_LOADING = 1; + */ + LOADING = 1, + + /** + * Model loaded and ready for predictions + * + * @generated from enum value: MODEL_STATE_READY = 2; + */ + READY = 2, + + /** + * Model actively making predictions + * + * @generated from enum value: MODEL_STATE_PREDICTING = 3; + */ + PREDICTING = 3, + + /** + * Model is being retrained + * + * @generated from enum value: MODEL_STATE_TRAINING = 4; + */ + TRAINING = 4, + + /** + * Model encountered an error + * + * @generated from enum value: MODEL_STATE_ERROR = 5; + */ + ERROR = 5, + + /** + * Model is offline/disabled + * + * @generated from enum value: MODEL_STATE_OFFLINE = 6; + */ + OFFLINE = 6, +} + +/** + * Describes the enum ml.ModelState. + */ +export const ModelStateSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_ml, 1); + +/** + * Health status of ML models + * + * @generated from enum ml.ModelHealth + */ +export enum ModelHealth { + /** + * Default/unknown health + * + * @generated from enum value: MODEL_HEALTH_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * Model operating normally + * + * @generated from enum value: MODEL_HEALTH_HEALTHY = 1; + */ + HEALTHY = 1, + + /** + * Model performance degraded + * + * @generated from enum value: MODEL_HEALTH_DEGRADED = 2; + */ + DEGRADED = 2, + + /** + * Model not performing well + * + * @generated from enum value: MODEL_HEALTH_UNHEALTHY = 3; + */ + UNHEALTHY = 3, + + /** + * Model in critical state + * + * @generated from enum value: MODEL_HEALTH_CRITICAL = 4; + */ + CRITICAL = 4, +} + +/** + * Describes the enum ml.ModelHealth. + */ +export const ModelHealthSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_ml, 2); + +/** + * Types of features used in ML models + * + * @generated from enum ml.FeatureType + */ +export enum FeatureType { + /** + * Default/unknown feature type + * + * @generated from enum value: FEATURE_TYPE_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * Price-based features (OHLC, etc.) + * + * @generated from enum value: FEATURE_TYPE_PRICE = 1; + */ + PRICE = 1, + + /** + * Volume-based features + * + * @generated from enum value: FEATURE_TYPE_VOLUME = 2; + */ + VOLUME = 2, + + /** + * Technical indicators (RSI, MACD, etc.) + * + * @generated from enum value: FEATURE_TYPE_TECHNICAL = 3; + */ + TECHNICAL = 3, + + /** + * Fundamental analysis features + * + * @generated from enum value: FEATURE_TYPE_FUNDAMENTAL = 4; + */ + FUNDAMENTAL = 4, + + /** + * Market sentiment features + * + * @generated from enum value: FEATURE_TYPE_SENTIMENT = 5; + */ + SENTIMENT = 5, + + /** + * Macroeconomic features + * + * @generated from enum value: FEATURE_TYPE_MACRO = 6; + */ + MACRO = 6, + + /** + * Time-based features + * + * @generated from enum value: FEATURE_TYPE_TIME = 7; + */ + TIME = 7, + + /** + * Order book depth and microstructure features + * + * @generated from enum value: FEATURE_TYPE_ORDERBOOK = 8; + */ + ORDERBOOK = 8, + + /** + * Market microstructure and flow features + * + * @generated from enum value: FEATURE_TYPE_MICROSTRUCTURE = 9; + */ + MICROSTRUCTURE = 9, +} + +/** + * Describes the enum ml.FeatureType. + */ +export const FeatureTypeSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_ml, 3); + +/** + * Signal strength levels for predictions + * + * @generated from enum ml.SignalStrength + */ +export enum SignalStrength { + /** + * Default/unknown strength + * + * @generated from enum value: SIGNAL_STRENGTH_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * Very weak signal confidence + * + * @generated from enum value: SIGNAL_STRENGTH_VERY_WEAK = 1; + */ + VERY_WEAK = 1, + + /** + * Weak signal confidence + * + * @generated from enum value: SIGNAL_STRENGTH_WEAK = 2; + */ + WEAK = 2, + + /** + * Moderate signal confidence + * + * @generated from enum value: SIGNAL_STRENGTH_MODERATE = 3; + */ + MODERATE = 3, + + /** + * Strong signal confidence + * + * @generated from enum value: SIGNAL_STRENGTH_STRONG = 4; + */ + STRONG = 4, + + /** + * Very strong signal confidence + * + * @generated from enum value: SIGNAL_STRENGTH_VERY_STRONG = 5; + */ + VERY_STRONG = 5, +} + +/** + * Describes the enum ml.SignalStrength. + */ +export const SignalStrengthSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_ml, 4); + +/** + * @generated from enum ml.PredictionEventType + */ +export enum PredictionEventType { + /** + * @generated from enum value: PREDICTION_EVENT_TYPE_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * @generated from enum value: PREDICTION_EVENT_TYPE_NEW = 1; + */ + NEW = 1, + + /** + * @generated from enum value: PREDICTION_EVENT_TYPE_UPDATED = 2; + */ + UPDATED = 2, + + /** + * @generated from enum value: PREDICTION_EVENT_TYPE_EXPIRED = 3; + */ + EXPIRED = 3, + + /** + * @generated from enum value: PREDICTION_EVENT_TYPE_CONFIRMED = 4; + */ + CONFIRMED = 4, +} + +/** + * Describes the enum ml.PredictionEventType. + */ +export const PredictionEventTypeSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_ml, 5); + +/** + * ML Service provides machine learning model management, predictions, and insights for trading decisions. + * This service integrates multiple ML models including MAMBA-2, TLOB transformers, DQN, and PPO models + * to provide real-time predictions, ensemble voting, and model performance monitoring. + * + * @generated from service ml.MLService + */ +export const MLService: GenService<{ + /** + * Model Predictions and Inference + * Get single prediction from a specific model + * + * @generated from rpc ml.MLService.GetPrediction + */ + getPrediction: { + methodKind: "unary"; + input: typeof GetPredictionRequestSchema; + output: typeof GetPredictionResponseSchema; + }, + /** + * Stream real-time predictions from multiple models + * + * @generated from rpc ml.MLService.StreamPredictions + */ + streamPredictions: { + methodKind: "server_streaming"; + input: typeof StreamPredictionsRequestSchema; + output: typeof PredictionEventSchema; + }, + /** + * Get ensemble voting results from multiple models + * + * @generated from rpc ml.MLService.GetEnsembleVote + */ + getEnsembleVote: { + methodKind: "unary"; + input: typeof GetEnsembleVoteRequestSchema; + output: typeof GetEnsembleVoteResponseSchema; + }, + /** + * Model Lifecycle Management + * Get current status of ML models (health, performance, etc.) + * + * @generated from rpc ml.MLService.GetModelStatus + */ + getModelStatus: { + methodKind: "unary"; + input: typeof GetModelStatusRequestSchema; + output: typeof GetModelStatusResponseSchema; + }, + /** + * List all available models and their capabilities + * + * @generated from rpc ml.MLService.GetAvailableModels + */ + getAvailableModels: { + methodKind: "unary"; + input: typeof GetAvailableModelsRequestSchema; + output: typeof GetAvailableModelsResponseSchema; + }, + /** + * Trigger model retraining with new data + * + * @generated from rpc ml.MLService.RetrainModel + */ + retrainModel: { + methodKind: "unary"; + input: typeof RetrainModelRequestSchema; + output: typeof RetrainModelResponseSchema; + }, + /** + * Model Performance and Analytics + * Get comprehensive performance metrics for a model + * + * @generated from rpc ml.MLService.GetModelPerformance + */ + getModelPerformance: { + methodKind: "unary"; + input: typeof GetModelPerformanceRequestSchema; + output: typeof GetModelPerformanceResponseSchema; + }, + /** + * Stream real-time model performance metrics + * + * @generated from rpc ml.MLService.StreamModelMetrics + */ + streamModelMetrics: { + methodKind: "server_streaming"; + input: typeof StreamModelMetricsRequestSchema; + output: typeof ModelMetricsEventSchema; + }, + /** + * Feature Analysis and Signal Intelligence + * Get feature importance analysis for model interpretation + * + * @generated from rpc ml.MLService.GetFeatureImportance + */ + getFeatureImportance: { + methodKind: "unary"; + input: typeof GetFeatureImportanceRequestSchema; + output: typeof GetFeatureImportanceResponseSchema; + }, + /** + * Stream real-time signal strength indicators across models + * + * @generated from rpc ml.MLService.StreamSignalStrength + */ + streamSignalStrength: { + methodKind: "server_streaming"; + input: typeof StreamSignalStrengthRequestSchema; + output: typeof SignalStrengthEventSchema; + }, + /** + * Server-streaming: polls GetModelStatus at gateway level + * + * @generated from rpc ml.MLService.StreamModelStatus + */ + streamModelStatus: { + methodKind: "server_streaming"; + input: typeof StreamModelStatusRequestSchema; + output: typeof GetModelStatusResponseSchema; + }, +}> = /*@__PURE__*/ + serviceDesc(file_ml, 0); + diff --git a/web-dashboard/src/gen/ml_training_pb.ts b/web-dashboard/src/gen/ml_training_pb.ts new file mode 100644 index 000000000..d7c1c1201 --- /dev/null +++ b/web-dashboard/src/gen/ml_training_pb.ts @@ -0,0 +1,2929 @@ +// @generated by protoc-gen-es v2.11.0 with parameter "target=ts" +// @generated from file ml_training.proto (package ml_training, syntax proto3) +/* eslint-disable */ + +import type { GenEnum, GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2"; +import { enumDesc, fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv2"; +import type { Message } from "@bufbuild/protobuf"; + +/** + * Describes the file ml_training.proto. + */ +export const file_ml_training: GenFile = /*@__PURE__*/ + fileDesc("ChFtbF90cmFpbmluZy5wcm90bxILbWxfdHJhaW5pbmci+gIKFFN0YXJ0VHJhaW5pbmdSZXF1ZXN0EhIKCm1vZGVsX3R5cGUYASABKAkSLAoLZGF0YV9zb3VyY2UYAiABKAsyFy5tbF90cmFpbmluZy5EYXRhU291cmNlEjUKD2h5cGVycGFyYW1ldGVycxgDIAEoCzIcLm1sX3RyYWluaW5nLkh5cGVycGFyYW1ldGVycxIPCgd1c2VfZ3B1GAQgASgIEhMKC2Rlc2NyaXB0aW9uGAUgASgJEjkKBHRhZ3MYBiADKAsyKy5tbF90cmFpbmluZy5TdGFydFRyYWluaW5nUmVxdWVzdC5UYWdzRW50cnkSJwoEbW9kZRgHIAEoDjIZLm1sX3RyYWluaW5nLlRyYWluaW5nTW9kZRIeChZyZXN1bWVfY2hlY2twb2ludF9wYXRoGAggASgJEhIKCm1heF9lcG9jaHMYCSABKA0aKwoJVGFnc0VudHJ5EgsKA2tleRgBIAEoCRINCgV2YWx1ZRgCIAEoCToCOAEiZQoVU3RhcnRUcmFpbmluZ1Jlc3BvbnNlEg4KBmpvYl9pZBgBIAEoCRIrCgZzdGF0dXMYAiABKA4yGy5tbF90cmFpbmluZy5UcmFpbmluZ1N0YXR1cxIPCgdtZXNzYWdlGAMgASgJIjIKIFN1YnNjcmliZVRvVHJhaW5pbmdTdGF0dXNSZXF1ZXN0Eg4KBmpvYl9pZBgBIAEoCSKgAwoUVHJhaW5pbmdTdGF0dXNVcGRhdGUSDgoGam9iX2lkGAEgASgJEisKBnN0YXR1cxgCIAEoDjIbLm1sX3RyYWluaW5nLlRyYWluaW5nU3RhdHVzEhsKE3Byb2dyZXNzX3BlcmNlbnRhZ2UYAyABKAIS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UHJvbW90aW9uUmVxdWVzdBolLm1sX3RyYWluaW5nLkFwcHJvdmVQcm9tb3Rpb25SZXNwb25zZRJcCg9SZWplY3RQcm9tb3Rpb24SIy5tbF90cmFpbmluZy5SZWplY3RQcm9tb3Rpb25SZXF1ZXN0GiQubWxfdHJhaW5pbmcuUmVqZWN0UHJvbW90aW9uUmVzcG9uc2USUwoMQXBwcm92ZU1vZGVsEiAubWxfdHJhaW5pbmcuQXBwcm92ZU1vZGVsUmVxdWVzdBohLm1sX3RyYWluaW5nLkFwcHJvdmVNb2RlbFJlc3BvbnNlElAKC1JlamVjdE1vZGVsEh8ubWxfdHJhaW5pbmcuUmVqZWN0TW9kZWxSZXF1ZXN0GiAubWxfdHJhaW5pbmcuUmVqZWN0TW9kZWxSZXNwb25zZWIGcHJvdG8z"); + +/** + * Request to start a new model training job + * + * @generated from message ml_training.StartTrainingRequest + */ +export type StartTrainingRequest = Message<"ml_training.StartTrainingRequest"> & { + /** + * Model type ("TLOB", "MAMBA_2", "DQN", "PPO", "LIQUID", "TFT") + * + * @generated from field: string model_type = 1; + */ + modelType: string; + + /** + * Training data source configuration + * + * @generated from field: ml_training.DataSource data_source = 2; + */ + dataSource?: DataSource; + + /** + * Model-specific training parameters + * + * @generated from field: ml_training.Hyperparameters hyperparameters = 3; + */ + hyperparameters?: Hyperparameters; + + /** + * Whether to use GPU acceleration + * + * @generated from field: bool use_gpu = 4; + */ + useGpu: boolean; + + /** + * Optional job description + * + * @generated from field: string description = 5; + */ + description: string; + + /** + * Optional categorization tags + * + * @generated from field: map tags = 6; + */ + tags: { [key: string]: string }; + + /** + * FULL (default) or FINE_TUNE + * + * @generated from field: ml_training.TrainingMode mode = 7; + */ + mode: TrainingMode; + + /** + * Path to checkpoint for fine-tune + * + * @generated from field: string resume_checkpoint_path = 8; + */ + resumeCheckpointPath: string; + + /** + * Override epoch count (0 = use default) + * + * @generated from field: uint32 max_epochs = 9; + */ + maxEpochs: number; +}; + +/** + * Describes the message ml_training.StartTrainingRequest. + * Use `create(StartTrainingRequestSchema)` to create a new message. + */ +export const StartTrainingRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_ml_training, 0); + +/** + * @generated from message ml_training.StartTrainingResponse + */ +export type StartTrainingResponse = Message<"ml_training.StartTrainingResponse"> & { + /** + * @generated from field: string job_id = 1; + */ + jobId: string; + + /** + * @generated from field: ml_training.TrainingStatus status = 2; + */ + status: TrainingStatus; + + /** + * @generated from field: string message = 3; + */ + message: string; +}; + +/** + * Describes the message ml_training.StartTrainingResponse. + * Use `create(StartTrainingResponseSchema)` to create a new message. + */ +export const StartTrainingResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_ml_training, 1); + +/** + * @generated from message ml_training.SubscribeToTrainingStatusRequest + */ +export type SubscribeToTrainingStatusRequest = Message<"ml_training.SubscribeToTrainingStatusRequest"> & { + /** + * @generated from field: string job_id = 1; + */ + jobId: string; +}; + +/** + * Describes the message ml_training.SubscribeToTrainingStatusRequest. + * Use `create(SubscribeToTrainingStatusRequestSchema)` to create a new message. + */ +export const SubscribeToTrainingStatusRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_ml_training, 2); + +/** + * Real-time training progress update streamed from server + * + * @generated from message ml_training.TrainingStatusUpdate + */ +export type TrainingStatusUpdate = Message<"ml_training.TrainingStatusUpdate"> & { + /** + * Training job identifier + * + * @generated from field: string job_id = 1; + */ + jobId: string; + + /** + * Current job status + * + * @generated from field: ml_training.TrainingStatus status = 2; + */ + status: TrainingStatus; + + /** + * Training progress (0.0 to 100.0) + * + * @generated from field: float progress_percentage = 3; + */ + progressPercentage: number; + + /** + * Current training epoch + * + * @generated from field: uint32 current_epoch = 4; + */ + currentEpoch: number; + + /** + * Total epochs planned + * + * @generated from field: uint32 total_epochs = 5; + */ + totalEpochs: number; + + /** + * Training metrics (loss, accuracy, sharpe_ratio, etc.) + * + * @generated from field: map metrics = 6; + */ + metrics: { [key: string]: number }; + + /** + * Human-readable status message + * + * @generated from field: string message = 7; + */ + message: string; + + /** + * Update timestamp (Unix seconds) + * + * @generated from field: int64 timestamp = 8; + */ + timestamp: bigint; + + /** + * Financial performance metrics + * + * @generated from field: ml_training.FinancialMetrics financial_metrics = 9; + */ + financialMetrics?: FinancialMetrics; + + /** + * Current resource utilization + * + * @generated from field: ml_training.ResourceUsage resource_usage = 10; + */ + resourceUsage?: ResourceUsage; +}; + +/** + * Describes the message ml_training.TrainingStatusUpdate. + * Use `create(TrainingStatusUpdateSchema)` to create a new message. + */ +export const TrainingStatusUpdateSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_ml_training, 3); + +/** + * @generated from message ml_training.StopTrainingRequest + */ +export type StopTrainingRequest = Message<"ml_training.StopTrainingRequest"> & { + /** + * @generated from field: string job_id = 1; + */ + jobId: string; + + /** + * Optional reason for stopping + * + * @generated from field: string reason = 2; + */ + reason: string; +}; + +/** + * Describes the message ml_training.StopTrainingRequest. + * Use `create(StopTrainingRequestSchema)` to create a new message. + */ +export const StopTrainingRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_ml_training, 4); + +/** + * @generated from message ml_training.StopTrainingResponse + */ +export type StopTrainingResponse = Message<"ml_training.StopTrainingResponse"> & { + /** + * @generated from field: bool success = 1; + */ + success: boolean; + + /** + * @generated from field: string message = 2; + */ + message: string; +}; + +/** + * Describes the message ml_training.StopTrainingResponse. + * Use `create(StopTrainingResponseSchema)` to create a new message. + */ +export const StopTrainingResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_ml_training, 5); + +/** + * @generated from message ml_training.ListAvailableModelsRequest + */ +export type ListAvailableModelsRequest = Message<"ml_training.ListAvailableModelsRequest"> & { +}; + +/** + * Describes the message ml_training.ListAvailableModelsRequest. + * Use `create(ListAvailableModelsRequestSchema)` to create a new message. + */ +export const ListAvailableModelsRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_ml_training, 6); + +/** + * @generated from message ml_training.ListAvailableModelsResponse + */ +export type ListAvailableModelsResponse = Message<"ml_training.ListAvailableModelsResponse"> & { + /** + * @generated from field: repeated ml_training.ModelDefinition models = 1; + */ + models: ModelDefinition[]; +}; + +/** + * Describes the message ml_training.ListAvailableModelsResponse. + * Use `create(ListAvailableModelsResponseSchema)` to create a new message. + */ +export const ListAvailableModelsResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_ml_training, 7); + +/** + * @generated from message ml_training.ListTrainingJobsRequest + */ +export type ListTrainingJobsRequest = Message<"ml_training.ListTrainingJobsRequest"> & { + /** + * @generated from field: uint32 page = 1; + */ + page: number; + + /** + * @generated from field: uint32 page_size = 2; + */ + pageSize: number; + + /** + * @generated from field: ml_training.TrainingStatus status_filter = 3; + */ + statusFilter: TrainingStatus; + + /** + * @generated from field: string model_type_filter = 4; + */ + modelTypeFilter: string; + + /** + * Unix timestamp in seconds + * + * @generated from field: int64 start_time = 5; + */ + startTime: bigint; + + /** + * Unix timestamp in seconds + * + * @generated from field: int64 end_time = 6; + */ + endTime: bigint; +}; + +/** + * Describes the message ml_training.ListTrainingJobsRequest. + * Use `create(ListTrainingJobsRequestSchema)` to create a new message. + */ +export const ListTrainingJobsRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_ml_training, 8); + +/** + * @generated from message ml_training.ListTrainingJobsResponse + */ +export type ListTrainingJobsResponse = Message<"ml_training.ListTrainingJobsResponse"> & { + /** + * @generated from field: repeated ml_training.TrainingJobSummary jobs = 1; + */ + jobs: TrainingJobSummary[]; + + /** + * @generated from field: uint32 total_count = 2; + */ + totalCount: number; + + /** + * @generated from field: uint32 page = 3; + */ + page: number; + + /** + * @generated from field: uint32 page_size = 4; + */ + pageSize: number; +}; + +/** + * Describes the message ml_training.ListTrainingJobsResponse. + * Use `create(ListTrainingJobsResponseSchema)` to create a new message. + */ +export const ListTrainingJobsResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_ml_training, 9); + +/** + * @generated from message ml_training.GetTrainingJobDetailsRequest + */ +export type GetTrainingJobDetailsRequest = Message<"ml_training.GetTrainingJobDetailsRequest"> & { + /** + * @generated from field: string job_id = 1; + */ + jobId: string; +}; + +/** + * Describes the message ml_training.GetTrainingJobDetailsRequest. + * Use `create(GetTrainingJobDetailsRequestSchema)` to create a new message. + */ +export const GetTrainingJobDetailsRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_ml_training, 10); + +/** + * @generated from message ml_training.GetTrainingJobDetailsResponse + */ +export type GetTrainingJobDetailsResponse = Message<"ml_training.GetTrainingJobDetailsResponse"> & { + /** + * @generated from field: ml_training.TrainingJobDetails job_details = 1; + */ + jobDetails?: TrainingJobDetails; +}; + +/** + * Describes the message ml_training.GetTrainingJobDetailsResponse. + * Use `create(GetTrainingJobDetailsResponseSchema)` to create a new message. + */ +export const GetTrainingJobDetailsResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_ml_training, 11); + +/** + * @generated from message ml_training.HealthCheckRequest + */ +export type HealthCheckRequest = Message<"ml_training.HealthCheckRequest"> & { +}; + +/** + * Describes the message ml_training.HealthCheckRequest. + * Use `create(HealthCheckRequestSchema)` to create a new message. + */ +export const HealthCheckRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_ml_training, 12); + +/** + * @generated from message ml_training.HealthCheckResponse + */ +export type HealthCheckResponse = Message<"ml_training.HealthCheckResponse"> & { + /** + * @generated from field: bool healthy = 1; + */ + healthy: boolean; + + /** + * @generated from field: string message = 2; + */ + message: string; + + /** + * @generated from field: map details = 3; + */ + details: { [key: string]: string }; +}; + +/** + * Describes the message ml_training.HealthCheckResponse. + * Use `create(HealthCheckResponseSchema)` to create a new message. + */ +export const HealthCheckResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_ml_training, 13); + +/** + * Request to start hyperparameter tuning job + * + * @generated from message ml_training.StartTuningJobRequest + */ +export type StartTuningJobRequest = Message<"ml_training.StartTuningJobRequest"> & { + /** + * Model type to tune ("TLOB", "MAMBA_2", "DQN", "PPO", "LIQUID", "TFT") + * + * @generated from field: string model_type = 1; + */ + modelType: string; + + /** + * Number of tuning trials to run + * + * @generated from field: uint32 num_trials = 2; + */ + numTrials: number; + + /** + * Path to tuning configuration file (search space, objectives) + * + * @generated from field: string config_path = 3; + */ + configPath: string; + + /** + * Training data source for all trials + * + * @generated from field: ml_training.DataSource data_source = 4; + */ + dataSource?: DataSource; + + /** + * Whether to use GPU acceleration + * + * @generated from field: bool use_gpu = 5; + */ + useGpu: boolean; + + /** + * Optional job description + * + * @generated from field: string description = 6; + */ + description: string; + + /** + * Optional categorization tags + * + * @generated from field: map tags = 7; + */ + tags: { [key: string]: string }; +}; + +/** + * Describes the message ml_training.StartTuningJobRequest. + * Use `create(StartTuningJobRequestSchema)` to create a new message. + */ +export const StartTuningJobRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_ml_training, 14); + +/** + * @generated from message ml_training.StartTuningJobResponse + */ +export type StartTuningJobResponse = Message<"ml_training.StartTuningJobResponse"> & { + /** + * Unique tuning job identifier + * + * @generated from field: string job_id = 1; + */ + jobId: string; + + /** + * Initial job status + * + * @generated from field: ml_training.TuningJobStatus status = 2; + */ + status: TuningJobStatus; + + /** + * Human-readable status message + * + * @generated from field: string message = 3; + */ + message: string; +}; + +/** + * Describes the message ml_training.StartTuningJobResponse. + * Use `create(StartTuningJobResponseSchema)` to create a new message. + */ +export const StartTuningJobResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_ml_training, 15); + +/** + * Request to query tuning job status + * + * @generated from message ml_training.GetTuningJobStatusRequest + */ +export type GetTuningJobStatusRequest = Message<"ml_training.GetTuningJobStatusRequest"> & { + /** + * Tuning job identifier + * + * @generated from field: string job_id = 1; + */ + jobId: string; +}; + +/** + * Describes the message ml_training.GetTuningJobStatusRequest. + * Use `create(GetTuningJobStatusRequestSchema)` to create a new message. + */ +export const GetTuningJobStatusRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_ml_training, 16); + +/** + * @generated from message ml_training.GetTuningJobStatusResponse + */ +export type GetTuningJobStatusResponse = Message<"ml_training.GetTuningJobStatusResponse"> & { + /** + * Tuning job identifier + * + * @generated from field: string job_id = 1; + */ + jobId: string; + + /** + * Current job status + * + * @generated from field: ml_training.TuningJobStatus status = 2; + */ + status: TuningJobStatus; + + /** + * Current trial number (0-indexed) + * + * @generated from field: uint32 current_trial = 3; + */ + currentTrial: number; + + /** + * Total number of trials + * + * @generated from field: uint32 total_trials = 4; + */ + totalTrials: number; + + /** + * Best hyperparameters found so far + * + * @generated from field: map best_params = 5; + */ + bestParams: { [key: string]: number }; + + /** + * Metrics for best parameters (sharpe_ratio, training_loss, etc.) + * + * @generated from field: map best_metrics = 6; + */ + bestMetrics: { [key: string]: number }; + + /** + * Complete trial history + * + * @generated from field: repeated ml_training.TrialResult trial_history = 7; + */ + trialHistory: TrialResult[]; + + /** + * Human-readable status message + * + * @generated from field: string message = 8; + */ + message: string; + + /** + * Job start time (Unix timestamp in seconds) + * + * @generated from field: int64 started_at = 9; + */ + startedAt: bigint; + + /** + * Last update time (Unix timestamp in seconds) + * + * @generated from field: int64 updated_at = 10; + */ + updatedAt: bigint; +}; + +/** + * Describes the message ml_training.GetTuningJobStatusResponse. + * Use `create(GetTuningJobStatusResponseSchema)` to create a new message. + */ +export const GetTuningJobStatusResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_ml_training, 17); + +/** + * Request to stop a tuning job + * + * @generated from message ml_training.StopTuningJobRequest + */ +export type StopTuningJobRequest = Message<"ml_training.StopTuningJobRequest"> & { + /** + * Tuning job identifier + * + * @generated from field: string job_id = 1; + */ + jobId: string; + + /** + * Optional reason for stopping + * + * @generated from field: string reason = 2; + */ + reason: string; +}; + +/** + * Describes the message ml_training.StopTuningJobRequest. + * Use `create(StopTuningJobRequestSchema)` to create a new message. + */ +export const StopTuningJobRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_ml_training, 18); + +/** + * @generated from message ml_training.StopTuningJobResponse + */ +export type StopTuningJobResponse = Message<"ml_training.StopTuningJobResponse"> & { + /** + * Whether stop was successful + * + * @generated from field: bool success = 1; + */ + success: boolean; + + /** + * Human-readable status message + * + * @generated from field: string message = 2; + */ + message: string; + + /** + * Final job status after stopping + * + * @generated from field: ml_training.TuningJobStatus final_status = 3; + */ + finalStatus: TuningJobStatus; +}; + +/** + * Describes the message ml_training.StopTuningJobResponse. + * Use `create(StopTuningJobResponseSchema)` to create a new message. + */ +export const StopTuningJobResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_ml_training, 19); + +/** + * INTERNAL: Request to train a model with specific hyperparameters (called by Optuna) + * + * @generated from message ml_training.TrainModelRequest + */ +export type TrainModelRequest = Message<"ml_training.TrainModelRequest"> & { + /** + * Model type ("TLOB", "MAMBA_2", "DQN", "PPO", "LIQUID", "TFT") + * + * @generated from field: string model_type = 1; + */ + modelType: string; + + /** + * Hyperparameters to use for this trial + * + * @generated from field: map hyperparameters = 2; + */ + hyperparameters: { [key: string]: number }; + + /** + * Training data source + * + * @generated from field: ml_training.DataSource data_source = 3; + */ + dataSource?: DataSource; + + /** + * Whether to use GPU acceleration + * + * @generated from field: bool use_gpu = 4; + */ + useGpu: boolean; + + /** + * Optuna trial identifier for tracking + * + * @generated from field: string trial_id = 5; + */ + trialId: string; +}; + +/** + * Describes the message ml_training.TrainModelRequest. + * Use `create(TrainModelRequestSchema)` to create a new message. + */ +export const TrainModelRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_ml_training, 20); + +/** + * @generated from message ml_training.TrainModelResponse + */ +export type TrainModelResponse = Message<"ml_training.TrainModelResponse"> & { + /** + * Whether training succeeded + * + * @generated from field: bool success = 1; + */ + success: boolean; + + /** + * Primary optimization objective (Sharpe ratio) + * + * @generated from field: float sharpe_ratio = 2; + */ + sharpeRatio: number; + + /** + * Final training loss + * + * @generated from field: float training_loss = 3; + */ + trainingLoss: number; + + /** + * Additional validation metrics + * + * @generated from field: map validation_metrics = 4; + */ + validationMetrics: { [key: string]: number }; + + /** + * Error message if training failed + * + * @generated from field: string error_message = 5; + */ + errorMessage: string; + + /** + * Total training time + * + * @generated from field: int64 training_duration_seconds = 6; + */ + trainingDurationSeconds: bigint; +}; + +/** + * Describes the message ml_training.TrainModelResponse. + * Use `create(TrainModelResponseSchema)` to create a new message. + */ +export const TrainModelResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_ml_training, 21); + +/** + * Individual trial result for tuning job history + * + * @generated from message ml_training.TrialResult + */ +export type TrialResult = Message<"ml_training.TrialResult"> & { + /** + * Trial index + * + * @generated from field: uint32 trial_number = 1; + */ + trialNumber: number; + + /** + * Hyperparameters tested + * + * @generated from field: map params = 2; + */ + params: { [key: string]: number }; + + /** + * Objective metric (e.g., Sharpe ratio) + * + * @generated from field: float objective_value = 3; + */ + objectiveValue: number; + + /** + * Additional metrics + * + * @generated from field: map metrics = 4; + */ + metrics: { [key: string]: number }; + + /** + * Trial outcome state + * + * @generated from field: ml_training.TrialState state = 5; + */ + state: TrialState; + + /** + * Trial start time (Unix timestamp in seconds) + * + * @generated from field: int64 started_at = 6; + */ + startedAt: bigint; + + /** + * Trial completion time (Unix timestamp in seconds) + * + * @generated from field: int64 completed_at = 7; + */ + completedAt: bigint; +}; + +/** + * Describes the message ml_training.TrialResult. + * Use `create(TrialResultSchema)` to create a new message. + */ +export const TrialResultSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_ml_training, 22); + +/** + * Request to stream tuning progress updates + * + * @generated from message ml_training.StreamProgressRequest + */ +export type StreamProgressRequest = Message<"ml_training.StreamProgressRequest"> & { + /** + * Tuning job identifier to subscribe to + * + * @generated from field: string job_id = 1; + */ + jobId: string; +}; + +/** + * Describes the message ml_training.StreamProgressRequest. + * Use `create(StreamProgressRequestSchema)` to create a new message. + */ +export const StreamProgressRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_ml_training, 23); + +/** + * Real-time progress update streamed after each trial completes + * + * @generated from message ml_training.ProgressUpdate + */ +export type ProgressUpdate = Message<"ml_training.ProgressUpdate"> & { + /** + * Tuning job identifier + * + * @generated from field: string job_id = 1; + */ + jobId: string; + + /** + * Current trial number (0-indexed) + * + * @generated from field: uint32 current_trial = 2; + */ + currentTrial: number; + + /** + * Total number of trials + * + * @generated from field: uint32 total_trials = 3; + */ + totalTrials: number; + + /** + * Current trial hyperparameters (as strings for display) + * + * @generated from field: map trial_params = 4; + */ + trialParams: { [key: string]: string }; + + /** + * Current trial's Sharpe ratio (objective value) + * + * @generated from field: float trial_sharpe = 5; + */ + trialSharpe: number; + + /** + * Best Sharpe ratio achieved so far + * + * @generated from field: float best_sharpe_so_far = 6; + */ + bestSharpeSoFar: number; + + /** + * Estimated seconds until completion + * + * @generated from field: uint32 estimated_time_remaining = 7; + */ + estimatedTimeRemaining: number; + + /** + * Current job status + * + * @generated from field: ml_training.TuningJobStatus status = 8; + */ + status: TuningJobStatus; + + /** + * Human-readable status message + * + * @generated from field: string message = 9; + */ + message: string; + + /** + * Update timestamp (Unix seconds) + * + * @generated from field: int64 timestamp = 10; + */ + timestamp: bigint; + + /** + * Type of update (trial completion, heartbeat, job complete) + * + * @generated from field: ml_training.UpdateType update_type = 11; + */ + updateType: UpdateType; +}; + +/** + * Describes the message ml_training.ProgressUpdate. + * Use `create(ProgressUpdateSchema)` to create a new message. + */ +export const ProgressUpdateSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_ml_training, 24); + +/** + * @generated from message ml_training.DataSource + */ +export type DataSource = Message<"ml_training.DataSource"> & { + /** + * @generated from oneof ml_training.DataSource.source + */ + source: { + /** + * @generated from field: string historical_db_query = 1; + */ + value: string; + case: "historicalDbQuery"; + } | { + /** + * @generated from field: string real_time_stream_topic = 2; + */ + value: string; + case: "realTimeStreamTopic"; + } | { + /** + * @generated from field: string file_path = 3; + */ + value: string; + case: "filePath"; + } | { case: undefined; value?: undefined }; + + /** + * Unix timestamp in seconds + * + * @generated from field: int64 start_time = 4; + */ + startTime: bigint; + + /** + * Unix timestamp in seconds + * + * @generated from field: int64 end_time = 5; + */ + endTime: bigint; +}; + +/** + * Describes the message ml_training.DataSource. + * Use `create(DataSourceSchema)` to create a new message. + */ +export const DataSourceSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_ml_training, 25); + +/** + * Provides type-safe hyperparameter configuration. + * + * @generated from message ml_training.Hyperparameters + */ +export type Hyperparameters = Message<"ml_training.Hyperparameters"> & { + /** + * @generated from oneof ml_training.Hyperparameters.model_params + */ + modelParams: { + /** + * @generated from field: ml_training.TlobParams tlob_params = 1; + */ + value: TlobParams; + case: "tlobParams"; + } | { + /** + * @generated from field: ml_training.MambaParams mamba_params = 2; + */ + value: MambaParams; + case: "mambaParams"; + } | { + /** + * @generated from field: ml_training.DqnParams dqn_params = 3; + */ + value: DqnParams; + case: "dqnParams"; + } | { + /** + * @generated from field: ml_training.PpoParams ppo_params = 4; + */ + value: PpoParams; + case: "ppoParams"; + } | { + /** + * @generated from field: ml_training.LiquidParams liquid_params = 5; + */ + value: LiquidParams; + case: "liquidParams"; + } | { + /** + * @generated from field: ml_training.TftParams tft_params = 6; + */ + value: TftParams; + case: "tftParams"; + } | { case: undefined; value?: undefined }; +}; + +/** + * Describes the message ml_training.Hyperparameters. + * Use `create(HyperparametersSchema)` to create a new message. + */ +export const HyperparametersSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_ml_training, 26); + +/** + * TLOB (Time-Limit Order Book) Transformer parameters + * + * @generated from message ml_training.TlobParams + */ +export type TlobParams = Message<"ml_training.TlobParams"> & { + /** + * @generated from field: uint32 epochs = 1; + */ + epochs: number; + + /** + * @generated from field: float learning_rate = 2; + */ + learningRate: number; + + /** + * @generated from field: uint32 batch_size = 3; + */ + batchSize: number; + + /** + * @generated from field: uint32 sequence_length = 4; + */ + sequenceLength: number; + + /** + * @generated from field: uint32 hidden_dim = 5; + */ + hiddenDim: number; + + /** + * @generated from field: uint32 num_heads = 6; + */ + numHeads: number; + + /** + * @generated from field: uint32 num_layers = 7; + */ + numLayers: number; + + /** + * @generated from field: float dropout_rate = 8; + */ + dropoutRate: number; + + /** + * @generated from field: bool use_positional_encoding = 9; + */ + usePositionalEncoding: boolean; +}; + +/** + * Describes the message ml_training.TlobParams. + * Use `create(TlobParamsSchema)` to create a new message. + */ +export const TlobParamsSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_ml_training, 27); + +/** + * MAMBA-2 State Space Model parameters + * + * @generated from message ml_training.MambaParams + */ +export type MambaParams = Message<"ml_training.MambaParams"> & { + /** + * @generated from field: uint32 epochs = 1; + */ + epochs: number; + + /** + * @generated from field: float learning_rate = 2; + */ + learningRate: number; + + /** + * @generated from field: uint32 batch_size = 3; + */ + batchSize: number; + + /** + * @generated from field: uint32 state_dim = 4; + */ + stateDim: number; + + /** + * @generated from field: uint32 hidden_dim = 5; + */ + hiddenDim: number; + + /** + * @generated from field: uint32 num_layers = 6; + */ + numLayers: number; + + /** + * @generated from field: float dt_min = 7; + */ + dtMin: number; + + /** + * @generated from field: float dt_max = 8; + */ + dtMax: number; + + /** + * @generated from field: bool use_cuda_kernels = 9; + */ + useCudaKernels: boolean; +}; + +/** + * Describes the message ml_training.MambaParams. + * Use `create(MambaParamsSchema)` to create a new message. + */ +export const MambaParamsSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_ml_training, 28); + +/** + * DQN (Deep Q-Network) parameters + * + * @generated from message ml_training.DqnParams + */ +export type DqnParams = Message<"ml_training.DqnParams"> & { + /** + * @generated from field: uint32 epochs = 1; + */ + epochs: number; + + /** + * @generated from field: float learning_rate = 2; + */ + learningRate: number; + + /** + * @generated from field: uint32 batch_size = 3; + */ + batchSize: number; + + /** + * @generated from field: uint32 replay_buffer_size = 4; + */ + replayBufferSize: number; + + /** + * @generated from field: float epsilon_start = 5; + */ + epsilonStart: number; + + /** + * @generated from field: float epsilon_end = 6; + */ + epsilonEnd: number; + + /** + * @generated from field: uint32 epsilon_decay_steps = 7; + */ + epsilonDecaySteps: number; + + /** + * @generated from field: float gamma = 8; + */ + gamma: number; + + /** + * @generated from field: uint32 target_update_frequency = 9; + */ + targetUpdateFrequency: number; + + /** + * @generated from field: bool use_double_dqn = 10; + */ + useDoubleDqn: boolean; + + /** + * @generated from field: bool use_dueling = 11; + */ + useDueling: boolean; + + /** + * @generated from field: bool use_prioritized_replay = 12; + */ + usePrioritizedReplay: boolean; +}; + +/** + * Describes the message ml_training.DqnParams. + * Use `create(DqnParamsSchema)` to create a new message. + */ +export const DqnParamsSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_ml_training, 29); + +/** + * PPO (Proximal Policy Optimization) parameters + * + * @generated from message ml_training.PpoParams + */ +export type PpoParams = Message<"ml_training.PpoParams"> & { + /** + * @generated from field: uint32 epochs = 1; + */ + epochs: number; + + /** + * @generated from field: float learning_rate = 2; + */ + learningRate: number; + + /** + * @generated from field: uint32 batch_size = 3; + */ + batchSize: number; + + /** + * @generated from field: float clip_ratio = 4; + */ + clipRatio: number; + + /** + * @generated from field: float value_loss_coef = 5; + */ + valueLossCoef: number; + + /** + * @generated from field: float entropy_coef = 6; + */ + entropyCoef: number; + + /** + * @generated from field: uint32 rollout_steps = 7; + */ + rolloutSteps: number; + + /** + * @generated from field: uint32 minibatch_size = 8; + */ + minibatchSize: number; + + /** + * @generated from field: float gae_lambda = 9; + */ + gaeLambda: number; +}; + +/** + * Describes the message ml_training.PpoParams. + * Use `create(PpoParamsSchema)` to create a new message. + */ +export const PpoParamsSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_ml_training, 30); + +/** + * Liquid Network parameters + * + * @generated from message ml_training.LiquidParams + */ +export type LiquidParams = Message<"ml_training.LiquidParams"> & { + /** + * @generated from field: uint32 epochs = 1; + */ + epochs: number; + + /** + * @generated from field: float learning_rate = 2; + */ + learningRate: number; + + /** + * @generated from field: uint32 batch_size = 3; + */ + batchSize: number; + + /** + * @generated from field: uint32 num_neurons = 4; + */ + numNeurons: number; + + /** + * @generated from field: float tau = 5; + */ + tau: number; + + /** + * @generated from field: float sigma = 6; + */ + sigma: number; + + /** + * @generated from field: bool use_adaptive_tau = 7; + */ + useAdaptiveTau: boolean; +}; + +/** + * Describes the message ml_training.LiquidParams. + * Use `create(LiquidParamsSchema)` to create a new message. + */ +export const LiquidParamsSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_ml_training, 31); + +/** + * Temporal Fusion Transformer parameters + * + * @generated from message ml_training.TftParams + */ +export type TftParams = Message<"ml_training.TftParams"> & { + /** + * @generated from field: uint32 epochs = 1; + */ + epochs: number; + + /** + * @generated from field: float learning_rate = 2; + */ + learningRate: number; + + /** + * @generated from field: uint32 batch_size = 3; + */ + batchSize: number; + + /** + * @generated from field: uint32 hidden_dim = 4; + */ + hiddenDim: number; + + /** + * @generated from field: uint32 num_heads = 5; + */ + numHeads: number; + + /** + * @generated from field: uint32 num_layers = 6; + */ + numLayers: number; + + /** + * @generated from field: uint32 lookback_window = 7; + */ + lookbackWindow: number; + + /** + * @generated from field: uint32 forecast_horizon = 8; + */ + forecastHorizon: number; + + /** + * @generated from field: float dropout_rate = 9; + */ + dropoutRate: number; +}; + +/** + * Describes the message ml_training.TftParams. + * Use `create(TftParamsSchema)` to create a new message. + */ +export const TftParamsSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_ml_training, 32); + +/** + * @generated from message ml_training.ModelDefinition + */ +export type ModelDefinition = Message<"ml_training.ModelDefinition"> & { + /** + * @generated from field: string model_type = 1; + */ + modelType: string; + + /** + * @generated from field: string description = 2; + */ + description: string; + + /** + * @generated from field: ml_training.Hyperparameters default_hyperparameters = 3; + */ + defaultHyperparameters?: Hyperparameters; + + /** + * @generated from field: repeated string required_features = 4; + */ + requiredFeatures: string[]; + + /** + * @generated from field: uint32 estimated_training_time_minutes = 5; + */ + estimatedTrainingTimeMinutes: number; + + /** + * @generated from field: bool requires_gpu = 6; + */ + requiresGpu: boolean; +}; + +/** + * Describes the message ml_training.ModelDefinition. + * Use `create(ModelDefinitionSchema)` to create a new message. + */ +export const ModelDefinitionSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_ml_training, 33); + +/** + * @generated from message ml_training.TrainingJobSummary + */ +export type TrainingJobSummary = Message<"ml_training.TrainingJobSummary"> & { + /** + * @generated from field: string job_id = 1; + */ + jobId: string; + + /** + * @generated from field: string model_type = 2; + */ + modelType: string; + + /** + * @generated from field: ml_training.TrainingStatus status = 3; + */ + status: TrainingStatus; + + /** + * Unix timestamp in seconds + * + * @generated from field: int64 created_at = 4; + */ + createdAt: bigint; + + /** + * Unix timestamp in seconds + * + * @generated from field: int64 started_at = 5; + */ + startedAt: bigint; + + /** + * Unix timestamp in seconds + * + * @generated from field: int64 completed_at = 6; + */ + completedAt: bigint; + + /** + * @generated from field: string description = 7; + */ + description: string; + + /** + * @generated from field: float final_loss = 8; + */ + finalLoss: number; + + /** + * @generated from field: float best_validation_score = 9; + */ + bestValidationScore: number; + + /** + * @generated from field: map tags = 10; + */ + tags: { [key: string]: string }; +}; + +/** + * Describes the message ml_training.TrainingJobSummary. + * Use `create(TrainingJobSummarySchema)` to create a new message. + */ +export const TrainingJobSummarySchema: GenMessage = /*@__PURE__*/ + messageDesc(file_ml_training, 34); + +/** + * @generated from message ml_training.TrainingJobDetails + */ +export type TrainingJobDetails = Message<"ml_training.TrainingJobDetails"> & { + /** + * @generated from field: string job_id = 1; + */ + jobId: string; + + /** + * @generated from field: string model_type = 2; + */ + modelType: string; + + /** + * @generated from field: ml_training.TrainingStatus status = 3; + */ + status: TrainingStatus; + + /** + * Unix timestamp in seconds + * + * @generated from field: int64 created_at = 4; + */ + createdAt: bigint; + + /** + * Unix timestamp in seconds + * + * @generated from field: int64 started_at = 5; + */ + startedAt: bigint; + + /** + * Unix timestamp in seconds + * + * @generated from field: int64 completed_at = 6; + */ + completedAt: bigint; + + /** + * @generated from field: string description = 7; + */ + description: string; + + /** + * @generated from field: ml_training.Hyperparameters hyperparameters = 8; + */ + hyperparameters?: Hyperparameters; + + /** + * @generated from field: ml_training.DataSource data_source = 9; + */ + dataSource?: DataSource; + + /** + * @generated from field: repeated ml_training.TrainingStatusUpdate status_history = 10; + */ + statusHistory: TrainingStatusUpdate[]; + + /** + * @generated from field: ml_training.FinancialMetrics final_financial_metrics = 11; + */ + finalFinancialMetrics?: FinancialMetrics; + + /** + * @generated from field: string model_artifact_path = 12; + */ + modelArtifactPath: string; + + /** + * @generated from field: map tags = 13; + */ + tags: { [key: string]: string }; + + /** + * @generated from field: string error_message = 14; + */ + errorMessage: string; +}; + +/** + * Describes the message ml_training.TrainingJobDetails. + * Use `create(TrainingJobDetailsSchema)` to create a new message. + */ +export const TrainingJobDetailsSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_ml_training, 35); + +/** + * @generated from message ml_training.FinancialMetrics + */ +export type FinancialMetrics = Message<"ml_training.FinancialMetrics"> & { + /** + * @generated from field: float simulated_return = 1; + */ + simulatedReturn: number; + + /** + * @generated from field: float sharpe_ratio = 2; + */ + sharpeRatio: number; + + /** + * @generated from field: float max_drawdown = 3; + */ + maxDrawdown: number; + + /** + * @generated from field: float hit_rate = 4; + */ + hitRate: number; + + /** + * @generated from field: float avg_prediction_error_bps = 5; + */ + avgPredictionErrorBps: number; + + /** + * @generated from field: float risk_adjusted_return = 6; + */ + riskAdjustedReturn: number; + + /** + * @generated from field: float var_5pct = 7; + */ + var5pct: number; + + /** + * @generated from field: float expected_shortfall = 8; + */ + expectedShortfall: number; +}; + +/** + * Describes the message ml_training.FinancialMetrics. + * Use `create(FinancialMetricsSchema)` to create a new message. + */ +export const FinancialMetricsSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_ml_training, 36); + +/** + * @generated from message ml_training.ResourceUsage + */ +export type ResourceUsage = Message<"ml_training.ResourceUsage"> & { + /** + * @generated from field: float cpu_usage_percent = 1; + */ + cpuUsagePercent: number; + + /** + * @generated from field: float memory_usage_gb = 2; + */ + memoryUsageGb: number; + + /** + * @generated from field: float gpu_usage_percent = 3; + */ + gpuUsagePercent: number; + + /** + * @generated from field: float gpu_memory_usage_gb = 4; + */ + gpuMemoryUsageGb: number; + + /** + * @generated from field: uint32 active_workers = 5; + */ + activeWorkers: number; +}; + +/** + * Describes the message ml_training.ResourceUsage. + * Use `create(ResourceUsageSchema)` to create a new message. + */ +export const ResourceUsageSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_ml_training, 37); + +/** + * Request to start batch tuning for multiple models + * + * @generated from message ml_training.BatchStartTuningJobsRequest + */ +export type BatchStartTuningJobsRequest = Message<"ml_training.BatchStartTuningJobsRequest"> & { + /** + * List of models to tune (DQN, PPO, MAMBA_2, TFT, etc.) + * + * @generated from field: repeated string model_types = 1; + */ + modelTypes: string[]; + + /** + * Number of trials for each model + * + * @generated from field: uint32 trials_per_model = 2; + */ + trialsPerModel: number; + + /** + * Path to tuning configuration file + * + * @generated from field: string config_path = 3; + */ + configPath: string; + + /** + * Training data source for all models + * + * @generated from field: ml_training.DataSource data_source = 4; + */ + dataSource?: DataSource; + + /** + * Whether to use GPU acceleration + * + * @generated from field: bool use_gpu = 5; + */ + useGpu: boolean; + + /** + * Automatically export best params to YAML (default: true) + * + * @generated from field: bool auto_export_yaml = 6; + */ + autoExportYaml: boolean; + + /** + * Custom YAML export path (default: ml/config/best_hyperparameters.yaml) + * + * @generated from field: string yaml_export_path = 7; + */ + yamlExportPath: string; + + /** + * Optional batch job description + * + * @generated from field: string description = 8; + */ + description: string; + + /** + * Optional categorization tags + * + * @generated from field: map tags = 9; + */ + tags: { [key: string]: string }; +}; + +/** + * Describes the message ml_training.BatchStartTuningJobsRequest. + * Use `create(BatchStartTuningJobsRequestSchema)` to create a new message. + */ +export const BatchStartTuningJobsRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_ml_training, 38); + +/** + * @generated from message ml_training.BatchStartTuningJobsResponse + */ +export type BatchStartTuningJobsResponse = Message<"ml_training.BatchStartTuningJobsResponse"> & { + /** + * Unique batch job identifier + * + * @generated from field: string batch_id = 1; + */ + batchId: string; + + /** + * Model execution order (after dependency resolution) + * + * @generated from field: repeated string execution_order = 2; + */ + executionOrder: string[]; + + /** + * Human-readable status message + * + * @generated from field: string message = 3; + */ + message: string; + + /** + * Initial batch status + * + * @generated from field: ml_training.BatchTuningStatus status = 4; + */ + status: BatchTuningStatus; +}; + +/** + * Describes the message ml_training.BatchStartTuningJobsResponse. + * Use `create(BatchStartTuningJobsResponseSchema)` to create a new message. + */ +export const BatchStartTuningJobsResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_ml_training, 39); + +/** + * Request to get batch tuning job status + * + * @generated from message ml_training.GetBatchTuningStatusRequest + */ +export type GetBatchTuningStatusRequest = Message<"ml_training.GetBatchTuningStatusRequest"> & { + /** + * Batch job identifier + * + * @generated from field: string batch_id = 1; + */ + batchId: string; +}; + +/** + * Describes the message ml_training.GetBatchTuningStatusRequest. + * Use `create(GetBatchTuningStatusRequestSchema)` to create a new message. + */ +export const GetBatchTuningStatusRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_ml_training, 40); + +/** + * @generated from message ml_training.GetBatchTuningStatusResponse + */ +export type GetBatchTuningStatusResponse = Message<"ml_training.GetBatchTuningStatusResponse"> & { + /** + * Batch job identifier + * + * @generated from field: string batch_id = 1; + */ + batchId: string; + + /** + * Current batch status + * + * @generated from field: ml_training.BatchTuningStatus status = 2; + */ + status: BatchTuningStatus; + + /** + * Index of currently executing model (0-based) + * + * @generated from field: uint32 current_model_index = 3; + */ + currentModelIndex: number; + + /** + * Total number of models in batch + * + * @generated from field: uint32 total_models = 4; + */ + totalModels: number; + + /** + * Results for completed models + * + * @generated from field: repeated ml_training.ModelTuningResult results = 5; + */ + results: ModelTuningResult[]; + + /** + * Currently tuning model type + * + * @generated from field: string current_model = 6; + */ + currentModel: string; + + /** + * Batch start time (Unix timestamp) + * + * @generated from field: int64 started_at = 7; + */ + startedAt: bigint; + + /** + * Last update time (Unix timestamp) + * + * @generated from field: int64 updated_at = 8; + */ + updatedAt: bigint; + + /** + * Estimated completion time (Unix timestamp) + * + * @generated from field: int64 estimated_completion_time = 9; + */ + estimatedCompletionTime: bigint; + + /** + * Path where YAML will be exported + * + * @generated from field: string yaml_export_path = 10; + */ + yamlExportPath: string; +}; + +/** + * Describes the message ml_training.GetBatchTuningStatusResponse. + * Use `create(GetBatchTuningStatusResponseSchema)` to create a new message. + */ +export const GetBatchTuningStatusResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_ml_training, 41); + +/** + * Individual model tuning result within batch + * + * @generated from message ml_training.ModelTuningResult + */ +export type ModelTuningResult = Message<"ml_training.ModelTuningResult"> & { + /** + * Model type (DQN, PPO, etc.) + * + * @generated from field: string model_type = 1; + */ + modelType: string; + + /** + * Individual tuning job ID + * + * @generated from field: string job_id = 2; + */ + jobId: string; + + /** + * Model tuning status + * + * @generated from field: ml_training.TuningJobStatus status = 3; + */ + status: TuningJobStatus; + + /** + * Best hyperparameters found + * + * @generated from field: map best_params = 4; + */ + bestParams: { [key: string]: number }; + + /** + * Best metrics achieved + * + * @generated from field: map best_metrics = 5; + */ + bestMetrics: { [key: string]: number }; + + /** + * Number of trials completed + * + * @generated from field: uint32 trials_completed = 6; + */ + trialsCompleted: number; + + /** + * Model tuning start time + * + * @generated from field: int64 started_at = 7; + */ + startedAt: bigint; + + /** + * Model tuning completion time + * + * @generated from field: int64 completed_at = 8; + */ + completedAt: bigint; + + /** + * Error message if failed + * + * @generated from field: string error_message = 9; + */ + errorMessage: string; +}; + +/** + * Describes the message ml_training.ModelTuningResult. + * Use `create(ModelTuningResultSchema)` to create a new message. + */ +export const ModelTuningResultSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_ml_training, 42); + +/** + * Request to stop batch tuning job + * + * @generated from message ml_training.StopBatchTuningJobRequest + */ +export type StopBatchTuningJobRequest = Message<"ml_training.StopBatchTuningJobRequest"> & { + /** + * Batch job identifier + * + * @generated from field: string batch_id = 1; + */ + batchId: string; + + /** + * Optional reason for stopping + * + * @generated from field: string reason = 2; + */ + reason: string; +}; + +/** + * Describes the message ml_training.StopBatchTuningJobRequest. + * Use `create(StopBatchTuningJobRequestSchema)` to create a new message. + */ +export const StopBatchTuningJobRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_ml_training, 43); + +/** + * @generated from message ml_training.StopBatchTuningJobResponse + */ +export type StopBatchTuningJobResponse = Message<"ml_training.StopBatchTuningJobResponse"> & { + /** + * Whether stop was successful + * + * @generated from field: bool success = 1; + */ + success: boolean; + + /** + * Human-readable status message + * + * @generated from field: string message = 2; + */ + message: string; + + /** + * Final batch status + * + * @generated from field: ml_training.BatchTuningStatus final_status = 3; + */ + finalStatus: BatchTuningStatus; + + /** + * Results for completed models + * + * @generated from field: repeated ml_training.ModelTuningResult completed_results = 4; + */ + completedResults: ModelTuningResult[]; +}; + +/** + * Describes the message ml_training.StopBatchTuningJobResponse. + * Use `create(StopBatchTuningJobResponseSchema)` to create a new message. + */ +export const StopBatchTuningJobResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_ml_training, 44); + +/** + * @generated from message ml_training.JobCompletionReport + */ +export type JobCompletionReport = Message<"ml_training.JobCompletionReport"> & { + /** + * @generated from field: string job_id = 1; + */ + jobId: string; + + /** + * @generated from field: string s3_path = 2; + */ + s3Path: string; + + /** + * @generated from field: bool success = 3; + */ + success: boolean; + + /** + * @generated from field: string error_message = 4; + */ + errorMessage: string; + + /** + * @generated from field: map metrics = 5; + */ + metrics: { [key: string]: number }; +}; + +/** + * Describes the message ml_training.JobCompletionReport. + * Use `create(JobCompletionReportSchema)` to create a new message. + */ +export const JobCompletionReportSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_ml_training, 45); + +/** + * @generated from message ml_training.JobCompletionAck + */ +export type JobCompletionAck = Message<"ml_training.JobCompletionAck"> & { + /** + * @generated from field: bool accepted = 1; + */ + accepted: boolean; + + /** + * @generated from field: string promotion_status = 2; + */ + promotionStatus: string; +}; + +/** + * Describes the message ml_training.JobCompletionAck. + * Use `create(JobCompletionAckSchema)` to create a new message. + */ +export const JobCompletionAckSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_ml_training, 46); + +/** + * @generated from message ml_training.ListPendingPromotionsRequest + */ +export type ListPendingPromotionsRequest = Message<"ml_training.ListPendingPromotionsRequest"> & { +}; + +/** + * Describes the message ml_training.ListPendingPromotionsRequest. + * Use `create(ListPendingPromotionsRequestSchema)` to create a new message. + */ +export const ListPendingPromotionsRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_ml_training, 47); + +/** + * @generated from message ml_training.ListPendingPromotionsResponse + */ +export type ListPendingPromotionsResponse = Message<"ml_training.ListPendingPromotionsResponse"> & { + /** + * @generated from field: repeated ml_training.PendingPromotion promotions = 1; + */ + promotions: PendingPromotion[]; +}; + +/** + * Describes the message ml_training.ListPendingPromotionsResponse. + * Use `create(ListPendingPromotionsResponseSchema)` to create a new message. + */ +export const ListPendingPromotionsResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_ml_training, 48); + +/** + * @generated from message ml_training.PendingPromotion + */ +export type PendingPromotion = Message<"ml_training.PendingPromotion"> & { + /** + * @generated from field: string model_id = 1; + */ + modelId: string; + + /** + * @generated from field: string model_type = 2; + */ + modelType: string; + + /** + * @generated from field: string symbol = 3; + */ + symbol: string; + + /** + * @generated from field: string s3_path = 4; + */ + s3Path: string; + + /** + * @generated from field: map new_metrics = 5; + */ + newMetrics: { [key: string]: number }; + + /** + * @generated from field: map current_metrics = 6; + */ + currentMetrics: { [key: string]: number }; + + /** + * @generated from field: int64 trained_at = 7; + */ + trainedAt: bigint; + + /** + * @generated from field: string job_id = 8; + */ + jobId: string; +}; + +/** + * Describes the message ml_training.PendingPromotion. + * Use `create(PendingPromotionSchema)` to create a new message. + */ +export const PendingPromotionSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_ml_training, 49); + +/** + * @generated from message ml_training.ApprovePromotionRequest + */ +export type ApprovePromotionRequest = Message<"ml_training.ApprovePromotionRequest"> & { + /** + * @generated from field: string model_id = 1; + */ + modelId: string; +}; + +/** + * Describes the message ml_training.ApprovePromotionRequest. + * Use `create(ApprovePromotionRequestSchema)` to create a new message. + */ +export const ApprovePromotionRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_ml_training, 50); + +/** + * @generated from message ml_training.ApprovePromotionResponse + */ +export type ApprovePromotionResponse = Message<"ml_training.ApprovePromotionResponse"> & { + /** + * @generated from field: bool success = 1; + */ + success: boolean; + + /** + * @generated from field: string message = 2; + */ + message: string; +}; + +/** + * Describes the message ml_training.ApprovePromotionResponse. + * Use `create(ApprovePromotionResponseSchema)` to create a new message. + */ +export const ApprovePromotionResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_ml_training, 51); + +/** + * @generated from message ml_training.RejectPromotionRequest + */ +export type RejectPromotionRequest = Message<"ml_training.RejectPromotionRequest"> & { + /** + * @generated from field: string model_id = 1; + */ + modelId: string; + + /** + * @generated from field: string reason = 2; + */ + reason: string; +}; + +/** + * Describes the message ml_training.RejectPromotionRequest. + * Use `create(RejectPromotionRequestSchema)` to create a new message. + */ +export const RejectPromotionRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_ml_training, 52); + +/** + * @generated from message ml_training.RejectPromotionResponse + */ +export type RejectPromotionResponse = Message<"ml_training.RejectPromotionResponse"> & { + /** + * @generated from field: bool success = 1; + */ + success: boolean; + + /** + * @generated from field: string message = 2; + */ + message: string; +}; + +/** + * Describes the message ml_training.RejectPromotionResponse. + * Use `create(RejectPromotionResponseSchema)` to create a new message. + */ +export const RejectPromotionResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_ml_training, 53); + +/** + * @generated from message ml_training.ApproveModelRequest + */ +export type ApproveModelRequest = Message<"ml_training.ApproveModelRequest"> & { + /** + * @generated from field: string model_id = 1; + */ + modelId: string; + + /** + * e.g. "production", "staging", "canary" + * + * @generated from field: string promoted_to = 2; + */ + promotedTo: string; +}; + +/** + * Describes the message ml_training.ApproveModelRequest. + * Use `create(ApproveModelRequestSchema)` to create a new message. + */ +export const ApproveModelRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_ml_training, 54); + +/** + * @generated from message ml_training.ApproveModelResponse + */ +export type ApproveModelResponse = Message<"ml_training.ApproveModelResponse"> & { + /** + * @generated from field: bool success = 1; + */ + success: boolean; + + /** + * @generated from field: string message = 2; + */ + message: string; +}; + +/** + * Describes the message ml_training.ApproveModelResponse. + * Use `create(ApproveModelResponseSchema)` to create a new message. + */ +export const ApproveModelResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_ml_training, 55); + +/** + * @generated from message ml_training.RejectModelRequest + */ +export type RejectModelRequest = Message<"ml_training.RejectModelRequest"> & { + /** + * @generated from field: string model_id = 1; + */ + modelId: string; + + /** + * @generated from field: string reason = 2; + */ + reason: string; +}; + +/** + * Describes the message ml_training.RejectModelRequest. + * Use `create(RejectModelRequestSchema)` to create a new message. + */ +export const RejectModelRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_ml_training, 56); + +/** + * @generated from message ml_training.RejectModelResponse + */ +export type RejectModelResponse = Message<"ml_training.RejectModelResponse"> & { + /** + * @generated from field: bool success = 1; + */ + success: boolean; + + /** + * @generated from field: string message = 2; + */ + message: string; +}; + +/** + * Describes the message ml_training.RejectModelResponse. + * Use `create(RejectModelResponseSchema)` to create a new message. + */ +export const RejectModelResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_ml_training, 57); + +/** + * Training mode selection + * + * @generated from enum ml_training.TrainingMode + */ +export enum TrainingMode { + /** + * Full training from scratch (default, backward-compatible) + * + * @generated from enum value: TRAINING_MODE_FULL = 0; + */ + FULL = 0, + + /** + * Fine-tune from existing checkpoint + * + * @generated from enum value: TRAINING_MODE_FINE_TUNE = 1; + */ + FINE_TUNE = 1, +} + +/** + * Describes the enum ml_training.TrainingMode. + */ +export const TrainingModeSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_ml_training, 0); + +/** + * Type of progress update + * + * @generated from enum ml_training.UpdateType + */ +export enum UpdateType { + /** + * Unknown/unspecified + * + * @generated from enum value: UPDATE_UNKNOWN = 0; + */ + UPDATE_UNKNOWN = 0, + + /** + * Trial completed + * + * @generated from enum value: UPDATE_TRIAL_COMPLETE = 1; + */ + UPDATE_TRIAL_COMPLETE = 1, + + /** + * Keepalive heartbeat (no trial change) + * + * @generated from enum value: UPDATE_HEARTBEAT = 2; + */ + UPDATE_HEARTBEAT = 2, + + /** + * Job completed/stopped/failed + * + * @generated from enum value: UPDATE_JOB_COMPLETE = 3; + */ + UPDATE_JOB_COMPLETE = 3, +} + +/** + * Describes the enum ml_training.UpdateType. + */ +export const UpdateTypeSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_ml_training, 1); + +/** + * Current status of a training job + * + * @generated from enum ml_training.TrainingStatus + */ +export enum TrainingStatus { + /** + * Default/unknown status + * + * @generated from enum value: UNKNOWN = 0; + */ + UNKNOWN = 0, + + /** + * Job queued, waiting to start + * + * @generated from enum value: PENDING = 1; + */ + PENDING = 1, + + /** + * Job currently executing + * + * @generated from enum value: RUNNING = 2; + */ + RUNNING = 2, + + /** + * Job finished successfully + * + * @generated from enum value: COMPLETED = 3; + */ + COMPLETED = 3, + + /** + * Job failed with error + * + * @generated from enum value: FAILED = 4; + */ + FAILED = 4, + + /** + * Job manually stopped + * + * @generated from enum value: STOPPED = 5; + */ + STOPPED = 5, + + /** + * Job temporarily paused + * + * @generated from enum value: PAUSED = 6; + */ + PAUSED = 6, +} + +/** + * Describes the enum ml_training.TrainingStatus. + */ +export const TrainingStatusSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_ml_training, 2); + +/** + * Status of a hyperparameter tuning job + * + * @generated from enum ml_training.TuningJobStatus + */ +export enum TuningJobStatus { + /** + * Default/unknown status + * + * @generated from enum value: TUNING_UNKNOWN = 0; + */ + TUNING_UNKNOWN = 0, + + /** + * Job queued, waiting to start + * + * @generated from enum value: TUNING_PENDING = 1; + */ + TUNING_PENDING = 1, + + /** + * Job currently executing trials + * + * @generated from enum value: TUNING_RUNNING = 2; + */ + TUNING_RUNNING = 2, + + /** + * Job finished all trials successfully + * + * @generated from enum value: TUNING_COMPLETED = 3; + */ + TUNING_COMPLETED = 3, + + /** + * Job failed with error + * + * @generated from enum value: TUNING_FAILED = 4; + */ + TUNING_FAILED = 4, + + /** + * Job manually stopped before completion + * + * @generated from enum value: TUNING_STOPPED = 5; + */ + TUNING_STOPPED = 5, +} + +/** + * Describes the enum ml_training.TuningJobStatus. + */ +export const TuningJobStatusSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_ml_training, 3); + +/** + * Outcome state of an individual trial + * + * @generated from enum ml_training.TrialState + */ +export enum TrialState { + /** + * Default/unknown state + * + * @generated from enum value: TRIAL_UNKNOWN = 0; + */ + TRIAL_UNKNOWN = 0, + + /** + * Trial currently executing + * + * @generated from enum value: TRIAL_RUNNING = 1; + */ + TRIAL_RUNNING = 1, + + /** + * Trial completed successfully + * + * @generated from enum value: TRIAL_COMPLETE = 2; + */ + TRIAL_COMPLETE = 2, + + /** + * Trial pruned by Optuna (early stopping) + * + * @generated from enum value: TRIAL_PRUNED = 3; + */ + TRIAL_PRUNED = 3, + + /** + * Trial failed with error + * + * @generated from enum value: TRIAL_FAILED = 4; + */ + TRIAL_FAILED = 4, +} + +/** + * Describes the enum ml_training.TrialState. + */ +export const TrialStateSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_ml_training, 4); + +/** + * Batch tuning job status + * + * @generated from enum ml_training.BatchTuningStatus + */ +export enum BatchTuningStatus { + /** + * Default/unknown status + * + * @generated from enum value: BATCH_UNKNOWN = 0; + */ + BATCH_UNKNOWN = 0, + + /** + * Batch queued, waiting to start + * + * @generated from enum value: BATCH_PENDING = 1; + */ + BATCH_PENDING = 1, + + /** + * Batch currently executing models + * + * @generated from enum value: BATCH_RUNNING = 2; + */ + BATCH_RUNNING = 2, + + /** + * All models completed successfully + * + * @generated from enum value: BATCH_COMPLETED = 3; + */ + BATCH_COMPLETED = 3, + + /** + * Some models succeeded, some failed + * + * @generated from enum value: BATCH_PARTIALLY_COMPLETED = 4; + */ + BATCH_PARTIALLY_COMPLETED = 4, + + /** + * Batch failed (all models failed or critical error) + * + * @generated from enum value: BATCH_FAILED = 5; + */ + BATCH_FAILED = 5, + + /** + * Batch manually stopped + * + * @generated from enum value: BATCH_STOPPED = 6; + */ + BATCH_STOPPED = 6, +} + +/** + * Describes the enum ml_training.BatchTuningStatus. + */ +export const BatchTuningStatusSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_ml_training, 5); + +/** + * ML Training Service provides comprehensive machine learning model training capabilities for HFT systems. + * This service manages training jobs for MAMBA-2, TLOB transformers, DQN, PPO, Liquid Networks, and TFT models + * with real-time progress monitoring, resource management, and performance tracking. + * + * @generated from service ml_training.MLTrainingService + */ +export const MLTrainingService: GenService<{ + /** + * Training Job Management + * Initiates a new training job and returns job ID immediately + * + * @generated from rpc ml_training.MLTrainingService.StartTraining + */ + startTraining: { + methodKind: "unary"; + input: typeof StartTrainingRequestSchema; + output: typeof StartTrainingResponseSchema; + }, + /** + * Subscribe to real-time training progress and status updates + * + * @generated from rpc ml_training.MLTrainingService.SubscribeToTrainingStatus + */ + subscribeToTrainingStatus: { + methodKind: "server_streaming"; + input: typeof SubscribeToTrainingStatusRequestSchema; + output: typeof TrainingStatusUpdateSchema; + }, + /** + * Stop a running training job (idempotent operation) + * + * @generated from rpc ml_training.MLTrainingService.StopTraining + */ + stopTraining: { + methodKind: "unary"; + input: typeof StopTrainingRequestSchema; + output: typeof StopTrainingResponseSchema; + }, + /** + * Model and Job Discovery + * List available ML models with their training parameters + * + * @generated from rpc ml_training.MLTrainingService.ListAvailableModels + */ + listAvailableModels: { + methodKind: "unary"; + input: typeof ListAvailableModelsRequestSchema; + output: typeof ListAvailableModelsResponseSchema; + }, + /** + * Get paginated list of training job history + * + * @generated from rpc ml_training.MLTrainingService.ListTrainingJobs + */ + listTrainingJobs: { + methodKind: "unary"; + input: typeof ListTrainingJobsRequestSchema; + output: typeof ListTrainingJobsResponseSchema; + }, + /** + * Get comprehensive details for a specific training job + * + * @generated from rpc ml_training.MLTrainingService.GetTrainingJobDetails + */ + getTrainingJobDetails: { + methodKind: "unary"; + input: typeof GetTrainingJobDetailsRequestSchema; + output: typeof GetTrainingJobDetailsResponseSchema; + }, + /** + * Service Health and Status + * Check service health and resource availability + * + * @generated from rpc ml_training.MLTrainingService.HealthCheck + */ + healthCheck: { + methodKind: "unary"; + input: typeof HealthCheckRequestSchema; + output: typeof HealthCheckResponseSchema; + }, + /** + * Hyperparameter Tuning Management + * Start a new hyperparameter tuning job using Optuna + * + * @generated from rpc ml_training.MLTrainingService.StartTuningJob + */ + startTuningJob: { + methodKind: "unary"; + input: typeof StartTuningJobRequestSchema; + output: typeof StartTuningJobResponseSchema; + }, + /** + * Get current status and best parameters from a tuning job + * + * @generated from rpc ml_training.MLTrainingService.GetTuningJobStatus + */ + getTuningJobStatus: { + methodKind: "unary"; + input: typeof GetTuningJobStatusRequestSchema; + output: typeof GetTuningJobStatusResponseSchema; + }, + /** + * Stop a running hyperparameter tuning job + * + * @generated from rpc ml_training.MLTrainingService.StopTuningJob + */ + stopTuningJob: { + methodKind: "unary"; + input: typeof StopTuningJobRequestSchema; + output: typeof StopTuningJobResponseSchema; + }, + /** + * INTERNAL: Train a single model instance with specific hyperparameters (called by Optuna subprocess) + * + * @generated from rpc ml_training.MLTrainingService.TrainModel + */ + trainModel: { + methodKind: "unary"; + input: typeof TrainModelRequestSchema; + output: typeof TrainModelResponseSchema; + }, + /** + * Stream real-time tuning progress updates (trial completion events) + * + * @generated from rpc ml_training.MLTrainingService.StreamTuningProgress + */ + streamTuningProgress: { + methodKind: "server_streaming"; + input: typeof StreamProgressRequestSchema; + output: typeof ProgressUpdateSchema; + }, + /** + * Batch Tuning Management + * Start batch tuning job for multiple models with automatic dependency resolution + * + * @generated from rpc ml_training.MLTrainingService.BatchStartTuningJobs + */ + batchStartTuningJobs: { + methodKind: "unary"; + input: typeof BatchStartTuningJobsRequestSchema; + output: typeof BatchStartTuningJobsResponseSchema; + }, + /** + * Get batch tuning job status with per-model results + * + * @generated from rpc ml_training.MLTrainingService.GetBatchTuningStatus + */ + getBatchTuningStatus: { + methodKind: "unary"; + input: typeof GetBatchTuningStatusRequestSchema; + output: typeof GetBatchTuningStatusResponseSchema; + }, + /** + * Stop a running batch tuning job + * + * @generated from rpc ml_training.MLTrainingService.StopBatchTuningJob + */ + stopBatchTuningJob: { + methodKind: "unary"; + input: typeof StopBatchTuningJobRequestSchema; + output: typeof StopBatchTuningJobResponseSchema; + }, + /** + * Job Completion Callback (called by training-uploader sidecar) + * + * @generated from rpc ml_training.MLTrainingService.ReportJobCompletion + */ + reportJobCompletion: { + methodKind: "unary"; + input: typeof JobCompletionReportSchema; + output: typeof JobCompletionAckSchema; + }, + /** + * Model Promotion Management + * + * @generated from rpc ml_training.MLTrainingService.ListPendingPromotions + */ + listPendingPromotions: { + methodKind: "unary"; + input: typeof ListPendingPromotionsRequestSchema; + output: typeof ListPendingPromotionsResponseSchema; + }, + /** + * @generated from rpc ml_training.MLTrainingService.ApprovePromotion + */ + approvePromotion: { + methodKind: "unary"; + input: typeof ApprovePromotionRequestSchema; + output: typeof ApprovePromotionResponseSchema; + }, + /** + * @generated from rpc ml_training.MLTrainingService.RejectPromotion + */ + rejectPromotion: { + methodKind: "unary"; + input: typeof RejectPromotionRequestSchema; + output: typeof RejectPromotionResponseSchema; + }, + /** + * Model approval / rejection (dashboard-facing, delegates to promotion pipeline) + * + * @generated from rpc ml_training.MLTrainingService.ApproveModel + */ + approveModel: { + methodKind: "unary"; + input: typeof ApproveModelRequestSchema; + output: typeof ApproveModelResponseSchema; + }, + /** + * @generated from rpc ml_training.MLTrainingService.RejectModel + */ + rejectModel: { + methodKind: "unary"; + input: typeof RejectModelRequestSchema; + output: typeof RejectModelResponseSchema; + }, +}> = /*@__PURE__*/ + serviceDesc(file_ml_training, 0); + diff --git a/web-dashboard/src/gen/monitoring_pb.ts b/web-dashboard/src/gen/monitoring_pb.ts new file mode 100644 index 000000000..73716c824 --- /dev/null +++ b/web-dashboard/src/gen/monitoring_pb.ts @@ -0,0 +1,2342 @@ +// @generated by protoc-gen-es v2.11.0 with parameter "target=ts" +// @generated from file monitoring.proto (package monitoring, syntax proto3) +/* eslint-disable */ + +import type { GenEnum, GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2"; +import { enumDesc, fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv2"; +import type { Message } from "@bufbuild/protobuf"; + +/** + * Describes the file monitoring.proto. + */ +export const file_monitoring: GenFile = /*@__PURE__*/ + fileDesc("ChBtb25pdG9yaW5nLnByb3RvEgptb25pdG9yaW5nIi8KFkdldFN5c3RlbVN0YXR1c1JlcXVlc3QSFQoNc2VydmljZV9uYW1lcxgBIAMoCSKTAQoXR2V0U3lzdGVtU3RhdHVzUmVzcG9uc2USMAoOb3ZlcmFsbF9zdGF0dXMYASABKAsyGC5tb25pdG9yaW5nLlN5c3RlbVN0YXR1cxIzChBzZXJ2aWNlX3N0YXR1c2VzGAIgAygLMhkubW9uaXRvcmluZy5TZXJ2aWNlU3RhdHVzEhEKCXRpbWVzdGFtcBgDIAEoAyJ2ChlTdHJlYW1TeXN0ZW1TdGF0dXNSZXF1ZXN0EhUKDXNlcnZpY2VfbmFtZXMYASADKAkSJQoYdXBkYXRlX2ZyZXF1ZW5jeV9zZWNvbmRzGAIgASgFSACIAQFCGwoZX3VwZGF0ZV9mcmVxdWVuY3lfc2Vjb25kcyJDChVHZXRIZWFsdGhDaGVja1JlcXVlc3QSGQoMc2VydmljZV9uYW1lGAEgASgJSACIAQFCDwoNX3NlcnZpY2VfbmFtZSKMAQoWR2V0SGVhbHRoQ2hlY2tSZXNwb25zZRIvCg1oZWFsdGhfc3RhdHVzGAEgASgOMhgubW9uaXRvcmluZy5IZWFsdGhTdGF0dXMSLgoNaGVhbHRoX2NoZWNrcxgCIAMoCzIXLm1vbml0b3JpbmcuSGVhbHRoQ2hlY2sSEQoJdGltZXN0YW1wGAMgASgDIr4BChFHZXRNZXRyaWNzUmVxdWVzdBIUCgxtZXRyaWNfbmF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XZlVHJhaW5pbmdNZXRyaWNzUmVzcG9uc2USbwoVU3RyZWFtVHJhaW5pbmdNZXRyaWNzEigubW9uaXRvcmluZy5TdHJlYW1UcmFpbmluZ01ldHJpY3NSZXF1ZXN0GioubW9uaXRvcmluZy5HZXRMaXZlVHJhaW5pbmdNZXRyaWNzUmVzcG9uc2UwARJaCg9HZXRFcG9jaEhpc3RvcnkSIi5tb25pdG9yaW5nLkdldEVwb2NoSGlzdG9yeVJlcXVlc3QaIy5tb25pdG9yaW5nLkdldEVwb2NoSGlzdG9yeVJlc3BvbnNlEmIKFFN1YnNjcmliZUNsdXN0ZXJQb2RzEicubW9uaXRvcmluZy5TdWJzY3JpYmVDbHVzdGVyUG9kc1JlcXVlc3QaHy5tb25pdG9yaW5nLkNsdXN0ZXJQb2RzUmVzcG9uc2UwAWIGcHJvdG8z"); + +/** + * @generated from message monitoring.GetSystemStatusRequest + */ +export type GetSystemStatusRequest = Message<"monitoring.GetSystemStatusRequest"> & { + /** + * @generated from field: repeated string service_names = 1; + */ + serviceNames: string[]; +}; + +/** + * Describes the message monitoring.GetSystemStatusRequest. + * Use `create(GetSystemStatusRequestSchema)` to create a new message. + */ +export const GetSystemStatusRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_monitoring, 0); + +/** + * @generated from message monitoring.GetSystemStatusResponse + */ +export type GetSystemStatusResponse = Message<"monitoring.GetSystemStatusResponse"> & { + /** + * @generated from field: monitoring.SystemStatus overall_status = 1; + */ + overallStatus?: SystemStatus; + + /** + * @generated from field: repeated monitoring.ServiceStatus service_statuses = 2; + */ + serviceStatuses: ServiceStatus[]; + + /** + * @generated from field: int64 timestamp = 3; + */ + timestamp: bigint; +}; + +/** + * Describes the message monitoring.GetSystemStatusResponse. + * Use `create(GetSystemStatusResponseSchema)` to create a new message. + */ +export const GetSystemStatusResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_monitoring, 1); + +/** + * @generated from message monitoring.StreamSystemStatusRequest + */ +export type StreamSystemStatusRequest = Message<"monitoring.StreamSystemStatusRequest"> & { + /** + * @generated from field: repeated string service_names = 1; + */ + serviceNames: string[]; + + /** + * @generated from field: optional int32 update_frequency_seconds = 2; + */ + updateFrequencySeconds?: number; +}; + +/** + * Describes the message monitoring.StreamSystemStatusRequest. + * Use `create(StreamSystemStatusRequestSchema)` to create a new message. + */ +export const StreamSystemStatusRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_monitoring, 2); + +/** + * @generated from message monitoring.GetHealthCheckRequest + */ +export type GetHealthCheckRequest = Message<"monitoring.GetHealthCheckRequest"> & { + /** + * @generated from field: optional string service_name = 1; + */ + serviceName?: string; +}; + +/** + * Describes the message monitoring.GetHealthCheckRequest. + * Use `create(GetHealthCheckRequestSchema)` to create a new message. + */ +export const GetHealthCheckRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_monitoring, 3); + +/** + * @generated from message monitoring.GetHealthCheckResponse + */ +export type GetHealthCheckResponse = Message<"monitoring.GetHealthCheckResponse"> & { + /** + * @generated from field: monitoring.HealthStatus health_status = 1; + */ + healthStatus: HealthStatus; + + /** + * @generated from field: repeated monitoring.HealthCheck health_checks = 2; + */ + healthChecks: HealthCheck[]; + + /** + * @generated from field: int64 timestamp = 3; + */ + timestamp: bigint; +}; + +/** + * Describes the message monitoring.GetHealthCheckResponse. + * Use `create(GetHealthCheckResponseSchema)` to create a new message. + */ +export const GetHealthCheckResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_monitoring, 4); + +/** + * @generated from message monitoring.GetMetricsRequest + */ +export type GetMetricsRequest = Message<"monitoring.GetMetricsRequest"> & { + /** + * @generated from field: repeated string metric_names = 1; + */ + metricNames: string[]; + + /** + * @generated from field: optional int64 start_time = 2; + */ + startTime?: bigint; + + /** + * @generated from field: optional int64 end_time = 3; + */ + endTime?: bigint; + + /** + * @generated from field: optional monitoring.MetricAggregation aggregation = 4; + */ + aggregation?: MetricAggregation; +}; + +/** + * Describes the message monitoring.GetMetricsRequest. + * Use `create(GetMetricsRequestSchema)` to create a new message. + */ +export const GetMetricsRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_monitoring, 5); + +/** + * @generated from message monitoring.GetMetricsResponse + */ +export type GetMetricsResponse = Message<"monitoring.GetMetricsResponse"> & { + /** + * @generated from field: repeated monitoring.Metric metrics = 1; + */ + metrics: Metric[]; + + /** + * @generated from field: int64 timestamp = 2; + */ + timestamp: bigint; +}; + +/** + * Describes the message monitoring.GetMetricsResponse. + * Use `create(GetMetricsResponseSchema)` to create a new message. + */ +export const GetMetricsResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_monitoring, 6); + +/** + * @generated from message monitoring.StreamMetricsRequest + */ +export type StreamMetricsRequest = Message<"monitoring.StreamMetricsRequest"> & { + /** + * @generated from field: repeated string metric_names = 1; + */ + metricNames: string[]; + + /** + * @generated from field: optional int32 update_frequency_seconds = 2; + */ + updateFrequencySeconds?: number; +}; + +/** + * Describes the message monitoring.StreamMetricsRequest. + * Use `create(StreamMetricsRequestSchema)` to create a new message. + */ +export const StreamMetricsRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_monitoring, 7); + +/** + * @generated from message monitoring.GetLatencyMetricsRequest + */ +export type GetLatencyMetricsRequest = Message<"monitoring.GetLatencyMetricsRequest"> & { + /** + * @generated from field: optional string service_name = 1; + */ + serviceName?: string; + + /** + * @generated from field: optional string operation_name = 2; + */ + operationName?: string; + + /** + * @generated from field: optional int64 start_time = 3; + */ + startTime?: bigint; + + /** + * @generated from field: optional int64 end_time = 4; + */ + endTime?: bigint; +}; + +/** + * Describes the message monitoring.GetLatencyMetricsRequest. + * Use `create(GetLatencyMetricsRequestSchema)` to create a new message. + */ +export const GetLatencyMetricsRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_monitoring, 8); + +/** + * @generated from message monitoring.GetLatencyMetricsResponse + */ +export type GetLatencyMetricsResponse = Message<"monitoring.GetLatencyMetricsResponse"> & { + /** + * @generated from field: repeated monitoring.LatencyMetric latency_metrics = 1; + */ + latencyMetrics: LatencyMetric[]; +}; + +/** + * Describes the message monitoring.GetLatencyMetricsResponse. + * Use `create(GetLatencyMetricsResponseSchema)` to create a new message. + */ +export const GetLatencyMetricsResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_monitoring, 9); + +/** + * @generated from message monitoring.GetThroughputMetricsRequest + */ +export type GetThroughputMetricsRequest = Message<"monitoring.GetThroughputMetricsRequest"> & { + /** + * @generated from field: optional string service_name = 1; + */ + serviceName?: string; + + /** + * @generated from field: optional string operation_name = 2; + */ + operationName?: string; + + /** + * @generated from field: optional int64 start_time = 3; + */ + startTime?: bigint; + + /** + * @generated from field: optional int64 end_time = 4; + */ + endTime?: bigint; +}; + +/** + * Describes the message monitoring.GetThroughputMetricsRequest. + * Use `create(GetThroughputMetricsRequestSchema)` to create a new message. + */ +export const GetThroughputMetricsRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_monitoring, 10); + +/** + * @generated from message monitoring.GetThroughputMetricsResponse + */ +export type GetThroughputMetricsResponse = Message<"monitoring.GetThroughputMetricsResponse"> & { + /** + * @generated from field: repeated monitoring.ThroughputMetric throughput_metrics = 1; + */ + throughputMetrics: ThroughputMetric[]; +}; + +/** + * Describes the message monitoring.GetThroughputMetricsResponse. + * Use `create(GetThroughputMetricsResponseSchema)` to create a new message. + */ +export const GetThroughputMetricsResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_monitoring, 11); + +/** + * @generated from message monitoring.StreamAlertsRequest + */ +export type StreamAlertsRequest = Message<"monitoring.StreamAlertsRequest"> & { + /** + * @generated from field: optional monitoring.AlertSeverity min_severity = 1; + */ + minSeverity?: AlertSeverity; + + /** + * @generated from field: repeated string service_names = 2; + */ + serviceNames: string[]; + + /** + * @generated from field: repeated monitoring.AlertType alert_types = 3; + */ + alertTypes: AlertType[]; +}; + +/** + * Describes the message monitoring.StreamAlertsRequest. + * Use `create(StreamAlertsRequestSchema)` to create a new message. + */ +export const StreamAlertsRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_monitoring, 12); + +/** + * @generated from message monitoring.AcknowledgeAlertRequest + */ +export type AcknowledgeAlertRequest = Message<"monitoring.AcknowledgeAlertRequest"> & { + /** + * @generated from field: string alert_id = 1; + */ + alertId: string; + + /** + * @generated from field: string acknowledged_by = 2; + */ + acknowledgedBy: string; + + /** + * @generated from field: optional string note = 3; + */ + note?: string; +}; + +/** + * Describes the message monitoring.AcknowledgeAlertRequest. + * Use `create(AcknowledgeAlertRequestSchema)` to create a new message. + */ +export const AcknowledgeAlertRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_monitoring, 13); + +/** + * @generated from message monitoring.AcknowledgeAlertResponse + */ +export type AcknowledgeAlertResponse = Message<"monitoring.AcknowledgeAlertResponse"> & { + /** + * @generated from field: bool success = 1; + */ + success: boolean; + + /** + * @generated from field: string message = 2; + */ + message: string; + + /** + * @generated from field: int64 timestamp = 3; + */ + timestamp: bigint; +}; + +/** + * Describes the message monitoring.AcknowledgeAlertResponse. + * Use `create(AcknowledgeAlertResponseSchema)` to create a new message. + */ +export const AcknowledgeAlertResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_monitoring, 14); + +/** + * @generated from message monitoring.GetActiveAlertsRequest + */ +export type GetActiveAlertsRequest = Message<"monitoring.GetActiveAlertsRequest"> & { + /** + * @generated from field: optional monitoring.AlertSeverity min_severity = 1; + */ + minSeverity?: AlertSeverity; + + /** + * @generated from field: repeated string service_names = 2; + */ + serviceNames: string[]; +}; + +/** + * Describes the message monitoring.GetActiveAlertsRequest. + * Use `create(GetActiveAlertsRequestSchema)` to create a new message. + */ +export const GetActiveAlertsRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_monitoring, 15); + +/** + * @generated from message monitoring.GetActiveAlertsResponse + */ +export type GetActiveAlertsResponse = Message<"monitoring.GetActiveAlertsResponse"> & { + /** + * @generated from field: repeated monitoring.Alert active_alerts = 1; + */ + activeAlerts: Alert[]; + + /** + * @generated from field: int32 total_count = 2; + */ + totalCount: number; +}; + +/** + * Describes the message monitoring.GetActiveAlertsResponse. + * Use `create(GetActiveAlertsResponseSchema)` to create a new message. + */ +export const GetActiveAlertsResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_monitoring, 16); + +/** + * @generated from message monitoring.ServiceStatus + */ +export type ServiceStatus = Message<"monitoring.ServiceStatus"> & { + /** + * @generated from field: string service_name = 1; + */ + serviceName: string; + + /** + * @generated from field: monitoring.ServiceHealth health = 2; + */ + health: ServiceHealth; + + /** + * @generated from field: monitoring.ServiceState state = 3; + */ + state: ServiceState; + + /** + * @generated from field: optional string version = 4; + */ + version?: string; + + /** + * @generated from field: optional string error_message = 5; + */ + errorMessage?: string; + + /** + * @generated from field: int64 uptime_seconds = 6; + */ + uptimeSeconds: bigint; + + /** + * @generated from field: int64 last_health_check = 7; + */ + lastHealthCheck: bigint; + + /** + * @generated from field: map metadata = 8; + */ + metadata: { [key: string]: string }; + + /** + * @generated from field: repeated monitoring.Dependency dependencies = 9; + */ + dependencies: Dependency[]; +}; + +/** + * Describes the message monitoring.ServiceStatus. + * Use `create(ServiceStatusSchema)` to create a new message. + */ +export const ServiceStatusSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_monitoring, 17); + +/** + * @generated from message monitoring.SystemStatus + */ +export type SystemStatus = Message<"monitoring.SystemStatus"> & { + /** + * @generated from field: monitoring.SystemHealth overall_health = 1; + */ + overallHealth: SystemHealth; + + /** + * @generated from field: int32 healthy_services = 2; + */ + healthyServices: number; + + /** + * @generated from field: int32 total_services = 3; + */ + totalServices: number; + + /** + * @generated from field: repeated string critical_issues = 4; + */ + criticalIssues: string[]; + + /** + * @generated from field: int64 system_uptime_seconds = 5; + */ + systemUptimeSeconds: bigint; + + /** + * @generated from field: monitoring.SystemMetrics system_metrics = 6; + */ + systemMetrics?: SystemMetrics; +}; + +/** + * Describes the message monitoring.SystemStatus. + * Use `create(SystemStatusSchema)` to create a new message. + */ +export const SystemStatusSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_monitoring, 18); + +/** + * @generated from message monitoring.HealthCheck + */ +export type HealthCheck = Message<"monitoring.HealthCheck"> & { + /** + * @generated from field: string check_name = 1; + */ + checkName: string; + + /** + * @generated from field: monitoring.HealthStatus status = 2; + */ + status: HealthStatus; + + /** + * @generated from field: optional string message = 3; + */ + message?: string; + + /** + * @generated from field: optional double response_time_ms = 4; + */ + responseTimeMs?: number; + + /** + * @generated from field: int64 last_checked = 5; + */ + lastChecked: bigint; + + /** + * @generated from field: map details = 6; + */ + details: { [key: string]: string }; +}; + +/** + * Describes the message monitoring.HealthCheck. + * Use `create(HealthCheckSchema)` to create a new message. + */ +export const HealthCheckSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_monitoring, 19); + +/** + * @generated from message monitoring.Dependency + */ +export type Dependency = Message<"monitoring.Dependency"> & { + /** + * @generated from field: string name = 1; + */ + name: string; + + /** + * @generated from field: monitoring.DependencyType dependency_type = 2; + */ + dependencyType: DependencyType; + + /** + * @generated from field: monitoring.HealthStatus status = 3; + */ + status: HealthStatus; + + /** + * @generated from field: optional string endpoint = 4; + */ + endpoint?: string; + + /** + * @generated from field: optional double response_time_ms = 5; + */ + responseTimeMs?: number; + + /** + * @generated from field: int64 last_checked = 6; + */ + lastChecked: bigint; +}; + +/** + * Describes the message monitoring.Dependency. + * Use `create(DependencySchema)` to create a new message. + */ +export const DependencySchema: GenMessage = /*@__PURE__*/ + messageDesc(file_monitoring, 20); + +/** + * @generated from message monitoring.SystemMetrics + */ +export type SystemMetrics = Message<"monitoring.SystemMetrics"> & { + /** + * @generated from field: double cpu_usage_percent = 1; + */ + cpuUsagePercent: number; + + /** + * @generated from field: double memory_usage_percent = 2; + */ + memoryUsagePercent: number; + + /** + * @generated from field: double disk_usage_percent = 3; + */ + diskUsagePercent: number; + + /** + * @generated from field: double network_io_mbps = 4; + */ + networkIoMbps: number; + + /** + * @generated from field: int32 active_connections = 5; + */ + activeConnections: number; + + /** + * @generated from field: int32 total_requests = 6; + */ + totalRequests: number; + + /** + * @generated from field: double avg_response_time_ms = 7; + */ + avgResponseTimeMs: number; + + /** + * @generated from field: double error_rate_percent = 8; + */ + errorRatePercent: number; +}; + +/** + * Describes the message monitoring.SystemMetrics. + * Use `create(SystemMetricsSchema)` to create a new message. + */ +export const SystemMetricsSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_monitoring, 21); + +/** + * @generated from message monitoring.Metric + */ +export type Metric = Message<"monitoring.Metric"> & { + /** + * @generated from field: string name = 1; + */ + name: string; + + /** + * @generated from field: monitoring.MetricType metric_type = 2; + */ + metricType: MetricType; + + /** + * @generated from field: double value = 3; + */ + value: number; + + /** + * @generated from field: string unit = 4; + */ + unit: string; + + /** + * @generated from field: map labels = 5; + */ + labels: { [key: string]: string }; + + /** + * @generated from field: int64 timestamp = 6; + */ + timestamp: bigint; + + /** + * @generated from field: optional monitoring.MetricStatistics statistics = 7; + */ + statistics?: MetricStatistics; +}; + +/** + * Describes the message monitoring.Metric. + * Use `create(MetricSchema)` to create a new message. + */ +export const MetricSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_monitoring, 22); + +/** + * @generated from message monitoring.MetricStatistics + */ +export type MetricStatistics = Message<"monitoring.MetricStatistics"> & { + /** + * @generated from field: double min = 1; + */ + min: number; + + /** + * @generated from field: double max = 2; + */ + max: number; + + /** + * @generated from field: double avg = 3; + */ + avg: number; + + /** + * @generated from field: double percentile_95 = 4; + */ + percentile95: number; + + /** + * @generated from field: double percentile_99 = 5; + */ + percentile99: number; + + /** + * @generated from field: double std_dev = 6; + */ + stdDev: number; + + /** + * @generated from field: int32 sample_count = 7; + */ + sampleCount: number; +}; + +/** + * Describes the message monitoring.MetricStatistics. + * Use `create(MetricStatisticsSchema)` to create a new message. + */ +export const MetricStatisticsSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_monitoring, 23); + +/** + * @generated from message monitoring.LatencyMetric + */ +export type LatencyMetric = Message<"monitoring.LatencyMetric"> & { + /** + * @generated from field: string service_name = 1; + */ + serviceName: string; + + /** + * @generated from field: string operation_name = 2; + */ + operationName: string; + + /** + * @generated from field: double avg_latency_ms = 3; + */ + avgLatencyMs: number; + + /** + * @generated from field: double p50_latency_ms = 4; + */ + p50LatencyMs: number; + + /** + * @generated from field: double p95_latency_ms = 5; + */ + p95LatencyMs: number; + + /** + * @generated from field: double p99_latency_ms = 6; + */ + p99LatencyMs: number; + + /** + * @generated from field: double max_latency_ms = 7; + */ + maxLatencyMs: number; + + /** + * @generated from field: int32 request_count = 8; + */ + requestCount: number; + + /** + * @generated from field: int64 time_window_start = 9; + */ + timeWindowStart: bigint; + + /** + * @generated from field: int64 time_window_end = 10; + */ + timeWindowEnd: bigint; +}; + +/** + * Describes the message monitoring.LatencyMetric. + * Use `create(LatencyMetricSchema)` to create a new message. + */ +export const LatencyMetricSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_monitoring, 24); + +/** + * @generated from message monitoring.ThroughputMetric + */ +export type ThroughputMetric = Message<"monitoring.ThroughputMetric"> & { + /** + * @generated from field: string service_name = 1; + */ + serviceName: string; + + /** + * @generated from field: string operation_name = 2; + */ + operationName: string; + + /** + * @generated from field: double requests_per_second = 3; + */ + requestsPerSecond: number; + + /** + * @generated from field: double bytes_per_second = 4; + */ + bytesPerSecond: number; + + /** + * @generated from field: int32 total_requests = 5; + */ + totalRequests: number; + + /** + * @generated from field: int64 total_bytes = 6; + */ + totalBytes: bigint; + + /** + * @generated from field: int64 time_window_start = 7; + */ + timeWindowStart: bigint; + + /** + * @generated from field: int64 time_window_end = 8; + */ + timeWindowEnd: bigint; +}; + +/** + * Describes the message monitoring.ThroughputMetric. + * Use `create(ThroughputMetricSchema)` to create a new message. + */ +export const ThroughputMetricSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_monitoring, 25); + +/** + * @generated from message monitoring.Alert + */ +export type Alert = Message<"monitoring.Alert"> & { + /** + * @generated from field: string alert_id = 1; + */ + alertId: string; + + /** + * @generated from field: monitoring.AlertType alert_type = 2; + */ + alertType: AlertType; + + /** + * @generated from field: monitoring.AlertSeverity severity = 3; + */ + severity: AlertSeverity; + + /** + * @generated from field: string title = 4; + */ + title: string; + + /** + * @generated from field: string description = 5; + */ + description: string; + + /** + * @generated from field: string service_name = 6; + */ + serviceName: string; + + /** + * @generated from field: map labels = 7; + */ + labels: { [key: string]: string }; + + /** + * @generated from field: int64 triggered_at = 8; + */ + triggeredAt: bigint; + + /** + * @generated from field: optional int64 acknowledged_at = 9; + */ + acknowledgedAt?: bigint; + + /** + * @generated from field: optional string acknowledged_by = 10; + */ + acknowledgedBy?: string; + + /** + * @generated from field: optional int64 resolved_at = 11; + */ + resolvedAt?: bigint; + + /** + * @generated from field: monitoring.AlertStatus status = 12; + */ + status: AlertStatus; + + /** + * @generated from field: optional string resolution_note = 13; + */ + resolutionNote?: string; +}; + +/** + * Describes the message monitoring.Alert. + * Use `create(AlertSchema)` to create a new message. + */ +export const AlertSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_monitoring, 26); + +/** + * @generated from message monitoring.SystemStatusEvent + */ +export type SystemStatusEvent = Message<"monitoring.SystemStatusEvent"> & { + /** + * @generated from field: monitoring.SystemStatus system_status = 1; + */ + systemStatus?: SystemStatus; + + /** + * @generated from field: monitoring.SystemStatusChangeType change_type = 2; + */ + changeType: SystemStatusChangeType; + + /** + * @generated from field: int64 timestamp = 3; + */ + timestamp: bigint; +}; + +/** + * Describes the message monitoring.SystemStatusEvent. + * Use `create(SystemStatusEventSchema)` to create a new message. + */ +export const SystemStatusEventSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_monitoring, 27); + +/** + * @generated from message monitoring.MetricsEvent + */ +export type MetricsEvent = Message<"monitoring.MetricsEvent"> & { + /** + * @generated from field: repeated monitoring.Metric metrics = 1; + */ + metrics: Metric[]; + + /** + * @generated from field: int64 timestamp = 2; + */ + timestamp: bigint; +}; + +/** + * Describes the message monitoring.MetricsEvent. + * Use `create(MetricsEventSchema)` to create a new message. + */ +export const MetricsEventSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_monitoring, 28); + +/** + * @generated from message monitoring.AlertEvent + */ +export type AlertEvent = Message<"monitoring.AlertEvent"> & { + /** + * @generated from field: monitoring.Alert alert = 1; + */ + alert?: Alert; + + /** + * @generated from field: monitoring.AlertEventType event_type = 2; + */ + eventType: AlertEventType; + + /** + * @generated from field: int64 timestamp = 3; + */ + timestamp: bigint; +}; + +/** + * Describes the message monitoring.AlertEvent. + * Use `create(AlertEventSchema)` to create a new message. + */ +export const AlertEventSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_monitoring, 29); + +/** + * @generated from message monitoring.GetLiveTrainingMetricsRequest + */ +export type GetLiveTrainingMetricsRequest = Message<"monitoring.GetLiveTrainingMetricsRequest"> & { + /** + * optional: "dqn", "ppo", etc. + * + * @generated from field: string model_filter = 1; + */ + modelFilter: string; +}; + +/** + * Describes the message monitoring.GetLiveTrainingMetricsRequest. + * Use `create(GetLiveTrainingMetricsRequestSchema)` to create a new message. + */ +export const GetLiveTrainingMetricsRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_monitoring, 30); + +/** + * @generated from message monitoring.StreamTrainingMetricsRequest + */ +export type StreamTrainingMetricsRequest = Message<"monitoring.StreamTrainingMetricsRequest"> & { + /** + * @generated from field: string model_filter = 1; + */ + modelFilter: string; + + /** + * 0 = server default (3s) + * + * @generated from field: uint32 interval_seconds = 2; + */ + intervalSeconds: number; +}; + +/** + * Describes the message monitoring.StreamTrainingMetricsRequest. + * Use `create(StreamTrainingMetricsRequestSchema)` to create a new message. + */ +export const StreamTrainingMetricsRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_monitoring, 31); + +/** + * @generated from message monitoring.GetLiveTrainingMetricsResponse + */ +export type GetLiveTrainingMetricsResponse = Message<"monitoring.GetLiveTrainingMetricsResponse"> & { + /** + * @generated from field: repeated monitoring.TrainingSession sessions = 1; + */ + sessions: TrainingSession[]; + + /** + * @generated from field: monitoring.GpuSnapshot gpu = 2; + */ + gpu?: GpuSnapshot; + + /** + * @generated from field: uint32 active_k8s_jobs = 3; + */ + activeK8sJobs: number; + + /** + * @generated from field: int64 timestamp = 4; + */ + timestamp: bigint; + + /** + * @generated from field: float cpu_percent = 5; + */ + cpuPercent: number; + + /** + * @generated from field: float memory_used_mb = 6; + */ + memoryUsedMb: number; + + /** + * @generated from field: float memory_total_mb = 7; + */ + memoryTotalMb: number; +}; + +/** + * Describes the message monitoring.GetLiveTrainingMetricsResponse. + * Use `create(GetLiveTrainingMetricsResponseSchema)` to create a new message. + */ +export const GetLiveTrainingMetricsResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_monitoring, 32); + +/** + * @generated from message monitoring.TrainingSession + */ +export type TrainingSession = Message<"monitoring.TrainingSession"> & { + /** + * @generated from field: string model = 1; + */ + model: string; + + /** + * @generated from field: string fold = 2; + */ + fold: string; + + /** + * @generated from field: bool is_hyperopt = 3; + */ + isHyperopt: boolean; + + /** + * Epoch/progress + * + * @generated from field: float current_epoch = 4; + */ + currentEpoch: number; + + /** + * @generated from field: float epoch_loss = 5; + */ + epochLoss: number; + + /** + * @generated from field: float validation_loss = 6; + */ + validationLoss: number; + + /** + * Throughput + * + * @generated from field: float batches_per_second = 7; + */ + batchesPerSecond: number; + + /** + * @generated from field: float batches_processed = 8; + */ + batchesProcessed: number; + + /** + * @generated from field: float iteration_seconds = 9; + */ + iterationSeconds: number; + + /** + * Eval metrics + * + * @generated from field: float eval_accuracy = 10; + */ + evalAccuracy: number; + + /** + * @generated from field: float eval_precision = 11; + */ + evalPrecision: number; + + /** + * @generated from field: float eval_recall = 12; + */ + evalRecall: number; + + /** + * @generated from field: float eval_f1 = 13; + */ + evalF1: number; + + /** + * Checkpoint + * + * @generated from field: float checkpoint_size_bytes = 14; + */ + checkpointSizeBytes: number; + + /** + * @generated from field: uint32 checkpoint_saves = 15; + */ + checkpointSaves: number; + + /** + * @generated from field: uint32 checkpoint_failures = 16; + */ + checkpointFailures: number; + + /** + * Health counters + * + * @generated from field: uint32 nan_detected = 17; + */ + nanDetected: number; + + /** + * @generated from field: uint32 gradient_explosions = 18; + */ + gradientExplosions: number; + + /** + * @generated from field: uint32 feature_errors = 19; + */ + featureErrors: number; + + /** + * Hyperopt fields (populated when is_hyperopt=true) + * + * @generated from field: uint32 hyperopt_trial_current = 20; + */ + hyperoptTrialCurrent: number; + + /** + * @generated from field: uint32 hyperopt_trial_total = 21; + */ + hyperoptTrialTotal: number; + + /** + * @generated from field: float hyperopt_best_objective = 22; + */ + hyperoptBestObjective: number; + + /** + * @generated from field: uint32 hyperopt_trials_failed = 23; + */ + hyperoptTrialsFailed: number; + + /** + * RL diagnostics + * + * @generated from field: float q_value_mean = 24; + */ + qValueMean: number; + + /** + * @generated from field: float q_value_max = 25; + */ + qValueMax: number; + + /** + * @generated from field: float policy_entropy = 26; + */ + policyEntropy: number; + + /** + * @generated from field: float kl_divergence = 27; + */ + klDivergence: number; + + /** + * @generated from field: float advantage_mean = 28; + */ + advantageMean: number; + + /** + * @generated from field: uint32 replay_buffer_size = 29; + */ + replayBufferSize: number; + + /** + * Gradient & training health + * + * @generated from field: float gradient_norm = 30; + */ + gradientNorm: number; + + /** + * @generated from field: float learning_rate = 31; + */ + learningRate: number; + + /** + * @generated from field: float epoch_duration_seconds = 32; + */ + epochDurationSeconds: number; + + /** + * Hyperopt intra-trial + * + * @generated from field: uint32 hyperopt_trial_epoch = 33; + */ + hyperoptTrialEpoch: number; + + /** + * @generated from field: float hyperopt_trial_best_loss = 34; + */ + hyperoptTrialBestLoss: number; + + /** + * @generated from field: float hyperopt_elapsed_seconds = 35; + */ + hyperoptElapsedSeconds: number; + + /** + * Epoch-level financial metrics + * + * @generated from field: float epoch_sharpe = 36; + */ + epochSharpe: number; + + /** + * @generated from field: float epoch_sortino = 37; + */ + epochSortino: number; + + /** + * @generated from field: float epoch_win_rate = 38; + */ + epochWinRate: number; + + /** + * @generated from field: float epoch_max_drawdown = 39; + */ + epochMaxDrawdown: number; + + /** + * @generated from field: float epoch_profit_factor = 40; + */ + epochProfitFactor: number; + + /** + * @generated from field: float epoch_total_return = 41; + */ + epochTotalReturn: number; + + /** + * @generated from field: float epoch_avg_return = 42; + */ + epochAvgReturn: number; + + /** + * @generated from field: uint32 epoch_total_trades = 43; + */ + epochTotalTrades: number; + + /** + * Action distribution + * + * @generated from field: float action_buy_pct = 44; + */ + actionBuyPct: number; + + /** + * @generated from field: float action_sell_pct = 45; + */ + actionSellPct: number; + + /** + * @generated from field: float action_hold_pct = 46; + */ + actionHoldPct: number; +}; + +/** + * Describes the message monitoring.TrainingSession. + * Use `create(TrainingSessionSchema)` to create a new message. + */ +export const TrainingSessionSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_monitoring, 33); + +/** + * @generated from message monitoring.GpuSnapshot + */ +export type GpuSnapshot = Message<"monitoring.GpuSnapshot"> & { + /** + * @generated from field: float utilization_percent = 1; + */ + utilizationPercent: number; + + /** + * @generated from field: float memory_used_mb = 2; + */ + memoryUsedMb: number; + + /** + * @generated from field: float memory_total_mb = 3; + */ + memoryTotalMb: number; + + /** + * @generated from field: float temperature_celsius = 4; + */ + temperatureCelsius: number; + + /** + * @generated from field: float power_watts = 5; + */ + powerWatts: number; +}; + +/** + * Describes the message monitoring.GpuSnapshot. + * Use `create(GpuSnapshotSchema)` to create a new message. + */ +export const GpuSnapshotSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_monitoring, 34); + +/** + * @generated from message monitoring.GetEpochHistoryRequest + */ +export type GetEpochHistoryRequest = Message<"monitoring.GetEpochHistoryRequest"> & { + /** + * @generated from field: string model = 1; + */ + model: string; + + /** + * @generated from field: string fold = 2; + */ + fold: string; + + /** + * 0 = all (up to 50) + * + * @generated from field: uint32 max_epochs = 3; + */ + maxEpochs: number; +}; + +/** + * Describes the message monitoring.GetEpochHistoryRequest. + * Use `create(GetEpochHistoryRequestSchema)` to create a new message. + */ +export const GetEpochHistoryRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_monitoring, 35); + +/** + * @generated from message monitoring.EpochFinancialSnapshot + */ +export type EpochFinancialSnapshot = Message<"monitoring.EpochFinancialSnapshot"> & { + /** + * @generated from field: uint32 epoch = 1; + */ + epoch: number; + + /** + * @generated from field: float sharpe = 2; + */ + sharpe: number; + + /** + * @generated from field: float sortino = 3; + */ + sortino: number; + + /** + * @generated from field: float win_rate = 4; + */ + winRate: number; + + /** + * @generated from field: float max_drawdown = 5; + */ + maxDrawdown: number; + + /** + * @generated from field: float profit_factor = 6; + */ + profitFactor: number; + + /** + * @generated from field: float total_return = 7; + */ + totalReturn: number; + + /** + * @generated from field: float avg_return = 8; + */ + avgReturn: number; + + /** + * @generated from field: uint32 total_trades = 9; + */ + totalTrades: number; + + /** + * @generated from field: float loss = 10; + */ + loss: number; + + /** + * @generated from field: float val_loss = 11; + */ + valLoss: number; + + /** + * @generated from field: float learning_rate = 12; + */ + learningRate: number; + + /** + * @generated from field: float action_buy_pct = 13; + */ + actionBuyPct: number; + + /** + * @generated from field: float action_sell_pct = 14; + */ + actionSellPct: number; + + /** + * @generated from field: float action_hold_pct = 15; + */ + actionHoldPct: number; +}; + +/** + * Describes the message monitoring.EpochFinancialSnapshot. + * Use `create(EpochFinancialSnapshotSchema)` to create a new message. + */ +export const EpochFinancialSnapshotSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_monitoring, 36); + +/** + * @generated from message monitoring.GetEpochHistoryResponse + */ +export type GetEpochHistoryResponse = Message<"monitoring.GetEpochHistoryResponse"> & { + /** + * @generated from field: string model = 1; + */ + model: string; + + /** + * @generated from field: string fold = 2; + */ + fold: string; + + /** + * @generated from field: repeated monitoring.EpochFinancialSnapshot epochs = 3; + */ + epochs: EpochFinancialSnapshot[]; +}; + +/** + * Describes the message monitoring.GetEpochHistoryResponse. + * Use `create(GetEpochHistoryResponseSchema)` to create a new message. + */ +export const GetEpochHistoryResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_monitoring, 37); + +/** + * @generated from message monitoring.SubscribeClusterPodsRequest + */ +export type SubscribeClusterPodsRequest = Message<"monitoring.SubscribeClusterPodsRequest"> & { + /** + * 0 = server default (5s) + * + * @generated from field: uint32 interval_seconds = 1; + */ + intervalSeconds: number; +}; + +/** + * Describes the message monitoring.SubscribeClusterPodsRequest. + * Use `create(SubscribeClusterPodsRequestSchema)` to create a new message. + */ +export const SubscribeClusterPodsRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_monitoring, 38); + +/** + * @generated from message monitoring.ClusterPodsResponse + */ +export type ClusterPodsResponse = Message<"monitoring.ClusterPodsResponse"> & { + /** + * @generated from field: repeated monitoring.PodInfo pods = 1; + */ + pods: PodInfo[]; + + /** + * @generated from field: int64 timestamp = 2; + */ + timestamp: bigint; +}; + +/** + * Describes the message monitoring.ClusterPodsResponse. + * Use `create(ClusterPodsResponseSchema)` to create a new message. + */ +export const ClusterPodsResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_monitoring, 39); + +/** + * @generated from message monitoring.PodInfo + */ +export type PodInfo = Message<"monitoring.PodInfo"> & { + /** + * @generated from field: string name = 1; + */ + name: string; + + /** + * app.kubernetes.io/name label + * + * @generated from field: string service = 2; + */ + service: string; + + /** + * @generated from field: string namespace = 3; + */ + namespace: string; + + /** + * Running/Pending/CrashLoopBackOff/Completed/etc + * + * @generated from field: string status = 4; + */ + status: string; + + /** + * @generated from field: int32 restarts = 5; + */ + restarts: number; + + /** + * human-readable: "2d5h", "3m" + * + * @generated from field: string age = 6; + */ + age: string; + + /** + * @generated from field: string node = 7; + */ + node: string; + + /** + * @generated from field: bool ready = 8; + */ + ready: boolean; + + /** + * from FOXHUNT_BUILD_VERSION env or empty + * + * @generated from field: string version = 9; + */ + version: string; +}; + +/** + * Describes the message monitoring.PodInfo. + * Use `create(PodInfoSchema)` to create a new message. + */ +export const PodInfoSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_monitoring, 40); + +/** + * Health status levels for services + * + * @generated from enum monitoring.ServiceHealth + */ +export enum ServiceHealth { + /** + * Default/unknown health + * + * @generated from enum value: SERVICE_HEALTH_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * Service operating normally + * + * @generated from enum value: SERVICE_HEALTH_HEALTHY = 1; + */ + HEALTHY = 1, + + /** + * Service performance degraded + * + * @generated from enum value: SERVICE_HEALTH_DEGRADED = 2; + */ + DEGRADED = 2, + + /** + * Service not functioning properly + * + * @generated from enum value: SERVICE_HEALTH_UNHEALTHY = 3; + */ + UNHEALTHY = 3, + + /** + * Service in critical failure state + * + * @generated from enum value: SERVICE_HEALTH_CRITICAL = 4; + */ + CRITICAL = 4, +} + +/** + * Describes the enum monitoring.ServiceHealth. + */ +export const ServiceHealthSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_monitoring, 0); + +/** + * Operational states of services + * + * @generated from enum monitoring.ServiceState + */ +export enum ServiceState { + /** + * Default/unknown state + * + * @generated from enum value: SERVICE_STATE_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * Service is starting up + * + * @generated from enum value: SERVICE_STATE_STARTING = 1; + */ + STARTING = 1, + + /** + * Service is running normally + * + * @generated from enum value: SERVICE_STATE_RUNNING = 2; + */ + RUNNING = 2, + + /** + * Service is shutting down + * + * @generated from enum value: SERVICE_STATE_STOPPING = 3; + */ + STOPPING = 3, + + /** + * Service is stopped + * + * @generated from enum value: SERVICE_STATE_STOPPED = 4; + */ + STOPPED = 4, + + /** + * Service encountered an error + * + * @generated from enum value: SERVICE_STATE_ERROR = 5; + */ + ERROR = 5, +} + +/** + * Describes the enum monitoring.ServiceState. + */ +export const ServiceStateSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_monitoring, 1); + +/** + * @generated from enum monitoring.SystemHealth + */ +export enum SystemHealth { + /** + * @generated from enum value: SYSTEM_HEALTH_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * @generated from enum value: SYSTEM_HEALTH_HEALTHY = 1; + */ + HEALTHY = 1, + + /** + * @generated from enum value: SYSTEM_HEALTH_DEGRADED = 2; + */ + DEGRADED = 2, + + /** + * @generated from enum value: SYSTEM_HEALTH_UNHEALTHY = 3; + */ + UNHEALTHY = 3, + + /** + * @generated from enum value: SYSTEM_HEALTH_CRITICAL = 4; + */ + CRITICAL = 4, +} + +/** + * Describes the enum monitoring.SystemHealth. + */ +export const SystemHealthSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_monitoring, 2); + +/** + * @generated from enum monitoring.HealthStatus + */ +export enum HealthStatus { + /** + * @generated from enum value: HEALTH_STATUS_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * @generated from enum value: HEALTH_STATUS_HEALTHY = 1; + */ + HEALTHY = 1, + + /** + * @generated from enum value: HEALTH_STATUS_DEGRADED = 2; + */ + DEGRADED = 2, + + /** + * @generated from enum value: HEALTH_STATUS_UNHEALTHY = 3; + */ + UNHEALTHY = 3, + + /** + * @generated from enum value: HEALTH_STATUS_CRITICAL = 4; + */ + CRITICAL = 4, +} + +/** + * Describes the enum monitoring.HealthStatus. + */ +export const HealthStatusSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_monitoring, 3); + +/** + * @generated from enum monitoring.DependencyType + */ +export enum DependencyType { + /** + * @generated from enum value: DEPENDENCY_TYPE_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * @generated from enum value: DEPENDENCY_TYPE_DATABASE = 1; + */ + DATABASE = 1, + + /** + * @generated from enum value: DEPENDENCY_TYPE_MESSAGE_QUEUE = 2; + */ + MESSAGE_QUEUE = 2, + + /** + * @generated from enum value: DEPENDENCY_TYPE_CACHE = 3; + */ + CACHE = 3, + + /** + * @generated from enum value: DEPENDENCY_TYPE_EXTERNAL_API = 4; + */ + EXTERNAL_API = 4, + + /** + * @generated from enum value: DEPENDENCY_TYPE_FILE_SYSTEM = 5; + */ + FILE_SYSTEM = 5, + + /** + * @generated from enum value: DEPENDENCY_TYPE_NETWORK = 6; + */ + NETWORK = 6, +} + +/** + * Describes the enum monitoring.DependencyType. + */ +export const DependencyTypeSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_monitoring, 4); + +/** + * @generated from enum monitoring.MetricType + */ +export enum MetricType { + /** + * @generated from enum value: METRIC_TYPE_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * @generated from enum value: METRIC_TYPE_COUNTER = 1; + */ + COUNTER = 1, + + /** + * @generated from enum value: METRIC_TYPE_GAUGE = 2; + */ + GAUGE = 2, + + /** + * @generated from enum value: METRIC_TYPE_HISTOGRAM = 3; + */ + HISTOGRAM = 3, + + /** + * @generated from enum value: METRIC_TYPE_TIMER = 4; + */ + TIMER = 4, +} + +/** + * Describes the enum monitoring.MetricType. + */ +export const MetricTypeSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_monitoring, 5); + +/** + * @generated from enum monitoring.MetricAggregation + */ +export enum MetricAggregation { + /** + * @generated from enum value: METRIC_AGGREGATION_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * @generated from enum value: METRIC_AGGREGATION_SUM = 1; + */ + SUM = 1, + + /** + * @generated from enum value: METRIC_AGGREGATION_AVG = 2; + */ + AVG = 2, + + /** + * @generated from enum value: METRIC_AGGREGATION_MIN = 3; + */ + MIN = 3, + + /** + * @generated from enum value: METRIC_AGGREGATION_MAX = 4; + */ + MAX = 4, + + /** + * @generated from enum value: METRIC_AGGREGATION_COUNT = 5; + */ + COUNT = 5, +} + +/** + * Describes the enum monitoring.MetricAggregation. + */ +export const MetricAggregationSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_monitoring, 6); + +/** + * @generated from enum monitoring.AlertType + */ +export enum AlertType { + /** + * @generated from enum value: ALERT_TYPE_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * @generated from enum value: ALERT_TYPE_HEALTH_CHECK = 1; + */ + HEALTH_CHECK = 1, + + /** + * @generated from enum value: ALERT_TYPE_PERFORMANCE = 2; + */ + PERFORMANCE = 2, + + /** + * @generated from enum value: ALERT_TYPE_ERROR_RATE = 3; + */ + ERROR_RATE = 3, + + /** + * @generated from enum value: ALERT_TYPE_LATENCY = 4; + */ + LATENCY = 4, + + /** + * @generated from enum value: ALERT_TYPE_THROUGHPUT = 5; + */ + THROUGHPUT = 5, + + /** + * @generated from enum value: ALERT_TYPE_RESOURCE_USAGE = 6; + */ + RESOURCE_USAGE = 6, + + /** + * @generated from enum value: ALERT_TYPE_DEPENDENCY = 7; + */ + DEPENDENCY = 7, + + /** + * @generated from enum value: ALERT_TYPE_SECURITY = 8; + */ + SECURITY = 8, +} + +/** + * Describes the enum monitoring.AlertType. + */ +export const AlertTypeSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_monitoring, 7); + +/** + * Alert severity levels + * + * @generated from enum monitoring.AlertSeverity + */ +export enum AlertSeverity { + /** + * Default/unknown severity + * + * @generated from enum value: ALERT_SEVERITY_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * Informational alert + * + * @generated from enum value: ALERT_SEVERITY_INFO = 1; + */ + INFO = 1, + + /** + * Warning requiring attention + * + * @generated from enum value: ALERT_SEVERITY_WARNING = 2; + */ + WARNING = 2, + + /** + * Critical issue requiring immediate action + * + * @generated from enum value: ALERT_SEVERITY_CRITICAL = 3; + */ + CRITICAL = 3, + + /** + * Emergency requiring immediate response + * + * @generated from enum value: ALERT_SEVERITY_EMERGENCY = 4; + */ + EMERGENCY = 4, +} + +/** + * Describes the enum monitoring.AlertSeverity. + */ +export const AlertSeveritySchema: GenEnum = /*@__PURE__*/ + enumDesc(file_monitoring, 8); + +/** + * Current status of alerts + * + * @generated from enum monitoring.AlertStatus + */ +export enum AlertStatus { + /** + * Default/unknown status + * + * @generated from enum value: ALERT_STATUS_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * Alert is currently active + * + * @generated from enum value: ALERT_STATUS_ACTIVE = 1; + */ + ACTIVE = 1, + + /** + * Alert has been acknowledged + * + * @generated from enum value: ALERT_STATUS_ACKNOWLEDGED = 2; + */ + ACKNOWLEDGED = 2, + + /** + * Alert has been resolved + * + * @generated from enum value: ALERT_STATUS_RESOLVED = 3; + */ + RESOLVED = 3, + + /** + * Alert is temporarily suppressed + * + * @generated from enum value: ALERT_STATUS_SUPPRESSED = 4; + */ + SUPPRESSED = 4, +} + +/** + * Describes the enum monitoring.AlertStatus. + */ +export const AlertStatusSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_monitoring, 9); + +/** + * @generated from enum monitoring.SystemStatusChangeType + */ +export enum SystemStatusChangeType { + /** + * @generated from enum value: SYSTEM_STATUS_CHANGE_TYPE_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * @generated from enum value: SYSTEM_STATUS_CHANGE_TYPE_HEALTH_IMPROVED = 1; + */ + HEALTH_IMPROVED = 1, + + /** + * @generated from enum value: SYSTEM_STATUS_CHANGE_TYPE_HEALTH_DEGRADED = 2; + */ + HEALTH_DEGRADED = 2, + + /** + * @generated from enum value: SYSTEM_STATUS_CHANGE_TYPE_SERVICE_STARTED = 3; + */ + SERVICE_STARTED = 3, + + /** + * @generated from enum value: SYSTEM_STATUS_CHANGE_TYPE_SERVICE_STOPPED = 4; + */ + SERVICE_STOPPED = 4, + + /** + * @generated from enum value: SYSTEM_STATUS_CHANGE_TYPE_SERVICE_ERROR = 5; + */ + SERVICE_ERROR = 5, +} + +/** + * Describes the enum monitoring.SystemStatusChangeType. + */ +export const SystemStatusChangeTypeSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_monitoring, 10); + +/** + * @generated from enum monitoring.AlertEventType + */ +export enum AlertEventType { + /** + * @generated from enum value: ALERT_EVENT_TYPE_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * @generated from enum value: ALERT_EVENT_TYPE_TRIGGERED = 1; + */ + TRIGGERED = 1, + + /** + * @generated from enum value: ALERT_EVENT_TYPE_ACKNOWLEDGED = 2; + */ + ACKNOWLEDGED = 2, + + /** + * @generated from enum value: ALERT_EVENT_TYPE_RESOLVED = 3; + */ + RESOLVED = 3, + + /** + * @generated from enum value: ALERT_EVENT_TYPE_ESCALATED = 4; + */ + ESCALATED = 4, +} + +/** + * Describes the enum monitoring.AlertEventType. + */ +export const AlertEventTypeSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_monitoring, 11); + +/** + * Monitoring Service provides comprehensive system health monitoring, performance metrics collection, + * alerting capabilities, and training metrics for the HFT trading system. This service tracks latency, + * throughput, resource utilization, service health, and ML training progress across all components + * with real-time alerting and streaming. + * + * @generated from service monitoring.MonitoringService + */ +export const MonitoringService: GenService<{ + /** + * Health and Status Monitoring + * Get overall system status and individual service health + * + * @generated from rpc monitoring.MonitoringService.GetSystemStatus + */ + getSystemStatus: { + methodKind: "unary"; + input: typeof GetSystemStatusRequestSchema; + output: typeof GetSystemStatusResponseSchema; + }, + /** + * Stream real-time system status changes + * + * @generated from rpc monitoring.MonitoringService.StreamSystemStatus + */ + streamSystemStatus: { + methodKind: "server_streaming"; + input: typeof StreamSystemStatusRequestSchema; + output: typeof SystemStatusEventSchema; + }, + /** + * Perform detailed health checks on services + * + * @generated from rpc monitoring.MonitoringService.GetHealthCheck + */ + getHealthCheck: { + methodKind: "unary"; + input: typeof GetHealthCheckRequestSchema; + output: typeof GetHealthCheckResponseSchema; + }, + /** + * Performance Metrics Collection + * Get system and application metrics + * + * @generated from rpc monitoring.MonitoringService.GetMetrics + */ + getMetrics: { + methodKind: "unary"; + input: typeof GetMetricsRequestSchema; + output: typeof GetMetricsResponseSchema; + }, + /** + * Stream real-time performance metrics + * + * @generated from rpc monitoring.MonitoringService.StreamMetrics + */ + streamMetrics: { + methodKind: "server_streaming"; + input: typeof StreamMetricsRequestSchema; + output: typeof MetricsEventSchema; + }, + /** + * Get detailed latency performance metrics + * + * @generated from rpc monitoring.MonitoringService.GetLatencyMetrics + */ + getLatencyMetrics: { + methodKind: "unary"; + input: typeof GetLatencyMetricsRequestSchema; + output: typeof GetLatencyMetricsResponseSchema; + }, + /** + * Get throughput and capacity metrics + * + * @generated from rpc monitoring.MonitoringService.GetThroughputMetrics + */ + getThroughputMetrics: { + methodKind: "unary"; + input: typeof GetThroughputMetricsRequestSchema; + output: typeof GetThroughputMetricsResponseSchema; + }, + /** + * Alerting and Notification System + * Stream real-time system alerts and notifications + * + * @generated from rpc monitoring.MonitoringService.StreamAlerts + */ + streamAlerts: { + methodKind: "server_streaming"; + input: typeof StreamAlertsRequestSchema; + output: typeof AlertEventSchema; + }, + /** + * Acknowledge an active alert + * + * @generated from rpc monitoring.MonitoringService.AcknowledgeAlert + */ + acknowledgeAlert: { + methodKind: "unary"; + input: typeof AcknowledgeAlertRequestSchema; + output: typeof AcknowledgeAlertResponseSchema; + }, + /** + * Get all currently active alerts + * + * @generated from rpc monitoring.MonitoringService.GetActiveAlerts + */ + getActiveAlerts: { + methodKind: "unary"; + input: typeof GetActiveAlertsRequestSchema; + output: typeof GetActiveAlertsResponseSchema; + }, + /** + * Training Metrics (from monitoring_service) + * Single snapshot of all active training sessions + * + * @generated from rpc monitoring.MonitoringService.GetLiveTrainingMetrics + */ + getLiveTrainingMetrics: { + methodKind: "unary"; + input: typeof GetLiveTrainingMetricsRequestSchema; + output: typeof GetLiveTrainingMetricsResponseSchema; + }, + /** + * Server-streaming: pushes updates every N seconds + * + * @generated from rpc monitoring.MonitoringService.StreamTrainingMetrics + */ + streamTrainingMetrics: { + methodKind: "server_streaming"; + input: typeof StreamTrainingMetricsRequestSchema; + output: typeof GetLiveTrainingMetricsResponseSchema; + }, + /** + * Epoch history for a specific session (ring buffer, max 50 epochs) + * + * @generated from rpc monitoring.MonitoringService.GetEpochHistory + */ + getEpochHistory: { + methodKind: "unary"; + input: typeof GetEpochHistoryRequestSchema; + output: typeof GetEpochHistoryResponseSchema; + }, + /** + * Kubernetes pod status — streams every N seconds + * + * @generated from rpc monitoring.MonitoringService.SubscribeClusterPods + */ + subscribeClusterPods: { + methodKind: "server_streaming"; + input: typeof SubscribeClusterPodsRequestSchema; + output: typeof ClusterPodsResponseSchema; + }, +}> = /*@__PURE__*/ + serviceDesc(file_monitoring, 0); + diff --git a/web-dashboard/src/gen/risk_pb.ts b/web-dashboard/src/gen/risk_pb.ts new file mode 100644 index 000000000..8379a39cf --- /dev/null +++ b/web-dashboard/src/gen/risk_pb.ts @@ -0,0 +1,1435 @@ +// @generated by protoc-gen-es v2.11.0 with parameter "target=ts" +// @generated from file risk.proto (package risk, syntax proto3) +/* eslint-disable */ + +import type { GenEnum, GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2"; +import { enumDesc, fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv2"; +import type { Message } from "@bufbuild/protobuf"; + +/** + * Describes the file risk.proto. + */ +export const file_risk: GenFile = /*@__PURE__*/ + fileDesc("CgpyaXNrLnByb3RvEgRyaXNrIl0KIVN0cmVhbUNpcmN1aXRCcmVha2VyU3RhdHVzUmVxdWVzdBITCgZzeW1ib2wYASABKAlIAIgBARIYChBpbnRlcnZhbF9zZWNvbmRzGAIgASgNQgkKB19zeW1ib2wiYAoYU3RyZWFtUmlza01ldHJpY3NSZXF1ZXN0EhkKDHBvcnRmb2xpb19pZBgBIAEoCUgAiAEBEhgKEGludGVydmFsX3NlY29uZHMYAiABKA1CDwoNX3BvcnRmb2xpb19pZCJyCg1HZXRWYVJSZXF1ZXN0Eg8KB3N5bWJvbHMYASADKAkSGAoQY29uZmlkZW5jZV9sZXZlbBgCIAEoARIVCg1sb29rYmFja19kYXlzGAMgASgFEh8KBm1ldGhvZBgEIAEoDjIPLnJpc2suVmFSTWV0aG9kIrYBCg5HZXRWYVJSZXNwb25zZRIVCg1wb3J0Zm9saW9fdmFyGAEgASgBEiQKC3N5bWJvbF92YXJzGAIgAygLMg8ucmlzay5TeW1ib2xWYVISGAoQY29uZmlkZW5jZV9sZXZlbBgDIAEoARIVCg1sb29rYmFja19kYXlzGAQgASgFEh8KBm1ldGhvZBgFIAEoDjIPLnJpc2suVmFSTWV0aG9kEhU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XF1ZXN0Ghwucmlzay5HZXRSaXNrTWV0cmljc1Jlc3BvbnNlEkkKEFN0cmVhbVJpc2tBbGVydHMSHS5yaXNrLlN0cmVhbVJpc2tBbGVydHNSZXF1ZXN0GhQucmlzay5SaXNrQWxlcnRFdmVudDABEkgKDUVtZXJnZW5jeVN0b3ASGi5yaXNrLkVtZXJnZW5jeVN0b3BSZXF1ZXN0Ghsucmlzay5FbWVyZ2VuY3lTdG9wUmVzcG9uc2USZgoXR2V0Q2lyY3VpdEJyZWFrZXJTdGF0dXMSJC5yaXNrLkdldENpcmN1aXRCcmVha2VyU3RhdHVzUmVxdWVzdBolLnJpc2suR2V0Q2lyY3VpdEJyZWFrZXJTdGF0dXNSZXNwb25zZRJuChpTdHJlYW1DaXJjdWl0QnJlYWtlclN0YXR1cxInLnJpc2suU3RyZWFtQ2lyY3VpdEJyZWFrZXJTdGF0dXNSZXF1ZXN0GiUucmlzay5HZXRDaXJjdWl0QnJlYWtlclN0YXR1c1Jlc3BvbnNlMAESUwoRU3RyZWFtUmlza01ldHJpY3MSHi5yaXNrLlN0cmVhbVJpc2tNZXRyaWNzUmVxdWVzdBocLnJpc2suR2V0Umlza01ldHJpY3NSZXNwb25zZTABYgZwcm90bzM"); + +/** + * @generated from message risk.StreamCircuitBreakerStatusRequest + */ +export type StreamCircuitBreakerStatusRequest = Message<"risk.StreamCircuitBreakerStatusRequest"> & { + /** + * Filter by symbol (all if not specified) + * + * @generated from field: optional string symbol = 1; + */ + symbol?: string; + + /** + * 0 = server default (2s) + * + * @generated from field: uint32 interval_seconds = 2; + */ + intervalSeconds: number; +}; + +/** + * Describes the message risk.StreamCircuitBreakerStatusRequest. + * Use `create(StreamCircuitBreakerStatusRequestSchema)` to create a new message. + */ +export const StreamCircuitBreakerStatusRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_risk, 0); + +/** + * @generated from message risk.StreamRiskMetricsRequest + */ +export type StreamRiskMetricsRequest = Message<"risk.StreamRiskMetricsRequest"> & { + /** + * Portfolio identifier (default if not specified) + * + * @generated from field: optional string portfolio_id = 1; + */ + portfolioId?: string; + + /** + * 0 = server default (3s) + * + * @generated from field: uint32 interval_seconds = 2; + */ + intervalSeconds: number; +}; + +/** + * Describes the message risk.StreamRiskMetricsRequest. + * Use `create(StreamRiskMetricsRequestSchema)` to create a new message. + */ +export const StreamRiskMetricsRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_risk, 1); + +/** + * Request to calculate portfolio VaR + * + * @generated from message risk.GetVaRRequest + */ +export type GetVaRRequest = Message<"risk.GetVaRRequest"> & { + /** + * Symbols to include in VaR calculation (empty = all positions) + * + * @generated from field: repeated string symbols = 1; + */ + symbols: string[]; + + /** + * Confidence level (e.g., 0.95 for 95% VaR) + * + * @generated from field: double confidence_level = 2; + */ + confidenceLevel: number; + + /** + * Historical data period for calculation + * + * @generated from field: int32 lookback_days = 3; + */ + lookbackDays: number; + + /** + * VaR calculation method (historical, parametric, Monte Carlo) + * + * @generated from field: risk.VaRMethod method = 4; + */ + method: VaRMethod; +}; + +/** + * Describes the message risk.GetVaRRequest. + * Use `create(GetVaRRequestSchema)` to create a new message. + */ +export const GetVaRRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_risk, 2); + +/** + * Response containing VaR calculation results + * + * @generated from message risk.GetVaRResponse + */ +export type GetVaRResponse = Message<"risk.GetVaRResponse"> & { + /** + * Total portfolio VaR value + * + * @generated from field: double portfolio_var = 1; + */ + portfolioVar: number; + + /** + * Individual symbol VaR contributions + * + * @generated from field: repeated risk.SymbolVaR symbol_vars = 2; + */ + symbolVars: SymbolVaR[]; + + /** + * Confidence level used in calculation + * + * @generated from field: double confidence_level = 3; + */ + confidenceLevel: number; + + /** + * Historical period used + * + * @generated from field: int32 lookback_days = 4; + */ + lookbackDays: number; + + /** + * Calculation method used + * + * @generated from field: risk.VaRMethod method = 5; + */ + method: VaRMethod; + + /** + * Calculation timestamp (nanoseconds) + * + * @generated from field: int64 calculated_at = 6; + */ + calculatedAt: bigint; +}; + +/** + * Describes the message risk.GetVaRResponse. + * Use `create(GetVaRResponseSchema)` to create a new message. + */ +export const GetVaRResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_risk, 3); + +/** + * Request to stream real-time VaR updates + * + * @generated from message risk.StreamVaRRequest + */ +export type StreamVaRRequest = Message<"risk.StreamVaRRequest"> & { + /** + * Confidence level for VaR calculation + * + * @generated from field: double confidence_level = 1; + */ + confidenceLevel: number; + + /** + * How often to send updates + * + * @generated from field: int32 update_frequency_seconds = 2; + */ + updateFrequencySeconds: number; +}; + +/** + * Describes the message risk.StreamVaRRequest. + * Use `create(StreamVaRRequestSchema)` to create a new message. + */ +export const StreamVaRRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_risk, 4); + +/** + * VaR contribution for a specific symbol + * + * @generated from message risk.SymbolVaR + */ +export type SymbolVaR = Message<"risk.SymbolVaR"> & { + /** + * Trading symbol + * + * @generated from field: string symbol = 1; + */ + symbol: string; + + /** + * VaR value for this symbol + * + * @generated from field: double var_value = 2; + */ + varValue: number; + + /** + * Current position size + * + * @generated from field: double position_size = 3; + */ + positionSize: number; + + /** + * Percentage contribution to total portfolio VaR + * + * @generated from field: double contribution_pct = 4; + */ + contributionPct: number; +}; + +/** + * Describes the message risk.SymbolVaR. + * Use `create(SymbolVaRSchema)` to create a new message. + */ +export const SymbolVaRSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_risk, 5); + +/** + * Request for position risk analysis + * + * @generated from message risk.GetPositionRiskRequest + */ +export type GetPositionRiskRequest = Message<"risk.GetPositionRiskRequest"> & { + /** + * Filter by symbol (all symbols if not specified) + * + * @generated from field: optional string symbol = 1; + */ + symbol?: string; + + /** + * Filter by account (all accounts if not specified) + * + * @generated from field: optional string account_id = 2; + */ + accountId?: string; +}; + +/** + * Describes the message risk.GetPositionRiskRequest. + * Use `create(GetPositionRiskRequestSchema)` to create a new message. + */ +export const GetPositionRiskRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_risk, 6); + +/** + * Response containing position risk analysis + * + * @generated from message risk.GetPositionRiskResponse + */ +export type GetPositionRiskResponse = Message<"risk.GetPositionRiskResponse"> & { + /** + * Risk analysis for each position + * + * @generated from field: repeated risk.PositionRisk position_risks = 1; + */ + positionRisks: PositionRisk[]; + + /** + * Overall portfolio risk score (0-100) + * + * @generated from field: double portfolio_risk_score = 2; + */ + portfolioRiskScore: number; +}; + +/** + * Describes the message risk.GetPositionRiskResponse. + * Use `create(GetPositionRiskResponseSchema)` to create a new message. + */ +export const GetPositionRiskResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_risk, 7); + +/** + * Request to validate order against risk limits + * + * @generated from message risk.ValidateOrderRequest + */ +export type ValidateOrderRequest = Message<"risk.ValidateOrderRequest"> & { + /** + * Trading symbol + * + * @generated from field: string symbol = 1; + */ + symbol: string; + + /** + * Order quantity + * + * @generated from field: double quantity = 2; + */ + quantity: number; + + /** + * Order price + * + * @generated from field: double price = 3; + */ + price: number; + + /** + * Buy or sell + * + * @generated from field: string side = 4; + */ + side: string; + + /** + * Trading account + * + * @generated from field: string account_id = 5; + */ + accountId: string; +}; + +/** + * Describes the message risk.ValidateOrderRequest. + * Use `create(ValidateOrderRequestSchema)` to create a new message. + */ +export const ValidateOrderRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_risk, 8); + +/** + * Response containing order validation results + * + * @generated from message risk.ValidateOrderResponse + */ +export type ValidateOrderResponse = Message<"risk.ValidateOrderResponse"> & { + /** + * True if order passes all risk checks + * + * @generated from field: bool is_valid = 1; + */ + isValid: boolean; + + /** + * List of risk violations (if any) + * + * @generated from field: repeated risk.RiskViolation violations = 2; + */ + violations: RiskViolation[]; + + /** + * Risk assessment for this order + * + * @generated from field: risk.RiskScore risk_score = 3; + */ + riskScore?: RiskScore; + + /** + * Human-readable validation message + * + * @generated from field: string message = 4; + */ + message: string; +}; + +/** + * Describes the message risk.ValidateOrderResponse. + * Use `create(ValidateOrderResponseSchema)` to create a new message. + */ +export const ValidateOrderResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_risk, 9); + +/** + * Request for comprehensive risk metrics + * + * @generated from message risk.GetRiskMetricsRequest + */ +export type GetRiskMetricsRequest = Message<"risk.GetRiskMetricsRequest"> & { + /** + * Portfolio identifier (default portfolio if not specified) + * + * @generated from field: optional string portfolio_id = 1; + */ + portfolioId?: string; +}; + +/** + * Describes the message risk.GetRiskMetricsRequest. + * Use `create(GetRiskMetricsRequestSchema)` to create a new message. + */ +export const GetRiskMetricsRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_risk, 10); + +/** + * Response containing comprehensive risk metrics + * + * @generated from message risk.GetRiskMetricsResponse + */ +export type GetRiskMetricsResponse = Message<"risk.GetRiskMetricsResponse"> & { + /** + * Complete risk metrics and statistics + * + * @generated from field: risk.RiskMetrics metrics = 1; + */ + metrics?: RiskMetrics; + + /** + * Metrics calculation timestamp (nanoseconds) + * + * @generated from field: int64 calculated_at = 2; + */ + calculatedAt: bigint; +}; + +/** + * Describes the message risk.GetRiskMetricsResponse. + * Use `create(GetRiskMetricsResponseSchema)` to create a new message. + */ +export const GetRiskMetricsResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_risk, 11); + +/** + * Request to stream real-time risk alerts + * + * @generated from message risk.StreamRiskAlertsRequest + */ +export type StreamRiskAlertsRequest = Message<"risk.StreamRiskAlertsRequest"> & { + /** + * Minimum alert severity to receive + * + * @generated from field: risk.RiskAlertSeverity min_severity = 1; + */ + minSeverity: RiskAlertSeverity; + + /** + * Types of alerts to receive (empty = all types) + * + * @generated from field: repeated risk.RiskAlertType alert_types = 2; + */ + alertTypes: RiskAlertType[]; +}; + +/** + * Describes the message risk.StreamRiskAlertsRequest. + * Use `create(StreamRiskAlertsRequestSchema)` to create a new message. + */ +export const StreamRiskAlertsRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_risk, 12); + +/** + * Request to trigger emergency stop + * + * @generated from message risk.EmergencyStopRequest + */ +export type EmergencyStopRequest = Message<"risk.EmergencyStopRequest"> & { + /** + * Type of emergency stop (all trading, symbol, account, etc.) + * + * @generated from field: risk.EmergencyStopType stop_type = 1; + */ + stopType: EmergencyStopType; + + /** + * Reason for emergency stop + * + * @generated from field: string reason = 2; + */ + reason: string; + + /** + * Symbol to stop (for symbol-specific stops) + * + * @generated from field: optional string symbol = 3; + */ + symbol?: string; + + /** + * Account to stop (for account-specific stops) + * + * @generated from field: optional string account_id = 4; + */ + accountId?: string; +}; + +/** + * Describes the message risk.EmergencyStopRequest. + * Use `create(EmergencyStopRequestSchema)` to create a new message. + */ +export const EmergencyStopRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_risk, 13); + +/** + * Response after emergency stop execution + * + * @generated from message risk.EmergencyStopResponse + */ +export type EmergencyStopResponse = Message<"risk.EmergencyStopResponse"> & { + /** + * True if emergency stop was successful + * + * @generated from field: bool success = 1; + */ + success: boolean; + + /** + * Status message or error description + * + * @generated from field: string message = 2; + */ + message: string; + + /** + * Emergency stop timestamp (nanoseconds) + * + * @generated from field: int64 timestamp = 3; + */ + timestamp: bigint; + + /** + * List of order IDs affected by the stop + * + * @generated from field: repeated string affected_orders = 4; + */ + affectedOrders: string[]; +}; + +/** + * Describes the message risk.EmergencyStopResponse. + * Use `create(EmergencyStopResponseSchema)` to create a new message. + */ +export const EmergencyStopResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_risk, 14); + +/** + * Request for circuit breaker status + * + * @generated from message risk.GetCircuitBreakerStatusRequest + */ +export type GetCircuitBreakerStatusRequest = Message<"risk.GetCircuitBreakerStatusRequest"> & { + /** + * Filter by symbol (all symbols if not specified) + * + * @generated from field: optional string symbol = 1; + */ + symbol?: string; +}; + +/** + * Describes the message risk.GetCircuitBreakerStatusRequest. + * Use `create(GetCircuitBreakerStatusRequestSchema)` to create a new message. + */ +export const GetCircuitBreakerStatusRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_risk, 15); + +/** + * Response containing circuit breaker status + * + * @generated from message risk.GetCircuitBreakerStatusResponse + */ +export type GetCircuitBreakerStatusResponse = Message<"risk.GetCircuitBreakerStatusResponse"> & { + /** + * Status of all circuit breakers + * + * @generated from field: repeated risk.CircuitBreakerStatus circuit_breakers = 1; + */ + circuitBreakers: CircuitBreakerStatus[]; +}; + +/** + * Describes the message risk.GetCircuitBreakerStatusResponse. + * Use `create(GetCircuitBreakerStatusResponseSchema)` to create a new message. + */ +export const GetCircuitBreakerStatusResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_risk, 16); + +/** + * Risk analysis for a specific position + * + * @generated from message risk.PositionRisk + */ +export type PositionRisk = Message<"risk.PositionRisk"> & { + /** + * Trading symbol + * + * @generated from field: string symbol = 1; + */ + symbol: string; + + /** + * Current position size + * + * @generated from field: double position_size = 2; + */ + positionSize: number; + + /** + * Market value of position + * + * @generated from field: double market_value = 3; + */ + marketValue: number; + + /** + * Contribution to portfolio VaR + * + * @generated from field: double var_contribution = 4; + */ + varContribution: number; + + /** + * Position concentration risk (0-100) + * + * @generated from field: double concentration_risk = 5; + */ + concentrationRisk: number; + + /** + * Liquidity risk score (0-100) + * + * @generated from field: double liquidity_risk = 6; + */ + liquidityRisk: number; + + /** + * Overall risk assessment + * + * @generated from field: risk.RiskScore overall_score = 7; + */ + overallScore?: RiskScore; + + /** + * Additional risk metrics + * + * @generated from field: repeated risk.RiskMetric metrics = 8; + */ + metrics: RiskMetric[]; +}; + +/** + * Describes the message risk.PositionRisk. + * Use `create(PositionRiskSchema)` to create a new message. + */ +export const PositionRiskSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_risk, 17); + +/** + * @generated from message risk.RiskViolation + */ +export type RiskViolation = Message<"risk.RiskViolation"> & { + /** + * @generated from field: risk.RiskViolationType violation_type = 1; + */ + violationType: RiskViolationType; + + /** + * @generated from field: string description = 2; + */ + description: string; + + /** + * @generated from field: double current_value = 3; + */ + currentValue: number; + + /** + * @generated from field: double limit_value = 4; + */ + limitValue: number; + + /** + * @generated from field: risk.RiskAlertSeverity severity = 5; + */ + severity: RiskAlertSeverity; +}; + +/** + * Describes the message risk.RiskViolation. + * Use `create(RiskViolationSchema)` to create a new message. + */ +export const RiskViolationSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_risk, 18); + +/** + * @generated from message risk.RiskScore + */ +export type RiskScore = Message<"risk.RiskScore"> & { + /** + * @generated from field: double overall_score = 1; + */ + overallScore: number; + + /** + * @generated from field: double concentration_score = 2; + */ + concentrationScore: number; + + /** + * @generated from field: double liquidity_score = 3; + */ + liquidityScore: number; + + /** + * @generated from field: double volatility_score = 4; + */ + volatilityScore: number; + + /** + * @generated from field: double correlation_score = 5; + */ + correlationScore: number; + + /** + * @generated from field: risk.RiskLevel risk_level = 6; + */ + riskLevel: RiskLevel; +}; + +/** + * Describes the message risk.RiskScore. + * Use `create(RiskScoreSchema)` to create a new message. + */ +export const RiskScoreSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_risk, 19); + +/** + * @generated from message risk.RiskMetrics + */ +export type RiskMetrics = Message<"risk.RiskMetrics"> & { + /** + * @generated from field: double portfolio_var_1d = 1; + */ + portfolioVar1d: number; + + /** + * @generated from field: double portfolio_var_5d = 2; + */ + portfolioVar5d: number; + + /** + * @generated from field: double portfolio_var_30d = 3; + */ + portfolioVar30d: number; + + /** + * @generated from field: double max_drawdown = 4; + */ + maxDrawdown: number; + + /** + * @generated from field: double current_drawdown = 5; + */ + currentDrawdown: number; + + /** + * @generated from field: double sharpe_ratio = 6; + */ + sharpeRatio: number; + + /** + * @generated from field: double sortino_ratio = 7; + */ + sortinoRatio: number; + + /** + * @generated from field: double beta = 8; + */ + beta: number; + + /** + * @generated from field: double alpha = 9; + */ + alpha: number; + + /** + * @generated from field: double volatility = 10; + */ + volatility: number; + + /** + * @generated from field: repeated risk.PositionRisk position_risks = 11; + */ + positionRisks: PositionRisk[]; +}; + +/** + * Describes the message risk.RiskMetrics. + * Use `create(RiskMetricsSchema)` to create a new message. + */ +export const RiskMetricsSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_risk, 20); + +/** + * @generated from message risk.RiskMetric + */ +export type RiskMetric = Message<"risk.RiskMetric"> & { + /** + * @generated from field: string name = 1; + */ + name: string; + + /** + * @generated from field: double value = 2; + */ + value: number; + + /** + * @generated from field: string unit = 3; + */ + unit: string; + + /** + * @generated from field: risk.RiskLevel risk_level = 4; + */ + riskLevel: RiskLevel; +}; + +/** + * Describes the message risk.RiskMetric. + * Use `create(RiskMetricSchema)` to create a new message. + */ +export const RiskMetricSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_risk, 21); + +/** + * @generated from message risk.CircuitBreakerStatus + */ +export type CircuitBreakerStatus = Message<"risk.CircuitBreakerStatus"> & { + /** + * @generated from field: string name = 1; + */ + name: string; + + /** + * @generated from field: bool is_triggered = 2; + */ + isTriggered: boolean; + + /** + * @generated from field: optional string trigger_reason = 3; + */ + triggerReason?: string; + + /** + * @generated from field: optional int64 triggered_at = 4; + */ + triggeredAt?: bigint; + + /** + * @generated from field: optional int64 reset_at = 5; + */ + resetAt?: bigint; + + /** + * @generated from field: risk.CircuitBreakerType breaker_type = 6; + */ + breakerType: CircuitBreakerType; +}; + +/** + * Describes the message risk.CircuitBreakerStatus. + * Use `create(CircuitBreakerStatusSchema)` to create a new message. + */ +export const CircuitBreakerStatusSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_risk, 22); + +/** + * Event Messages + * + * @generated from message risk.VaREvent + */ +export type VaREvent = Message<"risk.VaREvent"> & { + /** + * @generated from field: double portfolio_var = 1; + */ + portfolioVar: number; + + /** + * @generated from field: repeated risk.SymbolVaR symbol_vars = 2; + */ + symbolVars: SymbolVaR[]; + + /** + * @generated from field: risk.VaRChangeType change_type = 3; + */ + changeType: VaRChangeType; + + /** + * @generated from field: int64 timestamp = 4; + */ + timestamp: bigint; +}; + +/** + * Describes the message risk.VaREvent. + * Use `create(VaREventSchema)` to create a new message. + */ +export const VaREventSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_risk, 23); + +/** + * @generated from message risk.RiskAlertEvent + */ +export type RiskAlertEvent = Message<"risk.RiskAlertEvent"> & { + /** + * @generated from field: string alert_id = 1; + */ + alertId: string; + + /** + * @generated from field: risk.RiskAlertType alert_type = 2; + */ + alertType: RiskAlertType; + + /** + * @generated from field: risk.RiskAlertSeverity severity = 3; + */ + severity: RiskAlertSeverity; + + /** + * @generated from field: string message = 4; + */ + message: string; + + /** + * @generated from field: optional string symbol = 5; + */ + symbol?: string; + + /** + * @generated from field: optional string account_id = 6; + */ + accountId?: string; + + /** + * @generated from field: map metadata = 7; + */ + metadata: { [key: string]: string }; + + /** + * @generated from field: int64 timestamp = 8; + */ + timestamp: bigint; +}; + +/** + * Describes the message risk.RiskAlertEvent. + * Use `create(RiskAlertEventSchema)` to create a new message. + */ +export const RiskAlertEventSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_risk, 24); + +/** + * VaR calculation methodology + * + * @generated from enum risk.VaRMethod + */ +export enum VaRMethod { + /** + * Default/unknown method + * + * @generated from enum value: VAR_METHOD_UNSPECIFIED = 0; + */ + VAR_METHOD_UNSPECIFIED = 0, + + /** + * Historical simulation method + * + * @generated from enum value: VAR_METHOD_HISTORICAL = 1; + */ + VAR_METHOD_HISTORICAL = 1, + + /** + * Parametric (variance-covariance) method + * + * @generated from enum value: VAR_METHOD_PARAMETRIC = 2; + */ + VAR_METHOD_PARAMETRIC = 2, + + /** + * Monte Carlo simulation method + * + * @generated from enum value: VAR_METHOD_MONTE_CARLO = 3; + */ + VAR_METHOD_MONTE_CARLO = 3, +} + +/** + * Describes the enum risk.VaRMethod. + */ +export const VaRMethodSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_risk, 0); + +/** + * @generated from enum risk.RiskViolationType + */ +export enum RiskViolationType { + /** + * @generated from enum value: RISK_VIOLATION_TYPE_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * @generated from enum value: RISK_VIOLATION_TYPE_POSITION_LIMIT = 1; + */ + POSITION_LIMIT = 1, + + /** + * @generated from enum value: RISK_VIOLATION_TYPE_CONCENTRATION = 2; + */ + CONCENTRATION = 2, + + /** + * @generated from enum value: RISK_VIOLATION_TYPE_VAR_LIMIT = 3; + */ + VAR_LIMIT = 3, + + /** + * @generated from enum value: RISK_VIOLATION_TYPE_DRAWDOWN = 4; + */ + DRAWDOWN = 4, + + /** + * @generated from enum value: RISK_VIOLATION_TYPE_LIQUIDITY = 5; + */ + LIQUIDITY = 5, + + /** + * @generated from enum value: RISK_VIOLATION_TYPE_CORRELATION = 6; + */ + CORRELATION = 6, +} + +/** + * Describes the enum risk.RiskViolationType. + */ +export const RiskViolationTypeSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_risk, 1); + +/** + * Risk assessment levels + * + * @generated from enum risk.RiskLevel + */ +export enum RiskLevel { + /** + * Default/unknown level + * + * @generated from enum value: RISK_LEVEL_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * Low risk (green) + * + * @generated from enum value: RISK_LEVEL_LOW = 1; + */ + LOW = 1, + + /** + * Medium risk (yellow) + * + * @generated from enum value: RISK_LEVEL_MEDIUM = 2; + */ + MEDIUM = 2, + + /** + * High risk (orange) + * + * @generated from enum value: RISK_LEVEL_HIGH = 3; + */ + HIGH = 3, + + /** + * Critical risk (red) + * + * @generated from enum value: RISK_LEVEL_CRITICAL = 4; + */ + CRITICAL = 4, +} + +/** + * Describes the enum risk.RiskLevel. + */ +export const RiskLevelSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_risk, 2); + +/** + * Severity levels for risk alerts + * + * @generated from enum risk.RiskAlertSeverity + */ +export enum RiskAlertSeverity { + /** + * Default/unknown severity + * + * @generated from enum value: RISK_ALERT_SEVERITY_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * Informational alert + * + * @generated from enum value: RISK_ALERT_SEVERITY_INFO = 1; + */ + INFO = 1, + + /** + * Warning alert + * + * @generated from enum value: RISK_ALERT_SEVERITY_WARNING = 2; + */ + WARNING = 2, + + /** + * Critical alert requiring attention + * + * @generated from enum value: RISK_ALERT_SEVERITY_CRITICAL = 3; + */ + CRITICAL = 3, + + /** + * Emergency alert requiring immediate action + * + * @generated from enum value: RISK_ALERT_SEVERITY_EMERGENCY = 4; + */ + EMERGENCY = 4, +} + +/** + * Describes the enum risk.RiskAlertSeverity. + */ +export const RiskAlertSeveritySchema: GenEnum = /*@__PURE__*/ + enumDesc(file_risk, 3); + +/** + * Types of risk alerts + * + * @generated from enum risk.RiskAlertType + */ +export enum RiskAlertType { + /** + * Default/unknown type + * + * @generated from enum value: RISK_ALERT_TYPE_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * VaR limit breach + * + * @generated from enum value: RISK_ALERT_TYPE_VAR_BREACH = 1; + */ + VAR_BREACH = 1, + + /** + * Position size limit breach + * + * @generated from enum value: RISK_ALERT_TYPE_POSITION_LIMIT = 2; + */ + POSITION_LIMIT = 2, + + /** + * Drawdown limit breach + * + * @generated from enum value: RISK_ALERT_TYPE_DRAWDOWN = 3; + */ + DRAWDOWN = 3, + + /** + * Portfolio concentration risk + * + * @generated from enum value: RISK_ALERT_TYPE_CONCENTRATION = 4; + */ + CONCENTRATION = 4, + + /** + * Liquidity risk alert + * + * @generated from enum value: RISK_ALERT_TYPE_LIQUIDITY = 5; + */ + LIQUIDITY = 5, + + /** + * Correlation risk alert + * + * @generated from enum value: RISK_ALERT_TYPE_CORRELATION = 6; + */ + CORRELATION = 6, +} + +/** + * Describes the enum risk.RiskAlertType. + */ +export const RiskAlertTypeSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_risk, 4); + +/** + * Types of emergency stops + * + * @generated from enum risk.EmergencyStopType + */ +export enum EmergencyStopType { + /** + * Default/unknown type + * + * @generated from enum value: EMERGENCY_STOP_TYPE_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * Stop all trading activity + * + * @generated from enum value: EMERGENCY_STOP_TYPE_ALL_TRADING = 1; + */ + ALL_TRADING = 1, + + /** + * Stop trading for specific symbol + * + * @generated from enum value: EMERGENCY_STOP_TYPE_SYMBOL = 2; + */ + SYMBOL = 2, + + /** + * Stop trading for specific account + * + * @generated from enum value: EMERGENCY_STOP_TYPE_ACCOUNT = 3; + */ + ACCOUNT = 3, + + /** + * Stop specific trading strategy + * + * @generated from enum value: EMERGENCY_STOP_TYPE_STRATEGY = 4; + */ + STRATEGY = 4, +} + +/** + * Describes the enum risk.EmergencyStopType. + */ +export const EmergencyStopTypeSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_risk, 5); + +/** + * @generated from enum risk.CircuitBreakerType + */ +export enum CircuitBreakerType { + /** + * @generated from enum value: CIRCUIT_BREAKER_TYPE_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * @generated from enum value: CIRCUIT_BREAKER_TYPE_PORTFOLIO_LOSS = 1; + */ + PORTFOLIO_LOSS = 1, + + /** + * @generated from enum value: CIRCUIT_BREAKER_TYPE_SYMBOL_VOLATILITY = 2; + */ + SYMBOL_VOLATILITY = 2, + + /** + * @generated from enum value: CIRCUIT_BREAKER_TYPE_POSITION_SIZE = 3; + */ + POSITION_SIZE = 3, + + /** + * @generated from enum value: CIRCUIT_BREAKER_TYPE_DRAWDOWN = 4; + */ + DRAWDOWN = 4, +} + +/** + * Describes the enum risk.CircuitBreakerType. + */ +export const CircuitBreakerTypeSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_risk, 6); + +/** + * @generated from enum risk.VaRChangeType + */ +export enum VaRChangeType { + /** + * @generated from enum value: VAR_CHANGE_TYPE_UNSPECIFIED = 0; + */ + VAR_CHANGE_TYPE_UNSPECIFIED = 0, + + /** + * @generated from enum value: VAR_CHANGE_TYPE_INCREASED = 1; + */ + VAR_CHANGE_TYPE_INCREASED = 1, + + /** + * @generated from enum value: VAR_CHANGE_TYPE_DECREASED = 2; + */ + VAR_CHANGE_TYPE_DECREASED = 2, + + /** + * @generated from enum value: VAR_CHANGE_TYPE_BREACH = 3; + */ + VAR_CHANGE_TYPE_BREACH = 3, +} + +/** + * Describes the enum risk.VaRChangeType. + */ +export const VaRChangeTypeSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_risk, 7); + +/** + * Risk Management Service provides comprehensive risk assessment, monitoring, and control capabilities + * for high-frequency trading operations. This service integrates real-time VaR calculations, + * position risk analysis, compliance monitoring, and emergency controls. + * + * @generated from service risk.RiskService + */ +export const RiskService: GenService<{ + /** + * Value at Risk (VaR) Calculations + * Calculate current portfolio VaR using specified method and parameters + * + * @generated from rpc risk.RiskService.GetVaR + */ + getVaR: { + methodKind: "unary"; + input: typeof GetVaRRequestSchema; + output: typeof GetVaRResponseSchema; + }, + /** + * Stream real-time VaR updates as market conditions change + * + * @generated from rpc risk.RiskService.StreamVaRUpdates + */ + streamVaRUpdates: { + methodKind: "server_streaming"; + input: typeof StreamVaRRequestSchema; + output: typeof VaREventSchema; + }, + /** + * Position Risk Analysis + * Get comprehensive risk analysis for current positions + * + * @generated from rpc risk.RiskService.GetPositionRisk + */ + getPositionRisk: { + methodKind: "unary"; + input: typeof GetPositionRiskRequestSchema; + output: typeof GetPositionRiskResponseSchema; + }, + /** + * Validate order against risk limits before execution + * + * @generated from rpc risk.RiskService.ValidateOrder + */ + validateOrder: { + methodKind: "unary"; + input: typeof ValidateOrderRequestSchema; + output: typeof ValidateOrderResponseSchema; + }, + /** + * Risk Metrics and Monitoring + * Get comprehensive portfolio risk metrics and statistics + * + * @generated from rpc risk.RiskService.GetRiskMetrics + */ + getRiskMetrics: { + methodKind: "unary"; + input: typeof GetRiskMetricsRequestSchema; + output: typeof GetRiskMetricsResponseSchema; + }, + /** + * Stream real-time risk alerts and violations + * + * @generated from rpc risk.RiskService.StreamRiskAlerts + */ + streamRiskAlerts: { + methodKind: "server_streaming"; + input: typeof StreamRiskAlertsRequestSchema; + output: typeof RiskAlertEventSchema; + }, + /** + * Emergency Controls and Circuit Breakers + * Trigger emergency stop to halt trading activities + * + * @generated from rpc risk.RiskService.EmergencyStop + */ + emergencyStop: { + methodKind: "unary"; + input: typeof EmergencyStopRequestSchema; + output: typeof EmergencyStopResponseSchema; + }, + /** + * Get status of all circuit breakers and safety mechanisms + * + * @generated from rpc risk.RiskService.GetCircuitBreakerStatus + */ + getCircuitBreakerStatus: { + methodKind: "unary"; + input: typeof GetCircuitBreakerStatusRequestSchema; + output: typeof GetCircuitBreakerStatusResponseSchema; + }, + /** + * Server-streaming: polls GetCircuitBreakerStatus at gateway level + * + * @generated from rpc risk.RiskService.StreamCircuitBreakerStatus + */ + streamCircuitBreakerStatus: { + methodKind: "server_streaming"; + input: typeof StreamCircuitBreakerStatusRequestSchema; + output: typeof GetCircuitBreakerStatusResponseSchema; + }, + /** + * Server-streaming: polls GetRiskMetrics at gateway level + * + * @generated from rpc risk.RiskService.StreamRiskMetrics + */ + streamRiskMetrics: { + methodKind: "server_streaming"; + input: typeof StreamRiskMetricsRequestSchema; + output: typeof GetRiskMetricsResponseSchema; + }, +}> = /*@__PURE__*/ + serviceDesc(file_risk, 0); + diff --git a/web-dashboard/src/gen/trading_agent_pb.ts b/web-dashboard/src/gen/trading_agent_pb.ts new file mode 100644 index 000000000..8d1459cdb --- /dev/null +++ b/web-dashboard/src/gen/trading_agent_pb.ts @@ -0,0 +1,2922 @@ +// @generated by protoc-gen-es v2.11.0 with parameter "target=ts" +// @generated from file trading_agent.proto (package trading_agent, syntax proto3) +/* eslint-disable */ + +import type { GenEnum, GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2"; +import { enumDesc, fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv2"; +import type { Message } from "@bufbuild/protobuf"; + +/** + * Describes the file trading_agent.proto. + */ +export const file_trading_agent: GenFile = /*@__PURE__*/ + fileDesc("ChN0cmFkaW5nX2FnZW50LnByb3RvEg10cmFkaW5nX2FnZW50IjQKGFN0cmVhbUFnZW50U3RhdHVzUmVxdWVzdBIYChBpbnRlcnZhbF9zZWNvbmRzGAE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19hZ2VudC5IZWFsdGhDaGVja1Jlc3BvbnNlEmUKEVN0cmVhbUFnZW50U3RhdHVzEicudHJhZGluZ19hZ2VudC5TdHJlYW1BZ2VudFN0YXR1c1JlcXVlc3QaJS50cmFkaW5nX2FnZW50LkdldEFnZW50U3RhdHVzUmVzcG9uc2UwAWIGcHJvdG8z"); + +/** + * @generated from message trading_agent.StreamAgentStatusRequest + */ +export type StreamAgentStatusRequest = Message<"trading_agent.StreamAgentStatusRequest"> & { + /** + * 0 = server default (3s) + * + * @generated from field: uint32 interval_seconds = 1; + */ + intervalSeconds: number; +}; + +/** + * Describes the message trading_agent.StreamAgentStatusRequest. + * Use `create(StreamAgentStatusRequestSchema)` to create a new message. + */ +export const StreamAgentStatusRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_trading_agent, 0); + +/** + * @generated from message trading_agent.SelectUniverseRequest + */ +export type SelectUniverseRequest = Message<"trading_agent.SelectUniverseRequest"> & { + /** + * Selection criteria + * + * @generated from field: trading_agent.UniverseCriteria criteria = 1; + */ + criteria?: UniverseCriteria; + + /** + * Maximum instruments in universe + * + * @generated from field: optional uint32 max_instruments = 2; + */ + maxInstruments?: number; + + /** + * Force recalculation + * + * @generated from field: bool force_refresh = 3; + */ + forceRefresh: boolean; +}; + +/** + * Describes the message trading_agent.SelectUniverseRequest. + * Use `create(SelectUniverseRequestSchema)` to create a new message. + */ +export const SelectUniverseRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_trading_agent, 1); + +/** + * @generated from message trading_agent.SelectUniverseResponse + */ +export type SelectUniverseResponse = Message<"trading_agent.SelectUniverseResponse"> & { + /** + * Selected instruments + * + * @generated from field: repeated trading_agent.Instrument instruments = 1; + */ + instruments: Instrument[]; + + /** + * Universe quality metrics + * + * @generated from field: trading_agent.UniverseMetrics metrics = 2; + */ + metrics?: UniverseMetrics; + + /** + * Selection timestamp (nanoseconds) + * + * @generated from field: int64 timestamp = 3; + */ + timestamp: bigint; + + /** + * Unique universe identifier + * + * @generated from field: string universe_id = 4; + */ + universeId: string; +}; + +/** + * Describes the message trading_agent.SelectUniverseResponse. + * Use `create(SelectUniverseResponseSchema)` to create a new message. + */ +export const SelectUniverseResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_trading_agent, 2); + +/** + * @generated from message trading_agent.GetUniverseRequest + */ +export type GetUniverseRequest = Message<"trading_agent.GetUniverseRequest"> & { + /** + * Get specific universe, or current if not specified + * + * @generated from field: optional string universe_id = 1; + */ + universeId?: string; +}; + +/** + * Describes the message trading_agent.GetUniverseRequest. + * Use `create(GetUniverseRequestSchema)` to create a new message. + */ +export const GetUniverseRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_trading_agent, 3); + +/** + * @generated from message trading_agent.GetUniverseResponse + */ +export type GetUniverseResponse = Message<"trading_agent.GetUniverseResponse"> & { + /** + * @generated from field: string universe_id = 1; + */ + universeId: string; + + /** + * @generated from field: repeated trading_agent.Instrument instruments = 2; + */ + instruments: Instrument[]; + + /** + * @generated from field: trading_agent.UniverseCriteria criteria = 3; + */ + criteria?: UniverseCriteria; + + /** + * @generated from field: trading_agent.UniverseMetrics metrics = 4; + */ + metrics?: UniverseMetrics; + + /** + * Unix timestamp (nanoseconds) + * + * @generated from field: int64 created_at = 5; + */ + createdAt: bigint; + + /** + * @generated from field: int64 updated_at = 6; + */ + updatedAt: bigint; +}; + +/** + * Describes the message trading_agent.GetUniverseResponse. + * Use `create(GetUniverseResponseSchema)` to create a new message. + */ +export const GetUniverseResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_trading_agent, 4); + +/** + * @generated from message trading_agent.UpdateUniverseCriteriaRequest + */ +export type UpdateUniverseCriteriaRequest = Message<"trading_agent.UpdateUniverseCriteriaRequest"> & { + /** + * @generated from field: trading_agent.UniverseCriteria criteria = 1; + */ + criteria?: UniverseCriteria; +}; + +/** + * Describes the message trading_agent.UpdateUniverseCriteriaRequest. + * Use `create(UpdateUniverseCriteriaRequestSchema)` to create a new message. + */ +export const UpdateUniverseCriteriaRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_trading_agent, 5); + +/** + * @generated from message trading_agent.UpdateUniverseCriteriaResponse + */ +export type UpdateUniverseCriteriaResponse = Message<"trading_agent.UpdateUniverseCriteriaResponse"> & { + /** + * @generated from field: bool success = 1; + */ + success: boolean; + + /** + * @generated from field: string message = 2; + */ + message: string; + + /** + * New universe ID after update + * + * @generated from field: string universe_id = 3; + */ + universeId: string; +}; + +/** + * Describes the message trading_agent.UpdateUniverseCriteriaResponse. + * Use `create(UpdateUniverseCriteriaResponseSchema)` to create a new message. + */ +export const UpdateUniverseCriteriaResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_trading_agent, 6); + +/** + * @generated from message trading_agent.SelectAssetsRequest + */ +export type SelectAssetsRequest = Message<"trading_agent.SelectAssetsRequest"> & { + /** + * Universe to select from + * + * @generated from field: string universe_id = 1; + */ + universeId: string; + + /** + * Selection criteria + * + * @generated from field: trading_agent.AssetSelectionCriteria criteria = 2; + */ + criteria?: AssetSelectionCriteria; + + /** + * Maximum assets to select + * + * @generated from field: uint32 max_assets = 3; + */ + maxAssets: number; +}; + +/** + * Describes the message trading_agent.SelectAssetsRequest. + * Use `create(SelectAssetsRequestSchema)` to create a new message. + */ +export const SelectAssetsRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_trading_agent, 7); + +/** + * @generated from message trading_agent.SelectAssetsResponse + */ +export type SelectAssetsResponse = Message<"trading_agent.SelectAssetsResponse"> & { + /** + * Selected assets with scores + * + * @generated from field: repeated trading_agent.AssetScore assets = 1; + */ + assets: AssetScore[]; + + /** + * Selection quality metrics + * + * @generated from field: trading_agent.SelectionMetrics metrics = 2; + */ + metrics?: SelectionMetrics; + + /** + * @generated from field: int64 timestamp = 3; + */ + timestamp: bigint; +}; + +/** + * Describes the message trading_agent.SelectAssetsResponse. + * Use `create(SelectAssetsResponseSchema)` to create a new message. + */ +export const SelectAssetsResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_trading_agent, 8); + +/** + * @generated from message trading_agent.GetSelectedAssetsRequest + */ +export type GetSelectedAssetsRequest = Message<"trading_agent.GetSelectedAssetsRequest"> & { + /** + * @generated from field: optional string universe_id = 1; + */ + universeId?: string; +}; + +/** + * Describes the message trading_agent.GetSelectedAssetsRequest. + * Use `create(GetSelectedAssetsRequestSchema)` to create a new message. + */ +export const GetSelectedAssetsRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_trading_agent, 9); + +/** + * @generated from message trading_agent.GetSelectedAssetsResponse + */ +export type GetSelectedAssetsResponse = Message<"trading_agent.GetSelectedAssetsResponse"> & { + /** + * @generated from field: repeated trading_agent.AssetScore assets = 1; + */ + assets: AssetScore[]; + + /** + * @generated from field: trading_agent.SelectionMetrics metrics = 2; + */ + metrics?: SelectionMetrics; + + /** + * @generated from field: int64 timestamp = 3; + */ + timestamp: bigint; +}; + +/** + * Describes the message trading_agent.GetSelectedAssetsResponse. + * Use `create(GetSelectedAssetsResponseSchema)` to create a new message. + */ +export const GetSelectedAssetsResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_trading_agent, 10); + +/** + * @generated from message trading_agent.AllocatePortfolioRequest + */ +export type AllocatePortfolioRequest = Message<"trading_agent.AllocatePortfolioRequest"> & { + /** + * Assets to allocate across + * + * @generated from field: repeated trading_agent.AssetScore assets = 1; + */ + assets: AssetScore[]; + + /** + * Allocation algorithm + * + * @generated from field: trading_agent.AllocationStrategy strategy = 2; + */ + strategy?: AllocationStrategy; + + /** + * Risk limits + * + * @generated from field: trading_agent.RiskConstraints risk_constraints = 3; + */ + riskConstraints?: RiskConstraints; + + /** + * Total capital to allocate + * + * @generated from field: double total_capital = 4; + */ + totalCapital: number; +}; + +/** + * Describes the message trading_agent.AllocatePortfolioRequest. + * Use `create(AllocatePortfolioRequestSchema)` to create a new message. + */ +export const AllocatePortfolioRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_trading_agent, 11); + +/** + * @generated from message trading_agent.AllocatePortfolioResponse + */ +export type AllocatePortfolioResponse = Message<"trading_agent.AllocatePortfolioResponse"> & { + /** + * Allocation per asset + * + * @generated from field: repeated trading_agent.AssetAllocation allocations = 1; + */ + allocations: AssetAllocation[]; + + /** + * Allocation quality metrics + * + * @generated from field: trading_agent.AllocationMetrics metrics = 2; + */ + metrics?: AllocationMetrics; + + /** + * @generated from field: int64 timestamp = 3; + */ + timestamp: bigint; + + /** + * @generated from field: string allocation_id = 4; + */ + allocationId: string; +}; + +/** + * Describes the message trading_agent.AllocatePortfolioResponse. + * Use `create(AllocatePortfolioResponseSchema)` to create a new message. + */ +export const AllocatePortfolioResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_trading_agent, 12); + +/** + * @generated from message trading_agent.GetAllocationRequest + */ +export type GetAllocationRequest = Message<"trading_agent.GetAllocationRequest"> & { + /** + * Get specific allocation, or current if not specified + * + * @generated from field: optional string allocation_id = 1; + */ + allocationId?: string; +}; + +/** + * Describes the message trading_agent.GetAllocationRequest. + * Use `create(GetAllocationRequestSchema)` to create a new message. + */ +export const GetAllocationRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_trading_agent, 13); + +/** + * @generated from message trading_agent.GetAllocationResponse + */ +export type GetAllocationResponse = Message<"trading_agent.GetAllocationResponse"> & { + /** + * @generated from field: string allocation_id = 1; + */ + allocationId: string; + + /** + * @generated from field: repeated trading_agent.AssetAllocation allocations = 2; + */ + allocations: AssetAllocation[]; + + /** + * @generated from field: trading_agent.AllocationMetrics metrics = 3; + */ + metrics?: AllocationMetrics; + + /** + * @generated from field: int64 created_at = 4; + */ + createdAt: bigint; + + /** + * @generated from field: double total_capital = 5; + */ + totalCapital: number; +}; + +/** + * Describes the message trading_agent.GetAllocationResponse. + * Use `create(GetAllocationResponseSchema)` to create a new message. + */ +export const GetAllocationResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_trading_agent, 14); + +/** + * @generated from message trading_agent.RebalancePortfolioRequest + */ +export type RebalancePortfolioRequest = Message<"trading_agent.RebalancePortfolioRequest"> & { + /** + * Target allocation + * + * @generated from field: string allocation_id = 1; + */ + allocationId: string; + + /** + * Min deviation to trigger rebalance (%) + * + * @generated from field: double rebalance_threshold = 2; + */ + rebalanceThreshold: number; + + /** + * Force rebalance regardless of threshold + * + * @generated from field: bool force_rebalance = 3; + */ + forceRebalance: boolean; +}; + +/** + * Describes the message trading_agent.RebalancePortfolioRequest. + * Use `create(RebalancePortfolioRequestSchema)` to create a new message. + */ +export const RebalancePortfolioRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_trading_agent, 15); + +/** + * @generated from message trading_agent.RebalancePortfolioResponse + */ +export type RebalancePortfolioResponse = Message<"trading_agent.RebalancePortfolioResponse"> & { + /** + * Required rebalancing actions + * + * @generated from field: repeated trading_agent.RebalanceAction actions = 1; + */ + actions: RebalanceAction[]; + + /** + * @generated from field: trading_agent.RebalanceMetrics metrics = 2; + */ + metrics?: RebalanceMetrics; + + /** + * @generated from field: bool rebalance_required = 3; + */ + rebalanceRequired: boolean; + + /** + * @generated from field: int64 timestamp = 4; + */ + timestamp: bigint; +}; + +/** + * Describes the message trading_agent.RebalancePortfolioResponse. + * Use `create(RebalancePortfolioResponseSchema)` to create a new message. + */ +export const RebalancePortfolioResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_trading_agent, 16); + +/** + * @generated from message trading_agent.GenerateOrdersRequest + */ +export type GenerateOrdersRequest = Message<"trading_agent.GenerateOrdersRequest"> & { + /** + * Target allocation + * + * @generated from field: string allocation_id = 1; + */ + allocationId: string; + + /** + * ML predictions for timing + * + * @generated from field: repeated trading_agent.MLSignal ml_signals = 2; + */ + mlSignals: MLSignal[]; + + /** + * Order generation algorithm + * + * @generated from field: trading_agent.OrderGenerationStrategy strategy = 3; + */ + strategy?: OrderGenerationStrategy; +}; + +/** + * Describes the message trading_agent.GenerateOrdersRequest. + * Use `create(GenerateOrdersRequestSchema)` to create a new message. + */ +export const GenerateOrdersRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_trading_agent, 17); + +/** + * @generated from message trading_agent.GenerateOrdersResponse + */ +export type GenerateOrdersResponse = Message<"trading_agent.GenerateOrdersResponse"> & { + /** + * Generated order instructions + * + * @generated from field: repeated trading_agent.GeneratedOrder orders = 1; + */ + orders: GeneratedOrder[]; + + /** + * @generated from field: trading_agent.OrderGenerationMetrics metrics = 2; + */ + metrics?: OrderGenerationMetrics; + + /** + * @generated from field: int64 timestamp = 3; + */ + timestamp: bigint; + + /** + * @generated from field: string order_batch_id = 4; + */ + orderBatchId: string; +}; + +/** + * Describes the message trading_agent.GenerateOrdersResponse. + * Use `create(GenerateOrdersResponseSchema)` to create a new message. + */ +export const GenerateOrdersResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_trading_agent, 18); + +/** + * @generated from message trading_agent.SubmitAgentOrdersRequest + */ +export type SubmitAgentOrdersRequest = Message<"trading_agent.SubmitAgentOrdersRequest"> & { + /** + * Batch ID from GenerateOrders + * + * @generated from field: string order_batch_id = 1; + */ + orderBatchId: string; + + /** + * Orders to submit + * + * @generated from field: repeated trading_agent.GeneratedOrder orders = 2; + */ + orders: GeneratedOrder[]; + + /** + * Test without actual submission + * + * @generated from field: bool dry_run = 3; + */ + dryRun: boolean; +}; + +/** + * Describes the message trading_agent.SubmitAgentOrdersRequest. + * Use `create(SubmitAgentOrdersRequestSchema)` to create a new message. + */ +export const SubmitAgentOrdersRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_trading_agent, 19); + +/** + * @generated from message trading_agent.SubmitAgentOrdersResponse + */ +export type SubmitAgentOrdersResponse = Message<"trading_agent.SubmitAgentOrdersResponse"> & { + /** + * Submission results per order + * + * @generated from field: repeated trading_agent.OrderSubmissionResult results = 1; + */ + results: OrderSubmissionResult[]; + + /** + * @generated from field: trading_agent.OrderSubmissionMetrics metrics = 2; + */ + metrics?: OrderSubmissionMetrics; + + /** + * @generated from field: int64 timestamp = 3; + */ + timestamp: bigint; +}; + +/** + * Describes the message trading_agent.SubmitAgentOrdersResponse. + * Use `create(SubmitAgentOrdersResponseSchema)` to create a new message. + */ +export const SubmitAgentOrdersResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_trading_agent, 20); + +/** + * @generated from message trading_agent.RegisterStrategyRequest + */ +export type RegisterStrategyRequest = Message<"trading_agent.RegisterStrategyRequest"> & { + /** + * Unique strategy name + * + * @generated from field: string strategy_name = 1; + */ + strategyName: string; + + /** + * Strategy category + * + * @generated from field: trading_agent.StrategyType strategy_type = 2; + */ + strategyType: StrategyType; + + /** + * Strategy configuration + * + * @generated from field: trading_agent.StrategyConfig config = 3; + */ + config?: StrategyConfig; + + /** + * Enable immediately after registration + * + * @generated from field: bool auto_enable = 4; + */ + autoEnable: boolean; +}; + +/** + * Describes the message trading_agent.RegisterStrategyRequest. + * Use `create(RegisterStrategyRequestSchema)` to create a new message. + */ +export const RegisterStrategyRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_trading_agent, 21); + +/** + * @generated from message trading_agent.RegisterStrategyResponse + */ +export type RegisterStrategyResponse = Message<"trading_agent.RegisterStrategyResponse"> & { + /** + * @generated from field: bool success = 1; + */ + success: boolean; + + /** + * @generated from field: string strategy_id = 2; + */ + strategyId: string; + + /** + * @generated from field: string message = 3; + */ + message: string; +}; + +/** + * Describes the message trading_agent.RegisterStrategyResponse. + * Use `create(RegisterStrategyResponseSchema)` to create a new message. + */ +export const RegisterStrategyResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_trading_agent, 22); + +/** + * @generated from message trading_agent.ListStrategiesRequest + */ +export type ListStrategiesRequest = Message<"trading_agent.ListStrategiesRequest"> & { + /** + * Filter by status + * + * @generated from field: optional trading_agent.StrategyStatus status_filter = 1; + */ + statusFilter?: StrategyStatus; +}; + +/** + * Describes the message trading_agent.ListStrategiesRequest. + * Use `create(ListStrategiesRequestSchema)` to create a new message. + */ +export const ListStrategiesRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_trading_agent, 23); + +/** + * @generated from message trading_agent.ListStrategiesResponse + */ +export type ListStrategiesResponse = Message<"trading_agent.ListStrategiesResponse"> & { + /** + * @generated from field: repeated trading_agent.Strategy strategies = 1; + */ + strategies: Strategy[]; +}; + +/** + * Describes the message trading_agent.ListStrategiesResponse. + * Use `create(ListStrategiesResponseSchema)` to create a new message. + */ +export const ListStrategiesResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_trading_agent, 24); + +/** + * @generated from message trading_agent.UpdateStrategyStatusRequest + */ +export type UpdateStrategyStatusRequest = Message<"trading_agent.UpdateStrategyStatusRequest"> & { + /** + * @generated from field: string strategy_id = 1; + */ + strategyId: string; + + /** + * @generated from field: trading_agent.StrategyStatus new_status = 2; + */ + newStatus: StrategyStatus; + + /** + * @generated from field: optional string reason = 3; + */ + reason?: string; +}; + +/** + * Describes the message trading_agent.UpdateStrategyStatusRequest. + * Use `create(UpdateStrategyStatusRequestSchema)` to create a new message. + */ +export const UpdateStrategyStatusRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_trading_agent, 25); + +/** + * @generated from message trading_agent.UpdateStrategyStatusResponse + */ +export type UpdateStrategyStatusResponse = Message<"trading_agent.UpdateStrategyStatusResponse"> & { + /** + * @generated from field: bool success = 1; + */ + success: boolean; + + /** + * @generated from field: string message = 2; + */ + message: string; + + /** + * @generated from field: trading_agent.Strategy updated_strategy = 3; + */ + updatedStrategy?: Strategy; +}; + +/** + * Describes the message trading_agent.UpdateStrategyStatusResponse. + * Use `create(UpdateStrategyStatusResponseSchema)` to create a new message. + */ +export const UpdateStrategyStatusResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_trading_agent, 26); + +/** + * @generated from message trading_agent.GetAgentStatusRequest + */ +export type GetAgentStatusRequest = Message<"trading_agent.GetAgentStatusRequest"> & { + /** + * Include performance metrics + * + * @generated from field: bool include_performance = 1; + */ + includePerformance: boolean; + + /** + * Include current positions + * + * @generated from field: bool include_positions = 2; + */ + includePositions: boolean; +}; + +/** + * Describes the message trading_agent.GetAgentStatusRequest. + * Use `create(GetAgentStatusRequestSchema)` to create a new message. + */ +export const GetAgentStatusRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_trading_agent, 27); + +/** + * @generated from message trading_agent.GetAgentStatusResponse + */ +export type GetAgentStatusResponse = Message<"trading_agent.GetAgentStatusResponse"> & { + /** + * @generated from field: trading_agent.AgentStatus status = 1; + */ + status?: AgentStatus; + + /** + * @generated from field: optional trading_agent.AgentPerformanceMetrics performance = 2; + */ + performance?: AgentPerformanceMetrics; + + /** + * @generated from field: optional trading_agent.PositionSummary positions = 3; + */ + positions?: PositionSummary; + + /** + * @generated from field: int64 timestamp = 4; + */ + timestamp: bigint; +}; + +/** + * Describes the message trading_agent.GetAgentStatusResponse. + * Use `create(GetAgentStatusResponseSchema)` to create a new message. + */ +export const GetAgentStatusResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_trading_agent, 28); + +/** + * @generated from message trading_agent.StreamAgentActivityRequest + */ +export type StreamAgentActivityRequest = Message<"trading_agent.StreamAgentActivityRequest"> & { + /** + * Filter by activity type + * + * @generated from field: repeated trading_agent.ActivityType activity_types = 1; + */ + activityTypes: ActivityType[]; +}; + +/** + * Describes the message trading_agent.StreamAgentActivityRequest. + * Use `create(StreamAgentActivityRequestSchema)` to create a new message. + */ +export const StreamAgentActivityRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_trading_agent, 29); + +/** + * @generated from message trading_agent.AgentActivityEvent + */ +export type AgentActivityEvent = Message<"trading_agent.AgentActivityEvent"> & { + /** + * @generated from field: trading_agent.ActivityType activity_type = 1; + */ + activityType: ActivityType; + + /** + * @generated from oneof trading_agent.AgentActivityEvent.event + */ + event: { + /** + * @generated from field: trading_agent.UniverseSelectionEvent universe_event = 2; + */ + value: UniverseSelectionEvent; + case: "universeEvent"; + } | { + /** + * @generated from field: trading_agent.AssetSelectionEvent asset_event = 3; + */ + value: AssetSelectionEvent; + case: "assetEvent"; + } | { + /** + * @generated from field: trading_agent.AllocationEvent allocation_event = 4; + */ + value: AllocationEvent; + case: "allocationEvent"; + } | { + /** + * @generated from field: trading_agent.OrderGenerationEvent order_event = 5; + */ + value: OrderGenerationEvent; + case: "orderEvent"; + } | { + /** + * @generated from field: trading_agent.StrategyEvent strategy_event = 6; + */ + value: StrategyEvent; + case: "strategyEvent"; + } | { case: undefined; value?: undefined }; + + /** + * @generated from field: int64 timestamp = 7; + */ + timestamp: bigint; +}; + +/** + * Describes the message trading_agent.AgentActivityEvent. + * Use `create(AgentActivityEventSchema)` to create a new message. + */ +export const AgentActivityEventSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_trading_agent, 30); + +/** + * @generated from message trading_agent.GetAgentPerformanceRequest + */ +export type GetAgentPerformanceRequest = Message<"trading_agent.GetAgentPerformanceRequest"> & { + /** + * Performance window start (nanoseconds) + * + * @generated from field: optional int64 start_time = 1; + */ + startTime?: bigint; + + /** + * Performance window end (nanoseconds) + * + * @generated from field: optional int64 end_time = 2; + */ + endTime?: bigint; + + /** + * Include per-strategy performance + * + * @generated from field: bool include_strategy_breakdown = 3; + */ + includeStrategyBreakdown: boolean; +}; + +/** + * Describes the message trading_agent.GetAgentPerformanceRequest. + * Use `create(GetAgentPerformanceRequestSchema)` to create a new message. + */ +export const GetAgentPerformanceRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_trading_agent, 31); + +/** + * @generated from message trading_agent.GetAgentPerformanceResponse + */ +export type GetAgentPerformanceResponse = Message<"trading_agent.GetAgentPerformanceResponse"> & { + /** + * @generated from field: trading_agent.AgentPerformanceMetrics metrics = 1; + */ + metrics?: AgentPerformanceMetrics; + + /** + * @generated from field: repeated trading_agent.StrategyPerformance strategy_performance = 2; + */ + strategyPerformance: StrategyPerformance[]; + + /** + * @generated from field: int64 timestamp = 3; + */ + timestamp: bigint; +}; + +/** + * Describes the message trading_agent.GetAgentPerformanceResponse. + * Use `create(GetAgentPerformanceResponseSchema)` to create a new message. + */ +export const GetAgentPerformanceResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_trading_agent, 32); + +/** + * @generated from message trading_agent.HealthCheckRequest + */ +export type HealthCheckRequest = Message<"trading_agent.HealthCheckRequest"> & { +}; + +/** + * Describes the message trading_agent.HealthCheckRequest. + * Use `create(HealthCheckRequestSchema)` to create a new message. + */ +export const HealthCheckRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_trading_agent, 33); + +/** + * @generated from message trading_agent.HealthCheckResponse + */ +export type HealthCheckResponse = Message<"trading_agent.HealthCheckResponse"> & { + /** + * @generated from field: bool healthy = 1; + */ + healthy: boolean; + + /** + * @generated from field: string message = 2; + */ + message: string; + + /** + * @generated from field: map details = 3; + */ + details: { [key: string]: string }; +}; + +/** + * Describes the message trading_agent.HealthCheckResponse. + * Use `create(HealthCheckResponseSchema)` to create a new message. + */ +export const HealthCheckResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_trading_agent, 34); + +/** + * @generated from message trading_agent.Instrument + */ +export type Instrument = Message<"trading_agent.Instrument"> & { + /** + * Trading symbol (ES.FUT, NQ.FUT) + * + * @generated from field: string symbol = 1; + */ + symbol: string; + + /** + * Exchange identifier + * + * @generated from field: string exchange = 2; + */ + exchange: string; + + /** + * Futures, equity, FX, etc. + * + * @generated from field: trading_agent.InstrumentType instrument_type = 3; + */ + instrumentType: InstrumentType; + + /** + * Liquidity rating (0.0-1.0) + * + * @generated from field: double liquidity_score = 4; + */ + liquidityScore: number; + + /** + * Annualized volatility + * + * @generated from field: double volatility = 5; + */ + volatility: number; + + /** + * ML prediction confidence + * + * @generated from field: double ml_signal_strength = 6; + */ + mlSignalStrength: number; + + /** + * @generated from field: map metadata = 7; + */ + metadata: { [key: string]: string }; +}; + +/** + * Describes the message trading_agent.Instrument. + * Use `create(InstrumentSchema)` to create a new message. + */ +export const InstrumentSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_trading_agent, 35); + +/** + * @generated from message trading_agent.UniverseCriteria + */ +export type UniverseCriteria = Message<"trading_agent.UniverseCriteria"> & { + /** + * Minimum liquidity threshold + * + * @generated from field: double min_liquidity_score = 1; + */ + minLiquidityScore: number; + + /** + * Minimum volatility + * + * @generated from field: double min_volatility = 2; + */ + minVolatility: number; + + /** + * Maximum volatility + * + * @generated from field: double max_volatility = 3; + */ + maxVolatility: number; + + /** + * @generated from field: repeated trading_agent.InstrumentType allowed_types = 4; + */ + allowedTypes: InstrumentType[]; + + /** + * Allowed exchanges + * + * @generated from field: repeated string exchanges = 5; + */ + exchanges: string[]; + + /** + * Minimum ML signal confidence + * + * @generated from field: double min_ml_confidence = 6; + */ + minMlConfidence: number; +}; + +/** + * Describes the message trading_agent.UniverseCriteria. + * Use `create(UniverseCriteriaSchema)` to create a new message. + */ +export const UniverseCriteriaSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_trading_agent, 36); + +/** + * @generated from message trading_agent.UniverseMetrics + */ +export type UniverseMetrics = Message<"trading_agent.UniverseMetrics"> & { + /** + * @generated from field: uint32 total_instruments = 1; + */ + totalInstruments: number; + + /** + * @generated from field: double avg_liquidity_score = 2; + */ + avgLiquidityScore: number; + + /** + * @generated from field: double avg_volatility = 3; + */ + avgVolatility: number; + + /** + * 0.0-1.0 + * + * @generated from field: double portfolio_diversification = 4; + */ + portfolioDiversification: number; +}; + +/** + * Describes the message trading_agent.UniverseMetrics. + * Use `create(UniverseMetricsSchema)` to create a new message. + */ +export const UniverseMetricsSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_trading_agent, 37); + +/** + * @generated from message trading_agent.AssetSelectionCriteria + */ +export type AssetSelectionCriteria = Message<"trading_agent.AssetSelectionCriteria"> & { + /** + * Minimum ML confidence + * + * @generated from field: double min_ml_signal_strength = 1; + */ + minMlSignalStrength: number; + + /** + * Minimum risk-adjusted return + * + * @generated from field: double min_sharpe_ratio = 2; + */ + minSharpeRatio: number; + + /** + * Top-N, threshold-based, etc. + * + * @generated from field: trading_agent.SelectionMode mode = 3; + */ + mode: SelectionMode; +}; + +/** + * Describes the message trading_agent.AssetSelectionCriteria. + * Use `create(AssetSelectionCriteriaSchema)` to create a new message. + */ +export const AssetSelectionCriteriaSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_trading_agent, 38); + +/** + * @generated from message trading_agent.AssetScore + */ +export type AssetScore = Message<"trading_agent.AssetScore"> & { + /** + * @generated from field: string symbol = 1; + */ + symbol: string; + + /** + * ML model prediction score + * + * @generated from field: double ml_score = 2; + */ + mlScore: number; + + /** + * Momentum factor score + * + * @generated from field: double momentum_score = 3; + */ + momentumScore: number; + + /** + * Value factor score + * + * @generated from field: double value_score = 4; + */ + valueScore: number; + + /** + * Quality factor score + * + * @generated from field: double quality_score = 5; + */ + qualityScore: number; + + /** + * Final weighted score + * + * @generated from field: double composite_score = 6; + */ + compositeScore: number; + + /** + * Per-model scores (DQN, MAMBA2, etc.) + * + * @generated from field: map model_scores = 7; + */ + modelScores: { [key: string]: number }; +}; + +/** + * Describes the message trading_agent.AssetScore. + * Use `create(AssetScoreSchema)` to create a new message. + */ +export const AssetScoreSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_trading_agent, 39); + +/** + * @generated from message trading_agent.SelectionMetrics + */ +export type SelectionMetrics = Message<"trading_agent.SelectionMetrics"> & { + /** + * @generated from field: uint32 assets_evaluated = 1; + */ + assetsEvaluated: number; + + /** + * @generated from field: uint32 assets_selected = 2; + */ + assetsSelected: number; + + /** + * @generated from field: double avg_composite_score = 3; + */ + avgCompositeScore: number; + + /** + * @generated from field: double min_score = 4; + */ + minScore: number; + + /** + * @generated from field: double max_score = 5; + */ + maxScore: number; +}; + +/** + * Describes the message trading_agent.SelectionMetrics. + * Use `create(SelectionMetricsSchema)` to create a new message. + */ +export const SelectionMetricsSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_trading_agent, 40); + +/** + * @generated from message trading_agent.AllocationStrategy + */ +export type AllocationStrategy = Message<"trading_agent.AllocationStrategy"> & { + /** + * Equal-weight, risk-parity, etc. + * + * @generated from field: trading_agent.AllocationType allocation_type = 1; + */ + allocationType: AllocationType; + + /** + * Strategy-specific parameters + * + * @generated from field: map parameters = 2; + */ + parameters: { [key: string]: number }; +}; + +/** + * Describes the message trading_agent.AllocationStrategy. + * Use `create(AllocationStrategySchema)` to create a new message. + */ +export const AllocationStrategySchema: GenMessage = /*@__PURE__*/ + messageDesc(file_trading_agent, 41); + +/** + * @generated from message trading_agent.RiskConstraints + */ +export type RiskConstraints = Message<"trading_agent.RiskConstraints"> & { + /** + * Max % of portfolio per position + * + * @generated from field: double max_position_size_pct = 1; + */ + maxPositionSizePct: number; + + /** + * Max % per sector + * + * @generated from field: double max_sector_exposure_pct = 2; + */ + maxSectorExposurePct: number; + + /** + * Portfolio volatility limit + * + * @generated from field: double max_volatility = 3; + */ + maxVolatility: number; + + /** + * Value at Risk (95%) + * + * @generated from field: double max_var_95 = 4; + */ + maxVar95: number; + + /** + * Maximum leverage ratio + * + * @generated from field: double max_leverage = 5; + */ + maxLeverage: number; +}; + +/** + * Describes the message trading_agent.RiskConstraints. + * Use `create(RiskConstraintsSchema)` to create a new message. + */ +export const RiskConstraintsSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_trading_agent, 42); + +/** + * @generated from message trading_agent.AssetAllocation + */ +export type AssetAllocation = Message<"trading_agent.AssetAllocation"> & { + /** + * @generated from field: string symbol = 1; + */ + symbol: string; + + /** + * Target allocation weight (0.0-1.0) + * + * @generated from field: double target_weight = 2; + */ + targetWeight: number; + + /** + * Target capital in USD + * + * @generated from field: double target_capital = 3; + */ + targetCapital: number; + + /** + * Target position size + * + * @generated from field: double target_quantity = 4; + */ + targetQuantity: number; + + /** + * Current allocation weight + * + * @generated from field: double current_weight = 5; + */ + currentWeight: number; + + /** + * Current position size + * + * @generated from field: double current_quantity = 6; + */ + currentQuantity: number; + + /** + * Required change + * + * @generated from field: double rebalance_delta = 7; + */ + rebalanceDelta: number; +}; + +/** + * Describes the message trading_agent.AssetAllocation. + * Use `create(AssetAllocationSchema)` to create a new message. + */ +export const AssetAllocationSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_trading_agent, 43); + +/** + * @generated from message trading_agent.AllocationMetrics + */ +export type AllocationMetrics = Message<"trading_agent.AllocationMetrics"> & { + /** + * Should be ~1.0 + * + * @generated from field: double total_weight = 1; + */ + totalWeight: number; + + /** + * Expected portfolio volatility + * + * @generated from field: double portfolio_volatility = 2; + */ + portfolioVolatility: number; + + /** + * Expected Sharpe ratio + * + * @generated from field: double portfolio_sharpe = 3; + */ + portfolioSharpe: number; + + /** + * Portfolio VaR (95%) + * + * @generated from field: double var_95 = 4; + */ + var95: number; + + /** + * Expected max drawdown + * + * @generated from field: double max_drawdown_estimate = 5; + */ + maxDrawdownEstimate: number; +}; + +/** + * Describes the message trading_agent.AllocationMetrics. + * Use `create(AllocationMetricsSchema)` to create a new message. + */ +export const AllocationMetricsSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_trading_agent, 44); + +/** + * @generated from message trading_agent.RebalanceAction + */ +export type RebalanceAction = Message<"trading_agent.RebalanceAction"> & { + /** + * @generated from field: string symbol = 1; + */ + symbol: string; + + /** + * @generated from field: double current_quantity = 2; + */ + currentQuantity: number; + + /** + * @generated from field: double target_quantity = 3; + */ + targetQuantity: number; + + /** + * Positive = buy, negative = sell + * + * @generated from field: double delta_quantity = 4; + */ + deltaQuantity: number; + + /** + * @generated from field: trading_agent.RebalanceReason reason = 5; + */ + reason: RebalanceReason; +}; + +/** + * Describes the message trading_agent.RebalanceAction. + * Use `create(RebalanceActionSchema)` to create a new message. + */ +export const RebalanceActionSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_trading_agent, 45); + +/** + * @generated from message trading_agent.RebalanceMetrics + */ +export type RebalanceMetrics = Message<"trading_agent.RebalanceMetrics"> & { + /** + * @generated from field: uint32 total_rebalance_actions = 1; + */ + totalRebalanceActions: number; + + /** + * Total capital moved (USD) + * + * @generated from field: double total_turnover = 2; + */ + totalTurnover: number; + + /** + * Estimated transaction costs + * + * @generated from field: double estimated_cost = 3; + */ + estimatedCost: number; +}; + +/** + * Describes the message trading_agent.RebalanceMetrics. + * Use `create(RebalanceMetricsSchema)` to create a new message. + */ +export const RebalanceMetricsSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_trading_agent, 46); + +/** + * @generated from message trading_agent.MLSignal + */ +export type MLSignal = Message<"trading_agent.MLSignal"> & { + /** + * @generated from field: string symbol = 1; + */ + symbol: string; + + /** + * DQN, MAMBA2, PPO, TFT + * + * @generated from field: string model_name = 2; + */ + modelName: string; + + /** + * -1.0 to 1.0 (short to long) + * + * @generated from field: double signal_strength = 3; + */ + signalStrength: number; + + /** + * 0.0 to 1.0 + * + * @generated from field: double confidence = 4; + */ + confidence: number; + + /** + * BUY, SELL, HOLD + * + * @generated from field: string predicted_action = 5; + */ + predictedAction: string; + + /** + * @generated from field: int64 timestamp = 6; + */ + timestamp: bigint; +}; + +/** + * Describes the message trading_agent.MLSignal. + * Use `create(MLSignalSchema)` to create a new message. + */ +export const MLSignalSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_trading_agent, 47); + +/** + * @generated from message trading_agent.OrderGenerationStrategy + */ +export type OrderGenerationStrategy = Message<"trading_agent.OrderGenerationStrategy"> & { + /** + * @generated from field: trading_agent.OrderGenerationMode mode = 1; + */ + mode: OrderGenerationMode; + + /** + * Max acceptable slippage (%) + * + * @generated from field: double slippage_tolerance = 2; + */ + slippageTolerance: number; + + /** + * Use limit orders vs market + * + * @generated from field: bool use_limit_orders = 3; + */ + useLimitOrders: boolean; + + /** + * Offset from mid price (%) + * + * @generated from field: double limit_price_offset = 4; + */ + limitPriceOffset: number; +}; + +/** + * Describes the message trading_agent.OrderGenerationStrategy. + * Use `create(OrderGenerationStrategySchema)` to create a new message. + */ +export const OrderGenerationStrategySchema: GenMessage = /*@__PURE__*/ + messageDesc(file_trading_agent, 48); + +/** + * @generated from message trading_agent.GeneratedOrder + */ +export type GeneratedOrder = Message<"trading_agent.GeneratedOrder"> & { + /** + * @generated from field: string symbol = 1; + */ + symbol: string; + + /** + * BUY or SELL + * + * @generated from field: trading_agent.OrderSide side = 2; + */ + side: OrderSide; + + /** + * @generated from field: double quantity = 3; + */ + quantity: number; + + /** + * MARKET, LIMIT, etc. + * + * @generated from field: trading_agent.OrderType order_type = 4; + */ + orderType: OrderType; + + /** + * Limit price if applicable + * + * @generated from field: optional double price = 5; + */ + price?: number; + + /** + * Why this order was generated + * + * @generated from field: string rationale = 6; + */ + rationale: string; + + /** + * @generated from field: map metadata = 7; + */ + metadata: { [key: string]: string }; +}; + +/** + * Describes the message trading_agent.GeneratedOrder. + * Use `create(GeneratedOrderSchema)` to create a new message. + */ +export const GeneratedOrderSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_trading_agent, 49); + +/** + * @generated from message trading_agent.OrderGenerationMetrics + */ +export type OrderGenerationMetrics = Message<"trading_agent.OrderGenerationMetrics"> & { + /** + * @generated from field: uint32 orders_generated = 1; + */ + ordersGenerated: number; + + /** + * Total order value (USD) + * + * @generated from field: double total_notional = 2; + */ + totalNotional: number; + + /** + * @generated from field: double avg_order_size = 3; + */ + avgOrderSize: number; +}; + +/** + * Describes the message trading_agent.OrderGenerationMetrics. + * Use `create(OrderGenerationMetricsSchema)` to create a new message. + */ +export const OrderGenerationMetricsSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_trading_agent, 50); + +/** + * @generated from message trading_agent.OrderSubmissionResult + */ +export type OrderSubmissionResult = Message<"trading_agent.OrderSubmissionResult"> & { + /** + * @generated from field: string symbol = 1; + */ + symbol: string; + + /** + * @generated from field: bool success = 2; + */ + success: boolean; + + /** + * From Trading Service + * + * @generated from field: optional string order_id = 3; + */ + orderId?: string; + + /** + * @generated from field: optional string error_message = 4; + */ + errorMessage?: string; +}; + +/** + * Describes the message trading_agent.OrderSubmissionResult. + * Use `create(OrderSubmissionResultSchema)` to create a new message. + */ +export const OrderSubmissionResultSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_trading_agent, 51); + +/** + * @generated from message trading_agent.OrderSubmissionMetrics + */ +export type OrderSubmissionMetrics = Message<"trading_agent.OrderSubmissionMetrics"> & { + /** + * @generated from field: uint32 orders_submitted = 1; + */ + ordersSubmitted: number; + + /** + * @generated from field: uint32 orders_accepted = 2; + */ + ordersAccepted: number; + + /** + * @generated from field: uint32 orders_rejected = 3; + */ + ordersRejected: number; + + /** + * @generated from field: double acceptance_rate = 4; + */ + acceptanceRate: number; +}; + +/** + * Describes the message trading_agent.OrderSubmissionMetrics. + * Use `create(OrderSubmissionMetricsSchema)` to create a new message. + */ +export const OrderSubmissionMetricsSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_trading_agent, 52); + +/** + * @generated from message trading_agent.Strategy + */ +export type Strategy = Message<"trading_agent.Strategy"> & { + /** + * @generated from field: string strategy_id = 1; + */ + strategyId: string; + + /** + * @generated from field: string strategy_name = 2; + */ + strategyName: string; + + /** + * @generated from field: trading_agent.StrategyType strategy_type = 3; + */ + strategyType: StrategyType; + + /** + * @generated from field: trading_agent.StrategyStatus status = 4; + */ + status: StrategyStatus; + + /** + * @generated from field: trading_agent.StrategyConfig config = 5; + */ + config?: StrategyConfig; + + /** + * @generated from field: trading_agent.StrategyPerformance performance = 6; + */ + performance?: StrategyPerformance; + + /** + * @generated from field: int64 created_at = 7; + */ + createdAt: bigint; + + /** + * @generated from field: int64 updated_at = 8; + */ + updatedAt: bigint; +}; + +/** + * Describes the message trading_agent.Strategy. + * Use `create(StrategySchema)` to create a new message. + */ +export const StrategySchema: GenMessage = /*@__PURE__*/ + messageDesc(file_trading_agent, 53); + +/** + * @generated from message trading_agent.StrategyConfig + */ +export type StrategyConfig = Message<"trading_agent.StrategyConfig"> & { + /** + * Strategy-specific parameters + * + * @generated from field: map parameters = 1; + */ + parameters: { [key: string]: string }; + + /** + * Symbols this strategy trades + * + * @generated from field: repeated string target_symbols = 2; + */ + targetSymbols: string[]; + + /** + * Max % of portfolio for this strategy + * + * @generated from field: double max_capital_pct = 3; + */ + maxCapitalPct: number; +}; + +/** + * Describes the message trading_agent.StrategyConfig. + * Use `create(StrategyConfigSchema)` to create a new message. + */ +export const StrategyConfigSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_trading_agent, 54); + +/** + * @generated from message trading_agent.StrategyPerformance + */ +export type StrategyPerformance = Message<"trading_agent.StrategyPerformance"> & { + /** + * @generated from field: string strategy_id = 1; + */ + strategyId: string; + + /** + * @generated from field: double total_pnl = 2; + */ + totalPnl: number; + + /** + * @generated from field: double sharpe_ratio = 3; + */ + sharpeRatio: number; + + /** + * @generated from field: double win_rate = 4; + */ + winRate: number; + + /** + * @generated from field: uint32 total_trades = 5; + */ + totalTrades: number; + + /** + * @generated from field: int64 period_start = 6; + */ + periodStart: bigint; + + /** + * @generated from field: int64 period_end = 7; + */ + periodEnd: bigint; +}; + +/** + * Describes the message trading_agent.StrategyPerformance. + * Use `create(StrategyPerformanceSchema)` to create a new message. + */ +export const StrategyPerformanceSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_trading_agent, 55); + +/** + * @generated from message trading_agent.AgentStatus + */ +export type AgentStatus = Message<"trading_agent.AgentStatus"> & { + /** + * @generated from field: trading_agent.AgentState state = 1; + */ + state: AgentState; + + /** + * @generated from field: string current_universe_id = 2; + */ + currentUniverseId: string; + + /** + * @generated from field: uint32 active_strategies = 3; + */ + activeStrategies: number; + + /** + * @generated from field: uint32 selected_assets = 4; + */ + selectedAssets: number; + + /** + * % of capital deployed + * + * @generated from field: double portfolio_utilization = 5; + */ + portfolioUtilization: number; + + /** + * @generated from field: int64 last_action_timestamp = 6; + */ + lastActionTimestamp: bigint; +}; + +/** + * Describes the message trading_agent.AgentStatus. + * Use `create(AgentStatusSchema)` to create a new message. + */ +export const AgentStatusSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_trading_agent, 56); + +/** + * @generated from message trading_agent.AgentPerformanceMetrics + */ +export type AgentPerformanceMetrics = Message<"trading_agent.AgentPerformanceMetrics"> & { + /** + * @generated from field: double total_pnl = 1; + */ + totalPnl: number; + + /** + * @generated from field: double sharpe_ratio = 2; + */ + sharpeRatio: number; + + /** + * @generated from field: double max_drawdown = 3; + */ + maxDrawdown: number; + + /** + * @generated from field: double win_rate = 4; + */ + winRate: number; + + /** + * @generated from field: uint32 total_trades = 5; + */ + totalTrades: number; + + /** + * @generated from field: double avg_trade_pnl = 6; + */ + avgTradePnl: number; + + /** + * Annualized + * + * @generated from field: double portfolio_turnover = 7; + */ + portfolioTurnover: number; + + /** + * @generated from field: int64 period_start = 8; + */ + periodStart: bigint; + + /** + * @generated from field: int64 period_end = 9; + */ + periodEnd: bigint; +}; + +/** + * Describes the message trading_agent.AgentPerformanceMetrics. + * Use `create(AgentPerformanceMetricsSchema)` to create a new message. + */ +export const AgentPerformanceMetricsSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_trading_agent, 57); + +/** + * @generated from message trading_agent.PositionSummary + */ +export type PositionSummary = Message<"trading_agent.PositionSummary"> & { + /** + * @generated from field: repeated trading_agent.Position positions = 1; + */ + positions: Position[]; + + /** + * @generated from field: double total_equity = 2; + */ + totalEquity: number; + + /** + * @generated from field: double total_exposure = 3; + */ + totalExposure: number; + + /** + * @generated from field: double leverage_ratio = 4; + */ + leverageRatio: number; +}; + +/** + * Describes the message trading_agent.PositionSummary. + * Use `create(PositionSummarySchema)` to create a new message. + */ +export const PositionSummarySchema: GenMessage = /*@__PURE__*/ + messageDesc(file_trading_agent, 58); + +/** + * @generated from message trading_agent.Position + */ +export type Position = Message<"trading_agent.Position"> & { + /** + * @generated from field: string symbol = 1; + */ + symbol: string; + + /** + * @generated from field: double quantity = 2; + */ + quantity: number; + + /** + * @generated from field: double average_price = 3; + */ + averagePrice: number; + + /** + * @generated from field: double market_value = 4; + */ + marketValue: number; + + /** + * @generated from field: double unrealized_pnl = 5; + */ + unrealizedPnl: number; + + /** + * % of portfolio + * + * @generated from field: double weight = 6; + */ + weight: number; +}; + +/** + * Describes the message trading_agent.Position. + * Use `create(PositionSchema)` to create a new message. + */ +export const PositionSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_trading_agent, 59); + +/** + * @generated from message trading_agent.UniverseSelectionEvent + */ +export type UniverseSelectionEvent = Message<"trading_agent.UniverseSelectionEvent"> & { + /** + * @generated from field: string universe_id = 1; + */ + universeId: string; + + /** + * @generated from field: repeated string added_symbols = 2; + */ + addedSymbols: string[]; + + /** + * @generated from field: repeated string removed_symbols = 3; + */ + removedSymbols: string[]; + + /** + * @generated from field: trading_agent.UniverseMetrics metrics = 4; + */ + metrics?: UniverseMetrics; +}; + +/** + * Describes the message trading_agent.UniverseSelectionEvent. + * Use `create(UniverseSelectionEventSchema)` to create a new message. + */ +export const UniverseSelectionEventSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_trading_agent, 60); + +/** + * @generated from message trading_agent.AssetSelectionEvent + */ +export type AssetSelectionEvent = Message<"trading_agent.AssetSelectionEvent"> & { + /** + * @generated from field: repeated trading_agent.AssetScore selected_assets = 1; + */ + selectedAssets: AssetScore[]; + + /** + * @generated from field: trading_agent.SelectionMetrics metrics = 2; + */ + metrics?: SelectionMetrics; +}; + +/** + * Describes the message trading_agent.AssetSelectionEvent. + * Use `create(AssetSelectionEventSchema)` to create a new message. + */ +export const AssetSelectionEventSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_trading_agent, 61); + +/** + * @generated from message trading_agent.AllocationEvent + */ +export type AllocationEvent = Message<"trading_agent.AllocationEvent"> & { + /** + * @generated from field: string allocation_id = 1; + */ + allocationId: string; + + /** + * @generated from field: repeated trading_agent.AssetAllocation allocations = 2; + */ + allocations: AssetAllocation[]; + + /** + * @generated from field: trading_agent.AllocationMetrics metrics = 3; + */ + metrics?: AllocationMetrics; +}; + +/** + * Describes the message trading_agent.AllocationEvent. + * Use `create(AllocationEventSchema)` to create a new message. + */ +export const AllocationEventSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_trading_agent, 62); + +/** + * @generated from message trading_agent.OrderGenerationEvent + */ +export type OrderGenerationEvent = Message<"trading_agent.OrderGenerationEvent"> & { + /** + * @generated from field: string order_batch_id = 1; + */ + orderBatchId: string; + + /** + * @generated from field: repeated trading_agent.GeneratedOrder orders = 2; + */ + orders: GeneratedOrder[]; + + /** + * @generated from field: trading_agent.OrderGenerationMetrics metrics = 3; + */ + metrics?: OrderGenerationMetrics; +}; + +/** + * Describes the message trading_agent.OrderGenerationEvent. + * Use `create(OrderGenerationEventSchema)` to create a new message. + */ +export const OrderGenerationEventSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_trading_agent, 63); + +/** + * @generated from message trading_agent.StrategyEvent + */ +export type StrategyEvent = Message<"trading_agent.StrategyEvent"> & { + /** + * @generated from field: string strategy_id = 1; + */ + strategyId: string; + + /** + * @generated from field: trading_agent.StrategyEventType event_type = 2; + */ + eventType: StrategyEventType; + + /** + * @generated from field: string message = 3; + */ + message: string; +}; + +/** + * Describes the message trading_agent.StrategyEvent. + * Use `create(StrategyEventSchema)` to create a new message. + */ +export const StrategyEventSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_trading_agent, 64); + +/** + * @generated from enum trading_agent.InstrumentType + */ +export enum InstrumentType { + /** + * @generated from enum value: INSTRUMENT_TYPE_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * @generated from enum value: INSTRUMENT_TYPE_EQUITY = 1; + */ + EQUITY = 1, + + /** + * @generated from enum value: INSTRUMENT_TYPE_FUTURES = 2; + */ + FUTURES = 2, + + /** + * @generated from enum value: INSTRUMENT_TYPE_FX = 3; + */ + FX = 3, + + /** + * @generated from enum value: INSTRUMENT_TYPE_OPTIONS = 4; + */ + OPTIONS = 4, + + /** + * @generated from enum value: INSTRUMENT_TYPE_CRYPTO = 5; + */ + CRYPTO = 5, +} + +/** + * Describes the enum trading_agent.InstrumentType. + */ +export const InstrumentTypeSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_trading_agent, 0); + +/** + * @generated from enum trading_agent.SelectionMode + */ +export enum SelectionMode { + /** + * @generated from enum value: SELECTION_MODE_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * Select top N by score + * + * @generated from enum value: SELECTION_MODE_TOP_N = 1; + */ + TOP_N = 1, + + /** + * Select all above threshold + * + * @generated from enum value: SELECTION_MODE_THRESHOLD = 2; + */ + THRESHOLD = 2, + + /** + * Select top quantile (e.g., top 20%) + * + * @generated from enum value: SELECTION_MODE_QUANTILE = 3; + */ + QUANTILE = 3, +} + +/** + * Describes the enum trading_agent.SelectionMode. + */ +export const SelectionModeSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_trading_agent, 1); + +/** + * @generated from enum trading_agent.AllocationType + */ +export enum AllocationType { + /** + * @generated from enum value: ALLOCATION_TYPE_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * 1/N allocation + * + * @generated from enum value: ALLOCATION_TYPE_EQUAL_WEIGHT = 1; + */ + EQUAL_WEIGHT = 1, + + /** + * Equal risk contribution + * + * @generated from enum value: ALLOCATION_TYPE_RISK_PARITY = 2; + */ + RISK_PARITY = 2, + + /** + * ML-based optimization + * + * @generated from enum value: ALLOCATION_TYPE_ML_OPTIMIZED = 3; + */ + ML_OPTIMIZED = 3, + + /** + * Kelly criterion + * + * @generated from enum value: ALLOCATION_TYPE_KELLY = 4; + */ + KELLY = 4, + + /** + * Mean-variance optimization + * + * @generated from enum value: ALLOCATION_TYPE_MEAN_VARIANCE = 5; + */ + MEAN_VARIANCE = 5, +} + +/** + * Describes the enum trading_agent.AllocationType. + */ +export const AllocationTypeSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_trading_agent, 2); + +/** + * @generated from enum trading_agent.RebalanceReason + */ +export enum RebalanceReason { + /** + * @generated from enum value: REBALANCE_REASON_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * Allocation drifted from target + * + * @generated from enum value: REBALANCE_REASON_DRIFT = 1; + */ + DRIFT = 1, + + /** + * Universe updated + * + * @generated from enum value: REBALANCE_REASON_UNIVERSE_CHANGE = 2; + */ + UNIVERSE_CHANGE = 2, + + /** + * Risk limit violation + * + * @generated from enum value: REBALANCE_REASON_RISK_LIMIT = 3; + */ + RISK_LIMIT = 3, + + /** + * Manual rebalance request + * + * @generated from enum value: REBALANCE_REASON_MANUAL = 4; + */ + MANUAL = 4, +} + +/** + * Describes the enum trading_agent.RebalanceReason. + */ +export const RebalanceReasonSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_trading_agent, 3); + +/** + * @generated from enum trading_agent.OrderGenerationMode + */ +export enum OrderGenerationMode { + /** + * @generated from enum value: ORDER_GENERATION_MODE_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * Market orders, immediate execution + * + * @generated from enum value: ORDER_GENERATION_MODE_AGGRESSIVE = 1; + */ + AGGRESSIVE = 1, + + /** + * Limit orders, minimize slippage + * + * @generated from enum value: ORDER_GENERATION_MODE_PASSIVE = 2; + */ + PASSIVE = 2, + + /** + * Adapt based on market conditions + * + * @generated from enum value: ORDER_GENERATION_MODE_ADAPTIVE = 3; + */ + ADAPTIVE = 3, +} + +/** + * Describes the enum trading_agent.OrderGenerationMode. + */ +export const OrderGenerationModeSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_trading_agent, 4); + +/** + * @generated from enum trading_agent.OrderSide + */ +export enum OrderSide { + /** + * @generated from enum value: ORDER_SIDE_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * @generated from enum value: ORDER_SIDE_BUY = 1; + */ + BUY = 1, + + /** + * @generated from enum value: ORDER_SIDE_SELL = 2; + */ + SELL = 2, +} + +/** + * Describes the enum trading_agent.OrderSide. + */ +export const OrderSideSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_trading_agent, 5); + +/** + * @generated from enum trading_agent.OrderType + */ +export enum OrderType { + /** + * @generated from enum value: ORDER_TYPE_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * @generated from enum value: ORDER_TYPE_MARKET = 1; + */ + MARKET = 1, + + /** + * @generated from enum value: ORDER_TYPE_LIMIT = 2; + */ + LIMIT = 2, + + /** + * @generated from enum value: ORDER_TYPE_STOP = 3; + */ + STOP = 3, + + /** + * @generated from enum value: ORDER_TYPE_STOP_LIMIT = 4; + */ + STOP_LIMIT = 4, +} + +/** + * Describes the enum trading_agent.OrderType. + */ +export const OrderTypeSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_trading_agent, 6); + +/** + * @generated from enum trading_agent.StrategyType + */ +export enum StrategyType { + /** + * @generated from enum value: STRATEGY_TYPE_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * Ensemble ML predictions + * + * @generated from enum value: STRATEGY_TYPE_ML_ENSEMBLE = 1; + */ + ML_ENSEMBLE = 1, + + /** + * Mean reversion + * + * @generated from enum value: STRATEGY_TYPE_MEAN_REVERSION = 2; + */ + MEAN_REVERSION = 2, + + /** + * Momentum/trend following + * + * @generated from enum value: STRATEGY_TYPE_MOMENTUM = 3; + */ + MOMENTUM = 3, + + /** + * Statistical arbitrage + * + * @generated from enum value: STRATEGY_TYPE_ARBITRAGE = 4; + */ + ARBITRAGE = 4, + + /** + * Market making + * + * @generated from enum value: STRATEGY_TYPE_MARKET_MAKING = 5; + */ + MARKET_MAKING = 5, +} + +/** + * Describes the enum trading_agent.StrategyType. + */ +export const StrategyTypeSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_trading_agent, 7); + +/** + * @generated from enum trading_agent.StrategyStatus + */ +export enum StrategyStatus { + /** + * @generated from enum value: STRATEGY_STATUS_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * @generated from enum value: STRATEGY_STATUS_ENABLED = 1; + */ + ENABLED = 1, + + /** + * @generated from enum value: STRATEGY_STATUS_DISABLED = 2; + */ + DISABLED = 2, + + /** + * @generated from enum value: STRATEGY_STATUS_PAUSED = 3; + */ + PAUSED = 3, + + /** + * @generated from enum value: STRATEGY_STATUS_ERROR = 4; + */ + ERROR = 4, +} + +/** + * Describes the enum trading_agent.StrategyStatus. + */ +export const StrategyStatusSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_trading_agent, 8); + +/** + * @generated from enum trading_agent.AgentState + */ +export enum AgentState { + /** + * @generated from enum value: AGENT_STATE_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * @generated from enum value: AGENT_STATE_INITIALIZING = 1; + */ + INITIALIZING = 1, + + /** + * @generated from enum value: AGENT_STATE_ACTIVE = 2; + */ + ACTIVE = 2, + + /** + * @generated from enum value: AGENT_STATE_PAUSED = 3; + */ + PAUSED = 3, + + /** + * @generated from enum value: AGENT_STATE_ERROR = 4; + */ + ERROR = 4, + + /** + * @generated from enum value: AGENT_STATE_SHUTDOWN = 5; + */ + SHUTDOWN = 5, +} + +/** + * Describes the enum trading_agent.AgentState. + */ +export const AgentStateSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_trading_agent, 9); + +/** + * @generated from enum trading_agent.ActivityType + */ +export enum ActivityType { + /** + * @generated from enum value: ACTIVITY_TYPE_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * @generated from enum value: ACTIVITY_TYPE_UNIVERSE_SELECTION = 1; + */ + UNIVERSE_SELECTION = 1, + + /** + * @generated from enum value: ACTIVITY_TYPE_ASSET_SELECTION = 2; + */ + ASSET_SELECTION = 2, + + /** + * @generated from enum value: ACTIVITY_TYPE_ALLOCATION = 3; + */ + ALLOCATION = 3, + + /** + * @generated from enum value: ACTIVITY_TYPE_ORDER_GENERATION = 4; + */ + ORDER_GENERATION = 4, + + /** + * @generated from enum value: ACTIVITY_TYPE_STRATEGY = 5; + */ + STRATEGY = 5, +} + +/** + * Describes the enum trading_agent.ActivityType. + */ +export const ActivityTypeSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_trading_agent, 10); + +/** + * @generated from enum trading_agent.StrategyEventType + */ +export enum StrategyEventType { + /** + * @generated from enum value: STRATEGY_EVENT_TYPE_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * @generated from enum value: STRATEGY_EVENT_TYPE_REGISTERED = 1; + */ + REGISTERED = 1, + + /** + * @generated from enum value: STRATEGY_EVENT_TYPE_ENABLED = 2; + */ + ENABLED = 2, + + /** + * @generated from enum value: STRATEGY_EVENT_TYPE_DISABLED = 3; + */ + DISABLED = 3, + + /** + * @generated from enum value: STRATEGY_EVENT_TYPE_ERROR = 4; + */ + ERROR = 4, +} + +/** + * Describes the enum trading_agent.StrategyEventType. + */ +export const StrategyEventTypeSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_trading_agent, 11); + +/** + * Trading Agent Service orchestrates trading decisions across universe selection, + * asset selection, portfolio allocation, and strategy coordination. + * + * @generated from service trading_agent.TradingAgentService + */ +export const TradingAgentService: GenService<{ + /** + * Universe Management + * Select tradable universe based on liquidity, volatility, and ML signals + * + * @generated from rpc trading_agent.TradingAgentService.SelectUniverse + */ + selectUniverse: { + methodKind: "unary"; + input: typeof SelectUniverseRequestSchema; + output: typeof SelectUniverseResponseSchema; + }, + /** + * Get current trading universe configuration + * + * @generated from rpc trading_agent.TradingAgentService.GetUniverse + */ + getUniverse: { + methodKind: "unary"; + input: typeof GetUniverseRequestSchema; + output: typeof GetUniverseResponseSchema; + }, + /** + * Update universe selection criteria + * + * @generated from rpc trading_agent.TradingAgentService.UpdateUniverseCriteria + */ + updateUniverseCriteria: { + methodKind: "unary"; + input: typeof UpdateUniverseCriteriaRequestSchema; + output: typeof UpdateUniverseCriteriaResponseSchema; + }, + /** + * Asset Selection + * Select specific assets to trade within universe + * + * @generated from rpc trading_agent.TradingAgentService.SelectAssets + */ + selectAssets: { + methodKind: "unary"; + input: typeof SelectAssetsRequestSchema; + output: typeof SelectAssetsResponseSchema; + }, + /** + * Get current asset selection with scores + * + * @generated from rpc trading_agent.TradingAgentService.GetSelectedAssets + */ + getSelectedAssets: { + methodKind: "unary"; + input: typeof GetSelectedAssetsRequestSchema; + output: typeof GetSelectedAssetsResponseSchema; + }, + /** + * Portfolio Allocation + * Allocate capital across selected assets + * + * @generated from rpc trading_agent.TradingAgentService.AllocatePortfolio + */ + allocatePortfolio: { + methodKind: "unary"; + input: typeof AllocatePortfolioRequestSchema; + output: typeof AllocatePortfolioResponseSchema; + }, + /** + * Get current portfolio allocation + * + * @generated from rpc trading_agent.TradingAgentService.GetAllocation + */ + getAllocation: { + methodKind: "unary"; + input: typeof GetAllocationRequestSchema; + output: typeof GetAllocationResponseSchema; + }, + /** + * Rebalance portfolio based on target allocation + * + * @generated from rpc trading_agent.TradingAgentService.RebalancePortfolio + */ + rebalancePortfolio: { + methodKind: "unary"; + input: typeof RebalancePortfolioRequestSchema; + output: typeof RebalancePortfolioResponseSchema; + }, + /** + * Order Generation + * Generate orders based on allocation and ML signals + * + * @generated from rpc trading_agent.TradingAgentService.GenerateOrders + */ + generateOrders: { + methodKind: "unary"; + input: typeof GenerateOrdersRequestSchema; + output: typeof GenerateOrdersResponseSchema; + }, + /** + * Submit generated orders to Trading Service + * + * @generated from rpc trading_agent.TradingAgentService.SubmitAgentOrders + */ + submitAgentOrders: { + methodKind: "unary"; + input: typeof SubmitAgentOrdersRequestSchema; + output: typeof SubmitAgentOrdersResponseSchema; + }, + /** + * Strategy Coordination + * Register a trading strategy with the agent + * + * @generated from rpc trading_agent.TradingAgentService.RegisterStrategy + */ + registerStrategy: { + methodKind: "unary"; + input: typeof RegisterStrategyRequestSchema; + output: typeof RegisterStrategyResponseSchema; + }, + /** + * Get list of active strategies + * + * @generated from rpc trading_agent.TradingAgentService.ListStrategies + */ + listStrategies: { + methodKind: "unary"; + input: typeof ListStrategiesRequestSchema; + output: typeof ListStrategiesResponseSchema; + }, + /** + * Enable/disable a strategy + * + * @generated from rpc trading_agent.TradingAgentService.UpdateStrategyStatus + */ + updateStrategyStatus: { + methodKind: "unary"; + input: typeof UpdateStrategyStatusRequestSchema; + output: typeof UpdateStrategyStatusResponseSchema; + }, + /** + * Agent Monitoring + * Get comprehensive agent status and performance + * + * @generated from rpc trading_agent.TradingAgentService.GetAgentStatus + */ + getAgentStatus: { + methodKind: "unary"; + input: typeof GetAgentStatusRequestSchema; + output: typeof GetAgentStatusResponseSchema; + }, + /** + * Stream real-time agent decisions and actions + * + * @generated from rpc trading_agent.TradingAgentService.StreamAgentActivity + */ + streamAgentActivity: { + methodKind: "server_streaming"; + input: typeof StreamAgentActivityRequestSchema; + output: typeof AgentActivityEventSchema; + }, + /** + * Get agent performance metrics + * + * @generated from rpc trading_agent.TradingAgentService.GetAgentPerformance + */ + getAgentPerformance: { + methodKind: "unary"; + input: typeof GetAgentPerformanceRequestSchema; + output: typeof GetAgentPerformanceResponseSchema; + }, + /** + * Service Health + * + * @generated from rpc trading_agent.TradingAgentService.HealthCheck + */ + healthCheck: { + methodKind: "unary"; + input: typeof HealthCheckRequestSchema; + output: typeof HealthCheckResponseSchema; + }, + /** + * Server-streaming: polls GetAgentStatus at gateway level + * + * @generated from rpc trading_agent.TradingAgentService.StreamAgentStatus + */ + streamAgentStatus: { + methodKind: "server_streaming"; + input: typeof StreamAgentStatusRequestSchema; + output: typeof GetAgentStatusResponseSchema; + }, +}> = /*@__PURE__*/ + serviceDesc(file_trading_agent, 0); + diff --git a/web-dashboard/src/gen/trading_pb.ts b/web-dashboard/src/gen/trading_pb.ts new file mode 100644 index 000000000..19319a9ae --- /dev/null +++ b/web-dashboard/src/gen/trading_pb.ts @@ -0,0 +1,2375 @@ +// @generated by protoc-gen-es v2.11.0 with parameter "target=ts" +// @generated from file trading.proto (package trading, syntax proto3) +/* eslint-disable */ + +import type { GenEnum, GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2"; +import { enumDesc, fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv2"; +import type { Message } from "@bufbuild/protobuf"; + +/** + * Describes the file trading.proto. + */ +export const file_trading: GenFile = /*@__PURE__*/ + fileDesc("Cg10cmFkaW5nLnByb3RvEgd0cmFkaW5nIk0KHVN0cmVhbVBvcnRmb2xpb1N1bW1hcnlSZXF1ZXN0EhI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WFyeVJlc3BvbnNlMAESUwoPU3RyZWFtT3JkZXJCb29rEh8udHJhZGluZy5TdHJlYW1PcmRlckJvb2tSZXF1ZXN0Gh0udHJhZGluZy5HZXRPcmRlckJvb2tSZXNwb25zZTABYgZwcm90bzM"); + +/** + * @generated from message trading.StreamPortfolioSummaryRequest + */ +export type StreamPortfolioSummaryRequest = Message<"trading.StreamPortfolioSummaryRequest"> & { + /** + * Account ID for portfolio summary + * + * @generated from field: string account_id = 1; + */ + accountId: string; + + /** + * 0 = server default (3s) + * + * @generated from field: uint32 interval_seconds = 2; + */ + intervalSeconds: number; +}; + +/** + * Describes the message trading.StreamPortfolioSummaryRequest. + * Use `create(StreamPortfolioSummaryRequestSchema)` to create a new message. + */ +export const StreamPortfolioSummaryRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_trading, 0); + +/** + * @generated from message trading.StreamOrderBookRequest + */ +export type StreamOrderBookRequest = Message<"trading.StreamOrderBookRequest"> & { + /** + * @generated from field: string symbol = 1; + */ + symbol: string; + + /** + * @generated from field: int32 depth = 2; + */ + depth: number; + + /** + * 0 = server default (1s) + * + * @generated from field: uint32 interval_seconds = 3; + */ + intervalSeconds: number; +}; + +/** + * Describes the message trading.StreamOrderBookRequest. + * Use `create(StreamOrderBookRequestSchema)` to create a new message. + */ +export const StreamOrderBookRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_trading, 1); + +/** + * Request to submit a new trading order + * + * @generated from message trading.SubmitOrderRequest + */ +export type SubmitOrderRequest = Message<"trading.SubmitOrderRequest"> & { + /** + * Trading symbol (e.g., "AAPL", "BTC-USD") + * + * @generated from field: string symbol = 1; + */ + symbol: string; + + /** + * Buy or sell direction + * + * @generated from field: trading.OrderSide side = 2; + */ + side: OrderSide; + + /** + * Number of shares/units to trade + * + * @generated from field: double quantity = 3; + */ + quantity: number; + + /** + * Market, limit, stop, or stop-limit + * + * @generated from field: trading.OrderType order_type = 4; + */ + orderType: OrderType; + + /** + * Limit price (required for limit orders) + * + * @generated from field: optional double price = 5; + */ + price?: number; + + /** + * Stop price (required for stop orders) + * + * @generated from field: optional double stop_price = 6; + */ + stopPrice?: number; + + /** + * Trading account identifier + * + * @generated from field: string account_id = 7; + */ + accountId: string; + + /** + * Additional order metadata (strategy, tags, etc.) + * + * @generated from field: map metadata = 8; + */ + metadata: { [key: string]: string }; +}; + +/** + * Describes the message trading.SubmitOrderRequest. + * Use `create(SubmitOrderRequestSchema)` to create a new message. + */ +export const SubmitOrderRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_trading, 2); + +/** + * Response after submitting an order + * + * @generated from message trading.SubmitOrderResponse + */ +export type SubmitOrderResponse = Message<"trading.SubmitOrderResponse"> & { + /** + * Unique order identifier assigned by system + * + * @generated from field: string order_id = 1; + */ + orderId: string; + + /** + * Current order status (pending, submitted, etc.) + * + * @generated from field: trading.OrderStatus status = 2; + */ + status: OrderStatus; + + /** + * Status message or error description + * + * @generated from field: string message = 3; + */ + message: string; + + /** + * Order submission timestamp (nanoseconds) + * + * @generated from field: int64 timestamp = 4; + */ + timestamp: bigint; +}; + +/** + * Describes the message trading.SubmitOrderResponse. + * Use `create(SubmitOrderResponseSchema)` to create a new message. + */ +export const SubmitOrderResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_trading, 3); + +/** + * Request to cancel an existing order + * + * @generated from message trading.CancelOrderRequest + */ +export type CancelOrderRequest = Message<"trading.CancelOrderRequest"> & { + /** + * Order ID to cancel + * + * @generated from field: string order_id = 1; + */ + orderId: string; + + /** + * Account ID for verification + * + * @generated from field: string account_id = 2; + */ + accountId: string; +}; + +/** + * Describes the message trading.CancelOrderRequest. + * Use `create(CancelOrderRequestSchema)` to create a new message. + */ +export const CancelOrderRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_trading, 4); + +/** + * Response after attempting to cancel an order + * + * @generated from message trading.CancelOrderResponse + */ +export type CancelOrderResponse = Message<"trading.CancelOrderResponse"> & { + /** + * True if cancellation was successful + * + * @generated from field: bool success = 1; + */ + success: boolean; + + /** + * Success confirmation or error message + * + * @generated from field: string message = 2; + */ + message: string; + + /** + * Cancellation timestamp (nanoseconds) + * + * @generated from field: int64 timestamp = 3; + */ + timestamp: bigint; +}; + +/** + * Describes the message trading.CancelOrderResponse. + * Use `create(CancelOrderResponseSchema)` to create a new message. + */ +export const CancelOrderResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_trading, 5); + +/** + * Request to get current status of an order + * + * @generated from message trading.GetOrderStatusRequest + */ +export type GetOrderStatusRequest = Message<"trading.GetOrderStatusRequest"> & { + /** + * Order ID to query + * + * @generated from field: string order_id = 1; + */ + orderId: string; +}; + +/** + * Describes the message trading.GetOrderStatusRequest. + * Use `create(GetOrderStatusRequestSchema)` to create a new message. + */ +export const GetOrderStatusRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_trading, 6); + +/** + * Response containing order status information + * + * @generated from message trading.GetOrderStatusResponse + */ +export type GetOrderStatusResponse = Message<"trading.GetOrderStatusResponse"> & { + /** + * Complete order details with current status + * + * @generated from field: trading.Order order = 1; + */ + order?: Order; +}; + +/** + * Describes the message trading.GetOrderStatusResponse. + * Use `create(GetOrderStatusResponseSchema)` to create a new message. + */ +export const GetOrderStatusResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_trading, 7); + +/** + * Request to stream real-time order events + * + * @generated from message trading.StreamOrdersRequest + */ +export type StreamOrdersRequest = Message<"trading.StreamOrdersRequest"> & { + /** + * Filter by account (all accounts if not specified) + * + * @generated from field: optional string account_id = 1; + */ + accountId?: string; + + /** + * Filter by symbol (all symbols if not specified) + * + * @generated from field: optional string symbol = 2; + */ + symbol?: string; +}; + +/** + * Describes the message trading.StreamOrdersRequest. + * Use `create(StreamOrdersRequestSchema)` to create a new message. + */ +export const StreamOrdersRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_trading, 8); + +/** + * Request to get current positions + * + * @generated from message trading.GetPositionsRequest + */ +export type GetPositionsRequest = Message<"trading.GetPositionsRequest"> & { + /** + * Filter by account (all accounts if not specified) + * + * @generated from field: optional string account_id = 1; + */ + accountId?: string; + + /** + * Filter by symbol (all symbols if not specified) + * + * @generated from field: optional string symbol = 2; + */ + symbol?: string; +}; + +/** + * Describes the message trading.GetPositionsRequest. + * Use `create(GetPositionsRequestSchema)` to create a new message. + */ +export const GetPositionsRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_trading, 9); + +/** + * Response containing position information + * + * @generated from message trading.GetPositionsResponse + */ +export type GetPositionsResponse = Message<"trading.GetPositionsResponse"> & { + /** + * List of current positions + * + * @generated from field: repeated trading.Position positions = 1; + */ + positions: Position[]; +}; + +/** + * Describes the message trading.GetPositionsResponse. + * Use `create(GetPositionsResponseSchema)` to create a new message. + */ +export const GetPositionsResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_trading, 10); + +/** + * Request to stream real-time position updates + * + * @generated from message trading.StreamPositionsRequest + */ +export type StreamPositionsRequest = Message<"trading.StreamPositionsRequest"> & { + /** + * Filter by account (all accounts if not specified) + * + * @generated from field: optional string account_id = 1; + */ + accountId?: string; +}; + +/** + * Describes the message trading.StreamPositionsRequest. + * Use `create(StreamPositionsRequestSchema)` to create a new message. + */ +export const StreamPositionsRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_trading, 11); + +/** + * Request for portfolio summary + * + * @generated from message trading.GetPortfolioSummaryRequest + */ +export type GetPortfolioSummaryRequest = Message<"trading.GetPortfolioSummaryRequest"> & { + /** + * Account ID for portfolio summary + * + * @generated from field: string account_id = 1; + */ + accountId: string; +}; + +/** + * Describes the message trading.GetPortfolioSummaryRequest. + * Use `create(GetPortfolioSummaryRequestSchema)` to create a new message. + */ +export const GetPortfolioSummaryRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_trading, 12); + +/** + * Response containing comprehensive portfolio information + * + * @generated from message trading.GetPortfolioSummaryResponse + */ +export type GetPortfolioSummaryResponse = Message<"trading.GetPortfolioSummaryResponse"> & { + /** + * Total portfolio value in USD + * + * @generated from field: double total_value = 1; + */ + totalValue: number; + + /** + * Unrealized profit/loss + * + * @generated from field: double unrealized_pnl = 2; + */ + unrealizedPnl: number; + + /** + * Realized profit/loss for the day + * + * @generated from field: double realized_pnl = 3; + */ + realizedPnl: number; + + /** + * Total P&L for the current trading day + * + * @generated from field: double day_pnl = 4; + */ + dayPnl: number; + + /** + * Available buying power + * + * @generated from field: double buying_power = 5; + */ + buyingPower: number; + + /** + * Amount of margin currently used + * + * @generated from field: double margin_used = 6; + */ + marginUsed: number; + + /** + * Detailed position information + * + * @generated from field: repeated trading.Position positions = 7; + */ + positions: Position[]; +}; + +/** + * Describes the message trading.GetPortfolioSummaryResponse. + * Use `create(GetPortfolioSummaryResponseSchema)` to create a new message. + */ +export const GetPortfolioSummaryResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_trading, 13); + +/** + * Request to stream real-time market data + * + * @generated from message trading.StreamMarketDataRequest + */ +export type StreamMarketDataRequest = Message<"trading.StreamMarketDataRequest"> & { + /** + * List of symbols to subscribe to + * + * @generated from field: repeated string symbols = 1; + */ + symbols: string[]; + + /** + * Types of data to stream (trades, quotes, order book) + * + * @generated from field: repeated trading.MarketDataType data_types = 2; + */ + dataTypes: MarketDataType[]; +}; + +/** + * Describes the message trading.StreamMarketDataRequest. + * Use `create(StreamMarketDataRequestSchema)` to create a new message. + */ +export const StreamMarketDataRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_trading, 14); + +/** + * Request for order book snapshot + * + * @generated from message trading.GetOrderBookRequest + */ +export type GetOrderBookRequest = Message<"trading.GetOrderBookRequest"> & { + /** + * Symbol to get order book for + * + * @generated from field: string symbol = 1; + */ + symbol: string; + + /** + * Number of price levels (default: full book) + * + * @generated from field: optional int32 depth = 2; + */ + depth?: number; +}; + +/** + * Describes the message trading.GetOrderBookRequest. + * Use `create(GetOrderBookRequestSchema)` to create a new message. + */ +export const GetOrderBookRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_trading, 15); + +/** + * Response containing order book data + * + * @generated from message trading.GetOrderBookResponse + */ +export type GetOrderBookResponse = Message<"trading.GetOrderBookResponse"> & { + /** + * Current order book snapshot + * + * @generated from field: trading.OrderBook order_book = 1; + */ + orderBook?: OrderBook; +}; + +/** + * Describes the message trading.GetOrderBookResponse. + * Use `create(GetOrderBookResponseSchema)` to create a new message. + */ +export const GetOrderBookResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_trading, 16); + +/** + * Request to stream real-time executions + * + * @generated from message trading.StreamExecutionsRequest + */ +export type StreamExecutionsRequest = Message<"trading.StreamExecutionsRequest"> & { + /** + * Filter by account (all accounts if not specified) + * + * @generated from field: optional string account_id = 1; + */ + accountId?: string; + + /** + * Filter by symbol (all symbols if not specified) + * + * @generated from field: optional string symbol = 2; + */ + symbol?: string; +}; + +/** + * Describes the message trading.StreamExecutionsRequest. + * Use `create(StreamExecutionsRequestSchema)` to create a new message. + */ +export const StreamExecutionsRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_trading, 17); + +/** + * Request for historical execution data + * + * @generated from message trading.GetExecutionHistoryRequest + */ +export type GetExecutionHistoryRequest = Message<"trading.GetExecutionHistoryRequest"> & { + /** + * Filter by account (all accounts if not specified) + * + * @generated from field: optional string account_id = 1; + */ + accountId?: string; + + /** + * Filter by symbol (all symbols if not specified) + * + * @generated from field: optional string symbol = 2; + */ + symbol?: string; + + /** + * Start time for query (nanoseconds) + * + * @generated from field: optional int64 start_time = 3; + */ + startTime?: bigint; + + /** + * End time for query (nanoseconds) + * + * @generated from field: optional int64 end_time = 4; + */ + endTime?: bigint; + + /** + * Maximum number of executions to return + * + * @generated from field: optional int32 limit = 5; + */ + limit?: number; +}; + +/** + * Describes the message trading.GetExecutionHistoryRequest. + * Use `create(GetExecutionHistoryRequestSchema)` to create a new message. + */ +export const GetExecutionHistoryRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_trading, 18); + +/** + * Response containing execution history + * + * @generated from message trading.GetExecutionHistoryResponse + */ +export type GetExecutionHistoryResponse = Message<"trading.GetExecutionHistoryResponse"> & { + /** + * List of historical executions + * + * @generated from field: repeated trading.Execution executions = 1; + */ + executions: Execution[]; +}; + +/** + * Describes the message trading.GetExecutionHistoryResponse. + * Use `create(GetExecutionHistoryResponseSchema)` to create a new message. + */ +export const GetExecutionHistoryResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_trading, 19); + +/** + * Request to submit ML-generated order + * + * @generated from message trading.MLOrderRequest + */ +export type MLOrderRequest = Message<"trading.MLOrderRequest"> & { + /** + * Trading symbol (e.g., "ES.FUT") + * + * @generated from field: string symbol = 1; + */ + symbol: string; + + /** + * Trading account identifier + * + * @generated from field: string account_id = 2; + */ + accountId: string; + + /** + * Use ensemble voting or specific model + * + * @generated from field: bool use_ensemble = 3; + */ + useEnsemble: boolean; + + /** + * Specific model name if not using ensemble + * + * @generated from field: optional string model_name = 4; + */ + modelName?: string; + + /** + * Feature vector for ML prediction (26 features: OHLCV + technicals) + * + * @generated from field: repeated double features = 5; + */ + features: number[]; +}; + +/** + * Describes the message trading.MLOrderRequest. + * Use `create(MLOrderRequestSchema)` to create a new message. + */ +export const MLOrderRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_trading, 20); + +/** + * Response after submitting ML order + * + * @generated from message trading.MLOrderResponse + */ +export type MLOrderResponse = Message<"trading.MLOrderResponse"> & { + /** + * Order ID if executed + * + * @generated from field: string order_id = 1; + */ + orderId: string; + + /** + * Prediction ID from ensemble_predictions table + * + * @generated from field: string prediction_id = 2; + */ + predictionId: string; + + /** + * Action taken: BUY, SELL, HOLD + * + * @generated from field: string action = 3; + */ + action: string; + + /** + * Prediction confidence (0.0-1.0) + * + * @generated from field: double confidence = 4; + */ + confidence: number; + + /** + * Status message + * + * @generated from field: string message = 5; + */ + message: string; + + /** + * True if order was executed + * + * @generated from field: bool executed = 6; + */ + executed: boolean; +}; + +/** + * Describes the message trading.MLOrderResponse. + * Use `create(MLOrderResponseSchema)` to create a new message. + */ +export const MLOrderResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_trading, 21); + +/** + * Request to get ML prediction history + * + * @generated from message trading.MLPredictionsRequest + */ +export type MLPredictionsRequest = Message<"trading.MLPredictionsRequest"> & { + /** + * Trading symbol to filter by + * + * @generated from field: string symbol = 1; + */ + symbol: string; + + /** + * Filter by specific model + * + * @generated from field: optional string model_name = 2; + */ + modelName?: string; + + /** + * Maximum predictions to return (default: 100) + * + * @generated from field: int32 limit = 3; + */ + limit: number; + + /** + * Start time filter (nanoseconds) + * + * @generated from field: optional int64 start_time = 4; + */ + startTime?: bigint; + + /** + * End time filter (nanoseconds) + * + * @generated from field: optional int64 end_time = 5; + */ + endTime?: bigint; +}; + +/** + * Describes the message trading.MLPredictionsRequest. + * Use `create(MLPredictionsRequestSchema)` to create a new message. + */ +export const MLPredictionsRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_trading, 22); + +/** + * Response containing ML prediction history + * + * @generated from message trading.MLPredictionsResponse + */ +export type MLPredictionsResponse = Message<"trading.MLPredictionsResponse"> & { + /** + * List of predictions with outcomes + * + * @generated from field: repeated trading.MLPrediction predictions = 1; + */ + predictions: MLPrediction[]; +}; + +/** + * Describes the message trading.MLPredictionsResponse. + * Use `create(MLPredictionsResponseSchema)` to create a new message. + */ +export const MLPredictionsResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_trading, 23); + +/** + * Single ML prediction with outcome + * + * @generated from message trading.MLPrediction + */ +export type MLPrediction = Message<"trading.MLPrediction"> & { + /** + * Prediction ID (UUID) + * + * @generated from field: string id = 1; + */ + id: string; + + /** + * Trading symbol + * + * @generated from field: string symbol = 2; + */ + symbol: string; + + /** + * Predicted action: BUY, SELL, HOLD + * + * @generated from field: string ensemble_action = 3; + */ + ensembleAction: string; + + /** + * Signal strength (-1.0 to 1.0) + * + * @generated from field: double ensemble_signal = 4; + */ + ensembleSignal: number; + + /** + * Confidence level (0.0-1.0) + * + * @generated from field: double ensemble_confidence = 5; + */ + ensembleConfidence: number; + + /** + * Prediction timestamp (nanoseconds) + * + * @generated from field: int64 timestamp = 6; + */ + timestamp: bigint; + + /** + * Order ID if executed + * + * @generated from field: optional string order_id = 7; + */ + orderId?: string; + + /** + * Actual P&L if order filled + * + * @generated from field: optional double actual_pnl = 8; + */ + actualPnl?: number; + + /** + * Individual model predictions + * + * @generated from field: repeated trading.ModelPrediction model_predictions = 9; + */ + modelPredictions: ModelPrediction[]; +}; + +/** + * Describes the message trading.MLPrediction. + * Use `create(MLPredictionSchema)` to create a new message. + */ +export const MLPredictionSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_trading, 24); + +/** + * Individual model prediction within ensemble + * + * @generated from message trading.ModelPrediction + */ +export type ModelPrediction = Message<"trading.ModelPrediction"> & { + /** + * Model name (DQN, MAMBA2, PPO, TFT) + * + * @generated from field: string model_name = 1; + */ + modelName: string; + + /** + * Model signal strength + * + * @generated from field: double signal = 2; + */ + signal: number; + + /** + * Model confidence + * + * @generated from field: double confidence = 3; + */ + confidence: number; +}; + +/** + * Describes the message trading.ModelPrediction. + * Use `create(ModelPredictionSchema)` to create a new message. + */ +export const ModelPredictionSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_trading, 25); + +/** + * Request to get ML model performance metrics + * + * @generated from message trading.MLPerformanceRequest + */ +export type MLPerformanceRequest = Message<"trading.MLPerformanceRequest"> & { + /** + * Filter by specific model (or all if not specified) + * + * @generated from field: optional string model_name = 1; + */ + modelName?: string; + + /** + * Start time for metrics (nanoseconds) + * + * @generated from field: optional int64 start_time = 2; + */ + startTime?: bigint; + + /** + * End time for metrics (nanoseconds) + * + * @generated from field: optional int64 end_time = 3; + */ + endTime?: bigint; +}; + +/** + * Describes the message trading.MLPerformanceRequest. + * Use `create(MLPerformanceRequestSchema)` to create a new message. + */ +export const MLPerformanceRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_trading, 26); + +/** + * Response containing ML model performance + * + * @generated from message trading.MLPerformanceResponse + */ +export type MLPerformanceResponse = Message<"trading.MLPerformanceResponse"> & { + /** + * Performance metrics per model + * + * @generated from field: repeated trading.ModelPerformance models = 1; + */ + models: ModelPerformance[]; +}; + +/** + * Describes the message trading.MLPerformanceResponse. + * Use `create(MLPerformanceResponseSchema)` to create a new message. + */ +export const MLPerformanceResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_trading, 27); + +/** + * Performance metrics for a single model + * + * @generated from message trading.ModelPerformance + */ +export type ModelPerformance = Message<"trading.ModelPerformance"> & { + /** + * Model name + * + * @generated from field: string model_name = 1; + */ + modelName: string; + + /** + * Total predictions made + * + * @generated from field: int64 total_predictions = 2; + */ + totalPredictions: bigint; + + /** + * Correct predictions (profitable) + * + * @generated from field: int64 correct_predictions = 3; + */ + correctPredictions: bigint; + + /** + * Accuracy rate (0.0-1.0) + * + * @generated from field: double accuracy = 4; + */ + accuracy: number; + + /** + * Risk-adjusted return + * + * @generated from field: double sharpe_ratio = 5; + */ + sharpeRatio: number; + + /** + * Average P&L per prediction + * + * @generated from field: double avg_pnl = 6; + */ + avgPnl: number; +}; + +/** + * Describes the message trading.ModelPerformance. + * Use `create(ModelPerformanceSchema)` to create a new message. + */ +export const ModelPerformanceSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_trading, 28); + +/** + * Request to get current regime state + * + * @generated from message trading.GetRegimeStateRequest + */ +export type GetRegimeStateRequest = Message<"trading.GetRegimeStateRequest"> & { + /** + * Trading symbol to query + * + * @generated from field: string symbol = 1; + */ + symbol: string; +}; + +/** + * Describes the message trading.GetRegimeStateRequest. + * Use `create(GetRegimeStateRequestSchema)` to create a new message. + */ +export const GetRegimeStateRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_trading, 29); + +/** + * Response containing current regime state + * + * @generated from message trading.GetRegimeStateResponse + */ +export type GetRegimeStateResponse = Message<"trading.GetRegimeStateResponse"> & { + /** + * Trading symbol + * + * @generated from field: string symbol = 1; + */ + symbol: string; + + /** + * Current regime: TRENDING, RANGING, VOLATILE, CRISIS + * + * @generated from field: string current_regime = 2; + */ + currentRegime: string; + + /** + * Regime confidence (0.0-1.0) + * + * @generated from field: double confidence = 3; + */ + confidence: number; + + /** + * CUSUM S+ statistic + * + * @generated from field: double cusum_s_plus = 4; + */ + cusumSPlus: number; + + /** + * CUSUM S- statistic + * + * @generated from field: double cusum_s_minus = 5; + */ + cusumSMinus: number; + + /** + * Average Directional Index + * + * @generated from field: double adx = 6; + */ + adx: number; + + /** + * Regime stability score (0.0-1.0) + * + * @generated from field: double stability = 7; + */ + stability: number; + + /** + * Transition entropy (0.0-1.0) + * + * @generated from field: double entropy = 8; + */ + entropy: number; + + /** + * Last update timestamp (nanoseconds) + * + * @generated from field: int64 updated_at = 9; + */ + updatedAt: bigint; +}; + +/** + * Describes the message trading.GetRegimeStateResponse. + * Use `create(GetRegimeStateResponseSchema)` to create a new message. + */ +export const GetRegimeStateResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_trading, 30); + +/** + * Request to get regime transition history + * + * @generated from message trading.GetRegimeTransitionsRequest + */ +export type GetRegimeTransitionsRequest = Message<"trading.GetRegimeTransitionsRequest"> & { + /** + * Trading symbol to query + * + * @generated from field: string symbol = 1; + */ + symbol: string; + + /** + * Maximum transitions to return (default: 100) + * + * @generated from field: int32 limit = 2; + */ + limit: number; +}; + +/** + * Describes the message trading.GetRegimeTransitionsRequest. + * Use `create(GetRegimeTransitionsRequestSchema)` to create a new message. + */ +export const GetRegimeTransitionsRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_trading, 31); + +/** + * Response containing regime transition history + * + * @generated from message trading.GetRegimeTransitionsResponse + */ +export type GetRegimeTransitionsResponse = Message<"trading.GetRegimeTransitionsResponse"> & { + /** + * List of regime transitions + * + * @generated from field: repeated trading.RegimeTransition transitions = 1; + */ + transitions: RegimeTransition[]; +}; + +/** + * Describes the message trading.GetRegimeTransitionsResponse. + * Use `create(GetRegimeTransitionsResponseSchema)` to create a new message. + */ +export const GetRegimeTransitionsResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_trading, 32); + +/** + * Single regime transition record + * + * @generated from message trading.RegimeTransition + */ +export type RegimeTransition = Message<"trading.RegimeTransition"> & { + /** + * Previous regime + * + * @generated from field: string from_regime = 1; + */ + fromRegime: string; + + /** + * New regime + * + * @generated from field: string to_regime = 2; + */ + toRegime: string; + + /** + * Duration in previous regime (bars) + * + * @generated from field: int32 duration_bars = 3; + */ + durationBars: number; + + /** + * Transition probability from matrix + * + * @generated from field: double transition_probability = 4; + */ + transitionProbability: number; + + /** + * Transition timestamp (nanoseconds) + * + * @generated from field: int64 timestamp = 5; + */ + timestamp: bigint; +}; + +/** + * Describes the message trading.RegimeTransition. + * Use `create(RegimeTransitionSchema)` to create a new message. + */ +export const RegimeTransitionSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_trading, 33); + +/** + * Complete order information with all lifecycle details + * + * @generated from message trading.Order + */ +export type Order = Message<"trading.Order"> & { + /** + * Unique order identifier + * + * @generated from field: string order_id = 1; + */ + orderId: string; + + /** + * Trading symbol (e.g., "AAPL", "BTC-USD") + * + * @generated from field: string symbol = 2; + */ + symbol: string; + + /** + * Buy or sell direction + * + * @generated from field: trading.OrderSide side = 3; + */ + side: OrderSide; + + /** + * Total quantity ordered + * + * @generated from field: double quantity = 4; + */ + quantity: number; + + /** + * Quantity already filled + * + * @generated from field: double filled_quantity = 5; + */ + filledQuantity: number; + + /** + * Market, limit, stop, or stop-limit + * + * @generated from field: trading.OrderType order_type = 6; + */ + orderType: OrderType; + + /** + * Limit price (for limit orders) + * + * @generated from field: optional double price = 7; + */ + price?: number; + + /** + * Stop price (for stop orders) + * + * @generated from field: optional double stop_price = 8; + */ + stopPrice?: number; + + /** + * Current order status + * + * @generated from field: trading.OrderStatus status = 9; + */ + status: OrderStatus; + + /** + * Order creation timestamp (nanoseconds) + * + * @generated from field: int64 created_at = 10; + */ + createdAt: bigint; + + /** + * Last update timestamp (nanoseconds) + * + * @generated from field: optional int64 updated_at = 11; + */ + updatedAt?: bigint; + + /** + * Associated trading account + * + * @generated from field: string account_id = 12; + */ + accountId: string; + + /** + * Additional order metadata + * + * @generated from field: map metadata = 13; + */ + metadata: { [key: string]: string }; +}; + +/** + * Describes the message trading.Order. + * Use `create(OrderSchema)` to create a new message. + */ +export const OrderSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_trading, 34); + +/** + * Current position information for a symbol + * + * @generated from message trading.Position + */ +export type Position = Message<"trading.Position"> & { + /** + * Trading symbol + * + * @generated from field: string symbol = 1; + */ + symbol: string; + + /** + * Current position size (positive for long, negative for short) + * + * @generated from field: double quantity = 2; + */ + quantity: number; + + /** + * Average cost basis per share + * + * @generated from field: double average_price = 3; + */ + averagePrice: number; + + /** + * Current market value of position + * + * @generated from field: double market_value = 4; + */ + marketValue: number; + + /** + * Unrealized profit/loss + * + * @generated from field: double unrealized_pnl = 5; + */ + unrealizedPnl: number; + + /** + * Realized profit/loss for the day + * + * @generated from field: double realized_pnl = 6; + */ + realizedPnl: number; + + /** + * Associated trading account + * + * @generated from field: string account_id = 7; + */ + accountId: string; + + /** + * Last update timestamp (nanoseconds) + * + * @generated from field: int64 updated_at = 8; + */ + updatedAt: bigint; +}; + +/** + * Describes the message trading.Position. + * Use `create(PositionSchema)` to create a new message. + */ +export const PositionSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_trading, 35); + +/** + * Trade execution details + * + * @generated from message trading.Execution + */ +export type Execution = Message<"trading.Execution"> & { + /** + * Unique execution identifier + * + * @generated from field: string execution_id = 1; + */ + executionId: string; + + /** + * Associated order ID + * + * @generated from field: string order_id = 2; + */ + orderId: string; + + /** + * Trading symbol + * + * @generated from field: string symbol = 3; + */ + symbol: string; + + /** + * Buy or sell direction + * + * @generated from field: trading.OrderSide side = 4; + */ + side: OrderSide; + + /** + * Quantity executed + * + * @generated from field: double quantity = 5; + */ + quantity: number; + + /** + * Execution price + * + * @generated from field: double price = 6; + */ + price: number; + + /** + * Execution timestamp (nanoseconds) + * + * @generated from field: int64 timestamp = 7; + */ + timestamp: bigint; + + /** + * Associated trading account + * + * @generated from field: string account_id = 8; + */ + accountId: string; + + /** + * Additional execution metadata + * + * @generated from field: map metadata = 9; + */ + metadata: { [key: string]: string }; +}; + +/** + * Describes the message trading.Execution. + * Use `create(ExecutionSchema)` to create a new message. + */ +export const ExecutionSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_trading, 36); + +/** + * Order book snapshot for a symbol + * + * @generated from message trading.OrderBook + */ +export type OrderBook = Message<"trading.OrderBook"> & { + /** + * Trading symbol + * + * @generated from field: string symbol = 1; + */ + symbol: string; + + /** + * Bid levels (buyers) sorted by price descending + * + * @generated from field: repeated trading.OrderBookLevel bids = 2; + */ + bids: OrderBookLevel[]; + + /** + * Ask levels (sellers) sorted by price ascending + * + * @generated from field: repeated trading.OrderBookLevel asks = 3; + */ + asks: OrderBookLevel[]; + + /** + * Order book timestamp (nanoseconds) + * + * @generated from field: int64 timestamp = 4; + */ + timestamp: bigint; +}; + +/** + * Describes the message trading.OrderBook. + * Use `create(OrderBookSchema)` to create a new message. + */ +export const OrderBookSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_trading, 37); + +/** + * Single price level in the order book + * + * @generated from message trading.OrderBookLevel + */ +export type OrderBookLevel = Message<"trading.OrderBookLevel"> & { + /** + * Price level + * + * @generated from field: double price = 1; + */ + price: number; + + /** + * Total quantity at this price level + * + * @generated from field: double quantity = 2; + */ + quantity: number; + + /** + * Number of orders at this price level + * + * @generated from field: int32 order_count = 3; + */ + orderCount: number; +}; + +/** + * Describes the message trading.OrderBookLevel. + * Use `create(OrderBookLevelSchema)` to create a new message. + */ +export const OrderBookLevelSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_trading, 38); + +/** + * Real-time order event notification + * + * @generated from message trading.OrderEvent + */ +export type OrderEvent = Message<"trading.OrderEvent"> & { + /** + * Order identifier + * + * @generated from field: string order_id = 1; + */ + orderId: string; + + /** + * Complete order details + * + * @generated from field: trading.Order order = 2; + */ + order?: Order; + + /** + * Type of event (created, updated, filled, etc.) + * + * @generated from field: trading.OrderEventType event_type = 3; + */ + eventType: OrderEventType; + + /** + * Event timestamp (nanoseconds) + * + * @generated from field: int64 timestamp = 4; + */ + timestamp: bigint; + + /** + * Event message or additional details + * + * @generated from field: string message = 5; + */ + message: string; +}; + +/** + * Describes the message trading.OrderEvent. + * Use `create(OrderEventSchema)` to create a new message. + */ +export const OrderEventSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_trading, 39); + +/** + * Real-time position change notification + * + * @generated from message trading.PositionEvent + */ +export type PositionEvent = Message<"trading.PositionEvent"> & { + /** + * Trading symbol + * + * @generated from field: string symbol = 1; + */ + symbol: string; + + /** + * Updated position details + * + * @generated from field: trading.Position position = 2; + */ + position?: Position; + + /** + * Type of event (opened, updated, closed) + * + * @generated from field: trading.PositionEventType event_type = 3; + */ + eventType: PositionEventType; + + /** + * Event timestamp (nanoseconds) + * + * @generated from field: int64 timestamp = 4; + */ + timestamp: bigint; + + /** + * Position quantity (quick access) + * + * @generated from field: double quantity = 5; + */ + quantity: number; + + /** + * Average entry price (quick access) + * + * @generated from field: double average_price = 6; + */ + averagePrice: number; + + /** + * Unrealized P&L (quick access) + * + * @generated from field: double unrealized_pnl = 7; + */ + unrealizedPnl: number; +}; + +/** + * Describes the message trading.PositionEvent. + * Use `create(PositionEventSchema)` to create a new message. + */ +export const PositionEventSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_trading, 40); + +/** + * Real-time execution notification + * + * @generated from message trading.ExecutionEvent + */ +export type ExecutionEvent = Message<"trading.ExecutionEvent"> & { + /** + * Execution identifier + * + * @generated from field: string execution_id = 1; + */ + executionId: string; + + /** + * Execution details + * + * @generated from field: trading.Execution execution = 2; + */ + execution?: Execution; + + /** + * Event timestamp (nanoseconds) + * + * @generated from field: int64 timestamp = 3; + */ + timestamp: bigint; + + /** + * Associated order ID (quick access) + * + * @generated from field: string order_id = 4; + */ + orderId: string; + + /** + * Trading symbol (quick access) + * + * @generated from field: string symbol = 5; + */ + symbol: string; + + /** + * Executed quantity (quick access) + * + * @generated from field: double quantity = 6; + */ + quantity: number; + + /** + * Execution price (quick access) + * + * @generated from field: double price = 7; + */ + price: number; +}; + +/** + * Describes the message trading.ExecutionEvent. + * Use `create(ExecutionEventSchema)` to create a new message. + */ +export const ExecutionEventSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_trading, 41); + +/** + * Real-time market data update + * + * @generated from message trading.MarketDataEvent + */ +export type MarketDataEvent = Message<"trading.MarketDataEvent"> & { + /** + * Trading symbol + * + * @generated from field: string symbol = 1; + */ + symbol: string; + + /** + * Type of market data + * + * @generated from field: trading.MarketDataType data_type = 2; + */ + dataType: MarketDataType; + + /** + * @generated from oneof trading.MarketDataEvent.data + */ + data: { + /** + * Trade data (when data_type = TRADE) + * + * @generated from field: trading.Trade trade = 3; + */ + value: Trade; + case: "trade"; + } | { + /** + * Quote data (when data_type = QUOTE) + * + * @generated from field: trading.Quote quote = 4; + */ + value: Quote; + case: "quote"; + } | { + /** + * Order book data (when data_type = ORDER_BOOK) + * + * @generated from field: trading.OrderBook order_book = 5; + */ + value: OrderBook; + case: "orderBook"; + } | { case: undefined; value?: undefined }; + + /** + * Market data timestamp (nanoseconds) + * + * @generated from field: int64 timestamp = 6; + */ + timestamp: bigint; +}; + +/** + * Describes the message trading.MarketDataEvent. + * Use `create(MarketDataEventSchema)` to create a new message. + */ +export const MarketDataEventSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_trading, 42); + +/** + * Market trade information + * + * @generated from message trading.Trade + */ +export type Trade = Message<"trading.Trade"> & { + /** + * Trade price + * + * @generated from field: double price = 1; + */ + price: number; + + /** + * Trade volume + * + * @generated from field: double volume = 2; + */ + volume: number; + + /** + * Trade timestamp (nanoseconds) + * + * @generated from field: int64 timestamp = 3; + */ + timestamp: bigint; +}; + +/** + * Describes the message trading.Trade. + * Use `create(TradeSchema)` to create a new message. + */ +export const TradeSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_trading, 43); + +/** + * Market quote (bid/ask) information + * + * @generated from message trading.Quote + */ +export type Quote = Message<"trading.Quote"> & { + /** + * Best bid price + * + * @generated from field: double bid_price = 1; + */ + bidPrice: number; + + /** + * Size at best bid + * + * @generated from field: double bid_size = 2; + */ + bidSize: number; + + /** + * Best ask price + * + * @generated from field: double ask_price = 3; + */ + askPrice: number; + + /** + * Size at best ask + * + * @generated from field: double ask_size = 4; + */ + askSize: number; + + /** + * Quote timestamp (nanoseconds) + * + * @generated from field: int64 timestamp = 5; + */ + timestamp: bigint; +}; + +/** + * Describes the message trading.Quote. + * Use `create(QuoteSchema)` to create a new message. + */ +export const QuoteSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_trading, 44); + +/** + * Order direction (buy or sell) + * + * @generated from enum trading.OrderSide + */ +export enum OrderSide { + /** + * Default/unknown side + * + * @generated from enum value: ORDER_SIDE_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * Buy order (long position) + * + * @generated from enum value: ORDER_SIDE_BUY = 1; + */ + BUY = 1, + + /** + * Sell order (short position) + * + * @generated from enum value: ORDER_SIDE_SELL = 2; + */ + SELL = 2, +} + +/** + * Describes the enum trading.OrderSide. + */ +export const OrderSideSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_trading, 0); + +/** + * Order type determining execution behavior + * + * @generated from enum trading.OrderType + */ +export enum OrderType { + /** + * Default/unknown type + * + * @generated from enum value: ORDER_TYPE_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * Execute immediately at market price + * + * @generated from enum value: ORDER_TYPE_MARKET = 1; + */ + MARKET = 1, + + /** + * Execute only at specified price or better + * + * @generated from enum value: ORDER_TYPE_LIMIT = 2; + */ + LIMIT = 2, + + /** + * Market order triggered at stop price + * + * @generated from enum value: ORDER_TYPE_STOP = 3; + */ + STOP = 3, + + /** + * Limit order triggered at stop price + * + * @generated from enum value: ORDER_TYPE_STOP_LIMIT = 4; + */ + STOP_LIMIT = 4, +} + +/** + * Describes the enum trading.OrderType. + */ +export const OrderTypeSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_trading, 1); + +/** + * Current status of an order in its lifecycle + * + * @generated from enum trading.OrderStatus + */ +export enum OrderStatus { + /** + * Default/unknown status + * + * @generated from enum value: ORDER_STATUS_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * Order created but not yet submitted + * + * @generated from enum value: ORDER_STATUS_PENDING = 1; + */ + PENDING = 1, + + /** + * Order submitted to exchange + * + * @generated from enum value: ORDER_STATUS_SUBMITTED = 2; + */ + SUBMITTED = 2, + + /** + * Order partially executed + * + * @generated from enum value: ORDER_STATUS_PARTIALLY_FILLED = 3; + */ + PARTIALLY_FILLED = 3, + + /** + * Order completely executed + * + * @generated from enum value: ORDER_STATUS_FILLED = 4; + */ + FILLED = 4, + + /** + * Order cancelled by user or system + * + * @generated from enum value: ORDER_STATUS_CANCELLED = 5; + */ + CANCELLED = 5, + + /** + * Order rejected by exchange or risk system + * + * @generated from enum value: ORDER_STATUS_REJECTED = 6; + */ + REJECTED = 6, +} + +/** + * Describes the enum trading.OrderStatus. + */ +export const OrderStatusSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_trading, 2); + +/** + * Type of order event notification + * + * @generated from enum trading.OrderEventType + */ +export enum OrderEventType { + /** + * Default/unknown event + * + * @generated from enum value: ORDER_EVENT_TYPE_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * Order was created + * + * @generated from enum value: ORDER_EVENT_TYPE_CREATED = 1; + */ + CREATED = 1, + + /** + * Order details were updated + * + * @generated from enum value: ORDER_EVENT_TYPE_UPDATED = 2; + */ + UPDATED = 2, + + /** + * Order was executed (full or partial) + * + * @generated from enum value: ORDER_EVENT_TYPE_FILLED = 3; + */ + FILLED = 3, + + /** + * Order was cancelled + * + * @generated from enum value: ORDER_EVENT_TYPE_CANCELLED = 4; + */ + CANCELLED = 4, + + /** + * Order was partially filled + * + * @generated from enum value: ORDER_EVENT_TYPE_PARTIALLY_FILLED = 5; + */ + PARTIALLY_FILLED = 5, + + /** + * Order was rejected + * + * @generated from enum value: ORDER_EVENT_TYPE_REJECTED = 6; + */ + REJECTED = 6, +} + +/** + * Describes the enum trading.OrderEventType. + */ +export const OrderEventTypeSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_trading, 3); + +/** + * Type of position change event + * + * @generated from enum trading.PositionEventType + */ +export enum PositionEventType { + /** + * Default/unknown event + * + * @generated from enum value: POSITION_EVENT_TYPE_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * New position was opened + * + * @generated from enum value: POSITION_EVENT_TYPE_OPENED = 1; + */ + OPENED = 1, + + /** + * Existing position was modified + * + * @generated from enum value: POSITION_EVENT_TYPE_UPDATED = 2; + */ + UPDATED = 2, + + /** + * Position was closed + * + * @generated from enum value: POSITION_EVENT_TYPE_CLOSED = 3; + */ + CLOSED = 3, +} + +/** + * Describes the enum trading.PositionEventType. + */ +export const PositionEventTypeSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_trading, 4); + +/** + * Type of market data being streamed + * + * @generated from enum trading.MarketDataType + */ +export enum MarketDataType { + /** + * Default/unknown type + * + * @generated from enum value: MARKET_DATA_TYPE_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * Trade/transaction data + * + * @generated from enum value: MARKET_DATA_TYPE_TRADE = 1; + */ + TRADE = 1, + + /** + * Best bid/ask quotes + * + * @generated from enum value: MARKET_DATA_TYPE_QUOTE = 2; + */ + QUOTE = 2, + + /** + * Full order book depth + * + * @generated from enum value: MARKET_DATA_TYPE_ORDER_BOOK = 3; + */ + ORDER_BOOK = 3, +} + +/** + * Describes the enum trading.MarketDataType. + */ +export const MarketDataTypeSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_trading, 5); + +/** + * Trading Service provides comprehensive real-time trading operations for high-frequency trading. + * This service handles order management, position tracking, market data streaming, and execution monitoring. + * All operations are designed for ultra-low latency with microsecond precision timing. + * + * @generated from service trading.TradingService + */ +export const TradingService: GenService<{ + /** + * Order Management Operations + * Submit a new trading order with validation and risk checks + * + * @generated from rpc trading.TradingService.SubmitOrder + */ + submitOrder: { + methodKind: "unary"; + input: typeof SubmitOrderRequestSchema; + output: typeof SubmitOrderResponseSchema; + }, + /** + * Cancel an existing order by order ID + * + * @generated from rpc trading.TradingService.CancelOrder + */ + cancelOrder: { + methodKind: "unary"; + input: typeof CancelOrderRequestSchema; + output: typeof CancelOrderResponseSchema; + }, + /** + * Get current status of a specific order + * + * @generated from rpc trading.TradingService.GetOrderStatus + */ + getOrderStatus: { + methodKind: "unary"; + input: typeof GetOrderStatusRequestSchema; + output: typeof GetOrderStatusResponseSchema; + }, + /** + * Stream real-time order events for monitoring order lifecycle + * + * @generated from rpc trading.TradingService.StreamOrders + */ + streamOrders: { + methodKind: "server_streaming"; + input: typeof StreamOrdersRequestSchema; + output: typeof OrderEventSchema; + }, + /** + * Position Management Operations + * Get current positions for account and/or symbol + * + * @generated from rpc trading.TradingService.GetPositions + */ + getPositions: { + methodKind: "unary"; + input: typeof GetPositionsRequestSchema; + output: typeof GetPositionsResponseSchema; + }, + /** + * Stream real-time position updates as trades execute + * + * @generated from rpc trading.TradingService.StreamPositions + */ + streamPositions: { + methodKind: "server_streaming"; + input: typeof StreamPositionsRequestSchema; + output: typeof PositionEventSchema; + }, + /** + * Get comprehensive portfolio summary with P&L and risk metrics + * + * @generated from rpc trading.TradingService.GetPortfolioSummary + */ + getPortfolioSummary: { + methodKind: "unary"; + input: typeof GetPortfolioSummaryRequestSchema; + output: typeof GetPortfolioSummaryResponseSchema; + }, + /** + * Market Data Operations + * Stream real-time market data (trades, quotes, order book) + * + * @generated from rpc trading.TradingService.StreamMarketData + */ + streamMarketData: { + methodKind: "server_streaming"; + input: typeof StreamMarketDataRequestSchema; + output: typeof MarketDataEventSchema; + }, + /** + * Get current order book snapshot for a symbol + * + * @generated from rpc trading.TradingService.GetOrderBook + */ + getOrderBook: { + methodKind: "unary"; + input: typeof GetOrderBookRequestSchema; + output: typeof GetOrderBookResponseSchema; + }, + /** + * Execution Operations + * Stream real-time trade executions as they occur + * + * @generated from rpc trading.TradingService.StreamExecutions + */ + streamExecutions: { + methodKind: "server_streaming"; + input: typeof StreamExecutionsRequestSchema; + output: typeof ExecutionEventSchema; + }, + /** + * Get historical execution data with filtering options + * + * @generated from rpc trading.TradingService.GetExecutionHistory + */ + getExecutionHistory: { + methodKind: "unary"; + input: typeof GetExecutionHistoryRequestSchema; + output: typeof GetExecutionHistoryResponseSchema; + }, + /** + * ML-specific Trading Operations + * Submit ML-generated trading order with ensemble predictions + * + * @generated from rpc trading.TradingService.SubmitMLOrder + */ + submitMLOrder: { + methodKind: "unary"; + input: typeof MLOrderRequestSchema; + output: typeof MLOrderResponseSchema; + }, + /** + * Get ML prediction history with outcomes + * + * @generated from rpc trading.TradingService.GetMLPredictions + */ + getMLPredictions: { + methodKind: "unary"; + input: typeof MLPredictionsRequestSchema; + output: typeof MLPredictionsResponseSchema; + }, + /** + * Get ML model performance metrics + * + * @generated from rpc trading.TradingService.GetMLPerformance + */ + getMLPerformance: { + methodKind: "unary"; + input: typeof MLPerformanceRequestSchema; + output: typeof MLPerformanceResponseSchema; + }, + /** + * Wave D: Regime Detection Operations + * Get current regime state for a symbol + * + * @generated from rpc trading.TradingService.GetRegimeState + */ + getRegimeState: { + methodKind: "unary"; + input: typeof GetRegimeStateRequestSchema; + output: typeof GetRegimeStateResponseSchema; + }, + /** + * Get regime transition history for a symbol + * + * @generated from rpc trading.TradingService.GetRegimeTransitions + */ + getRegimeTransitions: { + methodKind: "unary"; + input: typeof GetRegimeTransitionsRequestSchema; + output: typeof GetRegimeTransitionsResponseSchema; + }, + /** + * Server-streaming: polls GetPortfolioSummary at gateway level + * + * @generated from rpc trading.TradingService.StreamPortfolioSummary + */ + streamPortfolioSummary: { + methodKind: "server_streaming"; + input: typeof StreamPortfolioSummaryRequestSchema; + output: typeof GetPortfolioSummaryResponseSchema; + }, + /** + * Server-streaming: polls GetOrderBook at gateway level + * + * @generated from rpc trading.TradingService.StreamOrderBook + */ + streamOrderBook: { + methodKind: "server_streaming"; + input: typeof StreamOrderBookRequestSchema; + output: typeof GetOrderBookResponseSchema; + }, +}> = /*@__PURE__*/ + serviceDesc(file_trading, 0); + diff --git a/web-dashboard/src/hooks/useApi.ts b/web-dashboard/src/hooks/useApi.ts index 3b5205778..9e55dac73 100644 --- a/web-dashboard/src/hooks/useApi.ts +++ b/web-dashboard/src/hooks/useApi.ts @@ -1,36 +1,179 @@ -import { useQuery, useMutation, type UseQueryOptions } from '@tanstack/react-query'; -import { apiGet, apiPost, apiPut, apiDelete } from '../lib/api'; +import { useQuery, useMutation } from "@tanstack/react-query"; +import { + tradingClient, + riskClient, + mlClient, + mlTrainingClient, + configClient, + monitoringClient, + backtestingClient, +} from "../lib/grpc"; -/** Typed GET query hook */ -export function useApiQuery( - key: string[], - path: string, - options?: Omit, 'queryKey' | 'queryFn'>, +// --------------------------------------------------------------------------- +// Trading +// --------------------------------------------------------------------------- + +export function usePositions() { + return useQuery({ + queryKey: ["positions"], + queryFn: () => tradingClient.getPositions({}), + refetchInterval: 5000, + }); +} + +export function useOrders() { + return useQuery({ + queryKey: ["orders"], + queryFn: () => tradingClient.getOrderStatus({}), + refetchInterval: 5000, + }); +} + +export function useOrderBook(symbol: string) { + return useQuery({ + queryKey: ["order-book", symbol], + queryFn: () => tradingClient.getOrderBook({ symbol }), + refetchInterval: 2000, + }); +} + +export function useSubmitOrder() { + return useMutation({ + mutationFn: (order: { + symbol: string; + side: string; + orderType: string; + quantity: number; + price?: number; + }) => tradingClient.submitOrder(order), + }); +} + +export function useMlPredictions() { + return useQuery({ + queryKey: ["ml-predictions"], + queryFn: () => tradingClient.getMLPredictions({}), + refetchInterval: 5000, + }); +} + +// --------------------------------------------------------------------------- +// Risk +// --------------------------------------------------------------------------- + +export function useRiskMetrics() { + return useQuery({ + queryKey: ["risk-metrics"], + queryFn: () => riskClient.getRiskMetrics({}), + refetchInterval: 5000, + }); +} + +export function useEmergencyStop() { + return useMutation({ + mutationFn: (params: { reason?: string }) => + riskClient.emergencyStop(params), + }); +} + +// --------------------------------------------------------------------------- +// ML +// --------------------------------------------------------------------------- + +export function useMlPrediction() { + return useQuery({ + queryKey: ["ml-prediction"], + queryFn: () => mlClient.getPrediction({}), + refetchInterval: 5000, + }); +} + +// --------------------------------------------------------------------------- +// Training +// --------------------------------------------------------------------------- + +export function useTrainingJobs() { + return useQuery({ + queryKey: ["training-jobs"], + queryFn: () => mlTrainingClient.listTrainingJobs({}), + refetchInterval: 5000, + }); +} + +// --------------------------------------------------------------------------- +// Performance / Monitoring +// --------------------------------------------------------------------------- + +export function usePerformanceMetrics() { + return useQuery({ + queryKey: ["performance-metrics"], + queryFn: () => monitoringClient.getMetrics({}), + refetchInterval: 10000, + }); +} + +export function useSystemStatus() { + return useQuery({ + queryKey: ["system-status"], + queryFn: () => monitoringClient.getSystemStatus({}), + refetchInterval: 10000, + }); +} + +// --------------------------------------------------------------------------- +// Config +// --------------------------------------------------------------------------- + +export function useConfig() { + return useQuery({ + queryKey: ["config"], + queryFn: () => configClient.getConfiguration({}), + }); +} + +export function useUpdateConfig() { + return useMutation({ + mutationFn: (params: { + key: string; + value: string; + category?: string; + }) => configClient.updateConfiguration(params), + }); +} + +// --------------------------------------------------------------------------- +// Backtesting +// --------------------------------------------------------------------------- + +export function useStartBacktest() { + return useMutation({ + mutationFn: (params: { + strategy: string; + symbol: string; + startDate: string; + endDate: string; + }) => backtestingClient.startBacktest(params), + }); +} + +export function useBacktestStatus(backtestId: string | null) { + return useQuery({ + queryKey: ["backtest-status", backtestId], + queryFn: () => + backtestingClient.getBacktestStatus({ backtestId: backtestId! }), + enabled: backtestId !== null, + refetchInterval: 2000, + }); +} + +export function useBacktestResults( + backtestId: string | null, + enabled: boolean, ) { - return useQuery({ - queryKey: key, - queryFn: () => apiGet(path), - ...options, - }); -} - -/** Typed POST mutation hook */ -export function useApiPost(path: string) { - return useMutation({ - mutationFn: (body) => apiPost(path, body), - }); -} - -/** Typed PUT mutation hook */ -export function useApiPut(path: string) { - return useMutation({ - mutationFn: (body) => apiPut(path, body), - }); -} - -/** Typed DELETE mutation hook */ -export function useApiDelete(path: string) { - return useMutation({ - mutationFn: () => apiDelete(path), + return useQuery({ + queryKey: ["backtest-results", backtestId], + queryFn: () => + backtestingClient.getBacktestResults({ backtestId: backtestId! }), + enabled, }); } diff --git a/web-dashboard/src/hooks/useAuth.ts b/web-dashboard/src/hooks/useAuth.ts index 2201922fc..faf284146 100644 --- a/web-dashboard/src/hooks/useAuth.ts +++ b/web-dashboard/src/hooks/useAuth.ts @@ -1,16 +1,23 @@ -import { useCallback, useSyncExternalStore } from 'react'; -import { clearTokens, getToken, isAuthenticated, setTokens } from '../lib/auth'; -import { wsManager } from '../lib/websocket'; +import { useCallback, useSyncExternalStore } from "react"; +import { + clearTokens, + getToken, + isAuthenticated, + setTokens, +} from "../lib/auth"; /** Simple external store for auth state reactivity */ -let authListeners: Set<() => void> = new Set(); +const authListeners: Set<() => void> = new Set(); + function notifyAuthChange() { authListeners.forEach((l) => l()); } function subscribeAuth(listener: () => void) { authListeners.add(listener); - return () => authListeners.delete(listener); + return () => { + authListeners.delete(listener); + }; } /** React hook for authentication state and actions */ @@ -18,15 +25,16 @@ export function useAuth() { const authenticated = useSyncExternalStore(subscribeAuth, isAuthenticated); const token = useSyncExternalStore(subscribeAuth, getToken); - const login = useCallback((accessToken: string, refreshToken?: string) => { - setTokens(accessToken, refreshToken); - wsManager.connect(); - notifyAuthChange(); - }, []); + const login = useCallback( + (accessToken: string, refreshToken?: string) => { + setTokens(accessToken, refreshToken); + notifyAuthChange(); + }, + [], + ); const logout = useCallback(() => { clearTokens(); - wsManager.disconnect(); notifyAuthChange(); }, []); diff --git a/web-dashboard/src/hooks/useGrpcStream.ts b/web-dashboard/src/hooks/useGrpcStream.ts new file mode 100644 index 000000000..a719755de --- /dev/null +++ b/web-dashboard/src/hooks/useGrpcStream.ts @@ -0,0 +1,109 @@ +import { useEffect, useRef, useState } from "react"; +import { + tradingClient, + riskClient, + monitoringClient, + mlClient, + mlTrainingClient, + configClient, +} from "../lib/grpc"; + +// --------------------------------------------------------------------------- +// Generic server-streaming hook +// --------------------------------------------------------------------------- + +/** Hook that consumes a server-streaming gRPC RPC and accumulates messages. */ +export function useServerStream( + streamFn: (signal: AbortSignal) => AsyncIterable, + deps: unknown[] = [], +) { + const [lastMessage, setLastMessage] = useState(null); + const [messages, setMessages] = useState([]); + const [connected, setConnected] = useState(false); + const mountedRef = useRef(true); + + useEffect(() => { + mountedRef.current = true; + const controller = new AbortController(); + setConnected(true); + + (async () => { + try { + for await (const msg of streamFn(controller.signal)) { + if (!mountedRef.current) break; + setLastMessage(msg); + setMessages((prev) => [...prev.slice(-99), msg]); + } + } catch { + // Stream ended, aborted, or encountered an error + } finally { + if (mountedRef.current) setConnected(false); + } + })(); + + return () => { + mountedRef.current = false; + controller.abort(); + }; + }, deps); // eslint-disable-line react-hooks/exhaustive-deps + + return { lastMessage, messages, connected }; +} + +// --------------------------------------------------------------------------- +// Typed stream hooks +// --------------------------------------------------------------------------- + +export function useMarketDataStream() { + return useServerStream((signal) => + tradingClient.streamMarketData({}, { signal }), + ); +} + +export function useOrderUpdatesStream() { + return useServerStream((signal) => + tradingClient.streamOrders({}, { signal }), + ); +} + +export function usePositionUpdatesStream() { + return useServerStream((signal) => + tradingClient.streamPositions({}, { signal }), + ); +} + +export function useRiskAlertsStream() { + return useServerStream((signal) => + riskClient.streamRiskAlerts({}, { signal }), + ); +} + +export function useRiskMetricsStream() { + return useServerStream((signal) => + riskClient.streamRiskMetrics({}, { signal }), + ); +} + +export function useMetricsStream() { + return useServerStream((signal) => + monitoringClient.streamMetrics({}, { signal }), + ); +} + +export function useMlPredictionStream() { + return useServerStream((signal) => + mlClient.streamPredictions({}, { signal }), + ); +} + +export function useTrainingStatusStream() { + return useServerStream((signal) => + mlTrainingClient.subscribeToTrainingStatus({}, { signal }), + ); +} + +export function useConfigChangesStream() { + return useServerStream((signal) => + configClient.streamConfigChanges({}, { signal }), + ); +} diff --git a/web-dashboard/src/hooks/useWebSocket.ts b/web-dashboard/src/hooks/useWebSocket.ts deleted file mode 100644 index 9f6d31082..000000000 --- a/web-dashboard/src/hooks/useWebSocket.ts +++ /dev/null @@ -1,49 +0,0 @@ -import { useEffect, useRef, useState } from 'react'; -import type { ServerMessage, ServerMessageType } from '../lib/types'; -import { wsManager } from '../lib/websocket'; - -/** React hook for WebSocket topic subscriptions and real-time messages */ -export function useWebSocket(topics: string[]) { - const [messages, setMessages] = useState([]); - const [connected, setConnected] = useState(wsManager.connected); - const topicsRef = useRef(topics); - topicsRef.current = topics; - - useEffect(() => { - // Subscribe to topics - if (topics.length > 0) { - wsManager.subscribe(topics); - } - - // Listen for messages - const unsubscribe = wsManager.onMessage((msg) => { - if (topicsRef.current.includes(msg.type) || topicsRef.current.includes('*')) { - setMessages((prev) => [...prev.slice(-99), msg]); // Keep last 100 - } - }); - - // Track connection status - const interval = setInterval(() => { - setConnected(wsManager.connected); - }, 1000); - - return () => { - unsubscribe(); - clearInterval(interval); - if (topics.length > 0) { - wsManager.unsubscribe(topics); - } - }; - }, [topics.join(',')]); // eslint-disable-line react-hooks/exhaustive-deps - - return { messages, connected, lastMessage: messages[messages.length - 1] }; -} - -/** Hook to get messages of a specific type */ -export function useWebSocketTopic( - topic: ServerMessageType, -) { - const { messages, connected } = useWebSocket([topic]); - const typed = messages.filter((m) => m.type === topic) as T[]; - return { messages: typed, connected, lastMessage: typed[typed.length - 1] }; -} diff --git a/web-dashboard/src/lib/api.ts b/web-dashboard/src/lib/api.ts deleted file mode 100644 index b1427d65e..000000000 --- a/web-dashboard/src/lib/api.ts +++ /dev/null @@ -1,100 +0,0 @@ -import { clearTokens, isTokenExpired, SESSION_EXPIRED_KEY } from './auth'; - -const API_BASE = import.meta.env.VITE_API_URL ?? '/api'; - -/** Margin in seconds before actual expiry to treat the token as expired */ -const EXPIRY_MARGIN_SECONDS = 60; - -/** Maximum time in ms to wait for an API response before aborting */ -const REQUEST_TIMEOUT_MS = 30_000; - -/** - * Redirect to login with a session-expired flag so the LoginPage can - * display a user-friendly message instead of a silent redirect. - */ -function redirectToLogin(): void { - sessionStorage.setItem(SESSION_EXPIRED_KEY, '1'); - clearTokens(); - window.location.href = '/login'; -} - -/** Fetch wrapper that injects JWT Authorization header and handles 401 auto-logout */ -async function apiFetch( - path: string, - options: RequestInit = {}, -): Promise { - const token = localStorage.getItem('foxhunt_token'); - - // Pre-flight: detect expired (or about-to-expire) tokens before making the request - if (token && isTokenExpired(token, EXPIRY_MARGIN_SECONDS)) { - redirectToLogin(); - throw new Error('Session expired. Please log in again.'); - } - - const headers: Record = { - 'Content-Type': 'application/json', - ...(options.headers as Record ?? {}), - }; - - if (token) { - headers['Authorization'] = `Bearer ${token}`; - } - - const controller = new AbortController(); - const timeoutId = setTimeout(() => controller.abort(), REQUEST_TIMEOUT_MS); - - let res: Response; - try { - res = await fetch(`${API_BASE}${path}`, { - ...options, - headers, - signal: controller.signal, - }); - } catch (err) { - if (err instanceof DOMException && err.name === 'AbortError') { - throw new Error('Request timed out. Please try again.'); - } - throw err; - } finally { - clearTimeout(timeoutId); - } - - if (!res.ok) { - // Server rejected the token — redirect gracefully - if (res.status === 401) { - redirectToLogin(); - throw new Error('Session expired. Please log in again.'); - } - - const body = await res.json().catch(() => ({ error: res.statusText })); - throw new Error(body.error ?? `API error: ${res.status}`); - } - - return res.json(); -} - -/** GET request */ -export function apiGet(path: string): Promise { - return apiFetch(path); -} - -/** POST request */ -export function apiPost(path: string, body?: unknown): Promise { - return apiFetch(path, { - method: 'POST', - body: body ? JSON.stringify(body) : undefined, - }); -} - -/** PUT request */ -export function apiPut(path: string, body?: unknown): Promise { - return apiFetch(path, { - method: 'PUT', - body: body ? JSON.stringify(body) : undefined, - }); -} - -/** DELETE request */ -export function apiDelete(path: string): Promise { - return apiFetch(path, { method: 'DELETE' }); -} diff --git a/web-dashboard/src/lib/grpc.ts b/web-dashboard/src/lib/grpc.ts new file mode 100644 index 000000000..8cd8e0265 --- /dev/null +++ b/web-dashboard/src/lib/grpc.ts @@ -0,0 +1,80 @@ +import { createGrpcWebTransport } from "@connectrpc/connect-web"; +import { createClient, type Interceptor } from "@connectrpc/connect"; +import { + getToken, + isTokenExpired, + clearTokens, + SESSION_EXPIRED_KEY, +} from "./auth"; + +// Generated service definitions (protoc-gen-es v2 — services live in *_pb.ts) +import { TradingService } from "../gen/trading_pb"; +import { RiskService } from "../gen/risk_pb"; +import { MLService } from "../gen/ml_pb"; +import { MLTrainingService } from "../gen/ml_training_pb"; +import { ConfigService } from "../gen/config_pb"; +import { MonitoringService } from "../gen/monitoring_pb"; +import { BacktestingService } from "../gen/fxt_trading_pb"; +import { AuthService } from "../gen/auth_pb"; + +const API_URL = import.meta.env.VITE_API_URL ?? "http://localhost:50051"; + +/** Margin in seconds before actual expiry to treat the token as expired */ +const EXPIRY_MARGIN_SECONDS = 60; + +/** + * Interceptor that attaches the JWT Authorization header to every request + * and handles session expiry / UNAUTHENTICATED responses. + */ +const authInterceptor: Interceptor = (next) => async (req) => { + const token = getToken(); + if (token) { + if (isTokenExpired(token, EXPIRY_MARGIN_SECONDS)) { + sessionStorage.setItem(SESSION_EXPIRED_KEY, "1"); + clearTokens(); + window.location.href = "/login"; + throw new Error("Session expired"); + } + req.header.set("authorization", `Bearer ${token}`); + } + try { + return await next(req); + } catch (err: unknown) { + // gRPC status 16 = UNAUTHENTICATED + if ( + err && + typeof err === "object" && + "code" in err && + (err as { code: number }).code === 16 + ) { + sessionStorage.setItem(SESSION_EXPIRED_KEY, "1"); + clearTokens(); + window.location.href = "/login"; + } + throw err; + } +}; + +/** Authenticated transport — used for all services except login */ +const transport = createGrpcWebTransport({ + baseUrl: API_URL, + interceptors: [authInterceptor], +}); + +/** Public transport — no auth header, used for login/refresh */ +const publicTransport = createGrpcWebTransport({ + baseUrl: API_URL, +}); + +// --------------------------------------------------------------------------- +// Service clients +// --------------------------------------------------------------------------- + +export const authClient = createClient(AuthService, publicTransport); +export const tradingClient = createClient(TradingService, transport); +export const riskClient = createClient(RiskService, transport); +export const mlClient = createClient(MLService, transport); +export const mlTrainingClient = createClient(MLTrainingService, transport); +export const configClient = createClient(ConfigService, transport); +export const monitoringClient = createClient(MonitoringService, transport); +export const backtestingClient = createClient(BacktestingService, transport); diff --git a/web-dashboard/src/lib/types.ts b/web-dashboard/src/lib/types.ts index 16ceb7fe0..b57106118 100644 --- a/web-dashboard/src/lib/types.ts +++ b/web-dashboard/src/lib/types.ts @@ -1,37 +1,36 @@ +/** + * UI adapter types. + * + * These are kept as lightweight interfaces for components that render data + * without depending directly on the generated proto message types. + * Pages and hooks now work with the proto-generated types from src/gen/*_pb.ts + * but child components may still accept these plain interfaces for flexibility. + */ + /** Position in a trading account */ export interface Position { symbol: string; quantity: number; - entry_price: number; - current_price: number; - unrealized_pnl: number; + averagePrice: number; + marketValue: number; + unrealizedPnl: number; side: 'long' | 'short'; } /** Order submitted to the trading engine */ export interface Order { - order_id: string; + orderId: string; symbol: string; side: 'buy' | 'sell'; - order_type: 'market' | 'limit' | 'stop'; + orderType: 'market' | 'limit' | 'stop'; quantity: number; price?: number; status: 'pending' | 'open' | 'partially_filled' | 'filled' | 'cancelled' | 'rejected'; - filled_quantity: number; - created_at: string; + filledQuantity: number; + createdAt: string; } -/** Risk metrics snapshot */ -export interface RiskMetrics { - portfolio_var: number; - position_utilization: number; - max_drawdown: number; - current_drawdown: number; - sharpe_ratio: number; - sortino_ratio: number; -} - -/** ML model prediction */ +/** ML model prediction (UI-facing) */ export interface MlPrediction { model: string; symbol: string; @@ -41,42 +40,25 @@ export interface MlPrediction { timestamp: string; } -/** Training job status */ +/** Training job status (UI-facing) */ export interface TrainingJob { - job_id: string; - model_type: string; + jobId: string; + modelType: string; status: 'queued' | 'running' | 'completed' | 'failed' | 'stopped'; progress: number; epoch: number; - total_epochs: number; + totalEpochs: number; loss: number; - started_at: string; + startedAt: string; } -/** Performance metrics */ +/** Performance metrics (UI-facing) */ export interface PerformanceMetrics { - total_pnl: number; - daily_pnl: number; - win_rate: number; - total_trades: number; - sharpe_ratio: number; - sortino_ratio: number; - max_drawdown: number; -} - -/** WebSocket message types (server -> client) */ -export type ServerMessageType = - | 'market_data' - | 'order_update' - | 'risk_alert' - | 'position_update' - | 'ml_prediction' - | 'training_progress' - | 'metrics' - | 'config_update'; - -/** Generic server message envelope */ -export interface ServerMessage { - type: ServerMessageType; - [key: string]: unknown; + totalPnl: number; + dailyPnl: number; + winRate: number; + totalTrades: number; + sharpeRatio: number; + sortinoRatio: number; + maxDrawdown: number; } diff --git a/web-dashboard/src/lib/websocket.ts b/web-dashboard/src/lib/websocket.ts deleted file mode 100644 index b12d9c60e..000000000 --- a/web-dashboard/src/lib/websocket.ts +++ /dev/null @@ -1,143 +0,0 @@ -import type { ServerMessage } from './types'; - -type MessageHandler = (msg: ServerMessage) => void; - -/** WebSocket connection manager with auto-reconnect and topic subscriptions */ -export class WsManager { - private ws: WebSocket | null = null; - private url: string; - private handlers: Set = new Set(); - private reconnectTimer: ReturnType | null = null; - private backoff = 1000; - private maxBackoff = 30000; - private maxAttempts = 50; - private attempts = 0; - private subscribedTopics: Set = new Set(); - private _connected = false; - - constructor(url?: string) { - const envWsUrl = import.meta.env.VITE_WS_URL as string | undefined; - if (url) { - this.url = url; - } else if (envWsUrl) { - this.url = envWsUrl; - } else { - const protocol = window.location.protocol === 'https:' ? 'wss:' : 'ws:'; - this.url = `${protocol}//${window.location.host}/api/ws`; - } - } - - get connected(): boolean { - return this._connected; - } - - /** Connect to the WebSocket server */ - connect(): void { - const token = localStorage.getItem('foxhunt_token'); - if (!token) return; - - const wsUrl = `${this.url}?token=${encodeURIComponent(token)}`; - this.ws = new WebSocket(wsUrl); - - this.ws.onopen = () => { - this._connected = true; - this.backoff = 1000; - this.attempts = 0; - // Re-subscribe to previously subscribed topics - if (this.subscribedTopics.size > 0) { - this.send({ type: 'subscribe', topics: Array.from(this.subscribedTopics) }); - } - }; - - this.ws.onmessage = (event) => { - try { - const msg = JSON.parse(event.data) as ServerMessage; - this.handlers.forEach((h) => h(msg)); - } catch { - // Ignore malformed messages - } - }; - - this.ws.onclose = () => { - this._connected = false; - this.scheduleReconnect(); - }; - - this.ws.onerror = () => { - this.ws?.close(); - }; - } - - /** Disconnect and stop reconnecting */ - disconnect(): void { - if (this.reconnectTimer) { - clearTimeout(this.reconnectTimer); - this.reconnectTimer = null; - } - this.ws?.close(); - this.ws = null; - this._connected = false; - } - - /** Manually trigger reconnection (resets backoff) */ - reconnect(): void { - this.disconnect(); - this.attempts = 0; - this.backoff = 1000; - this.connect(); - } - - get reconnectAttempts(): number { - return this.attempts; - } - - get maxReconnectAttempts(): number { - return this.maxAttempts; - } - - /** Subscribe to data topics */ - subscribe(topics: string[]): void { - topics.forEach((t) => this.subscribedTopics.add(t)); - if (this._connected) { - this.send({ type: 'subscribe', topics }); - } - } - - /** Unsubscribe from data topics */ - unsubscribe(topics: string[]): void { - topics.forEach((t) => this.subscribedTopics.delete(t)); - if (this._connected) { - this.send({ type: 'unsubscribe', topics }); - } - } - - /** Register a message handler */ - onMessage(handler: MessageHandler): () => void { - this.handlers.add(handler); - return () => this.handlers.delete(handler); - } - - private send(msg: unknown): void { - if (this.ws?.readyState === WebSocket.OPEN) { - this.ws.send(JSON.stringify(msg)); - } - } - - private scheduleReconnect(): void { - if (this.reconnectTimer) return; - this.attempts += 1; - if (this.attempts > this.maxAttempts) { - // Stop reconnecting after too many failures - return; - } - const delay = this.backoff; - this.backoff = Math.min(this.backoff * 2, this.maxBackoff); - this.reconnectTimer = setTimeout(() => { - this.reconnectTimer = null; - this.connect(); - }, delay); - } -} - -/** Singleton WebSocket manager instance */ -export const wsManager = new WsManager(); diff --git a/web-dashboard/src/pages/BacktestingDashboard.tsx b/web-dashboard/src/pages/BacktestingDashboard.tsx index ff4eb1ed6..da2420d5b 100644 --- a/web-dashboard/src/pages/BacktestingDashboard.tsx +++ b/web-dashboard/src/pages/BacktestingDashboard.tsx @@ -1,36 +1,8 @@ import { useState, type FormEvent } from 'react'; import { PnLChart } from '../components/charts/PnLChart'; import { ComponentErrorBoundary } from '../components/common/ComponentErrorBoundary'; -import { useApiPost, useApiQuery } from '../hooks/useApi'; - -interface BacktestParams { - strategy: string; - symbol: string; - start_date: string; - end_date: string; -} - -interface BacktestStatus { - backtest_id: string; - status: 'running' | 'completed' | 'failed'; - progress: number; - strategy: string; - symbol: string; -} - -interface BacktestResult { - trades: BacktestTrade[]; - equity_curve: { date: string; pnl: number }[]; -} - -interface BacktestTrade { - time: string; - symbol: string; - side: string; - entry_price: number; - exit_price: number; - pnl: number; -} +import { useStartBacktest, useBacktestStatus, useBacktestResults } from '../hooks/useApi'; +import { BacktestStatus } from '../gen/fxt_trading_pb'; interface BacktestValidationErrors { symbol?: string; @@ -46,26 +18,12 @@ export function BacktestingDashboard() { const [activeBacktestId, setActiveBacktestId] = useState(null); - const startBacktest = useApiPost<{ backtest_id: string }, BacktestParams>( - '/backtest/start', - ); + const startBacktest = useStartBacktest(); - const backtestStatus = useApiQuery( - ['backtest-status', activeBacktestId ?? ''], - `/backtest/${activeBacktestId}/status`, - { - enabled: activeBacktestId !== null, - refetchInterval: 2000, - }, - ); + const backtestStatusQuery = useBacktestStatus(activeBacktestId); - const backtestResults = useApiQuery( - ['backtest-results', activeBacktestId ?? ''], - `/backtest/${activeBacktestId}/results`, - { - enabled: backtestStatus.data?.status === 'completed', - }, - ); + const isCompleted = backtestStatusQuery.data?.status === BacktestStatus.COMPLETED; + const backtestResults = useBacktestResults(activeBacktestId, isCompleted); const hasValidationErrors = Object.keys(validationErrors).length > 0; @@ -96,11 +54,40 @@ export function BacktestingDashboard() { if (Object.keys(errors).length > 0) return; startBacktest.mutate( - { strategy, symbol, start_date: startDate, end_date: endDate }, - { onSuccess: (data) => setActiveBacktestId(data.backtest_id) }, + { strategy, symbol, startDate, endDate }, + { onSuccess: (data) => setActiveBacktestId(data.backtestId) }, ); } + // Map BacktestStatus enum to display strings + function statusLabel(status: BacktestStatus | undefined): string { + switch (status) { + case BacktestStatus.RUNNING: return 'running'; + case BacktestStatus.COMPLETED: return 'completed'; + case BacktestStatus.FAILED: return 'failed'; + case BacktestStatus.QUEUED: return 'queued'; + case BacktestStatus.CANCELLED: return 'cancelled'; + default: return 'unknown'; + } + } + + function statusColorClass(status: BacktestStatus | undefined): string { + switch (status) { + case BacktestStatus.COMPLETED: return 'bg-green-500/20 text-[var(--color-green)]'; + case BacktestStatus.FAILED: return 'bg-red-500/20 text-[var(--color-red)]'; + default: return 'bg-blue-500/20 text-[var(--color-accent)]'; + } + } + + // Adapt equity curve from proto to PnLChart shape + const equityCurveData = backtestResults.data?.equityCurve?.map((p) => ({ + date: new Date(Number(p.timestampUnixNanos) / 1_000_000).toISOString().slice(0, 10), + pnl: p.equity, + })); + + // Adapt trades from proto to display shape + const trades = backtestResults.data?.trades ?? []; + return (
@@ -201,7 +188,7 @@ export function BacktestingDashboard() { {startBacktest.isSuccess && (

- Backtest started: {startBacktest.data.backtest_id} + Backtest started: {startBacktest.data.backtestId}

)} {startBacktest.isError && ( @@ -217,28 +204,24 @@ export function BacktestingDashboard() {
Active Backtests
- {backtestStatus.data ? ( + {backtestStatusQuery.data ? (
- {backtestStatus.data.backtest_id.slice(0, 8)} - - {backtestStatus.data.status} + {backtestStatusQuery.data.backtestId.slice(0, 8)} + + {statusLabel(backtestStatusQuery.data.status)}
- {backtestStatus.data.strategy} / {backtestStatus.data.symbol} + {strategy} / {symbol}
- {backtestStatus.data.status === 'running' && ( + {backtestStatusQuery.data.status === BacktestStatus.RUNNING && (
@@ -256,7 +239,7 @@ export function BacktestingDashboard() { {/* Equity Curve */}
- +
@@ -278,21 +261,26 @@ export function BacktestingDashboard() { - {backtestResults.data?.trades && backtestResults.data.trades.length > 0 ? ( - backtestResults.data.trades.map((trade, i) => ( - - {trade.time} - {trade.symbol} - - {trade.side.toUpperCase()} - - {trade.entry_price.toFixed(2)} - {trade.exit_price.toFixed(2)} - = 0 ? 'text-[var(--color-green)]' : 'text-[var(--color-red)]'}`}> - ${trade.pnl.toFixed(2)} - - - )) + {trades.length > 0 ? ( + trades.map((trade, i) => { + const sideStr = trade.side === 1 ? 'BUY' : trade.side === 2 ? 'SELL' : 'UNKNOWN'; + const isBuy = trade.side === 1; + const entryTime = new Date(Number(trade.entryTimeUnixNanos) / 1_000_000).toISOString(); + return ( + + {entryTime.slice(0, 19).replace('T', ' ')} + {trade.symbol} + + {sideStr} + + {trade.entryPrice.toFixed(2)} + {trade.exitPrice.toFixed(2)} + = 0 ? 'text-[var(--color-green)]' : 'text-[var(--color-red)]'}`}> + ${trade.pnl.toFixed(2)} + + + ); + }) ) : ( diff --git a/web-dashboard/src/pages/ConfigDashboard.tsx b/web-dashboard/src/pages/ConfigDashboard.tsx index d07c36f00..8460bf397 100644 --- a/web-dashboard/src/pages/ConfigDashboard.tsx +++ b/web-dashboard/src/pages/ConfigDashboard.tsx @@ -1,10 +1,10 @@ import { useState } from 'react'; import { ComponentErrorBoundary } from '../components/common/ComponentErrorBoundary'; -import { useApiQuery, useApiPut } from '../hooks/useApi'; +import { useConfig, useUpdateConfig } from '../hooks/useApi'; type ConfigCategory = 'trading' | 'risk' | 'ml' | 'system'; -interface ConfigEntry { +interface ConfigFieldDef { key: string; value: string; description: string; @@ -13,7 +13,7 @@ interface ConfigEntry { export function ConfigDashboard() { const [activeTab, setActiveTab] = useState('trading'); - const config = useApiQuery>(['config'], '/config'); + const config = useConfig(); return (
@@ -46,7 +46,7 @@ export function ConfigDashboard() { {/* Config form */}
- +
@@ -65,12 +65,12 @@ export function ConfigDashboard() { function ConfigSection({ category, - config, + settings, }: { category: ConfigCategory; - config?: Record; + settings?: { key: string; value: string; category: string }[]; }) { - const defaults: Record = { + const defaults: Record = { trading: [ { key: 'max_position_size', value: '1000', description: 'Maximum position size per symbol' }, { key: 'max_order_value', value: '100000', description: 'Maximum order value in USD' }, @@ -92,21 +92,23 @@ function ConfigSection({ system: [ { key: 'log_level', value: 'info', description: 'Logging level (trace/debug/info/warn/error)' }, { key: 'grpc_timeout_ms', value: '10000', description: 'gRPC client timeout' }, - { key: 'ws_heartbeat_interval', value: '30', description: 'WebSocket heartbeat interval (s)' }, + { key: 'stream_heartbeat_interval', value: '30', description: 'Stream heartbeat interval (s)' }, { key: 'metrics_push_interval', value: '5', description: 'Metrics push interval (s)' }, ], }; - // Merge API values over defaults + // Merge server values over defaults const fields = defaults[category].map((field) => { - const serverValue = config?.[field.key]; + const serverSetting = settings?.find( + (s) => s.key === field.key && s.category === category, + ); return { ...field, - value: serverValue !== undefined ? String(serverValue) : field.value, + value: serverSetting?.value ?? field.value, }; }); - const updateConfig = useApiPut>('/config'); + const updateConfig = useUpdateConfig(); return (
@@ -125,7 +127,11 @@ function ConfigSection({ className="w-32 px-2 py-1 text-sm text-right rounded border border-[var(--color-border)] bg-[var(--color-bg-primary)] text-[var(--color-text-primary)] outline-none focus:border-[var(--color-accent)]" onBlur={(e) => { if (e.target.value !== field.value) { - updateConfig.mutate({ [field.key]: e.target.value }); + updateConfig.mutate({ + key: field.key, + value: e.target.value, + category, + }); } }} /> diff --git a/web-dashboard/src/pages/LoginPage.tsx b/web-dashboard/src/pages/LoginPage.tsx index 81b664706..3b177ad67 100644 --- a/web-dashboard/src/pages/LoginPage.tsx +++ b/web-dashboard/src/pages/LoginPage.tsx @@ -1,15 +1,10 @@ import { useState, type FormEvent } from 'react'; import { useNavigate } from 'react-router-dom'; import { useAuth } from '../hooks/useAuth'; -import { apiPost } from '../lib/api'; +import { authClient } from '../lib/grpc'; import { SESSION_EXPIRED_KEY } from '../lib/auth'; -interface LoginResponse { - token: string; - refresh_token?: string; -} - -/** Read and clear the session-expired flag set by the API client on 401 / token expiry */ +/** Read and clear the session-expired flag set by the gRPC interceptor on UNAUTHENTICATED / token expiry */ function consumeSessionExpiredFlag(): boolean { const expired = sessionStorage.getItem(SESSION_EXPIRED_KEY) === '1'; if (expired) sessionStorage.removeItem(SESSION_EXPIRED_KEY); @@ -36,11 +31,8 @@ export function LoginPage() { setLoading(true); try { - const response = await apiPost('/auth/login', { - username, - password, - }); - login(response.token, response.refresh_token); + const response = await authClient.login({ username, password }); + login(response.accessToken, response.refreshToken); navigate('/trading', { replace: true }); } catch (err) { setError(err instanceof Error ? err.message : 'Login failed'); diff --git a/web-dashboard/src/pages/MLDashboard.tsx b/web-dashboard/src/pages/MLDashboard.tsx index 57b544a21..e6053e43f 100644 --- a/web-dashboard/src/pages/MLDashboard.tsx +++ b/web-dashboard/src/pages/MLDashboard.tsx @@ -2,16 +2,8 @@ import { ComponentErrorBoundary } from '../components/common/ComponentErrorBound import { ModelCard } from '../components/ml/ModelCard'; import { EnsemblePanel } from '../components/ml/EnsemblePanel'; import { TrainingProgress } from '../components/ml/TrainingProgress'; -import { useApiQuery } from '../hooks/useApi'; -import { useWebSocketTopic } from '../hooks/useWebSocket'; -import type { MlPrediction, TrainingJob } from '../lib/types'; - -interface RegimeData { - regime?: string; - volatility?: string; - confidence?: number; - duration?: string; -} +import { useMlPredictions, useTrainingJobs } from '../hooks/useApi'; +import { useMetricsStream } from '../hooks/useGrpcStream'; const MODEL_GROUPS = [ { label: 'Reinforcement Learning', models: ['DQN', 'PPO'] }, @@ -21,26 +13,27 @@ const MODEL_GROUPS = [ ] as const; export function MLDashboard() { - const predictions = useApiQuery( - ['ml-predictions'], - '/ml/predictions', - { refetchInterval: 5000 }, - ); + const predictions = useMlPredictions(); + const trainingJobs = useTrainingJobs(); + const { messages: metricsMessages } = useMetricsStream(); - const trainingJobs = useApiQuery( - ['training-jobs'], - '/training/jobs', - { refetchInterval: 5000 }, - ); - - const { messages: metricsMessages } = useWebSocketTopic('metrics'); - - // Extract regime data from most recent metrics message + // Extract regime data from most recent metrics stream message const latestMetrics = metricsMessages.length > 0 - ? (metricsMessages.at(-1) as { data?: RegimeData })?.data + ? metricsMessages.at(-1) : undefined; - const preds = predictions.data ?? []; + // The gRPC response wraps predictions in a `predictions` field + const preds = predictions.data?.predictions ?? []; + + // Adapt proto MLPrediction to the shape the ModelCard / EnsemblePanel expects + const adaptedPreds = preds.map((p) => ({ + model: p.ensembleAction, // model name not in proto; use ensembleAction for signal + symbol: p.symbol, + signal: p.ensembleAction?.toLowerCase() as 'buy' | 'sell' | 'hold' | undefined, + confidence: p.ensembleConfidence, + predicted_return: p.ensembleSignal, + timestamp: '', + })); return (
@@ -61,7 +54,7 @@ export function MLDashboard() {
{group.models.map((model) => { - const pred = preds.find((p) => p.model === model); + const pred = adaptedPreds.find((p) => p.model === model); return (
- +
@@ -96,19 +89,19 @@ export function MLDashboard() {
Current Regime - {latestMetrics?.regime ?? '--'} + --
Volatility - {latestMetrics?.volatility ?? '--'} + --
Regime Confidence - {latestMetrics?.confidence !== undefined ? `${(latestMetrics.confidence * 100).toFixed(1)}%` : '--'} + --
Regime Duration - {latestMetrics?.duration ?? '--'} + {latestMetrics ? 'streaming' : '--'}
@@ -118,7 +111,7 @@ export function MLDashboard() {
diff --git a/web-dashboard/src/pages/PerformanceDashboard.tsx b/web-dashboard/src/pages/PerformanceDashboard.tsx index 2ca402d3d..6c23329d7 100644 --- a/web-dashboard/src/pages/PerformanceDashboard.tsx +++ b/web-dashboard/src/pages/PerformanceDashboard.tsx @@ -1,69 +1,63 @@ import { PnLChart } from '../components/charts/PnLChart'; import { ComponentErrorBoundary } from '../components/common/ComponentErrorBoundary'; import { MetricCard } from '../components/charts/MetricCard'; -import { useApiQuery } from '../hooks/useApi'; -import type { PerformanceMetrics } from '../lib/types'; - -interface PnLPoint { - date: string; - pnl: number; -} +import { usePerformanceMetrics } from '../hooks/useApi'; export function PerformanceDashboard() { - const metrics = useApiQuery( - ['performance-metrics'], - '/performance/metrics', - { refetchInterval: 10000 }, - ); + const metricsQuery = usePerformanceMetrics(); - const pnlData = useApiQuery( - ['performance-pnl'], - '/performance/pnl', - { refetchInterval: 30000 }, - ); + // The gRPC response is GetMetricsResponse with a `metrics` array of Metric objects. + // We try to find known metric names in the array for display. + const metricsList = metricsQuery.data?.metrics ?? []; + const findMetric = (name: string) => + metricsList.find((m) => m.name === name); - const m = metrics.data; + const sharpe = findMetric('sharpe_ratio'); + const sortino = findMetric('sortino_ratio'); + const maxDD = findMetric('max_drawdown'); + const winRate = findMetric('win_rate'); + const totalTrades = findMetric('total_trades'); return (
- {(metrics.isError || pnlData.isError) && ( + {metricsQuery.isError && (
- Failed to load {metrics.isError ? 'metrics' : 'P&L data'}: {(metrics.error ?? pnlData.error)?.message} - + Failed to load metrics: {metricsQuery.error.message} +
)} {/* Top: Metric cards */}
- +
- +
- +
{/* Middle: P&L Chart */}
- +
@@ -71,7 +65,7 @@ export function PerformanceDashboard() {
- +
diff --git a/web-dashboard/src/pages/RiskDashboard.tsx b/web-dashboard/src/pages/RiskDashboard.tsx index 9176fc025..910d93071 100644 --- a/web-dashboard/src/pages/RiskDashboard.tsx +++ b/web-dashboard/src/pages/RiskDashboard.tsx @@ -2,18 +2,15 @@ import { ComponentErrorBoundary } from '../components/common/ComponentErrorBound import { RiskGauge } from '../components/risk/RiskGauge'; import { DrawdownChart } from '../components/risk/DrawdownChart'; import { EmergencyControls } from '../components/risk/EmergencyControls'; -import { useApiQuery } from '../hooks/useApi'; -import { useWebSocketTopic } from '../hooks/useWebSocket'; -import type { RiskMetrics } from '../lib/types'; +import { useRiskMetrics } from '../hooks/useApi'; +import { useRiskAlertsStream } from '../hooks/useGrpcStream'; +import { RiskAlertSeverity } from '../gen/risk_pb'; export function RiskDashboard() { - const riskMetrics = useApiQuery(['risk-metrics'], '/risk/metrics', { - refetchInterval: 5000, - }); + const riskMetrics = useRiskMetrics(); + const { messages: alerts } = useRiskAlertsStream(); - const { messages: alerts } = useWebSocketTopic('risk_alert'); - - const metrics = riskMetrics.data; + const metrics = riskMetrics.data?.metrics; return (
@@ -30,15 +27,15 @@ export function RiskDashboard() {
- +
@@ -46,7 +43,7 @@ export function RiskDashboard() { @@ -74,20 +71,33 @@ export function RiskDashboard() {
) : (
- {alerts.slice(-20).reverse().map((alert, i) => ( -
- - [{((alert as { severity?: string }).severity ?? 'info').toUpperCase()}] - {' '} - {JSON.stringify((alert as { data?: unknown }).data ?? alert)} -
- ))} + {alerts.slice(-20).reverse().map((alert, i) => { + const severityLabel = + alert.severity === RiskAlertSeverity.CRITICAL + ? 'CRITICAL' + : alert.severity === RiskAlertSeverity.EMERGENCY + ? 'EMERGENCY' + : alert.severity === RiskAlertSeverity.WARNING + ? 'WARNING' + : 'INFO'; + const isCritical = + alert.severity === RiskAlertSeverity.CRITICAL || + alert.severity === RiskAlertSeverity.EMERGENCY; + return ( +
+ + [{severityLabel}] + {' '} + {alert.message} +
+ ); + })}
)}
diff --git a/web-dashboard/src/pages/TradingDashboard.tsx b/web-dashboard/src/pages/TradingDashboard.tsx index 2fa03e557..eb4a95887 100644 --- a/web-dashboard/src/pages/TradingDashboard.tsx +++ b/web-dashboard/src/pages/TradingDashboard.tsx @@ -5,37 +5,35 @@ import { OrderBook } from '../components/trading/OrderBook'; import { PositionsTable } from '../components/trading/PositionsTable'; import { OrderForm } from '../components/trading/OrderForm'; import { OrdersTable } from '../components/trading/OrdersTable'; -import { useApiQuery } from '../hooks/useApi'; -import { useWebSocket } from '../hooks/useWebSocket'; -import type { Position, Order } from '../lib/types'; - -interface OrderBookData { - bids: { price: number; size: number }[]; - asks: { price: number; size: number }[]; - spread?: number; -} - -const MARKET_DATA_TOPICS = ['market_data']; +import { usePositions, useOrders, useOrderBook } from '../hooks/useApi'; +import { useMarketDataStream } from '../hooks/useGrpcStream'; export function TradingDashboard() { - const positions = useApiQuery(['positions'], '/trading/positions', { - refetchInterval: 5000, - }); + const positions = usePositions(); + const orders = useOrders(); + const orderBook = useOrderBook('ES.FUT'); + const { lastMessage: marketDataEvent } = useMarketDataStream(); - const orders = useApiQuery(['orders'], '/trading/orders', { - refetchInterval: 5000, - }); - - const { lastMessage } = useWebSocket(MARKET_DATA_TOPICS); - - const orderBookData = useMemo(() => { - const data = lastMessage?.data as OrderBookData | undefined; + // Adapt proto OrderBook response to the component's expected shape + const orderBookData = useMemo(() => { + const ob = orderBook.data?.orderBook; return { - bids: data?.bids ?? [], - asks: data?.asks ?? [], - spread: data?.spread, + bids: ob?.bids?.map((l) => ({ price: l.price, size: l.quantity })) ?? [], + asks: ob?.asks?.map((l) => ({ price: l.price, size: l.quantity })) ?? [], + spread: undefined as number | undefined, }; - }, [lastMessage]); + }, [orderBook.data]); + + // Extract positions array from the gRPC response message + const positionsList = positions.data?.positions; + // The order response wraps a single Order; for the orders list we use + // streamOrders or getOrderStatus which returns a single order. + // Since the REST API returned Order[] and the proto returns a single Order, + // we wrap it into an array for backward compatibility with OrdersTable. + const ordersList = orders.data?.order ? [orders.data.order] : undefined; + + // We still expose lastMessage for components that might use market data + void marketDataEvent; return (
@@ -65,7 +63,7 @@ export function TradingDashboard() { {/* Middle: Positions */}
@@ -73,7 +71,7 @@ export function TradingDashboard() { {/* Bottom: Orders + Order Form */}
- +
diff --git a/web-dashboard/vite.config.ts b/web-dashboard/vite.config.ts index d0b6037aa..59cac5488 100644 --- a/web-dashboard/vite.config.ts +++ b/web-dashboard/vite.config.ts @@ -6,10 +6,15 @@ export default defineConfig({ plugins: [react(), tailwindcss()], server: { proxy: { - '/api': { - target: 'http://localhost:3000', - ws: true, - }, + // Proxy grpc-web requests to the tonic-web gateway + '/auth.AuthService': { target: 'http://localhost:50051' }, + '/trading.TradingService': { target: 'http://localhost:50051' }, + '/risk.RiskService': { target: 'http://localhost:50051' }, + '/ml.MLService': { target: 'http://localhost:50051' }, + '/ml_training.MLTrainingService': { target: 'http://localhost:50051' }, + '/config.ConfigService': { target: 'http://localhost:50051' }, + '/monitoring.MonitoringService': { target: 'http://localhost:50051' }, + '/foxhunt.tli.BacktestingService': { target: 'http://localhost:50051' }, }, }, build: { @@ -20,6 +25,7 @@ export default defineConfig({ vendor: ['react', 'react-dom', 'react-router-dom'], charts: ['lightweight-charts', 'recharts'], query: ['@tanstack/react-query'], + grpc: ['@connectrpc/connect', '@connectrpc/connect-web', '@bufbuild/protobuf'], }, }, },