agent_panel: ATR-normalized candle + indicator-value enrichment, hardened prompts, verdict logging
This commit is contained in:
@@ -97,6 +97,7 @@ _KNOWN_DEEPSEEK = {
|
||||
_KNOWN_AGENT_PANEL = {
|
||||
"enabled", "telegram", "dashboard", "min_quality",
|
||||
"max_panels_per_day", "reuse_ttl_seconds",
|
||||
"candles_enabled", "candle_bars_primary", "candle_bars_confirm",
|
||||
}
|
||||
_KNOWN_SIGNAL_LOG = {"enabled", "path"}
|
||||
_KNOWN_TELEGRAM = {"token", "chat_id", "channel_id", "alert_min_quality"}
|
||||
@@ -306,6 +307,18 @@ def load_app_config(path: str = CONFIG_PATH) -> AppConfig:
|
||||
raise AppConfigError(
|
||||
"config.json: agent_panel.reuse_ttl_seconds must be a "
|
||||
"non-negative number")
|
||||
if "candles_enabled" in panel \
|
||||
and not isinstance(panel["candles_enabled"], bool):
|
||||
raise AppConfigError(
|
||||
"config.json: agent_panel.candles_enabled must be true or false")
|
||||
for key in ("candle_bars_primary", "candle_bars_confirm"):
|
||||
if key in panel:
|
||||
n = panel[key]
|
||||
if isinstance(n, bool) or not isinstance(n, int) \
|
||||
or not 1 <= n <= 100:
|
||||
raise AppConfigError(
|
||||
f"config.json: agent_panel.{key} must be an integer "
|
||||
"between 1 and 100")
|
||||
app.agent_panel_settings = dict(panel)
|
||||
|
||||
slog = raw.get("signal_log", {})
|
||||
|
||||
Reference in New Issue
Block a user