P2-8 镜牢局内决策写入审计日志
- 新增 lc_mcp/decisions.py:每个决策追加一行 JSON(time/stage/choice/reason + 细节), 写失败只丢该行;summarize 按 stage/reason 计数 - TaskRunner 用 LCP_DECISIONS 把 task_*.decisions.jsonl 路径交给子进程, task_status 返回 decisions.counts,清理旧日志时一并删除 - 选队/键盘寻路/饰品/事件补丁记录各自决策;商店购买与卡包选择用只观察的补丁记录 (购买按钮点中前的商品;卡包取自上游日志里的选择结果与权重) - 抽出 _override 统一临时替换 auto 方法并在结束时还原 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+7
-3
@@ -13,9 +13,10 @@ from . import killswitch, preflight
|
||||
from .aalc_engine import bootstrap
|
||||
from .aalc_patches import (WindowGuard, driver_click_tasks, headless_hdr_warning,
|
||||
install_default_battle_team, install_event_choices, install_exact_team_match,
|
||||
install_gift_preference, install_robust_set_foreground, install_shop_lists,
|
||||
install_system_team_selection, install_typed_keyboard_road,
|
||||
mirror_progress, stop_driver_click)
|
||||
install_gift_preference, install_robust_set_foreground, install_shop_audit,
|
||||
install_shop_lists, install_system_team_selection, install_theme_pack_audit,
|
||||
install_typed_keyboard_road, mirror_progress, stop_driver_click)
|
||||
from .decisions import decisions
|
||||
from .game_lock import GameBusyError, exclusive_game
|
||||
|
||||
# 任务 -> {参数名: AALC 配置项}; 参数只在本次运行内生效
|
||||
@@ -119,6 +120,7 @@ def _run(task, params):
|
||||
log('[ERROR] [lc_mcp] preflight: %s' % p)
|
||||
return PREFLIGHT_EXIT
|
||||
|
||||
decisions.open() # TaskRunner 给的 .decisions.jsonl; 直接运行时不写
|
||||
install_exact_team_match(auto, log)
|
||||
install_robust_set_foreground(screen, log=log)
|
||||
# 日常本(经验/纽本)不翻队伍列表: 队伍是自定义名字时按名字找必然失败,
|
||||
@@ -132,6 +134,8 @@ def _run(task, params):
|
||||
install_typed_keyboard_road(log=log)
|
||||
install_gift_preference(log=log)
|
||||
install_event_choices(log=log)
|
||||
install_shop_audit(log=log)
|
||||
install_theme_pack_audit(log=log)
|
||||
guard = WindowGuard(screen, cfg, log=log)
|
||||
guard.start()
|
||||
restore_path = os.environ.get(RESTORE_ENV)
|
||||
|
||||
Reference in New Issue
Block a user