Add AI trading supervisor with WeChat push and daily session

Proactive monitoring for manual/hub closes and new opens prevents overtrading via in-app alerts, configurable WeChat links, and supervisor chat.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-06-23 19:25:01 +08:00
parent d3d366d0ee
commit bfbd6879d6
15 changed files with 1699 additions and 43 deletions
+7 -1
View File
@@ -9,6 +9,8 @@ from pathlib import Path
DIR = Path(__file__).resolve().parent
SETTINGS_PATH = DIR / "hub_settings.json"
from hub_supervisor_lib import DEFAULT_SUPERVISOR, normalize_supervisor_settings
DEFAULT_DISPLAY = {
"show_account_pnl": True,
"show_nav_funds": True,
@@ -98,6 +100,7 @@ def load_settings() -> dict:
except Exception:
pass
data["display"] = normalize_display_prefs(data.get("display"))
data["supervisor"] = normalize_supervisor_settings(data.get("supervisor"))
force_off = env_force_disabled_ids()
for ex in data.get("exchanges") or []:
if str(ex.get("id")) in force_off:
@@ -109,8 +112,11 @@ def load_settings() -> dict:
def save_settings(data: dict) -> None:
payload = dict(data)
payload["display"] = normalize_display_prefs(payload.get("display"))
payload["supervisor"] = normalize_supervisor_settings(payload.get("supervisor"))
SETTINGS_PATH.write_text(
json.dumps(data, ensure_ascii=False, indent=2),
json.dumps(payload, ensure_ascii=False, indent=2),
encoding="utf-8",
)