Refactor: Modularize codebase with separate decision and MCP packages

Architecture improvements:
- Extract AI decision engine to dedicated `decision` package
- Create `mcp` package for Model Context Protocol client
- Separate market data structures into `market/data.go`
- Update trader to use new modular structure
New packages:
- `decision/engine.go` - AI decision logic and prompt building
- `mcp/client.go` - Unified AI API client (DeepSeek/Qwen)
- `market/data.go` - Market data type definitions
Benefits:
- Better separation of concerns
- Improved code organization and maintainability
- Easier to test individual components
- More flexible AI provider integration
- Cleaner dependency management
Updated imports:
- trader/auto_trader.go now uses decision and mcp packages
- Consistent API across different AI providers
Co-Authored-By: tinkle-community <tinklefund@gmail.com>
This commit is contained in:
tinkle-community
2025-10-29 06:14:57 +08:00
parent 5681022a4d
commit b2c6925c89
5 changed files with 1305 additions and 130 deletions

BIN
nofx_test Executable file

Binary file not shown.