Devid HW
|
d8646074fb
|
Refactor handlers into SRP modules and add indicator/script tools
**Handler Refactoring:**
- Split monolithic handlers.rs (1468 lines) into 7 focused modules:
- system.rs: verify_setup, healthcheck, list_symbols
- experts.rs: list_experts, list_indicators, list_scripts, compile_ea
- backtest.rs: run_backtest, get_backtest_status, cache_status, clean_cache
- optimization.rs: run_optimization, get_optimization_results, list_jobs
- analysis.rs: analyze_report, compare_baseline
- setfiles.rs: read/write/patch/clone/diff set files
- reports.rs: list/search/prune reports, archive, promote, annotate
**New Tools:**
- list_indicators: List custom indicators in MQL5/Indicators
- list_scripts: List scripts in MQL5/Scripts
**Config Updates:**
- Added indicators_dir and scripts_dir to Config model
- Auto-discovery for MQL5/Indicators and MQL5/Scripts paths
- Updated healthcheck to validate new directories
**Benefits:**
- Single Responsibility Principle: each module handles one domain
- Easier maintenance and testing
- Clear separation of concerns
- Reduced cognitive load when modifying handlers
|
2026-04-18 18:38:28 +07:00 |
|
Devid HW
|
a3b046c68f
|
feat: complete Rust migration with modular architecture
Major changes:
- Migrate Python/shell scripts to Rust modules:
- analytics/extract.py → src/analytics/extract.rs (ReportExtractor)
- analytics/analyze.py → src/analytics/analyze.rs (DealAnalyzer)
- scripts/mqlcompile.sh → src/compile/mql_compiler.rs (MqlCompiler)
- scripts/backtest_pipeline.sh → src/pipeline/backtest.rs (BacktestPipeline)
- New modular structure:
- src/models/ - Config, Deal, Metrics, Report structs
- src/analytics/ - Report parsing and deal analysis
- src/compile/ - MQL5 compilation via Wine
- src/pipeline/ - 5-stage backtest orchestration
- src/tools/ - 27 MCP tool definitions and handlers
- Remove PyInstaller setup (now pure Rust)
- Remove migrated shell scripts (backtest_pipeline.sh, mqlcompile.sh)
- Add GitHub Actions CI/CD for macOS & Linux releases
- Update all documentation for Rust architecture
Binary size: 4.3MB (no Python dependencies)
Tools: 27 MCP tools fully functional
|
2026-04-18 15:07:08 +07:00 |
|