feat: auto_heal.py + api/autoheal + F Tab auto-heal display
This commit is contained in:
@@ -943,6 +943,19 @@ def api_todos():
|
||||
return jsonify({"todos": todos, "executor_log_tail": executor_tail, "count": len(todos)})
|
||||
|
||||
|
||||
@app.route("/api/autoheal")
|
||||
def api_autoheal():
|
||||
"""最近一次自动修复记录(auto_heal.py 写入的摘要)。"""
|
||||
sf = TEMP_DIR / "last_auto_heal.json"
|
||||
if sf.exists():
|
||||
try:
|
||||
with open(str(sf)) as f:
|
||||
return jsonify(json.load(f))
|
||||
except:
|
||||
pass
|
||||
return jsonify({"time": None, "dry_run": False, "total_expected": 0, "anomalies_found": 0, "actions_taken": []})
|
||||
|
||||
|
||||
# ════════════════════════════════════════════════════════════
|
||||
# F — 期望状态 vs 实际状态
|
||||
# ════════════════════════════════════════════════════════════
|
||||
|
||||
Reference in New Issue
Block a user