Clean rewrite of the fxt CLI with unified gRPC client, JSON/human output abstraction, and stub implementations for all 15 command groups: auth, trade, train, tune, model, agent, backtest, broker, data, service, cluster, risk, config, watch (TUI), mcp. Deleted old fat-client commands, client modules, types, prelude, and tests (-12,769 net lines). Fixed pre-existing clippy issues in auth module (indexing_slicing in encryption.rs, manual_let_else in token_manager.rs, str_to_string in build.rs). 60 tests passing (53 lib + 7 binary), 0 clippy warnings. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
50 lines
1.5 KiB
Rust
50 lines
1.5 KiB
Rust
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
|
// proto/ at workspace root — single source of truth for all services.
|
|
// Note: fxt_trading.proto (package foxhunt.tli) is excluded — it is the
|
|
// legacy fat-client proto kept only for API Gateway backward compatibility.
|
|
let proto_root = "../../proto";
|
|
let protos: Vec<String> = [
|
|
"trading",
|
|
"health",
|
|
"ml",
|
|
"config",
|
|
"ml_training",
|
|
"trading_agent",
|
|
"broker_gateway",
|
|
"monitoring",
|
|
"risk",
|
|
"data_acquisition",
|
|
"config_service",
|
|
]
|
|
.iter()
|
|
.map(|p| format!("{proto_root}/{p}.proto"))
|
|
.collect();
|
|
|
|
tonic_prost_build::configure()
|
|
.build_server(true) // Required for E2E test mock servers
|
|
.build_client(true)
|
|
.type_attribute(".", "#[derive(serde::Serialize, serde::Deserialize)]")
|
|
.server_mod_attribute(".", "#[allow(unused_qualifications)]")
|
|
.client_mod_attribute(".", "#[allow(unused_qualifications)]")
|
|
.protoc_arg("--experimental_allow_proto3_optional")
|
|
.compile_protos(&protos, &[proto_root.to_owned()])?;
|
|
|
|
for proto in &[
|
|
"trading",
|
|
"health",
|
|
"ml",
|
|
"config",
|
|
"ml_training",
|
|
"trading_agent",
|
|
"broker_gateway",
|
|
"monitoring",
|
|
"risk",
|
|
"data_acquisition",
|
|
"config_service",
|
|
] {
|
|
println!("cargo:rerun-if-changed={proto_root}/{proto}.proto");
|
|
}
|
|
|
|
Ok(())
|
|
}
|