6 Commits

Author SHA1 Message Date
jgrusewski
84877e5146 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 <noreply@anthropic.com>
2026-03-05 00:05:18 +01:00
jgrusewski
edfe4da2e8 refactor(proto): remove duplicate config_service.proto
config_service.proto (package foxhunt.config, 4 RPCs) was a subset of
config.proto (package config, 12 RPCs). Migrated api_gateway to implement
ConfigService from config.proto directly. Removed dead config_service()
method from fxt client.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 14:17:44 +01:00
jgrusewski
c49608815a feat(proto): add SubscribeClusterPods streaming RPC
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 12:55:21 +01:00
jgrusewski
2c5f99aedb feat(proto): add 9 streaming RPCs for TUI live data
New poll-to-stream RPCs (gateway adapters):
- broker_gateway: StreamAccountState, StreamSessionStatus
- risk: StreamCircuitBreakerStatus, StreamRiskMetrics
- data_acquisition: StreamDownloadStatus
- ml: StreamModelStatus
- trading_agent: StreamAgentStatus
- trading: StreamPortfolioSummary, StreamOrderBook

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 02:10:00 +01:00
jgrusewski
b70c6a0bd7 refactor: rewire all service build.rs to proto/ root directory
Delete per-service proto/ directories. All 7 services now compile
from the single canonical proto/ at workspace root.

- trading_service: 5 protos + ml_training client -> ../../proto/
- ml_training_service: ml_training server + fxt_trading client -> ../../proto/
- broker_gateway_service: broker_gateway -> ../../proto/
- trading_agent_service: trading_agent + ml client -> ../../proto/
- data_acquisition_service: data_acquisition -> ../../proto/
- api_gateway: 8 proto compilations -> ../../proto/
- monitoring_service: keeps local proto (3 training RPCs only, deleted in Task 5)

Added proto/fxt_trading.proto (fat-client proto, package foxhunt.tli)
separate from proto/trading.proto (backend, package trading) since the
API gateway needs both for protocol translation.

Added unimplemented stubs for merged monitoring.proto RPCs:
- trading_service: 3 training RPCs (served by monitoring_service)
- api_gateway monitoring_proxy: 13 system health RPCs (Task 4)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 20:34:09 +01:00
jgrusewski
ed1ab8ed88 feat: create consolidated proto/ directory at workspace root
Merge monitoring_service training metrics into trading_service system health
monitoring.proto. All 11 proto files now in one canonical location.

Merged monitoring.proto has 13 RPCs (10 system + 3 training) with all
message types from both source protos preserved. Added cpu_percent,
memory_used_mb, memory_total_mb fields to GetLiveTrainingMetricsResponse.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 20:15:11 +01:00