feat: add standalone dashboard for bot monitoring and control

- Introduced a new dashboard feature with endpoints for bot status, account management, logs, and configuration.
- Added support for starting the dashboard server via command line and configuration options.
- Implemented WebSocket support for real-time log streaming to the dashboard.
- Enhanced configuration management to include dashboard settings.
- Updated package.json to include new dependencies and scripts for dashboard functionality.
- Added tests for dashboard state management and functionality.
This commit is contained in:
2025-11-03 22:27:26 +01:00
parent 4e5f0f2a95
commit 6cd512e1b8
12 changed files with 1641 additions and 6 deletions

View File

@@ -30,6 +30,7 @@ export interface Config {
riskManagement?: ConfigRiskManagement; // NEW: Risk-aware throttling and ban prediction
dryRun?: boolean; // NEW: Dry-run mode (simulate without executing)
queryDiversity?: ConfigQueryDiversity; // NEW: Multi-source query generation
dashboard?: ConfigDashboard; // NEW: Local web dashboard for monitoring and control
}
export interface ConfigSaveFingerprint {
@@ -187,4 +188,10 @@ export interface ConfigQueryDiversity {
sources?: Array<'google-trends' | 'reddit' | 'news' | 'wikipedia' | 'local-fallback'>; // which sources to use
maxQueriesPerSource?: number; // limit per source
cacheMinutes?: number; // cache duration
}
}
export interface ConfigDashboard {
enabled?: boolean; // auto-start dashboard with bot (default: false)
port?: number; // dashboard server port (default: 3000)
host?: string; // bind address (default: 127.0.0.1)
}