Author SHA1 Message Date
ywsandClaude Opus 5.5 dd4259d41b 实验: 编队列表滑动补丁重写 (默认关闭, LCP_TEAM_SCROLL_PATCH=1 启用)
替代 66418dc 中的版本, 只验证"Windows 缺少队伍拖拽规避"这一假设:
- 几何/行程沿用 AALC build_windows_scroll_swipe_plan, 不改变 Windows 翻页标定
  (原版两端各加 60px escape);
- 参照 MuMu 在脱离段后保持 0.1s、松手前停稳 0.5s;
- 显式等待驱动分段移动: 原版后台每段 duration<0.01s, AALC _mouse_move_to
  步数为 0, 一个移动事件都不发; 前台关闭 pyautogui 默认 0.1s 停顿
  (原版单次滑动约 4.4s);
- 默认不安装, 需实机在编队界面验证后再决定是否默认开启。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 03:58:35 +00:00
ywsandClaude Opus 5.5 95ae060118 task_status 在退出码为 0 但日志有报错时附上 errors
取自 codex/story-test-20261003 的 66418dc (DSH) 中 tasks.py 部分及其两项测试:
AALC 每日流程单次战斗失败("未能进入战斗")后仍 exit 0, 只看 succeeded 会误判。
同一提交里的编队滑动补丁未合入: 后台模式分段移动时长 <0.01s 时 AALC 的
_mouse_move_to 步数为 0 不发移动事件, 前台每段受 pyautogui 默认 0.1s 停顿
影响单次滑动约 4.4s, 且行程比 AALC 的 Windows 标定多 60px; 另行重写后实测。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 03:56:16 +00:00
ywsandClaude Opus 5.5 a993210760 合并 codex/mcp-runtime-reliability: 运行可靠性、局状态与决策交接
与 main 上的审查修复及 2131f89 (story-test) 合并, 冲突处理:
- mcp_session: 保留超时/取消客户端, 补回 raise_on_error
- 执行器: 局状态改用 run_state (run_id 绑定), 取代完成后归档 context;
  Jev 请求统一经 jev_client.request_answer (支持 baseUrl/curl, 返回置信度与概率);
  保留截图解码缓存、地图模板缓存、按坐标点按钮、use_last_error 单实例互斥;
  刷新计数与开战标记只在动作成功后更新
- battle_batch: 取消/预算框架 + 只在看到胜率按钮时点胜率再回车;
  回合标签改为包含匹配 (OCR 常输出 'wave1')
- 文档采用 reliability 版本 (已是仓库相对路径), 注明 jev_client
- 测试: 互斥量桩改为 WinDLL/get_last_error, 战斗批次测试按胜率语义重写,
  Jev 测试改为对 jev_client 打桩, 生命周期测试改为轮询; 145 项通过

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 03:12:48 +00:00
Codex 2131f89e62 记录 4-48 实测失败与耗时复盘,修复前台输入及 Jev 配置 2026-10-03 10:56:19 +08:00
ywsandClaude Opus 5.5 030527f5de 审查修复: 任务配置恢复、执行器容错与续局状态、识别性能
正确性
- stop_task 强杀后 run_task 的临时次数会残留在 config.yaml (AALC 中途整份存盘);
  任务启动时先落盘原值, 强停/异常退出后由 TaskRunner 用 --restore 写回,
  写回失败时拒绝启动新任务并在 task_status 显示 pending_restore
- Jev 执行器: 工具失败不再抛异常导致整局退出 (Session raise_on_error=False),
  原有的"截图暂不可用"等降级分支终于生效; 刷新计数/开战标记只在动作成功后更新
- 一局完成后归档 jev_shop_context.json, 否则 claim_requested 让下一局一启动就判定完成
- 通用按钮直接点已核对的坐标, 不再 click_text 重新搜索 (可能点到背景同名按钮)
- 认证行按字节比较, 非 ASCII 输入不再让 compare_digest 抛 TypeError
- 单实例互斥改用 use_last_error 读取 ERROR_ALREADY_EXISTS

性能
- find_image 只在窗口尺寸变化时清模板缓存 (原来每次两次全量 gc); 模板列表只扫描一次
- 截图 PNG 压缩级别 1: 1080p 存图 0.66s -> 0.19s
- 执行器每帧截图只解码一次 (button_enabled 75ms -> 0.3ms); 地图模板与 ORB 描述子按比例缓存
- 箭头模板用 imdecode 读取, 支持中文路径 (输出与 imread 逐像素一致)

测试 73 -> 84, 修改前的识别输出与修改后逐项比对一致。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 00:31:21 +00:00
ywsandClaude Opus 5.5 5ab5fd9508 文档路径改为仓库相对路径, 去掉个人用户目录
笔记/skill/Jev 说明里指向 C:/Users/<用户名>/.codex 和 D:/codex/limbus_tools
的链接改为仓库内路径; docs/feedback 下的实测记录登记了哈希, 保持原样。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 00:02:37 +00:00
Codex 5bef3fe0c6 Document execution flow and speedrun guide coverage 2026-10-03 07:30:53 +08:00
Codex 6c2d26e629 Add execution-model decision handoff and Jev AALC research 2026-10-03 07:08:38 +08:00
Codex 7188b4ac0f Fix MCP cancellation, mirror run state, and battle boundaries 2026-10-03 01:21:51 +08:00
Codex Agent 97eca204c2 Streamline mirror confirmations and enforce updated rupture route 2026-10-02 21:21:31 +08:00
Codex Agent 6523f648fd Fix background clicks and mirror scene boundaries with run feedback 2026-10-02 20:58:56 +08:00
Codex Agent 9d3902ebe9 Record completed run and streamline reward claim and speedrun notes 2026-10-02 14:06:55 +08:00
Codex Agent da7dcefadd Fix background MCP input and add mirror dungeon feedback records 2026-10-02 13:58:43 +08:00
ywsandClaude Opus 5.5 a4b27f991c v0.7: 以 AALC 为底座重建 MCP server
- AALC 作为 submodule (vendor/aalc @ 7452fad), 不改其代码
- 低层工具走 AALC auto/ocr/模板匹配; 高层 run_task 跑 AALC 现成流程(子进程, 可强杀)
- 常驻服务跑在交互桌面会话 + stdio bridge (token 认证), 取代每次截图注册计划任务
- 删除自写的截图/输入/OCR 后端
- 测试: FakeEngine 覆盖协议、任务生命周期、TCP+bridge 端到端

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 01:39:06 +00:00
ywsandClaude Opus 5.5 809a7fb017 修复 v0.5 审查问题: platform 改名, 协议健壮性, CJK 匹配, VBS 引号, interception API
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 01:39:06 +00:00
anon 176570e7cd remove anon test 2026-10-02 01:38:17 +00:00
anon 5792bdf940 anon-test 2026-10-02 01:38:12 +00:00
yws e7e3f8470f 去云端: OCR 纯本地(winsdk), 删除 remote 后端与 ocr_server 2026-10-02 00:51:02 +00:00
yws 7eef32fc06 本地OCR: winsdk(Windows.Media.Ocr) 后端, OCR_BACKEND=local/auto/remote 2026-10-02 00:47:44 +00:00
yws 8d24276511 remove probe file 2026-10-01 17:01:38 +00:00
yws 7f07fb8c74 Merge branch 'main' of https://git.lingll.icu/yws/lc-mcp 2026-10-01 16:59:29 +00:00
yws 0db14040b7 lc-mcp v0.5: 语义化操控(MCP stdio) — OCR文本化+语义点击, win/linux/mac 截图与输入后端 2026-10-01 16:37:33 +00:00
99 changed files with 12596 additions and 3 deletions
+2
View File
@@ -0,0 +1,2 @@
# Keep exported evidence hashes stable across Windows/Linux checkout settings.
docs/feedback/** -text whitespace=cr-at-eol
+9
View File
@@ -0,0 +1,9 @@
__pycache__/
*.pyc
*.log
*.local.json
jev_config.json
token
.env
.env.*
!.env.example
+3
View File
@@ -0,0 +1,3 @@
[submodule "vendor/aalc"]
path = vendor/aalc
url = https://github.com/KIYI671/AhabAssistantLimbusCompany
+61
View File
@@ -0,0 +1,61 @@
# lc-mcp 安装与修复记录
日期:2026-10-02,Windows 当前交互桌面会话。
## 安装
- 仓库:`D:\codex\lc-mcp`,来源 `https://git.lingll.icu/yws/lc-mcp.git`。
- 初始主仓库提交:`a4b27f991c3619d2c9cf7f5ec9e80cbefd1d0465`。
- AALC 固定提交:`7452fad5a45a0fadb59a753fafbf40434d987c19`。
- GitHub Git 传输失败后,从官方 codeload 下载该固定提交的源码 ZIP,解压至 `vendor\aalc`;未修改 AALC 源码。源码可用,子模块 Git 元数据尚未完整建立。
- `uv sync --no-dev` 安装 AALC 依赖。C 盘空间不足,因此使用 `D:\codex\.cache\lc-mcp-uv` 缓存。
- Python:`D:\codex\lc-mcp\vendor\aalc\.venv\Scripts\python.exe`。
- 登录任务:`LcMCPServer`,普通权限,后台 `pythonw.exe` 服务,监听 `127.0.0.1:8765`。
- 已向 Codex 注册 stdio MCP `limbus`,由 `lc_mcp\bridge.py` 连接常驻服务。
- 服务日志:`%USERPROFILE%\lc_mcp\server.log`。认证凭据未写入报告。
## 修复
1. 新增 `drag` 工具,把长按并移动接口接到 AALC 后台输入,持续时间 0.1–10 秒;发送前检查客户区坐标,完整任务运行时禁止抢占输入。
2. 修复 `pythonw.exe` 标准输出/错误流为 `None` 导致启动日志异常的问题。
3. stdio 模式在 AALC 初始化前隔离 stdout,统一 UTF-8,避免启动打印污染 JSON-RPC 和中文编码异常。
4. 模板缩放根据实际截图尺寸计算,保留非整数比例;失配配置和缓存不再让 1080p 模板用于约 720p 客户区。匹配成功或异常后均恢复原配置,不保存配置、不调整窗口。
5. 客户端断开产生的 ConnectionResetError / BrokenPipeError 正常结束连接;其他服务错误仍会暴露。
6. 新增 `scripts\mcp_probe.py`,通过实际 stdio bridge 完成 MCP 握手、工具列表和指定调用。
7. 后台键盘按下后保持 0.12 秒再松开,并在异常时释放;修复 Unity 未识别立即按下/松开的快捷键问题。
8. Jev 执行器使用单实例互斥,避免多个终端同时输入;确认弹窗仅提供弹窗按钮,避免 OCR 命中背景“离开”。每店刷新至多 4 次,仅在无出战角色技能替换入口时提供。
9. 商店 CONNECTING 期间禁用所有输入,避免读取旧库存后重复刷新或误退出;有出战角色技能入口或仍可刷新时不提供“离开”。事件结果页使用可见“继续”按钮;回车一次未生效时改用当前按钮坐标。
10. 奖励卡与卡包详情的上层弹窗优先识别,排除背景控件;层末饰品与苦难提供独立选择入口,避免误当额外观测而默认拒绝。
11. 真实离线 bridge 复测发现 stderr 使用 cp936,客户端按 UTF-8 解码时产生线程异常;bridge 现统一 UTF-8 错误输出,回归测试主动设置 cp936 并检查中文诊断及退出码。
## 验证
- 单元与传输回归测试:23 项通过,涵盖认证、在线/离线 bridge、任务子进程状态、输入互斥、拖动边界与时长、UTF-8、pythonw 日志、缩放异常恢复、后台按键时长及客户端断线。独立 Jev 执行器 17 项场景回归中 16 项通过、1 项因旧截图已轮转删除而跳过;包含方向+回车直接进入、编队界面回车开战、战斗特写空 OCR 继续到奖励后停止、加载旧库存禁用操作、技能存在时禁止退出、嵌套奖励弹窗及事件结果点击继续。
- 真实后台服务:MCP 握手、工具列表、`task_status`、截图和中文 OCR 正常。
- 真实输入:战斗设置按钮点击成功,Esc 关闭;地图 `click_image` 打开迷宫进度菜单,`click_text` 打开游戏设置。
- 真实拖动:第 2 层地图上保持左键并水平移动 100 像素,地图跟随平移;反向拖动恢复视图。仅返回 ok 不作为生效证据,已查看前后截图。
- 后台输入检查:一组往返拖动前后 Windows 前台窗口句柄与系统鼠标坐标完全一致,测试未抢走焦点或移动系统鼠标。
- 模板识别:当前 1920×1080 地图设置按钮定位 `(1848, 68)` 并成功点击。
- 已保存的真实 1278×731 战斗截图使用实际 AALC 匹配器复测:设置 `(1233, 41)`,胜率 `(1077, 557)`;阈值 0.9 均命中,配置恢复确认通过。缩放比例为 718.875/1440,取整为 719 曾降低匹配置信度,已修正。
## 范围与后续
- 第五层卡包长按下拉于 2026-10-02 13:33:54 执行,后续截图于 13:33:57 已进入地图;拖动起点 (326,486)、终点 (326,983)、持续 1.8 秒,未要求用户手动拖动。
- 未启动完整 AALC 镜牢任务;其默认配置尚未设置用户的指定编队与速通路线。
- 修复源于本地工作区;本次按用户授权提交并推送远端,不修改 AALC 子模块指针。
- 用户已授权上传;修复、执行器、skill 快照、脱敏日志及现存游戏截图一起提交。最终推送结果以远端提交核对为准。
- 用户重启 Codex 后,原生 `limbus` 工具与独立 bridge 均已实测恢复。服务重启仍可能关闭旧连接,因此不为了执行器改动重启服务。
仓库内版本将 Jev 执行器改为相对路径和环境变量凭据,接入现有 `mcp_session.Session`,并用持久保存的白色地图节点截图替换已轮转的旧测试截图。最终仓库回归:41 项全部通过,无跳过;原机器上的执行器源码保留于反馈目录快照,便于对比。测试输出见 `docs/feedback/2026-10-02/test-results.txt`。
领取流程补充:助手点击领取后,用户完成回车确认,随后已观察到主界面。代码加入点击领取后按 Enter 的完整动作,新增回归检查;本局不记作完全自动通关。
复测命令:
```powershell
cd <仓库目录>
$env:PYTHONUTF8='1'
& vendor\aalc\.venv\Scripts\python.exe -m unittest discover -s tests -v
& vendor\aalc\.venv\Scripts\python.exe -X utf8 scripts\mcp_probe.py task_status
& vendor\aalc\.venv\Scripts\python.exe -X utf8 scripts\mcp_probe.py get_state
```
+196 -2
View File
@@ -1,2 +1,196 @@
# lc-mcp
linbus mcp server
# lc-mcp — 基于 AALC 的 Limbus Company MCP server
把 [AhabAssistantLimbusCompany (AALC)](https://github.com/KIYI671/AhabAssistantLimbusCompany)
的识别与操控能力包装成 MCP 工具,给 AI agent(codex / 任意 MCP 客户端)用。
- **低层**:截图、RapidOCR、AALC 模板图匹配(几百张按钮/图标模板)、后台点击/按键,全部直接调 AALC 的 `module.automation`
- **高层**:`run_task` 直接跑 AALC 现成的完整流程(日常经验本/纽本、领奖励、狂气换体力、镜牢),自带战斗处理、掉线重试、游戏重启
AALC 以 git submodule 引入(`vendor/aalc`,固定到某个 commit),不改它的代码,升级时只需更新 submodule 指针。
## 架构
```
MCP 客户端 ──ssh──> python lc_mcp/bridge.py (stdio, 只用标准库)
│ 127.0.0.1:8765, 首行 token 认证
▼
python -m lc_mcp.server ← 登录时由计划任务在「交互桌面会话」启动
├─ AalcEngine → AALC auto / ocr / screen (找窗口、后台截图、PostMessage 输入)
└─ TaskRunner → 子进程 python -m lc_mcp.aalc_task <task> (停止 = 杀进程树)
```
为什么要常驻服务 + bridge:SSH 登录的进程跑在 session 0,看不到游戏窗口,也发不了输入。
旧版靠"每次截图注册一个计划任务"绕过,慢且不能输入;现在整个服务常驻在桌面会话里。
## 部署(Windows,跑游戏的那台机器)
```powershell
git clone --recursive https://git.lingll.icu/yws/lc-mcp
cd lc-mcp\vendor\aalc
uv sync # 按 AALC 的 pyproject 装依赖 (Python >= 3.12),生成 .venv
# 先用 AALC 自己的界面 (uv run main.py) 配好队伍、镜牢设置等,lc-mcp 读同一个 config.yaml
cd ..\..
powershell -ExecutionPolicy Bypass -File scripts\install_logon_task.ps1
```
`install_logon_task.ps1` 会注册 `LcMCPServer` 计划任务(登录时启动、普通权限、失败自动重启)。
游戏以管理员身份运行时才需要加 `-Elevated`。卸载:`-Uninstall`。
## MCP 客户端配置
```jsonc
{
"mcpServers": {
"limbus": {
"type": "stdio",
"command": "ssh",
"args": ["win", "python", "C:/Users/<you>/lc-mcp/lc_mcp/bridge.py"]
}
}
}
```
bridge 读取 `~/lc_mcp/token` 认证(服务首次启动时生成),所以 SSH 用户必须和登录桌面的用户是同一个账号。
服务没起来时 bridge 仍会完成握手,并对每个调用返回“服务未运行”的原因。
本机直接用(客户端本身就在桌面会话里):`python -m lc_mcp.server --stdio`。
本机 Codex 也可以连接常驻后台服务(将路径替换为自己的仓库目录):
```powershell
codex mcp add limbus --env PYTHONUTF8=1 -- D:\lc-mcp\vendor\aalc\.venv\Scripts\python.exe -X utf8 D:\lc-mcp\lc_mcp\bridge.py
```
常驻服务使用 `pythonw.exe` 时,启动日志写入 `~/lc_mcp/server.log`。
直接 stdio 模式会在导入 AALC 前隔离日志,并统一使用 UTF-8,避免日志破坏 JSON-RPC 或中文乱码。
模板识别会根据当前客户区的 16:9 画面比例临时缩放,匹配结束后恢复内存中的原配置。
## 工具
| 工具 | 说明 |
|------|------|
| `get_state` | 截图 + OCR,返回窗口内全部文字 `{text,x,y,w,h,score}` |
| `click_text(text, index)` | 按文字点击;忽略空格/大小写,完全匹配优先 |
| `wait_for_text` / `wait_for_text_gone` | 轮询 OCR 等文字出现/消失(上限 300s) |
| `find_image` / `click_image(name, threshold, model)` | AALC 模板图匹配,适合没有文字的按钮 |
| `list_images(prefix)` | 列出模板图,如 `battle/`、`mirror/` |
| `screenshot` | 窗口截图(`~/lc_mcp/shots`,只保留最近 30 张) |
| `click(x,y,times)` / `keypress` / `type_text` | 低层输入(窗口客户区坐标) |
| `drag(from_x,from_y,to_x,to_y,duration)` | 保持左键按下并缓慢拖动,适用于卡包;默认 1 秒,范围 0.1–10 秒;坐标以 `get_state` 的客户区截图为准 |
| `run_task(task, …)` | `all` / `daily(exp,thread)` / `reward` / `enkephalin(times)` / `mirror(count)` |
| `task_status(lines)` / `stop_task` | 任务状态、日志尾部(`~/lc_mcp/runs`)、强制停止 |
任务运行期间,点击/按键类工具会被拒绝(防止打乱 AALC 的流程),只读工具仍可用。
`run_task` 传入的次数只对本次运行生效,结束后恢复 `config.yaml` 原值。AALC 运行中会整份保存配置,
所以任务启动时先把原值写到 `~/lc_mcp/runs/*.restore.json`;`stop_task` 强停或任务进程异常退出后,
服务会据此写回。写回失败时 `task_status` 显示 `pending_restore`,并在写回成功前拒绝启动新任务。
`state` 只反映任务子进程的退出码。AALC 在单次战斗失败(例如日志里的
`超出最大尝试次数,未能进入战斗`)后仍会继续跑完并正常退出,所以 `task_status`
会把日志尾部的 `[ERROR]`/异常行放进 `errors` 字段:**看到 `succeeded` 也要先看 `errors`。**
### 实验:编队列表滑动补丁(默认关闭)
AALC 基类允许适配器覆盖 `mouse_swipe_for_team_scroll`“以规避队伍拖拽判定”,上游只有 MuMu 实现了。
`lc_mcp/aalc_input_patch.py` 在 Windows 前台/后台适配器上补了一个最小版本:几何与行程沿用 AALC 的
`build_windows_scroll_swipe_plan`(不改变 Windows 翻页标定),脱离段后保持 0.1 秒、松手前停稳 0.5 秒。
是否真有队伍被拖乱的问题尚无实机证据,所以默认不启用。验证方法:给常驻服务设置环境变量
`LCP_TEAM_SCROLL_PATCH=1` 后重启服务,跑一次需要选队的日常任务,核对选中的队伍、编队人数以及 `task_status` 的 `errors`。
## 环境变量
| 变量 | 默认 | 说明 |
|------|------|------|
| `AALC_DIR` | `vendor/aalc` | 使用其他位置的 AALC 源码 |
| `LCP_PORT` | 8765 | 服务/bridge 端口 |
| `LCP_KEEP_SHOTS` | 30 | 截图保留张数 |
| `LCP_TEAM_SCROLL_PATCH` | 未设置 | 设为 `1` 启用实验性的编队列表滑动补丁 |
## 开发 / 测试
### Jev 决策接口
`scripts/jev_mirror_agent.py` 使用 `scripts/jev_client.py` 读取本地配置中的
`model`、`baseUrl`、`sessionId`、`transport` 和 `timeoutSeconds`。
Jev 默认地址为 `https://opencode.ai/zen/v1/systemone`;`baseUrl` 填到 `/v1`,
客户端会追加 `/systemone`。Go 网关的模型列表与 Jev 原生接口不同,不能仅替换地址就假设支持相同模型。
从 `scripts/jev_config.example.json` 创建仓库外的私有配置,API key 使用
`OPENCODE_API_KEY` 环境变量或私有配置中的 `apiKey`。不要把凭据提交到仓库。
Windows 上若 Python HTTPS 遇到握手中断,可用 `"transport": "curl"`,
并把超时提高到 20 秒;认证头通过 stdin 交给 curl,保留证书验证。
通用客户端也支持主线等其他场景的候选决策,不会发送游戏输入:
```powershell
vendor\aalc\.venv\Scripts\python.exe -X utf8 scripts\jev_client.py <private-config.json> <observation.json>
```
`observation.json` 提供 `state`(当前画面观察文本)、`criteria`(候选名到描述的映射)
和 `instructions`(当前任务规则)。返回候选名和耗时,候选之外的响应会被拒绝。
镜牢执行器的场景规则只适用于镜牢,推进主线时应提供主线观察和规则。
```bash
python -m unittest discover -s tests # 不需要 Windows/AALC (FakeEngine)
python -m lc_mcp.server --stdio --fake # 假引擎手动调试协议
```
服务安装后,可通过真实 bridge 做 MCP 握手和工具调用:
```powershell
vendor\aalc\.venv\Scripts\python.exe -X utf8 scripts\mcp_probe.py task_status
vendor\aalc\.venv\Scripts\python.exe -X utf8 scripts\mcp_probe.py get_state
vendor\aalc\.venv\Scripts\python.exe -X utf8 scripts\mcp_probe.py find_image '{"name":"mirror/road_in_mir/setting_assets.png"}'
```
该脚本只调用指定工具;输入类工具会实际操作游戏。完整 AALC 任务依赖已配置好的队伍与流程,基础连接测试不需要启动完整任务。
## Jev 镜牢执行器与真实反馈
`scripts/jev_mirror_agent.py` 通过 MCP bridge 操作游戏,普通分支经统一接口交给 Jev 或执行模型;战斗采用 P → 回车宏,事件先 SKIP,回车失效时使用当前按钮。它保留用户已配好的队伍,商店无可替换出战角色时至多刷新 4 次,加载期间不读取旧库存继续操作。
安装 AALC 依赖并启动常驻服务后,把 `OPENCODE_API_KEY` 设为自己的凭据,再运行:
```powershell
vendor\aalc\.venv\Scripts\python.exe -X utf8 scripts\jev_mirror_agent.py scripts\jev_config.example.json --steps 250 --seconds 1800
```
运行数据默认写到 `~/lc_mcp/jev`,可用 `LC_JEV_HOME` 指定其他目录。创建该目录下的 `JEV_STOP` 文件即可停止;续跑前移除它。不要与 AALC 完整任务或另一个游戏执行器同时操作。
工具调用失败(截图暂不可用、按钮已消失等)会记入日志并重新观察画面,同一画面上同一动作最多尝试两次,不会因单次失败整局退出。
每局运行现在有独立标识。默认续跑尚未结束且上下文一致的当前局;已完成或没有运行记录时建立新局。重新开一局时使用 `--new-run`,明确要求续跑时使用 `--resume`。旧版本未完成记录会保留楼层和强化进度,但旧的领取及战斗标记不会作为本局完成证据;只有上下文而没有运行记录时会重置它。领取截图和返回大厅截图必须属于当前局,才能记录完成。
```powershell
# 新开一局:清除上一局的楼层、饰品与领取状态
vendor\aalc\.venv\Scripts\python.exe -X utf8 scripts\jev_mirror_agent.py scripts\jev_config.example.json --new-run --seconds 1800
# 续跑已保存的未完成局,保持原计时起点
vendor\aalc\.venv\Scripts\python.exe -X utf8 scripts\jev_mirror_agent.py scripts\jev_config.example.json --resume --seconds 1800
```
MCP 客户端默认每次请求等待 30 秒,文字等待工具按自身时长延长响应期限。等待回复期间也检查停止标记和本次运行的时间预算。超时或中断时关闭客户端连接,并记录结果可能未知;不会自动重发点击或按键。常驻服务已经接收的操作可能仍会完成,需核对当前画面后再续跑。`battle_batch.py` 与主执行器共用判定、奖励、死亡和地图等战斗退出条件,并在每个按键前检查停止标记。
设置 `LC_FIXED_FALLBACK=1` 可只使用固定候选,无需 Jev API 密钥;仍需运行 MCP 服务。完整 AALC 任务启动时,如有 MCP 工具正在执行,会立即返回忙碌错误,避免与当前输入交错;查询与停止任务不受影响。
`decisionEngine` 支持 `auto`(默认)、`jev`、`executor`、`fixed`,也可用 `--decision-engine` 覆盖。只有指定非空 `model` 并提供凭据时,`auto`/`jev` 才调用 Jev。未指定模型、缺少凭据或 Jev 请求失败时,转交执行模型;固定策略需显式选择。Python 实际使用配置中的模型,并在动作日志保留概率、confidence 和实际决策来源。
不用 Jev 时可以省略配置文件:
```powershell
vendor\aalc\.venv\Scripts\python.exe -X utf8 scripts\jev_mirror_agent.py --decision-engine executor --seconds 1800
```
独立脚本在需要模型判断时输出 `requires_decision`,将页面观测、合法候选、当前局标识和请求标识写入 `decision_request.json` 及状态文件,随后释放连接与执行器互斥句柄。调用它的执行模型读取该请求,重新核对当前页面后处理动作,再用 `--resume` 继续同一局。请求文件是交接通知,旧请求不能直接用于输入。脚本本身没有访问当前聊天模型的 API。
嵌入执行端时,`scripts/decision_router.py` 的 `DecisionRouter` 及主脚本 `main(executor_decider=...)` 接受 `executor_decider(request)` 回调;返回候选 ID,或带同一 `request_id` 及 `choice` 的对象。回调只获得观测和候选,输入仍由执行器完成。未列出的候选、错误请求标识和无效概率会被拒绝。执行端应为自己的模型调用设置等待期限。长期混合执行器由这一接口接入当前执行模型,避免每个分支都重新启动脚本。
Jev 与 AALC 配置复用方案、离线页面样例及实测耗时统计见 [2026-10-03 自动化研究](docs/jev_aalc_automation_research_20261003.md)。
本轮修复、验证范围与已知限制见 [2026-10-03 运行可靠性改进](docs/mcp_runtime_improvements_20261003.md)。
本次修复、实际失败反馈、操作日志、截图清单、修改源码快照和速通 skill 见 [2026-10-02 实测记录](docs/feedback/2026-10-02/README.md);安装与测试说明见 [INSTALL_TEST_REPORT.md](INSTALL_TEST_REPORT.md)。这些是开发中的真实记录,包含失败和仍未验证的步骤。
[2026-10-03 主线实测与耗时复盘](docs/feedback/2026-10-03/README.md)记录了 4-48 未通关、三次 Jev 抉择耗时、混合操作限制、输入修复的验证边界及 94 项回归结果。
## 许可证
AALC 使用 AGPL-3.0。本项目会导入并运行 AALC 的代码,分发时需遵守 AGPL-3.0。
@@ -0,0 +1,71 @@
# 当前执行流程与速通资料覆盖
核对日期:2026-10-03。代码基线:`6c2d26e`。本次核对范围是现有基础执行能力,DS 适配留到后续。
## 两条现存的执行路径
`run_task` 启动 AALC 原生任务进程,读取 AALC 配置并执行镜牢、经验本、纽本等已有流程。它使用 AALC 的模板、队伍配置、卡包权重和商店策略,不调用当前 Jev 辅助脚本,也不自动加载本仓库的速通 skill。
`scripts/jev_mirror_agent.py` 则通过 MCP bridge 观察与操作游戏,以当前镜牢规则生成候选,交给 Jev 或执行模型选择。这是此前实测反馈和近期可靠性、决策接口改进主要涉及的路径。
## 辅助脚本每轮怎样推进
```mermaid
flowchart TD
A[MCP 截图与 OCR / 本地模板匹配] --> B[读取本局标识与保存进度]
B --> C[识别当前界面 / 更新可识别的楼层]
C --> D[生成并过滤合法动作候选]
D --> E{是否为确定步骤}
E -->|加载 / 战斗 / 跳对话 / 结果推进| F[执行有界动作宏]
E -->|路线 / 卡包 / 事件 / 奖励等分支| G[Jev或执行模型选择候选ID]
G --> F
F --> H[记录结果 / 更新部分进度]
H --> A
```
1. `get_state` 返回截图路径、尺寸、OCR 文字、位置和 OCR 分数。地图另外使用 AALC 图片资源和 OpenCV 识别公交位置、连接箭头和节点类型。
2. 保存上下文包含楼层、商店刷新次数、部分饰品取得/强化标志、战斗状态和领取状态。楼层遇到可识别的探索或主题包文字时更新,否则沿用上下文;它不是点击一次就自动加一,也尚不是完整的库存状态表。
3. `candidates()` 先处理加载、上层弹窗、死亡/错误、奖励等界面,再生成当前能执行的动作。部分攻略规则在这里直接过滤,例如二号线楼层限制、技能替换目标和商店刷新上限。
4. 战斗 P→Enter、SKIP 和已知结果后续推进等确定操作直接执行。其他分支经 `DecisionRouter` 选择;显式 fixed 模式使用已有固定优先级。模型的选择范围限于当前候选。
5. `execute()` 把路线方向+回车、连续确认及战斗短批次合成动作。下一轮重新观察,比较有效文字并记录重复尝试;部分快捷键未生效时改点对应按钮。
当前位置、候选控件、预期效果与实际结果仍没有全部形成统一状态合同。目前点击成功不等于某个饰品已经取得或升到 ++。`symbol_upgraded`、`thrill_upgraded` 等标志仍依赖外层核实和维护,自动库存识别及付款后目标核验是基础能力的重要缺口。
## 楼层规划怎样落地
规划来源:[rupture-route.md](skills/limbus-mirror-speedrun/references/rupture-route.md) 和 [速通笔记](mirror_dungeon_speedrun_notes.md)。下表的“计划”是资料与用户要求,不能当成每局已经完成的事实。
| 阶段 | 资料中的目标 | 当前脚本覆盖 |
| --- | --- | --- |
| 开局 | 基础等级的指定恩惠、荆棘套索/荧光灯、三级电池 | 电池必选和确认候选已有;完整开局配置尚未统一转成脚本策略输入 |
| 1F | 优先取得成捆的符咒 | 核心保留规则和模型提示已有;尚无可靠的“卡包奖励解析→缺失核心补全”规划器 |
| 2F | 符咒 ++,缺鸡胸时优先地狱鸡,技能替换 | 符咒未确认强化时限制商店推进;完整强化购买及库存确认仍需外层处理。鸡胸条件选包没有完整自动化 |
| 3F | 辛克莱改为 1→3,尽量完成快感 ++,选可纯 P 的较短卡包 | 辛克莱楼层技能规则已写入候选;卡包机制比较、合成预算与材料计算尚未完整接入 |
| 4F | 换技能,补缺失快感 ++,继续推进 | 对已有快感的待强化入口有部分支持;实际付款和强化完成状态仍依赖核验 |
| 5F | 二号线、技能替换、通关并确认领取 | 二号线候选过滤和剩余刷新已实现;刷新耗尽后的观测及不可选原因仍需外层处理。最终领取与当前局完成证据已有流程 |
路线层面,现有识别器能找可达节点;模型按当前候选选择。固定策略倾向商店、事件,再普通战斗,降低精英/集中战斗优先级。它尚未根据全部库存、剩余预算和每层目标计算整局最优路线。AALC 原生任务另有节点图和路线缓存,后续需要在同一执行进程中复用。
## skill、参考文件和笔记实际怎么利用
| 资料 | 当前用途 | 尚未自动化的部分 |
| --- | --- | --- |
| [SKILL.md](skills/limbus-mirror-speedrun/SKILL.md) | 执行助手读取的总流程:沿用队伍、按需查资料、快捷键、停止及完成标准 | Python 没有读取这个文件来自动装配执行策略 |
| [rupture-route.md](skills/limbus-mirror-speedrun/references/rupture-route.md) | 楼层目标、核心保护、技能表和商店策略;部分内容被人工转入 `SYSTEM_RULES` 和候选过滤 | 修改文档不会自动修改代码;完整目标与预算尚未形成机器可读配置 |
| [event-choices.md](skills/limbus-mirror-speedrun/references/event-choices.md) | 主助手按事件名及选项文字查对应条目,核对收益和额外分支 | 当前 Jev 请求未自动检索并附上相关事件条目,只依赖 OCR、候选描述和通用规则 |
| [mechanics.md](skills/limbus-mirror-speedrun/references/mechanics.md) | 解释核心强化、合成、恢复和版本差异,供助手核实 | 数量、预算、材料组合等应进入代码计算;机制说明本身不会产生执行动作 |
| [shortcuts.md](skills/limbus-mirror-speedrun/references/shortcuts.md) | 用户确认过的操作方式;部分已写成路线、确认和战斗宏 | 还需继续按场景边界复用,不能把快捷键扩展成所有界面的盲输入 |
| [mirror_dungeon_speedrun_notes.md](mirror_dungeon_speedrun_notes.md) | 攻略整理、用户修正和历史实测记录,帮助修订上述资料与代码 | 历史局面不是当前库存;当前运行状态保存在带 run ID 的运行上下文中 |
源码搜索中,`scripts/export_feedback.py` 对笔记和 skill 的引用用于导出反馈副本,并不是决策加载。当前 `lc_mcp` 与辅助脚本的决策循环没有读取这些攻略文件。
本次已同步三项资料说明:旧电脑的绝对执行器路径改为仓库相对路径与运行目录;决策失败改为最新的执行模型交接方式;死亡/重试识别标注为已做离线修复、尚待新实机验证。历史实测记录保留原貌。
## 接下来基础开发的顺序
1. **统一策略来源。** 将明确的楼层目标、技能表、核心保护和刷新限制转成机器可读 profile;skill 与说明引用同一配置。事件资料按当前事件检索,避免每次传全文。
2. **补齐真实状态。** 当前楼层、已持有饰品、强化等级、经费、材料等级和技能状态分别保存证据;未知不等于没有取得,付款成功不等于目标核验完成。
3. **按目标生成动作。** 由本层未完成目标和预算筛选可执行动作,代码计算合成材料点数及资源约束;模型处理剩余语义选择。
4. **复用 AALC 场景执行。** 保持一个游戏执行进程,复用地图缓存及可靠的场景操作;完成一次场景目标后核验,再继续推进。
以上四项是后续基础实现范围。本次流程核对与文档同步不会启动游戏,也没有新增实际通关或提速证据。
+54
View File
@@ -0,0 +1,54 @@
# 2026-10-02 镜牢 MCP 修复与真实反馈
此记录来自用户授权的 Windows 后台游戏实测。数据导出时间以 `manifest.json` 为准;本次导出时镜牢仍在第五层推进,未确认最终通关。操作日志保留失败、重复输入和错误选择,不以工具返回 `ok` 代替游戏实际生效。
后续补充:13:59:23 已观察到第五层“探索完成”,截图见 `final_completion.png`。助手点击“领取”后,由用户按回车确认;14:00:08 已观察到主界面。此局已完成并领取奖励,但含人工纠正,不能记为全自动速通。见 `final_result.json`。下一次固定领取流程已加入“点击领取 → 回车确认”的执行动作与回归检查。
## 修复文件
- `lc_mcp/aalc_engine.py`:后台按键保持 0.12 秒后释放;长按拖动与客户区边界检查;按实际截图比例缩放模板,并在异常后恢复原配置与缓存。
- `lc_mcp/engine.py`、`fake_engine.py`、`protocol.py`:拖动接口、参数校验、完整任务期间输入互斥。
- `lc_mcp/server.py`:pythonw 日志流、导入前隔离 stdio 输出、UTF-8、客户端断线处理。
- `lc_mcp/bridge.py`:中文离线错误输出统一 UTF-8。
- `scripts/mcp_probe.py`、`mcp_session.py`、`battle_batch.py`:实际 bridge 握手、复用调用、有界战斗批次。
- `scripts/jev_mirror_agent.py`、`jev_decision_client.mjs`:受限候选动作、Jev 分支决策、固定快捷流程和场景故障修正。
- `tests/`:真实场景与传输回归;最终 41 项全部通过,详见 `test-results.txt`。
## 实际问题与反馈
| 观察 | 原因与处理 | 验证状态 |
| --- | --- | --- |
| 自动拖动曾无法选卡包;用户指出需要长按 | 新增保持左键并缓慢移动的 MCP 接口,时长 0.1–10 秒;卡包使用 1.8 秒 | 地图往返拖动生效;13:33:54 下拉卡包,13:33:57 已进入第五层地图。对应过程在 Jev 日志中 |
| 后台快捷键有时不生效 | 原按下/松开可能落在同一 Unity 帧;改为保持 0.12 秒并确保释放 | 后台按键、异常释放回归通过;实际战斗批次有持续结算记录 |
| 模板在 1278×731 客户区失配 | 旧窗口配置与截图不一致;按 718.875/1440 比例匹配,保留小数 | 设置及胜率模板实际匹配成功,原配置恢复测试通过 |
| 商店刷新时已出现角色技能,却再次刷新或退出 | CONNECTING 时旧库存仍在屏幕上;执行器未阻断输入 | 新增加载期间只等待,以及有出战技能/可刷新时排除离开;场景回归通过。后续完整商店流程尚需持续实测 |
| 辛克莱替换曾选错楼层规则 | 候选入口没有按楼层限制;确认窗口回车也有未生效情况 | 1–2F 限定 1→2,3–5F 限定 1→3;奥提斯 2→3;只在目标选中后提供确认,购买用按钮。测试通过,3F 辛克莱 1→3 购买已核对 |
| 已购买技能又被识别成可买 | OCR 仍识别底部替换标题 | 同卡“已购买”标识排除;场景回归通过 |
| 白色地图节点未提供路线 | 依赖 OCR 楼层标题与红/绿节点;标题漏识别后只有等待候选 | 新增白色高亮节点及图标匹配;取消对楼层标题 OCR 的强依赖,真实截图回归通过 |
| 奖励弹窗遮挡后仍点背景卡 | 奖励处理早于嵌套弹窗,背景确认也被 OCR 识别 | 上层弹窗优先,仅提供较上方确认;测试通过 |
| 层末奖励误点“拒绝饰品”,未手动选择苦难 | 未为四卡饰品/苦难画面提供独立入口,混用额外观测按钮 | 已加入层末候选,禁止默认拒绝;发生的错误选择无法追溯撤销。修正后的完整层末选择尚未实测 |
| 事件反复滚动或回车后停在结果页 | 未给模型关联选项结果;结果页遮蔽“继续”,动态录像时间破坏重复识别 | 已关联结果文字,有直接领取选项时不提供滚动;结果页优先点击可见继续。测试通过,事件结束并进入后续节点已观察到 |
| 离线连接测试表面通过,但 stderr 解码线程报错 | Windows cp936 错误文本被按 UTF-8 读取 | bridge 统一 UTF-8;设置 cp936 的复测已无异常 |
用户另已指定:开局恩惠 1、3、10 不强化;起始荆棘套索/荧光灯;三级电池;保留出战顺序;关卡选路回车、编队回车、战斗 P+回车;事件先 SKIP;快捷键未生效即点按钮;第五层优先“2号线”,刷新次数为零时允许卡包观测。完整配置见 `source_snapshots/mirror_dungeon_speedrun_notes.md` 和 `skill/`。
## 数据与复现
- `logs/*.jsonl`:旧执行器、MCP 执行器、Jev 执行器及烟雾检查的完整现存记录。
- `logs/server.txt`、`logs/runs/`:常驻服务与完整任务的现存日志;不能将未成功的尝试当作已通关。
- `logs/jev_mirror_status.json`、`jev_shop_context.json`:导出时的状态快照。
- `source_snapshots/`:实际机器上修改后的执行器、测试、客户端和笔记快照。路径已占位处理,供追溯对比;可运行的相对路径版本位于仓库 `scripts/`。
- `skill/`:整理后的镜牢速通 skill 和参考文件。
- `game-captures.zip`:所有现存相关游戏截图和裁剪图;`capture_manifest.json` 记录名称、大小、SHA-256。
- `manifest.json`:导出时间、文件来源占位、原文件与导出文件哈希、记录数、排除范围;`metrics.json` 是该快照的汇总。
本次数据已排除 API 密钥、MCP 认证令牌、本机配置、Codex 聊天/会话转储、无关资源提取文件和虚拟环境。MCP 仅保留最近 30 张截图,早期删除帧无法补回;截图清单不意味着覆盖每次操作。战斗日志按批次记录 P+回车次数,没有每一按键的单独时间戳。失败暂停会写入状态文件,未必追加到动作日志,因此动作日志中的失败计数不是全部失败次数。
复现命令(需已安装 AALC 依赖):
```powershell
vendor\aalc\.venv\Scripts\python.exe -X utf8 -m unittest discover -s tests -v
vendor\aalc\.venv\Scripts\python.exe -X utf8 scripts\mcp_probe.py get_state
```
Jev 执行器另需 `OPENCODE_API_KEY`,使用方法见仓库 README。仅在用户授权的游戏会话中运行输入类工具。
@@ -0,0 +1,877 @@
[
{
"path": "legacy_game/agent_1790866575814.jpg",
"bytes": 116538,
"sha256": "daf4fdd981a85e84e50c956128c297cef6b4df3e7ce473b5affb0a35220061ae"
},
{
"path": "legacy_game/agent_1790866582517.jpg",
"bytes": 115494,
"sha256": "ea72b298ac3d8a3ecbca27b5e18ba5c371785c23d8618dfb22cc81aaea0f33ab"
},
{
"path": "legacy_game/agent_1790866676939.jpg",
"bytes": 115645,
"sha256": "c717e56e563be282c2b59b05a71f81c052e4bcdf634f9b6e32eb9de39c1df0ee"
},
{
"path": "legacy_game/agent_1790866687635.jpg",
"bytes": 114328,
"sha256": "f9709ff5061421b244c31e8772b3ddba4c630ac8759661a4e292de8b6d377f59"
},
{
"path": "legacy_game/agent_1790866694016.jpg",
"bytes": 115762,
"sha256": "c58ffaa0d72a31177a1b29b17ade727429362a9e5e74a782ceab992395e851e5"
},
{
"path": "legacy_game/agent_1790866701843.jpg",
"bytes": 114964,
"sha256": "aae7c4ef422e7ad3d9d1e2d31f68c2f4938dd0219b4285a00bae1d5312840304"
},
{
"path": "legacy_game/agent_1790866709868.jpg",
"bytes": 114972,
"sha256": "563e82eb085bfb0b4b67ce845d2269cfaae5b10c6fba876859e93a1b6f686168"
},
{
"path": "legacy_game/agent_1790866715935.jpg",
"bytes": 115550,
"sha256": "a3182cff37ea7385b080e989d141c14c9582215d9263d0f29acdee66c29caf05"
},
{
"path": "legacy_game/agent_1790866725708.jpg",
"bytes": 115060,
"sha256": "02171327064717686bcc63b64cedf6dfeb34d19a2d0d53bc53dd3a62683d9af8"
},
{
"path": "legacy_game/agent_1790866733472.jpg",
"bytes": 114130,
"sha256": "2aed29667f2ebb7d93cb9b686e9a33eac93395accad644c4c1f4fbca274a961c"
},
{
"path": "legacy_game/agent_1790866742706.jpg",
"bytes": 114360,
"sha256": "5f49b6f9ecc5c85012b1d0604cd677a6167acd403d108306e3f81e46082f2506"
},
{
"path": "legacy_game/agent_1790866749454.jpg",
"bytes": 115019,
"sha256": "20b13c1e2044902d03088cd3af79ae1418323ea8f50cdab15e85859b8110ffd0"
},
{
"path": "legacy_game/agent_1790866760544.jpg",
"bytes": 115503,
"sha256": "e2d895edc5076883f95969e76f139a7627adde9f6c754b7f08c1dc7a9b468e4c"
},
{
"path": "legacy_game/agent_1790866766722.jpg",
"bytes": 113177,
"sha256": "af49bb0b7d6fd26194b941c9262e11208f80b769319b13f05e9cdee4e6a0013a"
},
{
"path": "legacy_game/agent_1790866774789.jpg",
"bytes": 115527,
"sha256": "aa8c8197de4c009bc680c7aed0bd6146b9bddc5c5298eef00fcb145ae6027917"
},
{
"path": "legacy_game/agent_1790866780769.jpg",
"bytes": 114751,
"sha256": "6537af692d80af1edf39d2345518a56482b3c3f68478dbea7ed6faad287b8563"
},
{
"path": "legacy_game/agent_1790866787284.jpg",
"bytes": 115759,
"sha256": "3799b6c7a92445fde2f054a6c984ffac362dd6e839967ac6778d7d59c33882d0"
},
{
"path": "legacy_game/agent_1790866792326.jpg",
"bytes": 115069,
"sha256": "4f0c3a11ba9f945a17d858ba2a06a7a33fe6c2d7d1b59b57abd04674430f938f"
},
{
"path": "legacy_game/agent_1790866798069.jpg",
"bytes": 113978,
"sha256": "d8511e2d95cc9cbe5b4181700f8ca34f61cf35088808ee5318607e52dac7bbd8"
},
{
"path": "legacy_game/agent_1790866809967.jpg",
"bytes": 112866,
"sha256": "65c102610ade5ffecc3c47366b4e2c7f576ad0232d20ba60b6f73fa3164fc5cc"
},
{
"path": "legacy_game/agent_1790866814368.jpg",
"bytes": 115258,
"sha256": "bd3ce611f2e58ea16307eb6f9cc4f70c835afe969788fb8184c0d5f2d6f28aa7"
},
{
"path": "legacy_game/agent_1790866819647.jpg",
"bytes": 113772,
"sha256": "505307cbbae0102d9152c37d19f6315e1b03a9b0ee58ed49b93d1485a3494de5"
},
{
"path": "legacy_game/agent_1790866826559.jpg",
"bytes": 114889,
"sha256": "d93414a9b18e62615b3681bc9a205f8332d90327bea6ab039ca8e181e5da395e"
},
{
"path": "legacy_game/agent_1790866832381.jpg",
"bytes": 115240,
"sha256": "98cb0807cbd9c6f25153f5bcc86caa0fcc0a1dc5e8213f28a266afb9912f5852"
},
{
"path": "legacy_game/agent_1790866841756.jpg",
"bytes": 114441,
"sha256": "4f00f9da5ec90944b6e9ad4c82379ce5f29bfd50e477ca9b0586504ce2eda6fc"
},
{
"path": "legacy_game/agent_1790866953508.jpg",
"bytes": 65944,
"sha256": "42172604a6e93a559aa12195eaab370350ef5b341677fc7d5034db23d3a6185e"
},
{
"path": "legacy_game/agent_1790866960302.jpg",
"bytes": 88515,
"sha256": "ec6001fa0e878274bb7a3b41be4d13361fb0144716f744d19814c7fce5f2b5c4"
},
{
"path": "legacy_game/agent_1790866964924.jpg",
"bytes": 89395,
"sha256": "a267430a31d909ca7c3856f3b741cde1783943e13bd798d634478d3680b61e59"
},
{
"path": "legacy_game/agent_1790866971670.jpg",
"bytes": 116170,
"sha256": "ebc669631069844a17d99034cc8cdbf442a6d1c3914ea475aed77553eeed50bb"
},
{
"path": "legacy_game/agent_1790866978046.jpg",
"bytes": 90288,
"sha256": "22d754c6338036c857a86c1e86badcb797ddd4b9b11e3ee2ca33ffa3bf060301"
},
{
"path": "legacy_game/agent_1790866986043.jpg",
"bytes": 62994,
"sha256": "8af144ef7c732841e0c7399e63b21f5bcd136f9fd64aeb330ba7d4c5cb34dcaa"
},
{
"path": "legacy_game/agent_1790866995598.jpg",
"bytes": 115980,
"sha256": "4ddcc9b7808c047301ea6a03aaa2f83fdfd53f74acabdec8e701a851d9f4df62"
},
{
"path": "legacy_game/agent_1790867005970.jpg",
"bytes": 89117,
"sha256": "8b6635d786234043812841c13ae62d0dc6c524c49f6c43e8c0e497590affb4a2"
},
{
"path": "legacy_game/agent_1790867010606.jpg",
"bytes": 115412,
"sha256": "d0d2a1d6b7e75f40d1529aa9708e133ceeea326e535988fefb7bea57bdb3c989"
},
{
"path": "legacy_game/agent_1790867021340.jpg",
"bytes": 64776,
"sha256": "81e7b9fca4e9008d47c7bb62cf3877e0e1599c8329ff066f7beeb4b9ffd085ba"
},
{
"path": "legacy_game/agent_1790867027788.jpg",
"bytes": 65521,
"sha256": "8ec2ce34ac90e7c828aea235488dbc26e69919e74f1ef7b6f7b83c5b7f77eb17"
},
{
"path": "legacy_game/agent_1790867037523.jpg",
"bytes": 83402,
"sha256": "60e39b543e8d4e01004016f3030f989ea5c996e94b8e91ab5b03e3656344456b"
},
{
"path": "legacy_game/agent_1790867045377.jpg",
"bytes": 105011,
"sha256": "e62e371fc7e86f8567626852c8272b39745f1de46c6bb0ef160f68b7c0c837ff"
},
{
"path": "legacy_game/agent_1790867055346.jpg",
"bytes": 64044,
"sha256": "b21d7cfd4f92e8ec9e22f56c48026a840ca290948026634b4fd984aa67e15864"
},
{
"path": "legacy_game/agent_1790867069860.jpg",
"bytes": 114530,
"sha256": "92d7a4b6c355aef6336707c37bb274d7e27ea6e996c80baf349253f9a789d2b7"
},
{
"path": "legacy_game/agent_1790867825795.jpg",
"bytes": 91606,
"sha256": "7c2469f31609972c2056c13fd59bd317ff907a4223a8145502e1f687fb091b52"
},
{
"path": "legacy_game/agent_1790867833147.jpg",
"bytes": 91694,
"sha256": "b5d1aaf313fb3df7d76398fc3d25deeaba498e351d4dfaa3438966a3a277efff"
},
{
"path": "legacy_game/agent_1790867838858.jpg",
"bytes": 82099,
"sha256": "690f32817090fd29a27f04be7f81d86d7502e88032080463657f346a756e21d6"
},
{
"path": "legacy_game/agent_1790867846295.jpg",
"bytes": 81892,
"sha256": "7a7a4a060cabf02065320bf844e18df6e14a3b6acc19ab323b45d7d8832b3277"
},
{
"path": "legacy_game/agent_1790867854931.jpg",
"bytes": 157313,
"sha256": "49292e8c6f17d582874541c54d047bb0f7ffef8eb56e4e271d09e1ed389a1626"
},
{
"path": "legacy_game/agent_1790867865125.jpg",
"bytes": 155241,
"sha256": "4aaf68c0e756f79e028ba88d621b92c05fe80d9087d2a9dd0987df42b294f490"
},
{
"path": "legacy_game/agent_1790867872169.jpg",
"bytes": 103139,
"sha256": "c15000331be33993a8b0dec4fe8984e975d5940d6840a36839ec4f771bd13c4e"
},
{
"path": "legacy_game/agent_1790867880271.jpg",
"bytes": 154523,
"sha256": "97c4b29f25f9edccbdb922bc389c8cb3a4e5e9003c8c081f436efcd2b17e0117"
},
{
"path": "legacy_game/agent_1790867886361.jpg",
"bytes": 98433,
"sha256": "a5c532d83aac4097c026bb97516b2c97ff4749ded1a2b74dee24228b4b476ee9"
},
{
"path": "legacy_game/agent_1790867899698.jpg",
"bytes": 101851,
"sha256": "061fa8020265cc3b2f6c89f20da7aafbf59aaf06f399557990714e4eb6b2352a"
},
{
"path": "legacy_game/agent_1790867906287.jpg",
"bytes": 76106,
"sha256": "09f51bb4f928a50aa51a90e949038e749f5c5747e32a20ccd9f92defd1ab6710"
},
{
"path": "legacy_game/agent_1790867910244.jpg",
"bytes": 157643,
"sha256": "224fe9a3b4cdcbf9217af0299302f68a072bd9811bfbdf5710fd184afa3e810c"
},
{
"path": "legacy_game/agent_1790867917864.jpg",
"bytes": 160597,
"sha256": "9363b4f6f5fae5253bba215a3b9fe8a27dd3ab72fbd11df6673cb7e8297911a8"
},
{
"path": "legacy_game/agent_1790867928627.jpg",
"bytes": 153827,
"sha256": "27489d7c6978fa2457f09038672fe707daac39f32390ff13b31d58d7782d59ac"
},
{
"path": "legacy_game/agent_1790867937128.jpg",
"bytes": 135043,
"sha256": "297c6827818bd5111cc8c0391cfeed4219e23db91f095cfdf4f171109ed80fcd"
},
{
"path": "legacy_game/agent_1790867945645.jpg",
"bytes": 118305,
"sha256": "f3419da7d160e0522f7bf4d2f918eea9c1d6c25a517c18be52b8a32bded006d3"
},
{
"path": "legacy_game/agent_1790867953394.jpg",
"bytes": 102183,
"sha256": "eb3136dab7728e9c9764fe738278b7d8ac3838a20feb162b80ba47365792736b"
},
{
"path": "legacy_game/agent_1790867963569.jpg",
"bytes": 121472,
"sha256": "3d86f4c1fdbdf41ffa1d4f605ccd053db6cbef096651849489e6ae0172d7979b"
},
{
"path": "legacy_game/agent_1790867972869.jpg",
"bytes": 108829,
"sha256": "a95ac87343cf0f38c495c7b759081391e077c601484f8b756dc11ea8fd48fe5b"
},
{
"path": "legacy_game/agent_1790867979756.jpg",
"bytes": 108479,
"sha256": "df35b6f7663754290b075c7c62c9cb06594c8a1f8ebbe9840197a1720e2e528e"
},
{
"path": "legacy_game/agent_1790867999929.jpg",
"bytes": 188703,
"sha256": "2110f048a1e2b282923096c791f64ef7e4b88af6ecb5a70f8d8b877482b3d913"
},
{
"path": "legacy_game/agent_1790868007790.jpg",
"bytes": 201422,
"sha256": "b49f2596bea404168f767c8fa236d37b9e2c2d4d5c49c10b0a9b00f3a17b4400"
},
{
"path": "legacy_game/agent_1790868023910.jpg",
"bytes": 99930,
"sha256": "a16fc249f22964e0b205ce38c27d332bbd18fcc5571d9ca27a9ae43099d1e3e8"
},
{
"path": "legacy_game/agent_1790868034916.jpg",
"bytes": 102582,
"sha256": "a292d1a9abd96cda1550b14a51ece8cdac7c52009e48f2c4e5c50e171f70cad0"
},
{
"path": "legacy_game/agent_1790868042312.jpg",
"bytes": 92454,
"sha256": "94fc2533605d5e25d54581fdb1be7bbadbe6258adcdd111013aba2881756d734"
},
{
"path": "legacy_game/agent_1790868049706.jpg",
"bytes": 180441,
"sha256": "0e5517b51fdd2451822a07f791c0ec906c48355526e9f75fbe1218a84644e3fb"
},
{
"path": "legacy_game/agent_1790868065763.jpg",
"bytes": 165549,
"sha256": "3a88e0ea76e9fe28f1cbf459b0005af856161e6f4ff6a9374b6bc8d9ad0cb495"
},
{
"path": "legacy_game/agent_1790868082132.jpg",
"bytes": 101366,
"sha256": "75a6fd88234f48d64b11875c0e2e755609c94837b28c5cc529e68c72f1b9f1e1"
},
{
"path": "legacy_game/agent_1790868147102.jpg",
"bytes": 94168,
"sha256": "bdc408420754b2ab31f842d41bdaab5c2a6c7d1f61b368bc03f6d009982c218b"
},
{
"path": "legacy_game/agent_1790868151443.jpg",
"bytes": 75840,
"sha256": "160857dfbdda4137363467e0646c69ea7dc10b2c642304851fd06ffbb93fba5c"
},
{
"path": "legacy_game/agent_1790868156496.jpg",
"bytes": 52006,
"sha256": "2e2e3be83ffb21074c8bcb0ff8d45d2461efda2c8191c70cef0f6693c7a96d8f"
},
{
"path": "legacy_game/agent_1790868159008.jpg",
"bytes": 82409,
"sha256": "d8ee00be39a0dcf35464ebe18120f17bbb2a430837a7a19f74b85811dee66e55"
},
{
"path": "legacy_game/agent_1790868163354.jpg",
"bytes": 85736,
"sha256": "9d4d7de07fee223071202e024900d0b816fb6c93e968d3c3610bee9e8d82351b"
},
{
"path": "legacy_game/agent_1790868168017.jpg",
"bytes": 87077,
"sha256": "4c56433f5fe7a11bd0f311a6794c3fb69463f9e3549c9539b13284ac4ea148c4"
},
{
"path": "legacy_game/card3.png",
"bytes": 559631,
"sha256": "a007663342d31189695fd68e3f0ada9495941fb6dd80122e5b06f23074b4d078"
},
{
"path": "legacy_game/d_card5.png",
"bytes": 350415,
"sha256": "c3356662f0c73425acfdc929f3331dc3caa4b691319e0ed2854bde1f9aeda211"
},
{
"path": "legacy_game/deploy.png",
"bytes": 1469401,
"sha256": "9c1dd8cec31d56e24a9eae95ab77ca71c13a30d5d3d9245a790bb986f82b2fbc"
},
{
"path": "legacy_game/enhgrid.png",
"bytes": 518083,
"sha256": "a761ef3722791de51b83aaf4f194419a6cdf1ca09113f5c5fe3a86c99f5a3886"
},
{
"path": "legacy_game/giftdetail.png",
"bytes": 778545,
"sha256": "93fc3d9b6776dd11931a1ac747d6d7474e68163090512d8101454b28376428ab"
},
{
"path": "legacy_game/gifts.png",
"bytes": 192958,
"sha256": "c8cb06df9f23fb3617be639dcb7ef89a2728573d5e62dd2d8f1353f318d55451"
},
{
"path": "legacy_game/mag2.png",
"bytes": 188115,
"sha256": "99ae3cf3247675abfae9036ad6fb4ac475d00f551760888c123baa5c38014dfb"
},
{
"path": "legacy_game/map.png",
"bytes": 682998,
"sha256": "2ac2447cfbc3f3abe6d13e5686ec361658f9e5b8d1a4734c31dbd0d74ff01c02"
},
{
"path": "legacy_game/map2.png",
"bytes": 717564,
"sha256": "031513bcc8c12d2d26d498d69a4f494d7354b81be181c7f2ca88aaa329f4b4ed"
},
{
"path": "legacy_game/n_mid.png",
"bytes": 322132,
"sha256": "d76e87852f29c84ea7ccdb7642583905f95c0df26f1b55f95fde758e845d9d26"
},
{
"path": "legacy_game/n_q.png",
"bytes": 126852,
"sha256": "d88cb58d53eed2078edf0486ec5da5925aa62c32f90f02e6f7b7687a0e9cfc81"
},
{
"path": "legacy_game/n_right.png",
"bytes": 311232,
"sha256": "466c60464e236a3019bab8e09e97a54ed2429ff4dfde8d1205a542da112547d9"
},
{
"path": "legacy_game/n_top.png",
"bytes": 448097,
"sha256": "82429b733d71ef9718ce168a3a78fae066c84bb8716a394fb1ba2e514f4878c2"
},
{
"path": "legacy_game/packs_zoom.png",
"bytes": 1540405,
"sha256": "8030b17b5b5d448308fca85d58eb7e152d8da9e86380e1a0eb0c140b6618ff88"
},
{
"path": "legacy_game/refresh.png",
"bytes": 66286,
"sha256": "f44aa519175fb074cc095bcf98df4b0abdc45c368adddb53b379cbb94f12bdbb"
},
{
"path": "legacy_game/res.png",
"bytes": 310522,
"sha256": "a2cec7bfefc0f0eb28a7e90ec08279b36e88412711b85837e66e871140406121"
},
{
"path": "legacy_game/rew1.png",
"bytes": 151173,
"sha256": "75fe055953b6cec0ddaf722cd15a137eb31dc800d0290738504caec5d4608f9c"
},
{
"path": "legacy_game/rew2.png",
"bytes": 126432,
"sha256": "3b59d81003096293c4a55d57f5dc228b9ebafebebbdadd63e97460cd9d196ffa"
},
{
"path": "legacy_game/rew3.png",
"bytes": 133078,
"sha256": "47acdb8cdc002f6831d8a6ea29e7385c9a9c7211de8db104fcc2e8e867569cb8"
},
{
"path": "legacy_game/rew4.png",
"bytes": 128135,
"sha256": "981ed120390643b5965ffa84b3bfe1df870ec066cadb31c4a59eb413761c215f"
},
{
"path": "legacy_game/rew5.png",
"bytes": 97939,
"sha256": "3c44121098c04414be90259493f078eba780edfdd8470264e966d97a55f2cbe1"
},
{
"path": "legacy_game/rewall.png",
"bytes": 404087,
"sha256": "fcd350d46b97bd0d41f2287e37713ef50631c2437a36b733c0cf9355bb8c5b5a"
},
{
"path": "legacy_game/shot_1790863264709_screenshot-0.jpg",
"bytes": 116464,
"sha256": "7971c198233b559d062a23fb978929e5cb64593c0b018a19b1f25fe8b46cbb72"
},
{
"path": "legacy_game/shot_1790863387764_screenshot-0.jpg",
"bytes": 85143,
"sha256": "e13b5cd6ad342b9085090e9952cb098152aa9f2e60a8f89aa9a8e1c0144871d0"
},
{
"path": "legacy_game/shot_1790863466065_screenshot-0.jpg",
"bytes": 99393,
"sha256": "4f3cb838e0d4b8428a8f222a3e8874de2a7410cf7d02aff183ec6f35dc68dcd7"
},
{
"path": "legacy_game/shot_1790863567620_screenshot-0.jpg",
"bytes": 88247,
"sha256": "a1aa224d940cb68e28fb62c5584ed8b1b2ac3eb21585679e2c07776e51a56ce8"
},
{
"path": "legacy_game/shot_1790863621622_screenshot-0.jpg",
"bytes": 85164,
"sha256": "b97c15ee20e5015d452dc85ffae06c68edb1233527514fbef268a5828a15fcc5"
},
{
"path": "legacy_game/shot_1790863663221_screenshot-0.jpg",
"bytes": 85199,
"sha256": "4b813bc2e5d3771afdb5d5d8fbd5d4e73c30daba865381af1c8f578ac1210198"
},
{
"path": "legacy_game/shot_1790863792727_screenshot-0.jpg",
"bytes": 172083,
"sha256": "6ca26ed7e01e6e69833e464a570bc242d97f72a3e607f31779a2dd7e0f96341a"
},
{
"path": "legacy_game/shot_1790863943456_screenshot-0.jpg",
"bytes": 86828,
"sha256": "55b90cab090fcc06bc18cf83fb3c366c9d9185c632e15c454a84e2f57fc404b8"
},
{
"path": "legacy_game/shot_1790864373452_screenshot-0.jpg",
"bytes": 88599,
"sha256": "6e07b119906dd32c3146db78b1fd46096ef28cc834e76f5de65c838f56f6c943"
},
{
"path": "legacy_game/shot_1790864455464_screenshot-0.jpg",
"bytes": 107616,
"sha256": "c5801c31d43179fed0be110aed6e95076fc6c0ca1bdada1e3bfe1f47f8c6f9dd"
},
{
"path": "legacy_game/shot_1790864516487_screenshot-0.jpg",
"bytes": 94358,
"sha256": "66c751caa014c095921b168f9227310faa9e6ecd28d2cb5510e420b6af8e34b8"
},
{
"path": "legacy_game/shot_1790864655201_screenshot-0.jpg",
"bytes": 97068,
"sha256": "57cf616b64cdb8f5e413403cb5220a5b7fdb7d8bf75d50d1776563fc6fa9534a"
},
{
"path": "legacy_game/shot_1790864758574_screenshot-0.jpg",
"bytes": 108061,
"sha256": "74cb0b47936d5c36c62b895309f0598d680d8539a22858e26672e29c1aaad588"
},
{
"path": "legacy_game/shot_1790864819671_screenshot-0.jpg",
"bytes": 107989,
"sha256": "25a46fd83153c2f9c37f6ab51029c214c41aa59b2c85b3f98d5a4b8a08466519"
},
{
"path": "legacy_game/shot_1790864888480_screenshot-0.jpg",
"bytes": 86819,
"sha256": "fb563507c17c6f8188231770297cc9c8dcb81b14393cf571b421a188f0448ede"
},
{
"path": "legacy_game/shot_1790864946824_screenshot-0.jpg",
"bytes": 54093,
"sha256": "19abe15655dbcf6d2857a7b000ae9c1349a5f980424f1d5a2b039dcd49cb1965"
},
{
"path": "legacy_game/shot_1790865009886_screenshot-0.jpg",
"bytes": 79702,
"sha256": "48404d9c3294a015bb5737effff238b85aaa3d16c8aada4df6f5493d4c900c72"
},
{
"path": "legacy_game/shot_1790865080189_screenshot-0.jpg",
"bytes": 154086,
"sha256": "0bb7c8589115d4a47caf06c7fd1043d35b522d71fce77066dced84828e511b6a"
},
{
"path": "legacy_game/shot_1790865300779_screenshot-0.jpg",
"bytes": 165593,
"sha256": "b979fe93bfd609d7b51fdd5b874b729f53aa7ec0ed6c445a81bd300e8cdb3b76"
},
{
"path": "legacy_game/shot_1790865427717_screenshot-0.jpg",
"bytes": 132099,
"sha256": "ac0a2d84641c3ae1cc463a992933c928cb745ff56f809acd5ebd1848ad70d9f5"
},
{
"path": "legacy_game/shot_1790865502670_screenshot-0.jpg",
"bytes": 101784,
"sha256": "453fefdf5f8e33555a641885fafe1af7168ace58bf7ade97785c605d18a6dac7"
},
{
"path": "legacy_game/shot_1790865649867_screenshot-0.jpg",
"bytes": 81677,
"sha256": "5f621900eb79cf21cdf5b003e25156cce028490580b08992968dcf8422f22281"
},
{
"path": "legacy_game/shot_1790865876518_screenshot-0.jpg",
"bytes": 148591,
"sha256": "1007535baeb9d73cb0b973d012a002d160b1c8ab6d59238d2f34ce311f1bb1fc"
},
{
"path": "legacy_game/shot_1790866018699_screenshot-0.jpg",
"bytes": 57693,
"sha256": "77e54b917f52373bd145dbe70506ff4bace1267d9f4ac5487fbb7b31dc067f25"
},
{
"path": "legacy_game/shot_1790866091901_screenshot-0.jpg",
"bytes": 109514,
"sha256": "9378248451dfd62a8b97b2240716a32cc697edaeb3ddd4990d1d1e1cfc037b89"
},
{
"path": "legacy_game/shot_1790866177262_screenshot-0.jpg",
"bytes": 111629,
"sha256": "77c134a66d69f41848ca259a57963bc4a739dc3780d6452ba410975a564ea604"
},
{
"path": "legacy_game/shot_1790866256183_screenshot-0.jpg",
"bytes": 76263,
"sha256": "8879bcb042b0778adf442665d60f08d7e21f6b0c101b764d83772eb126fdfd91"
},
{
"path": "legacy_game/shot_1790866287016_screenshot-0.jpg",
"bytes": 74394,
"sha256": "a76382b246dbefeb43337ad86cd88fe662dddf72498847fb7a44b420760d7d8e"
},
{
"path": "legacy_game/shot_1790867126597_screenshot-0.jpg",
"bytes": 116443,
"sha256": "ac26f3808f410538c7dd0d088b93b6d2b5f0a6c34c8ade9f259b0f21aafa4b19"
},
{
"path": "legacy_game/shot_1790867210831_screenshot-0.jpg",
"bytes": 115483,
"sha256": "2e60e19162970c00e08bf086ae65ae2d17a6e0d811fc77a5c13509777651a871"
},
{
"path": "legacy_game/shot_1790867448475_screenshot-0.jpg",
"bytes": 115474,
"sha256": "998f4a79c6a61e275e630532d5d1e7598bac6122bcf80a5b18d341cd1dc4df91"
},
{
"path": "legacy_game/shot_1790867514885_screenshot-0.jpg",
"bytes": 90937,
"sha256": "9044c1c7835b3c809fdd80891b3e077e80edb5180980f4ea9110193e3da72b8f"
},
{
"path": "legacy_game/shot_1790868176995_screenshot-0.jpg",
"bytes": 87092,
"sha256": "b48ec048d635ec164fafa675d69aec0e395940f775aaf9217512414c16e0937a"
},
{
"path": "legacy_game/shot_1790868307563_screenshot-0.jpg",
"bytes": 101884,
"sha256": "bdc42ae1ce0d6f892a2d712a63eca87a8ff73078f5a226a24a8759cacc6f7e4e"
},
{
"path": "legacy_game/shot_1790868383062_screenshot-0.jpg",
"bytes": 100910,
"sha256": "2a590106950dba3bd491e58c369b1ff80a48d8e0b2a86e205b9f14ef91084acd"
},
{
"path": "legacy_game/shot_1790868456521_screenshot-0.jpg",
"bytes": 101978,
"sha256": "44e8c8ad013b64fd8093849118b43ec625ea11008a5ac7cfdf6dbb93d703e60c"
},
{
"path": "legacy_game/shot_1790868534785_screenshot-0.jpg",
"bytes": 101945,
"sha256": "253e12f9937e174ece5506d25a61500cceec4f9f036470faa73d87cdcffe4d9a"
},
{
"path": "legacy_game/shot_1790868651902_screenshot-0.jpg",
"bytes": 102462,
"sha256": "c6de7207a2fd6337571d6e9e3d137df802468031fc8a8c173a4448f55d73d0c9"
},
{
"path": "legacy_game/shot_1790868744952_screenshot-0.jpg",
"bytes": 75094,
"sha256": "2508d97bb641b6a7191e997a2d39e3e575bb036b148af8f6fbfc3834f88f957e"
},
{
"path": "legacy_game/shot_1790868835008_screenshot-0.jpg",
"bytes": 53514,
"sha256": "70d49e8313a87bb0d481af9bd8982709dff06c8b810fe29f2cf09534712a0812"
},
{
"path": "legacy_game/shot_1790868919463_screenshot-0.jpg",
"bytes": 94172,
"sha256": "5a8dadaf65240fc31d3ee737c5d6606d37f65a1556e10e4df4b3ae10acd407a5"
},
{
"path": "legacy_game/shot_1790869045746_screenshot-0.jpg",
"bytes": 83347,
"sha256": "e41fec5136369c979c822a253f1a4995d0478a37871c4fbf72f1dd748f3449a0"
},
{
"path": "legacy_game/shot_1790869101025_screenshot-0.jpg",
"bytes": 95228,
"sha256": "382430288d06de5baf83c02e63abee20c129493a8be0b3d5a0f11f0c478af18c"
},
{
"path": "legacy_game/shot_1790869182813_screenshot-0.jpg",
"bytes": 94935,
"sha256": "3df847bc546fe72d070ff76c0452bb66d62ea6b916c7d2b983538b0627e23d6d"
},
{
"path": "legacy_game/shot_1790869268376_screenshot-0.jpg",
"bytes": 100190,
"sha256": "d9922182f9d8423834b50bafee8f8b644201252a0505e71aa2f206c4ff3c24f2"
},
{
"path": "legacy_game/shot_1790911506916_screenshot-0.jpg",
"bytes": 136663,
"sha256": "7aea6a43b9a1ef77e34b1565b91ec5b9b9447a9df0cae5dbc35c5d7ee1e227e7"
},
{
"path": "legacy_game/topbar.png",
"bytes": 171644,
"sha256": "5686b85d423d589d47aae63f523fcf03421a6a515dfcd92778626d185c288cf3"
},
{
"path": "mcp_game/shot_20261002_134947_714.png",
"bytes": 792810,
"sha256": "0fe4f36241fbf453386bcb93cf4d8c6ad6ad3a30721f8e1f44f930b9a4410b4c"
},
{
"path": "mcp_game/shot_20261002_134952_133.png",
"bytes": 1698946,
"sha256": "7639bd853d455f9ea337fb39e93574078bbd60665e251d2686addfce79e74355"
},
{
"path": "mcp_game/shot_20261002_134955_777.png",
"bytes": 1662370,
"sha256": "9851355bd39179382bde382409e8c858fc7eefbbbd35e941af98ff6c23469fd6"
},
{
"path": "mcp_game/shot_20261002_134959_555.png",
"bytes": 1563163,
"sha256": "c1bf86db6eb8f705c6ef6f77aeba2debc10df6ace9caa83c555049cd74c86f90"
},
{
"path": "mcp_game/shot_20261002_135002_965.png",
"bytes": 1855536,
"sha256": "0be14afdc836e58b99b0d57c2e71d2df2a2593b7dacfb0fd9178d9602d2fc5df"
},
{
"path": "mcp_game/shot_20261002_135007_401.png",
"bytes": 2004655,
"sha256": "5a527e08ab3409a91edeb386449c33bbe7e79af9491fa49498a1b05d6d279120"
},
{
"path": "mcp_game/shot_20261002_135010_882.png",
"bytes": 1833326,
"sha256": "ff905d4da738b524924535756a42079741bd84635a1a5a80f5c01025cf9ad7d6"
},
{
"path": "mcp_game/shot_20261002_135014_262.png",
"bytes": 1692661,
"sha256": "2c1da1a170e6b8cd77899d066e44d2598767bcc3a63089a236786c07aaca6f7b"
},
{
"path": "mcp_game/shot_20261002_135018_303.png",
"bytes": 1661523,
"sha256": "f64eb1e8011dcc06e140a39006370dc92f4488184998f3216d5d5ad6f97c83a4"
},
{
"path": "mcp_game/shot_20261002_135022_071.png",
"bytes": 1665429,
"sha256": "9e3ef86486c888caf5a03356fb28ea53fe692cba0e7deecdde04d9a561271a3f"
},
{
"path": "mcp_game/shot_20261002_135026_447.png",
"bytes": 1753108,
"sha256": "90cbaedc837a65f981d5549e356d6c71661a6ef5874b014d5f4f7d7146ad5ec3"
},
{
"path": "mcp_game/shot_20261002_135030_036.png",
"bytes": 1227712,
"sha256": "f769b4569007dc00e67d256be9caa583d4d5ecdf85ca8fafda10a3abffa6a32a"
},
{
"path": "mcp_game/shot_20261002_135033_367.png",
"bytes": 1607717,
"sha256": "e93296f64c2f5354db8fb088c54497b8d49fdb34bddb69501343cf347b6f830a"
},
{
"path": "mcp_game/shot_20261002_135036_805.png",
"bytes": 2063612,
"sha256": "3b84bb46b2d7aaaf3f7be3507e3af37dcb5ed8b0db54421459ea992ab4c8d088"
},
{
"path": "mcp_game/shot_20261002_135038_538.png",
"bytes": 1577664,
"sha256": "63aa6dd9caba12c82561e67dc11b1c2b831894c3da6ae466f8dd65f60041472a"
},
{
"path": "mcp_game/shot_20261002_135042_348.png",
"bytes": 1462723,
"sha256": "1c614c32599bc83f68f0c5507abe2d8217906dcff692f7bace7d1570732cad7f"
},
{
"path": "mcp_game/shot_20261002_135045_901.png",
"bytes": 1384215,
"sha256": "d61a0ac98bfff4f9c0544cb072dd9cc45dadc331aeafc37513db78ea20fd28cf"
},
{
"path": "mcp_game/shot_20261002_135049_573.png",
"bytes": 1444505,
"sha256": "781f45bcae4bdb19eeaf0f8ff208c14700ea432c99ae316fc43e5679344612d7"
},
{
"path": "mcp_game/shot_20261002_135052_796.png",
"bytes": 1816445,
"sha256": "d729a6e9debeec2f88a76cee598cbeb0e4e9a5db8466a46a25fe05209451ae2e"
},
{
"path": "mcp_game/shot_20261002_135056_743.png",
"bytes": 1865482,
"sha256": "98e8c988f8cb7b7c1cc980a2323d4d3f3220ab4480653cc1801768ba74f5abdb"
},
{
"path": "mcp_game/shot_20261002_135101_341.png",
"bytes": 1235950,
"sha256": "6be44582494a5acac6a2e19c40747dfc0232fcf9826e99d21166ba7716d34b68"
},
{
"path": "mcp_game/shot_20261002_135105_171.png",
"bytes": 1561946,
"sha256": "f719c88d93a72d9e252360e5d451875fcd33b54f24d2923910cff345d0e0af43"
},
{
"path": "mcp_game/shot_20261002_135108_854.png",
"bytes": 1743342,
"sha256": "f1ed7d77ee839d39512ba860c04c5a9ccee727ac80da1cb5ec940632bae1f80c"
},
{
"path": "mcp_game/shot_20261002_135112_787.png",
"bytes": 1016511,
"sha256": "30ef0f667b14bf6b93fa7c87996bbc59e954779f1f60fdf6dadddc41a8c249ec"
},
{
"path": "mcp_game/shot_20261002_135116_882.png",
"bytes": 1020893,
"sha256": "03b97bdae1c392e8adee8bf44c3105c7630e31eaed586d94f7250f37ad7ffaa6"
},
{
"path": "mcp_game/shot_20261002_135120_900.png",
"bytes": 1206818,
"sha256": "388ecd62b9f8645ae48d694c1f5ab5581c78307988d17ae59bcc25d05a6f038e"
},
{
"path": "mcp_game/shot_20261002_135125_047.png",
"bytes": 1096896,
"sha256": "68ae8c07a388e599ec35a0081332899456b6f4ccee1f1453b4dc22acee265572"
},
{
"path": "mcp_game/shot_20261002_135127_786.png",
"bytes": 1290835,
"sha256": "628ae3867da3ff0a20300e6aff19efd417898f867ffccb51868d65414343924a"
},
{
"path": "mcp_game/shot_20261002_135132_355.png",
"bytes": 1453295,
"sha256": "e3a33ace3d895652e14467f2d3c4fdbfd123b4ab79c5970c4f2c09fa34e183e7"
},
{
"path": "mcp_game/shot_20261002_135134_484.png",
"bytes": 2172927,
"sha256": "dabbfe4822e23093b26b0c221899fe5616a595391a4df25db7bb0baeefcadd8d"
},
{
"path": "model_game/model_view.jpg",
"bytes": 90070,
"sha256": "26cc1644e600038f83c57713fd475e1775527eb713b36c84d4fc4b26c4151641"
},
{
"path": "fixtures/floor4_white_events.png",
"bytes": 1689223,
"sha256": "55ecd21353493b15c2967a7f6a0de34ce6ce9e3402eac63a42a69f74234ebcc8"
}
]
Binary file not shown.

After

Width:  |  Height:  |  Size: 925 KiB

@@ -0,0 +1,33 @@
{
"state": "completed",
"dungeon": "Mirror Dungeon, floor 5 completed",
"completion_evidence": {
"path": "final_completion.png",
"sha256": "51db3623e8099be82331f6981700d3664310892d292a15d1d7228fd72ac42ea6",
"observed_at_local": "2026-10-02T13:59:23+08:00"
},
"assistant_action": {
"tool": "click",
"x": 1292,
"y": 816,
"target": "领取"
},
"user_assistance": "User pressed Enter to confirm claim and explicitly requested this sequence for future runs.",
"post_claim_observation": {
"observed_at_local": "2026-10-02T14:00:08+08:00",
"home_buttons": [
"玻璃窗",
"罪人",
"驾驶席",
"放映室",
"提取",
"自动贩卖机"
]
},
"fully_automatic_run": false,
"claims_not_supported": [
"12-minute clear",
"all final steps performed without user assistance"
],
"recorded_at_utc": "2026-10-02T06:05:59.003197+00:00"
}
Binary file not shown.
@@ -0,0 +1,70 @@
{"step": 1, "status": "ok", "action": {"action": "click", "x": 170, "y": 430}, "result": {"kind": "click", "x": 170, "y": 430}, "ms": 13111, "model": "{\"action\":\"click\",\"x\":170,\"y\":430}", "shot": "{source_root}\\shots\\agent_1790866676939.jpg", "at": "2026-10-01T14:58:06.708Z"}
{"step": 2, "status": "ok", "action": {"action": "click", "x": 330, "y": 400}, "result": {"kind": "click", "x": 330, "y": 400}, "ms": 5523, "model": "{\"action\":\"click\",\"x\":330,\"y\":400}", "shot": "{source_root}\\shots\\agent_1790866687635.jpg", "at": "2026-10-01T14:58:12.746Z"}
{"step": 3, "status": "ok", "action": {"action": "click", "x": 650, "y": 350}, "result": {"kind": "click", "x": 650, "y": 350}, "ms": 7958, "model": "{\"action\":\"click\",\"x\":650,\"y\":350}", "shot": "{source_root}\\shots\\agent_1790866694016.jpg", "at": "2026-10-01T14:58:21.216Z"}
{"step": 4, "status": "ok", "action": {"action": "click", "x": 650, "y": 400}, "result": {"kind": "click", "x": 650, "y": 400}, "ms": 7520, "model": "{\"action\":\"click\",\"x\":650,\"y\":400}", "shot": "{source_root}\\shots\\agent_1790866701843.jpg", "at": "2026-10-01T14:58:29.252Z"}
{"step": 5, "status": "ok", "action": {"action": "click", "x": 650, "y": 300}, "result": {"kind": "click", "x": 650, "y": 300}, "ms": 4917, "model": "{\"action\":\"click\",\"x\":650,\"y\":300}", "shot": "{source_root}\\shots\\agent_1790866709868.jpg", "at": "2026-10-01T14:58:34.680Z"}
{"step": 6, "status": "ok", "action": {"action": "key", "key": "Return", "repeat": 1}, "result": {"kind": "key", "key": "Return", "repeat": 1}, "ms": 7757, "model": "{\"action\":\"key\",\"key\":\"Return\"}", "shot": "{source_root}\\shots\\agent_1790866715935.jpg", "at": "2026-10-01T14:58:42.953Z"}
{"step": 7, "status": "ok", "action": {"action": "click", "x": 512, "y": 420}, "result": {"kind": "click", "x": 512, "y": 420}, "ms": 9199, "model": "{\"action\":\"click\",\"x\":512,\"y\":420}", "shot": "{source_root}\\shots\\agent_1790866725708.jpg", "at": "2026-10-01T14:58:52.655Z"}
{"step": 8, "status": "model-error", "error": "Unexpected non-whitespace character after JSON at position 39 (line 1 column 40)", "modelInfo": {"content": "", "reasoning": "卡包选择界面。需要选一个卡包然后确认。当前高亮的是中间「尸山血海」。已有标记的中:第2个「定义为恶(已持有)」和第5个「时间杀人时间 复刻(已持有)」。\n\n应避开已持有的,选一个新的。速通角度选战斗少的。但简单起见,选一个未持有的卡包并确认。\n\n「空转的怠惰」?或「尸山血海」已是高亮(可能已选中)。不确定哪个更好。规则6:直接选卡包(避开明显更慢的),然后确认。\n\n我选中间高亮的可能已经是选中状态,直接点确认。但更安全:点击「空转的怠惰」或者保留当前高亮。\n\n其实选择界面通常需要点击卡包来选择,然后点确认按钮。上次点击 330,400 等。当前高亮在「尸山血海」——可能已被点击选中。下一步应点"}, "shot": "{source_root}\\shots\\agent_1790866733472.jpg"}
{"step": 9, "status": "ok", "action": {"action": "key", "key": "Return", "repeat": 1}, "result": {"kind": "key", "key": "Return", "repeat": 1}, "ms": 5822, "model": "{\"action\":\"key\",\"key\":\"Return\",\"repeat\":1}", "shot": "{source_root}\\shots\\agent_1790866742706.jpg", "at": "2026-10-01T14:59:08.413Z"}
{"step": 10, "status": "ok", "action": {"action": "key", "key": "Return", "repeat": 1}, "result": {"kind": "key", "key": "Return", "repeat": 1}, "ms": 11006, "model": "{\"action\":\"key\",\"key\":\"Return\",\"repeat\":1}", "shot": "{source_root}\\shots\\agent_1790866749454.jpg", "at": "2026-10-01T14:59:19.923Z"}
{"step": 11, "status": "ok", "action": {"action": "click", "x": 511, "y": 400}, "result": {"kind": "click", "x": 511, "y": 400}, "ms": 5069, "model": "{\"action\":\"click\",\"x\":511,\"y\":400}", "shot": "{source_root}\\shots\\agent_1790866760544.jpg", "at": "2026-10-01T14:59:25.501Z"}
{"step": 12, "status": "ok", "action": {"action": "click", "x": 512, "y": 350}, "result": {"kind": "click", "x": 512, "y": 350}, "ms": 8156, "model": "{\"action\":\"click\",\"x\":512,\"y\":350}", "shot": "{source_root}\\shots\\agent_1790866766722.jpg", "at": "2026-10-01T14:59:34.172Z"}
{"step": 13, "status": "ok", "action": {"action": "click", "x": 512, "y": 420}, "result": {"kind": "click", "x": 512, "y": 420}, "ms": 5360, "model": "{\"action\":\"click\",\"x\":512,\"y\":420}", "shot": "{source_root}\\shots\\agent_1790866774789.jpg", "at": "2026-10-01T14:59:40.045Z"}
{"step": 14, "status": "ok", "action": {"action": "key", "key": "Return", "repeat": 1}, "result": {"kind": "key", "key": "Return", "repeat": 1}, "ms": 6115, "model": "{\"action\":\"key\",\"key\":\"Return\",\"repeat\":1}", "shot": "{source_root}\\shots\\agent_1790866780769.jpg", "at": "2026-10-01T14:59:46.663Z"}
{"step": 15, "status": "ok", "action": {"action": "key", "key": "Return", "repeat": 1}, "result": {"kind": "key", "key": "Return", "repeat": 1}, "ms": 4543, "model": "{\"action\":\"key\",\"key\":\"Return\",\"repeat\":1}", "shot": "{source_root}\\shots\\agent_1790866787284.jpg", "at": "2026-10-01T14:59:51.720Z"}
{"step": 16, "status": "ok", "action": {"action": "click", "x": 512, "y": 350}, "result": {"kind": "click", "x": 512, "y": 350}, "ms": 4567, "model": "{\"action\":\"click\",\"x\":512,\"y\":350}", "shot": "{source_root}\\shots\\agent_1790866792326.jpg", "at": "2026-10-01T14:59:56.787Z"}
{"step": 17, "status": "ok", "action": {"action": "key", "key": "Return", "repeat": 1}, "result": {"kind": "key", "key": "Return", "repeat": 1}, "ms": 9927, "model": "{\"action\":\"key\",\"key\":\"Return\",\"repeat\":1}", "shot": "{source_root}\\shots\\agent_1790866798069.jpg", "at": "2026-10-01T15:00:07.221Z"}
{"step": 18, "status": "ok", "action": {"action": "click", "x": 512, "y": 380}, "result": {"kind": "click", "x": 512, "y": 380}, "ms": 6023, "model": "{\"action\":\"click\",\"x\":512,\"y\":380}", "shot": "{source_root}\\shots\\agent_1790866809967.jpg", "at": "2026-10-01T15:00:13.749Z"}
{"step": 19, "status": "ok", "action": {"action": "key", "key": "Return", "repeat": 1}, "result": {"kind": "key", "key": "Return", "repeat": 1}, "ms": 4253, "model": "{\"action\":\"key\",\"key\":\"Return\",\"repeat\":1}", "shot": "{source_root}\\shots\\agent_1790866814368.jpg", "at": "2026-10-01T15:00:18.509Z"}
{"step": 20, "status": "ok", "action": {"action": "click", "x": 512, "y": 340}, "result": {"kind": "click", "x": 512, "y": 340}, "ms": 6456, "model": "{\"action\":\"click\",\"x\":512,\"y\":340}", "shot": "{source_root}\\shots\\agent_1790866819647.jpg", "at": "2026-10-01T15:00:25.476Z"}
{"step": 21, "status": "ok", "action": {"action": "click", "x": 512, "y": 300}, "result": {"kind": "click", "x": 512, "y": 300}, "ms": 5184, "model": "{\"action\":\"click\",\"x\":512,\"y\":300}", "shot": "{source_root}\\shots\\agent_1790866826559.jpg", "at": "2026-10-01T15:00:31.172Z"}
{"step": 22, "status": "ok", "action": {"action": "click", "x": 512, "y": 350}, "result": {"kind": "click", "x": 512, "y": 350}, "ms": 9156, "model": "", "shot": "{source_root}\\shots\\agent_1790866832381.jpg", "at": "2026-10-01T15:00:40.843Z"}
{"step": 1, "status": "ok", "action": {"action": "click", "x": 549, "y": 232}, "result": {"kind": "click", "x": 549, "y": 232}, "ms": 7764, "model": "{\"action\":\"click\",\"x\":549,\"y\":232}", "shot": "{source_root}\\shots\\agent_1790866953508.jpg", "at": "2026-10-01T15:02:38.581Z"}
{"step": 2, "status": "ok", "action": {"action": "click", "x": 512, "y": 520}, "result": {"kind": "click", "x": 512, "y": 520}, "ms": 5215, "model": "{\"action\":\"click\",\"x\":512,\"y\":520}", "shot": "{source_root}\\shots\\agent_1790866960302.jpg", "at": "2026-10-01T15:02:44.308Z"}
{"step": 3, "status": "ok", "action": {"action": "click", "x": 512, "y": 478}, "result": {"kind": "click", "x": 512, "y": 478}, "ms": 6199, "model": "{\"action\":\"click\",\"x\":512,\"y\":478}", "shot": "{source_root}\\shots\\agent_1790866964924.jpg", "at": "2026-10-01T15:02:51.012Z"}
{"step": 4, "status": "ok", "action": {"action": "click", "x": 715, "y": 232}, "result": {"kind": "click", "x": 715, "y": 232}, "ms": 5908, "model": "{\"action\":\"click\",\"x\":715,\"y\":232}", "shot": "{source_root}\\shots\\agent_1790866971670.jpg", "at": "2026-10-01T15:02:57.433Z"}
{"step": 5, "status": "ok", "action": {"action": "click", "x": 512, "y": 520}, "result": {"kind": "click", "x": 512, "y": 520}, "ms": 5838, "model": "{\"action\":\"click\",\"x\":512,\"y\":520}", "shot": "{source_root}\\shots\\agent_1790866978046.jpg", "at": "2026-10-01T15:03:03.771Z"}
{"step": 7, "status": "ok", "action": {"action": "click", "x": 880, "y": 600}, "result": {"kind": "click", "x": 880, "y": 600}, "ms": 8506, "model": "", "shot": "{source_root}\\shots\\agent_1790866986043.jpg", "at": "2026-10-01T15:03:14.396Z"}
{"step": 8, "status": "ok", "action": {"action": "click", "x": 549, "y": 232}, "result": {"kind": "click", "x": 549, "y": 232}, "ms": 10014, "model": "{\"action\":\"click\",\"x\":549,\"y\":232}", "shot": "{source_root}\\shots\\agent_1790866995598.jpg", "at": "2026-10-01T15:03:24.912Z"}
{"step": 9, "status": "ok", "action": {"action": "click", "x": 512, "y": 520}, "result": {"kind": "click", "x": 512, "y": 520}, "ms": 4545, "model": "{\"action\":\"click\",\"x\":512,\"y\":520}", "shot": "{source_root}\\shots\\agent_1790867005970.jpg", "at": "2026-10-01T15:03:29.958Z"}
{"step": 10, "status": "ok", "action": {"action": "click", "x": 715, "y": 232}, "result": {"kind": "click", "x": 715, "y": 232}, "ms": 7976, "model": "{\"action\":\"click\",\"x\":715,\"y\":232}", "shot": "{source_root}\\shots\\agent_1790867010606.jpg", "at": "2026-10-01T15:03:38.448Z"}
{"step": 11, "status": "exec-error", "action": {"action": "click", "x": 385, "y": 232}, "error": "no screenshot targets found for process:E:\\steam\\steamapps\\common\\Limbus Company\\LimbusCompany.exe", "shot": "{source_root}\\shots\\agent_1790867021340.jpg"}
{"step": 12, "status": "ok", "action": {"action": "click", "x": 385, "y": 232}, "result": {"kind": "click", "x": 385, "y": 232}, "ms": 6222, "model": "{\"action\":\"click\",\"x\":385,\"y\":232}", "shot": "{source_root}\\shots\\agent_1790867027788.jpg", "at": "2026-10-01T15:03:53.883Z"}
{"step": 13, "status": "ok", "action": {"action": "click", "x": 512, "y": 520}, "result": {"kind": "click", "x": 512, "y": 520}, "ms": 10344, "model": "{\"action\":\"click\",\"x\":512,\"y\":520}", "shot": "{source_root}\\shots\\agent_1790867037523.jpg", "at": "2026-10-01T15:04:04.738Z"}
{"step": 14, "status": "model-error", "error": "no valid action JSON in reply", "modelInfo": {"content": "", "reasoning": "The card pack selection screen for layer 4. I need to click the magnifier 🔍 at the top-right of a card pack. The magnifiers are visible at y≈232. Positions from left: x≈219, 385, 549, 715, 881.\n\nPrevious operations clicked x=880,y=600, x=549,y=232, x=512,y=520, x=715,y=232, x=385,y=232, x=512,y=520"}, "shot": "{source_root}\\shots\\agent_1790867045377.jpg"}
{"step": 15, "status": "ok", "action": {"action": "click", "x": 219, "y": 200}, "result": {"kind": "click", "x": 219, "y": 200}, "ms": 13286, "model": "{\"action\":\"click\",\"x\":219,\"y\":200}", "shot": "{source_root}\\shots\\agent_1790867055346.jpg", "at": "2026-10-01T15:04:28.498Z"}
{"step": 16, "status": "ok", "action": {"action": "click", "x": 219, "y": 232}, "result": {"kind": "click", "x": 219, "y": 232}, "ms": 6396, "model": "{\"action\":\"click\",\"x\":219,\"y\":232}", "shot": "{source_root}\\shots\\agent_1790867069860.jpg", "at": "2026-10-01T15:04:35.403Z"}
{"step": 1, "status": "ok", "action": {"action": "click", "x": 585, "y": 262}, "result": {"kind": "click", "x": 585, "y": 262}, "ms": 9074, "model": "{\"action\":\"click\",\"x\":585,\"y\":262}", "shot": "{source_root}\\shots\\agent_1790867825795.jpg", "at": "2026-10-01T15:17:11.988Z"}
{"step": 2, "status": "ok", "action": {"action": "click", "x": 585, "y": 262}, "result": {"kind": "click", "x": 585, "y": 262}, "ms": 5758, "model": "{\"action\":\"click\",\"x\":585,\"y\":262}", "shot": "{source_root}\\shots\\agent_1790867833147.jpg", "at": "2026-10-01T15:17:18.248Z"}
{"step": 3, "status": "ok", "action": {"action": "click", "x": 896, "y": 483}, "result": {"kind": "click", "x": 896, "y": 483}, "ms": 4326, "model": "{\"action\":\"click\",\"x\":896,\"y\":483}", "shot": "{source_root}\\shots\\agent_1790867838858.jpg", "at": "2026-10-01T15:17:23.077Z"}
{"step": 4, "status": "ok", "action": {"action": "key", "key": "Return", "repeat": 1}, "result": {"kind": "key", "key": "Return", "repeat": 1}, "ms": 9425, "model": "{\"action\":\"key\",\"key\":\"Return\",\"repeat\":1}", "shot": "{source_root}\\shots\\agent_1790867846295.jpg", "at": "2026-10-01T15:17:33.015Z"}
{"step": 5, "status": "ok", "action": {"action": "click", "x": 336, "y": 268}, "result": {"kind": "click", "x": 336, "y": 268}, "ms": 10973, "model": "{\"action\":\"click\",\"x\":336,\"y\":268}", "shot": "{source_root}\\shots\\agent_1790867854931.jpg", "at": "2026-10-01T15:17:44.491Z"}
{"step": 6, "status": "ok", "action": {"action": "click", "x": 896, "y": 523}, "result": {"kind": "click", "x": 896, "y": 523}, "ms": 6550, "model": "{\"action\":\"click\",\"x\":896,\"y\":523}", "shot": "{source_root}\\shots\\agent_1790867865125.jpg", "at": "2026-10-01T15:17:51.549Z"}
{"step": 7, "status": "ok", "action": {"action": "click", "x": 896, "y": 523}, "result": {"kind": "click", "x": 896, "y": 523}, "ms": 7587, "model": "{\"action\":\"click\",\"x\":896,\"y\":523}", "shot": "{source_root}\\shots\\agent_1790867872169.jpg", "at": "2026-10-01T15:17:59.638Z"}
{"step": 8, "status": "ok", "action": {"action": "click", "x": 893, "y": 523}, "result": {"kind": "click", "x": 893, "y": 523}, "ms": 5570, "model": "{\"action\":\"click\",\"x\":893,\"y\":523}", "shot": "{source_root}\\shots\\agent_1790867880271.jpg", "at": "2026-10-01T15:18:05.716Z"}
{"step": 9, "status": "model-error", "error": "no valid action JSON in reply", "modelInfo": {"content": "", "reasoning": "This is a team selection screen. 3 selected, need 12? Wait \"参战人数 3/12\" - need to select more. But actually the team is 破裂纯P. The screen shows selected members marked with numbers. We need to fill to 12 presumably, or maybe it's already the prep screen and we should click \"开始战斗\" (start battle).\n\nActu"}, "shot": "{source_root}\\shots\\agent_1790867886361.jpg"}
{"step": 10, "status": "ok", "action": {"action": "wait", "ms": 3000}, "result": {"kind": "wait", "ms": 3000}, "ms": 9438, "model": "{\"action\":\"wait\",\"ms\":3000}", "shot": "{source_root}\\shots\\agent_1790867899698.jpg", "at": "2026-10-01T15:18:25.648Z"}
{"step": 11, "status": "ok", "action": {"action": "click", "x": 896, "y": 480}, "result": {"kind": "click", "x": 896, "y": 480}, "ms": 3444, "model": "{\"action\":\"click\",\"x\":896,\"y\":480}", "shot": "{source_root}\\shots\\agent_1790867906287.jpg", "at": "2026-10-01T15:18:29.602Z"}
{"step": 12, "status": "ok", "action": {"action": "click", "x": 899, "y": 490}, "result": {"kind": "click", "x": 899, "y": 490}, "ms": 6863, "model": "{\"action\":\"click\",\"x\":899,\"y\":490}", "shot": "{source_root}\\shots\\agent_1790867910244.jpg", "at": "2026-10-01T15:18:36.967Z"}
{"step": 13, "status": "model-error", "error": "no valid action JSON in reply", "modelInfo": {"content": "", "reasoning": "This is the team selection / deployment screen. There are 12 slots and 4 selected. I need to select more sinners to fill the team. The recently selected ones are highlighted. Currently 4 selected - shows \"参战人数 4/12\". I should select more sinners by clicking on them.\n\nWait, but actually this might be"}, "shot": "{source_root}\\shots\\agent_1790867917864.jpg"}
{"step": 14, "status": "ok", "action": {"action": "click", "x": 895, "y": 523}, "result": {"kind": "click", "x": 895, "y": 523}, "ms": 7666, "model": "{\"action\":\"click\",\"x\":895,\"y\":523}", "shot": "{source_root}\\shots\\agent_1790867928627.jpg", "at": "2026-10-01T15:18:54.118Z"}
{"step": 15, "status": "exec-error", "action": {"action": "keys", "keys": ["p", "Return"], "rounds": 6, "delayMs": 800}, "error": "user input was detected in this window; call get_window_state before continuing", "shot": "{source_root}\\shots\\agent_1790867937128.jpg"}
{"step": 16, "status": "exec-error", "action": {"action": "keys", "keys": ["p", "Return"], "rounds": 6, "delayMs": 800}, "error": "user input was detected in this window; call get_window_state before continuing", "shot": "{source_root}\\shots\\agent_1790867945645.jpg"}
{"step": 17, "status": "exec-error", "action": {"action": "keys", "keys": ["p", "Return"], "rounds": 6, "delayMs": 800}, "error": "user input was detected in this window; call get_window_state before continuing", "shot": "{source_root}\\shots\\agent_1790867953394.jpg"}
{"step": 18, "status": "exec-error", "action": {"action": "keys", "keys": ["p", "Return"], "rounds": 6, "delayMs": 800}, "error": "user input was detected in this window; call get_window_state before continuing", "shot": "{source_root}\\shots\\agent_1790867963569.jpg"}
{"step": 19, "status": "exec-error", "action": {"action": "keys", "keys": ["p", "Return"], "rounds": 6, "delayMs": 800}, "error": "user input was detected in this window; call get_window_state before continuing", "shot": "{source_root}\\shots\\agent_1790867972869.jpg"}
{"step": 20, "status": "exec-error", "action": {"action": "keys", "keys": ["p", "Return"], "rounds": 6, "delayMs": 800}, "error": "Computer Use was stopped by the user with the physical Escape key. Stop your work, do not call further Computer Use tools in this turn, and send a final message noting that the user stopped Computer Use.", "shot": "{source_root}\\shots\\agent_1790867979756.jpg"}
{"step": 21, "status": "exec-error", "action": {"action": "keys", "keys": ["p", "Return"], "rounds": 6, "delayMs": 800}, "error": "user input was detected in this window; call get_window_state before continuing", "shot": "{source_root}\\shots\\agent_1790867999929.jpg"}
{"step": 22, "status": "ok", "action": {"action": "keys", "keys": ["p", "Return"], "rounds": 6, "delayMs": 800}, "result": {"kind": "keys", "keys": ["p", "Return"], "rounds": 6}, "ms": 14303, "model": "{\"action\":\"keys\",\"keys\":[\"p\",\"Return\"],\"rounds\":6,\"delayMs\":800}", "shot": "{source_root}\\shots\\agent_1790868007790.jpg", "at": "2026-10-01T15:20:21.959Z"}
{"step": 23, "status": "exec-error", "action": {"action": "keys", "keys": ["p", "Return"], "rounds": 6, "delayMs": 800}, "error": "user input was detected in this window; call get_window_state before continuing", "shot": "{source_root}\\shots\\agent_1790868023910.jpg"}
{"step": 24, "status": "exec-error", "action": {"action": "keys", "keys": ["p", "Return"], "rounds": 6, "delayMs": 800}, "error": "user input was detected in this window; call get_window_state before continuing", "shot": "{source_root}\\shots\\agent_1790868034916.jpg"}
{"step": 25, "status": "exec-error", "action": {"action": "keys", "keys": ["p", "Return"], "rounds": 6, "delayMs": 800}, "error": "user input was detected in this window; call get_window_state before continuing", "shot": "{source_root}\\shots\\agent_1790868042312.jpg"}
{"step": 26, "status": "ok", "action": {"action": "keys", "keys": ["p", "Return"], "rounds": 6, "delayMs": 800}, "result": {"kind": "keys", "keys": ["p", "Return"], "rounds": 6}, "ms": 15557, "model": "{\"action\":\"keys\",\"keys\":[\"p\",\"Return\"],\"rounds\":6,\"delayMs\":800}", "shot": "{source_root}\\shots\\agent_1790868049706.jpg", "at": "2026-10-01T15:21:05.126Z"}
{"step": 27, "status": "ok", "action": {"action": "keys", "keys": ["p", "Return"], "rounds": 6, "delayMs": 800}, "result": {"kind": "keys", "keys": ["p", "Return"], "rounds": 6}, "ms": 15535, "model": "{\"action\":\"keys\",\"keys\":[\"p\",\"Return\"],\"rounds\":6,\"delayMs\":800}", "shot": "{source_root}\\shots\\agent_1790868065763.jpg", "at": "2026-10-01T15:21:21.168Z"}
{"step": 28, "status": "ok", "action": {"action": "wait", "ms": 1500}, "result": {"kind": "wait", "ms": 1500}, "ms": 5185, "model": "{\"action\":\"wait\",\"ms\":1500}", "shot": "{source_root}\\shots\\agent_1790868082132.jpg", "at": "2026-10-01T15:21:26.862Z"}
{"step": 66, "status": "ok", "action": {"action": "click", "x": 585, "y": 273}, "result": {"kind": "click", "x": 585, "y": 273}, "ms": 3843, "model": "{\"action\":\"click\",\"x\":585,\"y\":273}", "shot": "{source_root}\\shots\\agent_1790868147102.jpg", "at": "2026-10-01T15:22:30.825Z"}
{"step": 67, "status": "ok", "action": {"action": "click", "x": 910, "y": 486}, "result": {"kind": "click", "x": 910, "y": 486}, "ms": 4541, "model": "{\"action\":\"click\",\"x\":910,\"y\":486}", "shot": "{source_root}\\shots\\agent_1790868151443.jpg", "at": "2026-10-01T15:22:35.880Z"}
{"step": 68, "status": "ok", "action": {"action": "click", "x": 896, "y": 588}, "result": {"kind": "click", "x": 896, "y": 588}, "ms": 1977, "model": "{\"action\":\"click\",\"x\":896,\"y\":588}", "shot": "{source_root}\\shots\\agent_1790868156496.jpg", "at": "2026-10-01T15:22:38.369Z"}
{"step": 69, "status": "ok", "action": {"action": "click", "x": 727, "y": 322}, "result": {"kind": "click", "x": 727, "y": 322}, "ms": 3850, "model": "{\"action\":\"click\",\"x\":727,\"y\":322}", "shot": "{source_root}\\shots\\agent_1790868159008.jpg", "at": "2026-10-01T15:22:42.734Z"}
{"step": 70, "status": "ok", "action": {"action": "click", "x": 888, "y": 590}, "result": {"kind": "click", "x": 888, "y": 590}, "ms": 3634, "model": "{\"action\":\"click\",\"x\":888,\"y\":590}", "shot": "{source_root}\\shots\\agent_1790868163354.jpg", "at": "2026-10-01T15:22:46.883Z"}
@@ -0,0 +1,2 @@
{"step": 1, "status": "ok", "action": {"action": "click", "x": 680, "y": 390}, "result": {"kind": "click", "x": 680, "y": 390}, "ms": 8560, "model": "{\"action\":\"click\",\"x\":680,\"y\":390}", "shot": "{source_root}\\shots\\agent_1790866575814.jpg", "at": "2026-10-01T14:56:21.676Z"}
{"step": 2, "status": "ok", "action": {"action": "key", "key": "Return", "repeat": 1}, "result": {"kind": "key", "key": "Return", "repeat": 1}, "ms": 9087, "model": "", "shot": "{source_root}\\shots\\agent_1790866582517.jpg", "at": "2026-10-01T14:56:31.272Z"}
@@ -0,0 +1,273 @@
{"step": 0, "choice": "button_17", "action": {"tool": "click_text", "args": {"text": "确认"}}, "jev_ms": 1281, "screen": {"path": "{runtime_root}/shots/shot_20261002_120921_521.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:09:25", "result": {"ok": true, "clicked": {"text": "确认", "x": 982, "y": 847}, "other_hits": 0}, "state": "running"}
{"step": 1, "choice": "route_w", "action": {"tool": "keypress", "args": {"key": "w"}}, "jev_ms": 1125, "screen": {"path": "{runtime_root}/shots/shot_20261002_120927_552.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:09:30", "result": {"ok": true, "key": "w"}, "state": "running"}
{"step": 2, "choice": "button_7", "action": {"tool": "click_text", "args": {"text": "进入"}}, "jev_ms": 2125, "screen": {"path": "{runtime_root}/shots/shot_20261002_120930_651.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:09:34", "result": {"ok": true, "clicked": {"text": "进入", "x": 1731, "y": 814}, "other_hits": 0}, "state": "running"}
{"step": 0, "choice": "wait", "action": {"tool": "wait", "args": {"seconds": 0.7}}, "jev_ms": 1500, "screen": {"path": "{runtime_root}/shots/shot_20261002_121056_708.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:10:59", "result": {"ok": true, "waited": 0.7}, "state": "running"}
{"step": 1, "choice": "wait", "action": {"tool": "wait", "args": {"seconds": 0.7}}, "jev_ms": 1250, "screen": {"path": "{runtime_root}/shots/shot_20261002_121100_674.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:11:03", "result": {"ok": true, "waited": 0.7}, "state": "running"}
{"step": 2, "choice": "wait", "action": {"tool": "wait", "args": {"seconds": 0.7}}, "jev_ms": 1312, "screen": {"path": "{runtime_root}/shots/shot_20261002_121104_396.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:11:07", "result": {"ok": true, "waited": 0.7}, "state": "running"}
{"step": 0, "choice": "wait", "action": {"tool": "wait", "args": {"seconds": 0.7}}, "jev_ms": 1719, "screen": {"path": "{runtime_root}/shots/shot_20261002_121322_345.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:13:25", "result": {"ok": true, "waited": 0.7}, "state": "running"}
{"step": 1, "choice": "wait", "action": {"tool": "wait", "args": {"seconds": 0.7}}, "jev_ms": 1625, "screen": {"path": "{runtime_root}/shots/shot_20261002_121326_759.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:13:29", "result": {"ok": true, "waited": 0.7}, "state": "running"}
{"step": 2, "choice": "wait", "action": {"tool": "wait", "args": {"seconds": 0.7}}, "jev_ms": 2016, "screen": {"path": "{runtime_root}/shots/shot_20261002_121330_912.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:13:34", "result": {"ok": true, "waited": 0.7}, "state": "running"}
{"step": 3, "choice": "wait", "action": {"tool": "wait", "args": {"seconds": 0.7}}, "jev_ms": 1047, "screen": {"path": "{runtime_root}/shots/shot_20261002_121335_429.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:13:37", "result": {"ok": true, "waited": 0.7}, "state": "running"}
{"step": 4, "choice": "wait", "action": {"tool": "wait", "args": {"seconds": 0.7}}, "jev_ms": 1219, "screen": {"path": "{runtime_root}/shots/shot_20261002_121338_925.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:13:41", "result": {"ok": true, "waited": 0.7}, "state": "running"}
{"step": 5, "choice": "wait", "action": {"tool": "wait", "args": {"seconds": 0.7}}, "jev_ms": 1140, "screen": {"path": "{runtime_root}/shots/shot_20261002_121342_645.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:13:45", "result": {"ok": true, "waited": 0.7}, "state": "running"}
{"step": 6, "choice": "wait", "action": {"tool": "wait", "args": {"seconds": 0.7}}, "jev_ms": 1172, "screen": {"path": "{runtime_root}/shots/shot_20261002_121346_250.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:13:48", "result": {"ok": true, "waited": 0.7}, "state": "running"}
{"step": 7, "choice": "wait", "action": {"tool": "wait", "args": {"seconds": 0.7}}, "jev_ms": 1250, "screen": {"path": "{runtime_root}/shots/shot_20261002_121349_798.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:13:52", "result": {"ok": true, "waited": 0.7}, "state": "running"}
{"step": 8, "choice": "wait", "action": {"tool": "wait", "args": {"seconds": 0.7}}, "jev_ms": 1062, "screen": {"path": "{runtime_root}/shots/shot_20261002_121353_332.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:13:55", "result": {"ok": true, "waited": 0.7}, "state": "running"}
{"step": 9, "choice": "wait", "action": {"tool": "wait", "args": {"seconds": 0.7}}, "jev_ms": 1141, "screen": {"path": "{runtime_root}/shots/shot_20261002_121356_831.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:13:59", "result": {"ok": true, "waited": 0.7}, "state": "running"}
{"step": 10, "choice": "wait", "action": {"tool": "wait", "args": {"seconds": 0.7}}, "jev_ms": 1235, "screen": {"path": "{runtime_root}/shots/shot_20261002_121400_253.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:14:02", "result": {"ok": true, "waited": 0.7}, "state": "running"}
{"step": 11, "choice": "wait", "action": {"tool": "wait", "args": {"seconds": 0.7}}, "jev_ms": 2578, "screen": {"path": "{runtime_root}/shots/shot_20261002_121403_902.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:14:07", "result": {"ok": true, "waited": 0.7}, "state": "running"}
{"step": 0, "choice": "wait", "action": {"tool": "wait", "args": {"seconds": 0.7}}, "jev_ms": 1188, "screen": {"path": "{runtime_root}/shots/shot_20261002_121554_311.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:15:56", "result": {"ok": true, "waited": 0.7}, "state": "running"}
{"step": 1, "choice": "wait", "action": {"tool": "wait", "args": {"seconds": 0.7}}, "jev_ms": 1156, "screen": {"path": "{runtime_root}/shots/shot_20261002_121558_684.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:16:01", "result": {"ok": true, "waited": 0.7}, "state": "running"}
{"step": 2, "choice": "button_30", "action": {"tool": "click_text", "args": {"text": "离开"}}, "jev_ms": 2531, "screen": {"path": "{runtime_root}/shots/shot_20261002_121602_381.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:16:07", "result": {"ok": true, "clicked": {"text": "离开", "x": 1700, "y": 971}, "other_hits": 0}, "state": "running"}
{"step": 3, "choice": "button_20", "action": {"tool": "click_text", "args": {"text": "离开"}}, "jev_ms": 1344, "screen": {"path": "{runtime_root}/shots/shot_20261002_121609_209.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:16:12", "result": {"ok": true, "clicked": {"text": "离开", "x": 1700, "y": 971}, "other_hits": 1}, "state": "running"}
{"step": 0, "choice": "wait", "action": {"tool": "wait", "args": {"seconds": 0.7}}, "jev_ms": 1156, "screen": {"path": "{runtime_root}/shots/shot_20261002_122038_076.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:20:41", "result": {"ok": true, "waited": 0.7}, "state": "running"}
{"step": 1, "choice": "button_29", "action": {"tool": "click_text", "args": {"text": "离开"}}, "jev_ms": 1109, "screen": {"path": "{runtime_root}/shots/shot_20261002_122042_158.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:20:44", "result": {"ok": true, "clicked": {"text": "离开", "x": 1700, "y": 971}, "other_hits": 0}, "state": "running"}
{"step": 0, "choice": "wait", "action": {"tool": "wait", "args": {"seconds": 0.7}}, "jev_ms": 1313, "screen": {"path": "{runtime_root}/shots/shot_20261002_122105_498.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:21:10", "result": {"ok": true, "waited": 0.7}, "state": "running"}
{"step": 1, "choice": "confirm_18", "action": {"tool": "click", "args": {"x": 1171, "y": 741}}, "jev_ms": 1547, "screen": {"path": "{runtime_root}/shots/shot_20261002_122111_626.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:21:14", "result": {"ok": true, "clicked": [1171, 741]}, "state": "running"}
{"step": 2, "choice": "button_30", "action": {"tool": "click_text", "args": {"text": "离开"}}, "jev_ms": 8422, "screen": {"path": "{runtime_root}/shots/shot_20261002_122115_245.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:21:25", "result": {"ok": false, "error": "text not found: 离开", "screen": {"path": "{runtime_root}/shots/shot_20261002_122125_621.png", "w": 1920, "h": 1080}, "items": [{"text": "17菱11425271411", "x": 686, "y": 38, "w": 587, "h": 43, "score": 0.785}, {"text": "2699", "x": 1448, "y": 40, "w": 143, "h": 61, "score": 0.993}, {"text": "1076", "x": 1648, "y": 47, "w": 78, "h": 45, "score": 0.992}, {"text": "正在探索第2层", "x": 64, "y": 136, "w": 291, "h": 44, "score": 0.994}, {"text": "地狱鸡", "x": 58, "y": 185, "w": 74, "h": 34, "score": 0.995}, {"text": "茗姆", "x": 295, "y": 474, "w": 128, "h": 56, "score": 0.971}, {"text": "237", "x": 396, "y": 1026, "w": 40, "h": 22, "score": 0.997}, {"text": "271", "x": 512, "y": 1026, "w": 41, "h": 22, "score": 0.997}, {"text": "124", "x": 746, "y": 1028, "w": 36, "h": 18, "score": 0.831}, {"text": "12", "x": 982, "y": 1030, "w": 24, "h": 13, "score": 0.742}, {"text": "203", "x": 1322, "y": 1026, "w": 38, "h": 22, "score": 0.997}, {"text": "209", "x": 1437, "y": 1026, "w": 41, "h": 22, "score": 0.998}, {"text": "CUSTOm LANGUAGE", "x": 1784, "y": 1057, "w": 132, "h": 19, "score": 0.93}]}, "state": "running"}
{"step": 0, "choice": "route_d", "action": {"tool": "keypress", "args": {"key": "d"}}, "jev_ms": 1610, "screen": {"path": "{runtime_root}/shots/shot_20261002_122241_232.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:22:44", "result": {"ok": true, "key": "d"}, "state": "running"}
{"step": 1, "choice": "wait", "action": {"tool": "wait", "args": {"seconds": 0.7}}, "jev_ms": 1250, "screen": {"path": "{runtime_root}/shots/shot_20261002_122245_515.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:22:48", "result": {"ok": true, "waited": 0.7}, "state": "running"}
{"step": 2, "choice": "button_8", "action": {"tool": "click_text", "args": {"text": "进入"}}, "jev_ms": 2296, "screen": {"path": "{runtime_root}/shots/shot_20261002_122249_425.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:22:53", "result": {"ok": true, "clicked": {"text": "进入", "x": 1731, "y": 814}, "other_hits": 0}, "state": "running"}
{"step": 3, "choice": "wait", "action": {"tool": "wait", "args": {"seconds": 0.7}}, "jev_ms": 1203, "screen": {"path": "{runtime_root}/shots/shot_20261002_122255_601.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:22:58", "result": {"ok": true, "waited": 0.7}, "state": "running"}
{"step": 4, "choice": "button_66", "action": {"tool": "click_text", "args": {"text": "开始战斗"}}, "jev_ms": 1078, "screen": {"path": "{runtime_root}/shots/shot_20261002_122259_505.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:23:03", "result": {"ok": true, "clicked": {"text": "开始战斗", "x": 1717, "y": 881}, "other_hits": 0}, "state": "running"}
{"step": 5, "choice": "button_66", "action": {"tool": "click_text", "args": {"text": "开始战斗"}}, "jev_ms": 1140, "screen": {"path": "{runtime_root}/shots/shot_20261002_122306_404.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:23:10", "result": {"ok": false, "error": "text not found: 开始战斗", "screen": {"path": "{runtime_root}/shots/shot_20261002_122312_332.png", "w": 1920, "h": 1080}, "items": [{"text": "战斗小贴士", "x": 1648, "y": 432, "w": 190, "h": 48, "score": 0.995}, {"text": "多次击败同一个异想体可以提升对其的观察等级,之后再次与", "x": 1155, "y": 497, "w": 684, "h": 36, "score": 0.996}, {"text": "学", "x": 67, "y": 529, "w": 219, "h": 114, "score": 0.514}, {"text": "之战斗时造成的伤害也会随之提高。", "x": 1432, "y": 538, "w": 389, "h": 32, "score": 0.993}, {"text": "NOW LOADING...", "x": 1635, "y": 946, "w": 199, "h": 39, "score": 0.915}]}, "state": "running"}
{"step": 6, "choice": "wait", "action": {"tool": "wait", "args": {"seconds": 0.7}}, "jev_ms": 1141, "screen": {"path": "{runtime_root}/shots/shot_20261002_122314_337.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:23:16", "result": {"ok": true, "waited": 0.7}, "state": "running"}
{"step": 7, "choice": "battle", "action": {"tool": "battle", "args": {"rounds": 2}}, "jev_ms": 1781, "screen": {"path": "{runtime_root}/shots/shot_20261002_122317_204.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:23:20", "result": {"ok": true, "pairs": 2}, "state": "running"}
{"step": 8, "choice": "battle", "action": {"tool": "battle", "args": {"rounds": 2}}, "jev_ms": 1063, "screen": {"path": "{runtime_root}/shots/shot_20261002_122325_039.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:23:27", "result": {"ok": true, "pairs": 2}, "state": "running"}
{"step": 9, "choice": "battle", "action": {"tool": "battle", "args": {"rounds": 2}}, "jev_ms": 1359, "screen": {"path": "{runtime_root}/shots/shot_20261002_122331_127.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:23:34", "result": {"ok": true, "pairs": 2}, "state": "running"}
{"step": 10, "choice": "battle", "action": {"tool": "battle", "args": {"rounds": 2}}, "jev_ms": 1609, "screen": {"path": "{runtime_root}/shots/shot_20261002_122338_157.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:23:41", "result": {"ok": true, "pairs": 2}, "state": "running"}
{"step": 11, "choice": "battle", "action": {"tool": "battle", "args": {"rounds": 2}}, "jev_ms": 1203, "screen": {"path": "{runtime_root}/shots/shot_20261002_122345_096.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:23:47", "result": {"ok": true, "pairs": 2}, "state": "running"}
{"step": 12, "choice": "battle", "action": {"tool": "battle", "args": {"rounds": 2}}, "jev_ms": 1047, "screen": {"path": "{runtime_root}/shots/shot_20261002_122351_636.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:23:54", "result": {"ok": true, "pairs": 2}, "state": "running"}
{"step": 13, "choice": "battle", "action": {"tool": "battle", "args": {"rounds": 2}}, "jev_ms": 1203, "screen": {"path": "{runtime_root}/shots/shot_20261002_122358_325.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:24:00", "result": {"ok": true, "pairs": 2}, "state": "running"}
{"step": 14, "choice": "battle", "action": {"tool": "battle", "args": {"rounds": 2}}, "jev_ms": 1203, "screen": {"path": "{runtime_root}/shots/shot_20261002_122404_803.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:24:07", "result": {"ok": true, "pairs": 2}, "state": "running"}
{"step": 15, "choice": "battle", "action": {"tool": "battle", "args": {"rounds": 2}}, "jev_ms": 1281, "screen": {"path": "{runtime_root}/shots/shot_20261002_122411_174.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:24:13", "result": {"ok": true, "pairs": 2}, "state": "running"}
{"step": 16, "choice": "battle", "action": {"tool": "battle", "args": {"rounds": 2}}, "jev_ms": 1281, "screen": {"path": "{runtime_root}/shots/shot_20261002_122417_847.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:24:20", "result": {"ok": true, "pairs": 2}, "state": "running"}
{"step": 17, "choice": "battle", "action": {"tool": "battle", "args": {"rounds": 2}}, "jev_ms": 1828, "screen": {"path": "{runtime_root}/shots/shot_20261002_122424_765.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:24:28", "result": {"ok": true, "pairs": 2}, "state": "running"}
{"step": 18, "choice": "battle", "action": {"tool": "battle", "args": {"rounds": 2}}, "jev_ms": 1297, "screen": {"path": "{runtime_root}/shots/shot_20261002_122432_135.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:24:35", "result": {"ok": true, "pairs": 2}, "state": "running"}
{"step": 19, "choice": "battle", "action": {"tool": "battle", "args": {"rounds": 2}}, "jev_ms": 1234, "screen": {"path": "{runtime_root}/shots/shot_20261002_122439_515.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:24:41", "result": {"ok": true, "pairs": 2}, "state": "running"}
{"step": 20, "choice": "battle", "action": {"tool": "battle", "args": {"rounds": 2}}, "jev_ms": 1062, "screen": {"path": "{runtime_root}/shots/shot_20261002_122445_786.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:24:48", "result": {"ok": true, "pairs": 2}, "state": "running"}
{"step": 21, "choice": "battle", "action": {"tool": "battle", "args": {"rounds": 2}}, "jev_ms": 1062, "screen": {"path": "{runtime_root}/shots/shot_20261002_122452_057.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:24:54", "result": {"ok": true, "pairs": 2}, "state": "running"}
{"step": 22, "choice": "wait", "action": {"tool": "wait", "args": {"seconds": 0.7}}, "jev_ms": 1156, "screen": {"path": "{runtime_root}/shots/shot_20261002_122458_283.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:25:00", "result": {"ok": true, "waited": 0.7}, "state": "running"}
{"step": 23, "choice": "wait", "action": {"tool": "wait", "args": {"seconds": 0.7}}, "jev_ms": 1110, "screen": {"path": "{runtime_root}/shots/shot_20261002_122502_151.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:25:04", "result": {"ok": true, "waited": 0.7}, "state": "running"}
{"step": 24, "choice": "confirm_8", "action": {"tool": "click", "args": {"x": 1231, "y": 792}}, "jev_ms": 1203, "screen": {"path": "{runtime_root}/shots/shot_20261002_122505_550.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:25:07", "result": {"ok": true, "clicked": [1231, 792]}, "state": "running"}
{"step": 25, "choice": "confirm_10", "action": {"tool": "click", "args": {"x": 1139, "y": 699}}, "jev_ms": 1203, "screen": {"path": "{runtime_root}/shots/shot_20261002_122508_363.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:25:11", "result": {"ok": true, "clicked": [1139, 699]}, "state": "running"}
{"step": 26, "choice": "confirm_9", "action": {"tool": "click", "args": {"x": 1231, "y": 792}}, "jev_ms": 1109, "screen": {"path": "{runtime_root}/shots/shot_20261002_122511_463.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:25:13", "result": {"ok": true, "clicked": [1231, 792]}, "state": "running"}
{"step": 27, "choice": "button_52", "action": {"tool": "click_text", "args": {"text": "拒绝饰品"}}, "jev_ms": 1078, "screen": {"path": "{runtime_root}/shots/shot_20261002_122514_366.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:25:19", "result": {"ok": true, "clicked": {"text": "拒绝饰品", "x": 1424, "y": 869}, "other_hits": 0}, "state": "running"}
{"step": 28, "choice": "confirm_32", "action": {"tool": "click", "args": {"x": 1170, "y": 759}}, "jev_ms": 1188, "screen": {"path": "{runtime_root}/shots/shot_20261002_122522_500.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:25:26", "result": {"ok": true, "clicked": [1170, 759]}, "state": "running"}
{"step": 29, "choice": "wait", "action": {"tool": "wait", "args": {"seconds": 0.7}}, "jev_ms": 1312, "screen": {"path": "{runtime_root}/shots/shot_20261002_122526_755.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:25:30", "result": {"ok": true, "waited": 0.7}, "state": "running"}
{"step": 0, "choice": "route_s", "action": {"tool": "keypress", "args": {"key": "s"}}, "jev_ms": 1828, "screen": {"path": "{runtime_root}/shots/shot_20261002_122738_760.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:27:42", "result": {"ok": true, "key": "s"}, "state": "running"}
{"step": 1, "choice": "wait", "action": {"tool": "wait", "args": {"seconds": 0.7}}, "jev_ms": 2141, "screen": {"path": "{runtime_root}/shots/shot_20261002_122742_876.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:27:46", "result": {"ok": true, "waited": 0.7}, "state": "running"}
{"step": 2, "choice": "button_7", "action": {"tool": "click_text", "args": {"text": "进入"}}, "jev_ms": 1266, "screen": {"path": "{runtime_root}/shots/shot_20261002_122747_292.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:27:50", "result": {"ok": true, "clicked": {"text": "进入", "x": 1731, "y": 814}, "other_hits": 0}, "state": "running"}
{"step": 3, "choice": "wait", "action": {"tool": "wait", "args": {"seconds": 0.7}}, "jev_ms": 1063, "screen": {"path": "{runtime_root}/shots/shot_20261002_122752_132.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:27:54", "result": {"ok": true, "waited": 0.7}, "state": "running"}
{"step": 4, "choice": "button_66", "action": {"tool": "click_text", "args": {"text": "开始战斗"}}, "jev_ms": 1125, "screen": {"path": "{runtime_root}/shots/shot_20261002_122755_395.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:27:58", "result": {"ok": true, "clicked": {"text": "开始战斗", "x": 1717, "y": 881}, "other_hits": 0}, "state": "running"}
{"step": 5, "choice": "button_65", "action": {"tool": "click_text", "args": {"text": "开始战斗"}}, "jev_ms": 1188, "screen": {"path": "{runtime_root}/shots/shot_20261002_122802_069.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:28:05", "result": {"ok": false, "error": "text not found: 开始战斗", "screen": {"path": "{runtime_root}/shots/shot_20261002_122806_473.png", "w": 1920, "h": 1080}, "items": [{"text": "战斗小贴士", "x": 1648, "y": 450, "w": 191, "h": 49, "score": 0.996}, {"text": "异想体的不同部位可能会有不同的抗性,使用不同的技能。", "x": 1185, "y": 519, "w": 635, "h": 31, "score": 0.994}, {"text": "NOWLOADING...", "x": 1634, "y": 943, "w": 200, "h": 44, "score": 0.988}]}, "state": "running"}
{"step": 6, "choice": "wait", "action": {"tool": "wait", "args": {"seconds": 0.7}}, "jev_ms": 1125, "screen": {"path": "{runtime_root}/shots/shot_20261002_122808_692.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:28:10", "result": {"ok": true, "waited": 0.7}, "state": "running"}
{"step": 7, "choice": "battle", "action": {"tool": "battle", "args": {"rounds": 2}}, "jev_ms": 1219, "screen": {"path": "{runtime_root}/shots/shot_20261002_122812_014.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:28:15", "result": {"ok": true, "pairs": 2}, "state": "running"}
{"step": 8, "choice": "battle", "action": {"tool": "battle", "args": {"rounds": 2}}, "jev_ms": 1140, "screen": {"path": "{runtime_root}/shots/shot_20261002_122819_273.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:28:21", "result": {"ok": true, "pairs": 2}, "state": "running"}
{"step": 9, "choice": "battle", "action": {"tool": "battle", "args": {"rounds": 2}}, "jev_ms": 1140, "screen": {"path": "{runtime_root}/shots/shot_20261002_122825_655.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:28:27", "result": {"ok": true, "pairs": 2}, "state": "running"}
{"step": 10, "choice": "battle", "action": {"tool": "battle", "args": {"rounds": 2}}, "jev_ms": 1109, "screen": {"path": "{runtime_root}/shots/shot_20261002_122831_823.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:28:35", "result": {"ok": true, "pairs": 2}, "state": "running"}
{"step": 11, "choice": "battle", "action": {"tool": "battle", "args": {"rounds": 2}}, "jev_ms": 1266, "screen": {"path": "{runtime_root}/shots/shot_20261002_122839_247.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:28:42", "result": {"ok": true, "pairs": 2}, "state": "running"}
{"step": 12, "choice": "battle", "action": {"tool": "battle", "args": {"rounds": 2}}, "jev_ms": 1109, "screen": {"path": "{runtime_root}/shots/shot_20261002_122846_057.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:28:48", "result": {"ok": true, "pairs": 2}, "state": "running"}
{"step": 13, "choice": "battle", "action": {"tool": "battle", "args": {"rounds": 2}}, "jev_ms": 1172, "screen": {"path": "{runtime_root}/shots/shot_20261002_122852_191.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:28:54", "result": {"ok": true, "pairs": 2}, "state": "running"}
{"step": 0, "choice": "wait", "action": {"tool": "wait", "args": {"seconds": 0.7}}, "jev_ms": 1250, "screen": {"path": "{runtime_root}/shots/shot_20261002_122934_170.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:29:36", "result": {"ok": true, "waited": 0.7}, "state": "running"}
{"step": 1, "choice": "battle", "action": {"tool": "battle", "args": {"rounds": 2}}, "jev_ms": 1094, "screen": {"path": "{runtime_root}/shots/shot_20261002_122937_846.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:29:40", "result": {"ok": true, "pairs": 2}, "state": "running"}
{"step": 0, "choice": "reward_card_1", "action": {"tool": "click", "args": {"x": 682, "y": 464}}, "jev_ms": 1234, "screen": {"path": "{runtime_root}/shots/shot_20261002_123100_237.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:31:02", "result": {"ok": true, "clicked": [682, 464]}, "state": "running"}
{"step": 1, "choice": "confirm_reward", "action": {"tool": "keypress", "args": {"key": "enter"}}, "jev_ms": 1125, "screen": {"path": "{runtime_root}/shots/shot_20261002_123103_135.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:31:05", "result": {"ok": true, "key": "enter"}, "state": "running"}
{"step": 2, "choice": "confirm_reward", "action": {"tool": "keypress", "args": {"key": "enter"}}, "jev_ms": 1156, "screen": {"path": "{runtime_root}/shots/shot_20261002_123106_258.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:31:08", "result": {"ok": true, "key": "enter"}, "state": "running"}
{"step": 3, "choice": "route_d", "action": {"tool": "route", "args": {"key": "d"}}, "jev_ms": 1125, "screen": {"path": "{runtime_root}/shots/shot_20261002_123109_388.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:31:12", "result": {"ok": true, "key": "enter"}, "state": "running"}
{"step": 4, "choice": "wait", "action": {"tool": "wait", "args": {"seconds": 0.7}}, "jev_ms": 1234, "screen": {"path": "{runtime_root}/shots/shot_20261002_123113_325.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:31:15", "result": {"ok": true, "waited": 0.7}, "state": "running"}
{"step": 5, "choice": "button_65", "action": {"tool": "click_text", "args": {"text": "开始战斗"}}, "jev_ms": 1234, "screen": {"path": "{runtime_root}/shots/shot_20261002_123116_988.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:31:20", "result": {"ok": true, "clicked": {"text": "开始战斗", "x": 1717, "y": 881}, "other_hits": 0}, "state": "running"}
{"step": 6, "choice": "wait", "action": {"tool": "wait", "args": {"seconds": 0.7}}, "jev_ms": 1094, "screen": {"path": "{runtime_root}/shots/shot_20261002_123123_746.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:31:27", "result": {"ok": true, "waited": 0.7}, "state": "running"}
{"step": 7, "choice": "wait", "action": {"tool": "wait", "args": {"seconds": 0.7}}, "jev_ms": 1203, "screen": {"path": "{runtime_root}/shots/shot_20261002_123128_457.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:31:30", "result": {"ok": true, "waited": 0.7}, "state": "running"}
{"step": 8, "choice": "battle", "action": {"tool": "battle", "args": {"rounds": 2}}, "jev_ms": 1172, "screen": {"path": "{runtime_root}/shots/shot_20261002_123131_228.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:31:33", "result": {"ok": true, "pairs": 2}, "state": "running"}
{"step": 9, "choice": "battle", "action": {"tool": "battle", "args": {"rounds": 2}}, "jev_ms": 1078, "screen": {"path": "{runtime_root}/shots/shot_20261002_123138_114.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:31:40", "result": {"ok": true, "pairs": 2}, "state": "running"}
{"step": 10, "choice": "battle", "action": {"tool": "battle", "args": {"rounds": 2}}, "jev_ms": 1094, "screen": {"path": "{runtime_root}/shots/shot_20261002_123144_292.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:31:46", "result": {"ok": true, "pairs": 2}, "state": "running"}
{"step": 11, "choice": "battle", "action": {"tool": "battle", "args": {"rounds": 2}}, "jev_ms": 1110, "screen": {"path": "{runtime_root}/shots/shot_20261002_123150_794.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:31:53", "result": {"ok": true, "pairs": 2}, "state": "running"}
{"step": 12, "choice": "battle", "action": {"tool": "battle", "args": {"rounds": 2}}, "jev_ms": 1375, "screen": {"path": "{runtime_root}/shots/shot_20261002_123157_563.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:32:00", "result": {"ok": true, "pairs": 2}, "state": "running"}
{"step": 13, "choice": "battle", "action": {"tool": "battle", "args": {"rounds": 2}}, "jev_ms": 1032, "screen": {"path": "{runtime_root}/shots/shot_20261002_123204_358.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:32:06", "result": {"ok": true, "pairs": 2}, "state": "running"}
{"step": 14, "choice": "battle", "action": {"tool": "battle", "args": {"rounds": 2}}, "jev_ms": 1109, "screen": {"path": "{runtime_root}/shots/shot_20261002_123210_580.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:32:13", "result": {"ok": true, "pairs": 2}, "state": "running"}
{"step": 15, "choice": "battle", "action": {"tool": "battle", "args": {"rounds": 2}}, "jev_ms": 1125, "screen": {"path": "{runtime_root}/shots/shot_20261002_123217_215.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:32:19", "result": {"ok": true, "pairs": 2}, "state": "running"}
{"step": 16, "choice": "battle", "action": {"tool": "battle", "args": {"rounds": 2}}, "jev_ms": 1078, "screen": {"path": "{runtime_root}/shots/shot_20261002_123223_549.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:32:25", "result": {"ok": true, "pairs": 2}, "state": "running"}
{"step": 17, "choice": "battle", "action": {"tool": "battle", "args": {"rounds": 2}}, "jev_ms": 1046, "screen": {"path": "{runtime_root}/shots/shot_20261002_123229_655.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:32:31", "result": {"ok": true, "pairs": 2}, "state": "running"}
{"step": 18, "choice": "battle", "action": {"tool": "battle", "args": {"rounds": 2}}, "jev_ms": 1656, "screen": {"path": "{runtime_root}/shots/shot_20261002_123235_651.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:32:38", "result": {"ok": true, "pairs": 2}, "state": "running"}
{"step": 19, "choice": "battle", "action": {"tool": "battle", "args": {"rounds": 2}}, "jev_ms": 1500, "screen": {"path": "{runtime_root}/shots/shot_20261002_123242_755.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:32:46", "result": {"ok": true, "pairs": 2}, "state": "running"}
{"step": 20, "choice": "battle", "action": {"tool": "battle", "args": {"rounds": 2}}, "jev_ms": 1859, "screen": {"path": "{runtime_root}/shots/shot_20261002_123250_297.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:32:54", "result": {"ok": true, "pairs": 2}, "state": "running"}
{"step": 21, "choice": "battle", "action": {"tool": "battle", "args": {"rounds": 2}}, "jev_ms": 1328, "screen": {"path": "{runtime_root}/shots/shot_20261002_123258_075.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:33:00", "result": {"ok": true, "pairs": 2}, "state": "running"}
{"step": 22, "choice": "battle", "action": {"tool": "battle", "args": {"rounds": 2}}, "jev_ms": 1110, "screen": {"path": "{runtime_root}/shots/shot_20261002_123304_785.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:33:07", "result": {"ok": true, "pairs": 2}, "state": "running"}
{"step": 0, "choice": "wait", "action": {"tool": "wait", "args": {"seconds": 0.7}}, "jev_ms": 1500, "screen": {"path": "{runtime_root}/shots/shot_20261002_123313_909.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:33:17", "result": {"ok": true, "waited": 0.7}, "state": "running"}
{"step": 1, "choice": "route_d", "action": {"tool": "route", "args": {"key": "d"}}, "jev_ms": 1093, "screen": {"path": "{runtime_root}/shots/shot_20261002_123318_092.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:33:20", "result": {"ok": true, "key": "enter"}, "state": "running"}
{"step": 2, "choice": "button_67", "action": {"tool": "keypress", "args": {"key": "enter"}}, "jev_ms": 1235, "screen": {"path": "{runtime_root}/shots/shot_20261002_123322_573.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:33:26", "result": {"ok": true, "key": "enter"}, "state": "running"}
{"step": 0, "choice": "wait", "action": {"tool": "wait", "args": {"seconds": 0.7}}, "jev_ms": 1250, "screen": {"path": "{runtime_root}/shots/shot_20261002_123422_560.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:34:25", "result": {"ok": true, "waited": 0.7}, "state": "running", "battle_context": false}
{"step": 1, "choice": "wait", "action": {"tool": "wait", "args": {"seconds": 0.7}}, "jev_ms": 1125, "screen": {"path": "{runtime_root}/shots/shot_20261002_123426_324.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:34:28", "result": {"ok": true, "waited": 0.7}, "state": "running", "battle_context": false}
{"step": 2, "choice": "wait", "action": {"tool": "wait", "args": {"seconds": 0.7}}, "jev_ms": 1094, "screen": {"path": "{runtime_root}/shots/shot_20261002_123429_911.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:34:32", "result": {"ok": true, "waited": 0.7}, "state": "running", "battle_context": false}
{"step": 3, "choice": "wait", "action": {"tool": "wait", "args": {"seconds": 0.7}}, "jev_ms": 1047, "screen": {"path": "{runtime_root}/shots/shot_20261002_123433_285.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:34:35", "result": {"ok": true, "waited": 0.7}, "state": "running", "battle_context": false}
{"step": 0, "choice": "battle", "action": {"tool": "battle", "args": {"rounds": 2}}, "jev_ms": 0, "screen": {"path": "{runtime_root}/shots/shot_20261002_123610_068.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:36:11", "result": {"ok": true, "pairs": 24, "terminal": false}, "state": "running", "battle_context": true}
{"step": 1, "choice": "battle", "action": {"tool": "battle", "args": {"rounds": 2}}, "jev_ms": 0, "screen": {"path": "{runtime_root}/shots/shot_20261002_123658_173.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:36:59", "result": {"ok": true, "pairs": 8, "terminal": true, "screen": {"path": "{runtime_root}/shots/shot_20261002_123714_119.png", "w": 1920, "h": 1080}}, "state": "running", "battle_context": false}
{"step": 2, "choice": "route_d", "action": {"tool": "route", "args": {"key": "d"}}, "jev_ms": 1359, "screen": {"path": "{runtime_root}/shots/shot_20261002_123715_640.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:37:18", "result": {"ok": true, "key": "enter"}, "state": "running", "battle_context": false}
{"step": 3, "choice": "button_66", "action": {"tool": "keypress", "args": {"key": "enter"}}, "jev_ms": 1063, "screen": {"path": "{runtime_root}/shots/shot_20261002_123720_503.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:37:24", "result": {"ok": true, "key": "enter"}, "state": "running", "battle_context": true}
{"step": 4, "choice": "battle", "action": {"tool": "battle", "args": {"rounds": 2}}, "jev_ms": 0, "screen": {"path": "{runtime_root}/shots/shot_20261002_123725_444.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:37:26", "result": {"ok": true, "pairs": 26, "terminal": false}, "state": "running", "battle_context": true}
{"step": 5, "choice": "battle", "action": {"tool": "battle", "args": {"rounds": 2}}, "jev_ms": 0, "screen": {"path": "{runtime_root}/shots/shot_20261002_123813_257.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:38:14", "result": {"ok": true, "pairs": 24, "terminal": false}, "state": "running", "battle_context": true}
{"step": 6, "choice": "battle", "action": {"tool": "battle", "args": {"rounds": 2}}, "jev_ms": 0, "screen": {"path": "{runtime_root}/shots/shot_20261002_123900_194.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:39:01", "result": {"ok": true, "pairs": 8, "terminal": true, "screen": {"path": "{runtime_root}/shots/shot_20261002_123914_784.png", "w": 1920, "h": 1080}}, "state": "running", "battle_context": false}
{"step": 7, "choice": "wait", "action": {"tool": "wait", "args": {"seconds": 0.7}}, "jev_ms": 1547, "screen": {"path": "{runtime_root}/shots/shot_20261002_123916_324.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:39:19", "result": {"ok": true, "waited": 0.7}, "state": "running", "battle_context": false}
{"step": 0, "choice": "route_s", "action": {"tool": "route", "args": {"key": "s"}}, "jev_ms": 1140, "screen": {"path": "{runtime_root}/shots/shot_20261002_124058_463.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:41:01", "result": {"ok": true, "key": "enter"}, "state": "running", "battle_context": false}
{"step": 1, "choice": "wait", "action": {"tool": "wait", "args": {"seconds": 0.7}}, "jev_ms": 1047, "screen": {"path": "{runtime_root}/shots/shot_20261002_124103_660.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:41:06", "result": {"ok": true, "waited": 0.7}, "state": "running", "battle_context": false}
{"step": 2, "choice": "wait", "action": {"tool": "wait", "args": {"seconds": 0.7}}, "jev_ms": 1438, "screen": {"path": "{runtime_root}/shots/shot_20261002_124107_411.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:41:10", "result": {"ok": true, "waited": 0.7}, "state": "running", "battle_context": false}
{"step": 3, "choice": "wait", "action": {"tool": "wait", "args": {"seconds": 0.7}}, "jev_ms": 1204, "screen": {"path": "{runtime_root}/shots/shot_20261002_124111_362.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:41:13", "result": {"ok": true, "waited": 0.7}, "state": "running", "battle_context": false}
{"step": 4, "choice": "button_29", "action": {"tool": "click_text", "args": {"text": "离开"}}, "jev_ms": 1297, "screen": {"path": "{runtime_root}/shots/shot_20261002_124115_025.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:41:18", "result": {"ok": true, "clicked": {"text": "离开", "x": 1700, "y": 971}, "other_hits": 0}, "state": "running", "battle_context": false}
{"step": 5, "choice": "wait", "action": {"tool": "wait", "args": {"seconds": 0.7}}, "jev_ms": 1094, "screen": {"path": "{runtime_root}/shots/shot_20261002_124120_872.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:41:23", "result": {"ok": true, "waited": 0.7}, "state": "running", "battle_context": false}
{"step": 6, "choice": "wait", "action": {"tool": "wait", "args": {"seconds": 0.7}}, "jev_ms": 1109, "screen": {"path": "{runtime_root}/shots/shot_20261002_124124_824.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:41:27", "result": {"ok": true, "waited": 0.7}, "state": "running", "battle_context": false}
{"step": 7, "choice": "wait", "action": {"tool": "wait", "args": {"seconds": 0.7}}, "jev_ms": 1063, "screen": {"path": "{runtime_root}/shots/shot_20261002_124128_759.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:41:31", "result": {"ok": true, "waited": 0.7}, "state": "running", "battle_context": false}
{"step": 8, "choice": "wait", "action": {"tool": "wait", "args": {"seconds": 0.7}}, "jev_ms": 1125, "screen": {"path": "{runtime_root}/shots/shot_20261002_124132_623.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:41:35", "result": {"ok": true, "waited": 0.7}, "state": "running", "battle_context": false}
{"step": 9, "choice": "button_30", "action": {"tool": "click_text", "args": {"text": "离开"}}, "jev_ms": 1125, "screen": {"path": "{runtime_root}/shots/shot_20261002_124136_630.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:41:39", "result": {"ok": false, "error": "text not found: 离开", "screen": {"path": "{runtime_root}/shots/shot_20261002_124139_490.png", "w": 1920, "h": 1080}, "items": [{"text": "强化E.G.O饰品", "x": 786, "y": 128, "w": 348, "h": 52, "score": 0.982}, {"text": "1751", "x": 1519, "y": 127, "w": 85, "h": 55, "score": 0.999}, {"text": "按等级排序", "x": 1536, "y": 219, "w": 116, "h": 29, "score": 0.998}, {"text": "标准负载电池", "x": 519, "y": 308, "w": 252, "h": 48, "score": 0.989}, {"text": "使用技能命中敌方单位时,使其增加3级破裂强", "x": 250, "y": 526, "w": 545, "h": 32, "score": 0.994}, {"text": "度。", "x": 249, "y": 561, "w": 40, "h": 30, "score": 0.999}, {"text": "若该技能为嫉妒技能,则改为使其增加5级破裂", "x": 248, "y": 626, "w": 546, "h": 32, "score": 0.994}, {"text": "强度。", "x": 243, "y": 658, "w": 71, "h": 36, "score": 0.999}, {"text": "×关闭", "x": 680, "y": 858, "w": 114, "h": 42, "score": 0.813}, {"text": "强化", "x": 1170, "y": 859, "w": 73, "h": 41, "score": 1.0}, {"text": "45", "x": 277, "y": 999, "w": 24, "h": 18, "score": 0.825}, {"text": "2710", "x": 334, "y": 994, "w": 83, "h": 30, "score": 0.945}, {"text": "ShA5", "x": 451, "y": 994, "w": 84, "h": 30, "score": 0.644}, {"text": "1240", "x": 565, "y": 992, "w": 85, "h": 33, "score": 0.823}, {"text": "19245", "x": 680, "y": 988, "w": 88, "h": 37, "score": 0.983}, {"text": "3245", "x": 794, "y": 994, "w": 86, "h": 30, "score": 0.95}, {"text": "2020", "x": 910, "y": 994, "w": 82, "h": 30, "score": 0.964}, {"text": "20335", "x": 1143, "y": 994, "w": 84, "h": 30, "score": 0.999}, {"text": "5h102", "x": 1252, "y": 993, "w": 92, "h": 30, "score": 0.725}, {"text": "26245", "x": 1375, "y": 994, "w": 77, "h": 25, "score": 0.988}, {"text": "CUSTOM LANGUAGE", "x": 1783, "y": 1053, "w": 135, "h": 25, "score": 0.94}]}, "state": "running", "battle_context": false}
{"step": 0, "choice": "wait", "action": {"tool": "wait", "args": {"seconds": 0.7}}, "jev_ms": 1954, "screen": {"path": "{runtime_root}/shots/shot_20261002_124306_264.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:43:09", "result": {"ok": true, "waited": 0.7}, "state": "running", "battle_context": false}
{"step": 0, "choice": "swap_14", "action": {"tool": "click_text", "args": {"text": "替换辛克莱的技能"}}, "jev_ms": 2312, "screen": {"path": "{runtime_root}/shots/shot_20261002_124345_796.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:43:49", "result": {"ok": true, "clicked": {"text": "替换辛克莱的技能", "x": 937, "y": 513}, "other_hits": 0}, "state": "running", "battle_context": false}
{"step": 1, "choice": "wait", "action": {"tool": "wait", "args": {"seconds": 0.7}}, "jev_ms": 1344, "screen": {"path": "{runtime_root}/shots/shot_20261002_124352_280.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:43:55", "result": {"ok": true, "waited": 0.7}, "state": "running", "battle_context": false}
{"step": 0, "choice": "skill_swap_1", "action": {"tool": "click", "args": {"x": 451, "y": 486}}, "jev_ms": 1219, "screen": {"path": "{runtime_root}/shots/shot_20261002_124534_555.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:45:37", "result": {"ok": true, "clicked": [451, 486]}, "state": "running", "battle_context": false}
{"step": 1, "choice": "confirm_swap", "action": {"tool": "keypress", "args": {"key": "enter"}}, "jev_ms": 1031, "screen": {"path": "{runtime_root}/shots/shot_20261002_124538_266.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:45:41", "result": {"ok": true, "key": "enter"}, "state": "running", "battle_context": false}
{"step": 2, "choice": "confirm_swap", "action": {"tool": "keypress", "args": {"key": "enter"}}, "jev_ms": 1125, "screen": {"path": "{runtime_root}/shots/shot_20261002_124541_686.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:45:44", "result": {"ok": true, "key": "enter"}, "state": "running", "battle_context": false}
{"step": 3, "choice": "wait", "action": {"tool": "wait", "args": {"seconds": 0.7}}, "jev_ms": 1203, "screen": {"path": "{runtime_root}/shots/shot_20261002_124545_086.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:45:48", "result": {"ok": true, "waited": 0.7}, "state": "running", "battle_context": false}
{"step": 4, "choice": "skill_swap_1", "action": {"tool": "click", "args": {"x": 451, "y": 486}}, "jev_ms": 1140, "screen": {"path": "{runtime_root}/shots/shot_20261002_124549_350.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:45:52", "result": {"ok": true, "clicked": [451, 486]}, "state": "running", "battle_context": false}
{"step": 5, "choice": "skill_swap_1", "action": {"tool": "click", "args": {"x": 451, "y": 486}}, "jev_ms": 1063, "screen": {"path": "{runtime_root}/shots/shot_20261002_124552_786.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:45:55", "result": {"ok": true, "clicked": [451, 486]}, "state": "running", "battle_context": false}
{"step": 6, "choice": "skill_swap_2", "action": {"tool": "click", "args": {"x": 941, "y": 486}}, "jev_ms": 1532, "screen": {"path": "{runtime_root}/shots/shot_20261002_124556_016.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:45:59", "result": {"ok": true, "clicked": [941, 486]}, "state": "running", "battle_context": false}
{"step": 7, "choice": "confirm_swap", "action": {"tool": "keypress", "args": {"key": "enter"}}, "jev_ms": 1079, "screen": {"path": "{runtime_root}/shots/shot_20261002_124559_719.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:46:02", "result": {"ok": true, "key": "enter"}, "state": "running", "battle_context": false}
{"step": 8, "choice": "confirm_swap", "action": {"tool": "keypress", "args": {"key": "enter"}}, "jev_ms": 1046, "screen": {"path": "{runtime_root}/shots/shot_20261002_124603_256.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:46:06", "result": {"ok": true, "key": "enter"}, "state": "running", "battle_context": false}
{"step": 9, "choice": "confirm_swap", "action": {"tool": "keypress", "args": {"key": "enter"}}, "jev_ms": 1406, "screen": {"path": "{runtime_root}/shots/shot_20261002_124606_784.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:46:09", "result": {"ok": true, "key": "enter"}, "state": "running", "battle_context": false}
{"step": 10, "choice": "wait", "action": {"tool": "wait", "args": {"seconds": 0.7}}, "jev_ms": 1062, "screen": {"path": "{runtime_root}/shots/shot_20261002_124610_452.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:46:13", "result": {"ok": true, "waited": 0.7}, "state": "running", "battle_context": false}
{"step": 11, "choice": "skill_swap_1", "action": {"tool": "click", "args": {"x": 451, "y": 486}}, "jev_ms": 1859, "screen": {"path": "{runtime_root}/shots/shot_20261002_124614_335.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:46:17", "result": {"ok": true, "clicked": [451, 486]}, "state": "running", "battle_context": false}
{"step": 0, "choice": "resume_game", "action": {"tool": "click", "args": {"x": 960, "y": 695}}, "jev_ms": 1250, "screen": {"path": "{runtime_root}/shots/shot_20261002_124849_819.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:48:53", "result": {"ok": true, "clicked": [960, 695]}, "state": "running", "battle_context": false}
{"step": 0, "choice": "buy_swap", "action": {"tool": "click", "args": {"x": 1196, "y": 816}}, "jev_ms": 1218, "screen": {"path": "{runtime_root}/shots/shot_20261002_124934_038.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:49:37", "result": {"ok": true, "clicked": [1196, 816]}, "state": "running", "battle_context": false}
{"step": 1, "choice": "wait", "action": {"tool": "wait", "args": {"seconds": 0.7}}, "jev_ms": 1094, "screen": {"path": "{runtime_root}/shots/shot_20261002_124938_125.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:49:41", "result": {"ok": true, "waited": 0.7}, "state": "running", "battle_context": false}
{"step": 2, "choice": "swap_15", "action": {"tool": "click", "args": {"x": 937, "y": 396}}, "jev_ms": 1532, "screen": {"path": "{runtime_root}/shots/shot_20261002_124942_587.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:49:45", "result": {"ok": true, "clicked": [937, 396]}, "state": "running", "battle_context": false}
{"step": 3, "choice": "swap_16", "action": {"tool": "click", "args": {"x": 937, "y": 396}}, "jev_ms": 1109, "screen": {"path": "{runtime_root}/shots/shot_20261002_124946_356.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:49:49", "result": {"ok": true, "clicked": [937, 396]}, "state": "running", "battle_context": false}
{"step": 4, "choice": "swap_15", "action": {"tool": "click", "args": {"x": 937, "y": 396}}, "jev_ms": 8500, "screen": {"path": "{runtime_root}/shots/shot_20261002_124949_707.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:49:59", "result": {"ok": true, "clicked": [937, 396]}, "state": "running", "battle_context": false}
{"step": 0, "choice": "shop_refresh", "action": {"tool": "click", "args": {"x": 1523, "y": 183}}, "jev_ms": 1204, "screen": {"path": "{runtime_root}/shots/shot_20261002_125046_457.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:50:49", "result": {"ok": true, "clicked": [1523, 183]}, "state": "running", "battle_context": false}
{"step": 1, "choice": "shop_refresh", "action": {"tool": "click", "args": {"x": 1523, "y": 183}}, "jev_ms": 1094, "screen": {"path": "{runtime_root}/shots/shot_20261002_125050_144.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:50:53", "result": {"ok": true, "clicked": [1523, 183]}, "state": "running", "battle_context": false}
{"step": 2, "choice": "button_32", "action": {"tool": "click_text", "args": {"text": "离开"}}, "jev_ms": 1078, "screen": {"path": "{runtime_root}/shots/shot_20261002_125053_500.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:50:56", "result": {"ok": true, "clicked": {"text": "离开", "x": 1700, "y": 971}, "other_hits": 0}, "state": "running", "battle_context": false}
{"step": 3, "choice": "button_35", "action": {"tool": "click_text", "args": {"text": "离开"}}, "jev_ms": 1109, "screen": {"path": "{runtime_root}/shots/shot_20261002_125100_640.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:51:03", "result": {"ok": false, "error": "text not found: 离开", "screen": {"path": "{runtime_root}/shots/shot_20261002_125104_049.png", "w": 1920, "h": 1080}, "items": [{"text": "强化E.G.O饰品", "x": 786, "y": 128, "w": 348, "h": 52, "score": 0.982}, {"text": "1601", "x": 1519, "y": 127, "w": 87, "h": 55, "score": 0.998}, {"text": "按等级排序", "x": 1536, "y": 219, "w": 116, "h": 29, "score": 0.998}, {"text": "标准负载电池", "x": 519, "y": 308, "w": 252, "h": 48, "score": 0.989}, {"text": "使用技能命中敌方单位时,使其增加3级破裂强", "x": 250, "y": 526, "w": 545, "h": 32, "score": 0.994}, {"text": "度。", "x": 249, "y": 561, "w": 40, "h": 30, "score": 0.999}, {"text": "若该技能为嫉妒技能,则改为使其增加5级破裂", "x": 248, "y": 626, "w": 546, "h": 32, "score": 0.994}, {"text": "强度。", "x": 243, "y": 658, "w": 71, "h": 36, "score": 0.999}, {"text": "×关闭", "x": 680, "y": 858, "w": 114, "h": 42, "score": 0.813}, {"text": "强化", "x": 1170, "y": 859, "w": 73, "h": 41, "score": 1.0}, {"text": "45", "x": 277, "y": 999, "w": 24, "h": 18, "score": 0.825}, {"text": "2710", "x": 334, "y": 994, "w": 83, "h": 30, "score": 0.945}, {"text": "ShA5", "x": 451, "y": 994, "w": 84, "h": 30, "score": 0.644}, {"text": "1240", "x": 565, "y": 992, "w": 85, "h": 33, "score": 0.823}, {"text": "19245", "x": 680, "y": 988, "w": 88, "h": 37, "score": 0.983}, {"text": "3245", "x": 794, "y": 994, "w": 86, "h": 30, "score": 0.95}, {"text": "2020", "x": 910, "y": 994, "w": 82, "h": 30, "score": 0.964}, {"text": "20335", "x": 1143, "y": 994, "w": 84, "h": 30, "score": 0.999}, {"text": "5h102", "x": 1252, "y": 993, "w": 92, "h": 30, "score": 0.725}, {"text": "26245", "x": 1375, "y": 994, "w": 77, "h": 25, "score": 0.988}, {"text": "CUSTOM LANGUAGE", "x": 1783, "y": 1053, "w": 135, "h": 25, "score": 0.94}]}, "state": "running", "battle_context": false}
{"step": 4, "choice": "close_8", "action": {"tool": "keypress", "args": {"key": "esc"}}, "jev_ms": 1156, "screen": {"path": "{runtime_root}/shots/shot_20261002_125106_021.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:51:08", "result": {"ok": true, "key": "esc"}, "state": "running", "battle_context": false}
{"step": 5, "choice": "button_32", "action": {"tool": "click_text", "args": {"text": "离开"}}, "jev_ms": 8406, "screen": {"path": "{runtime_root}/shots/shot_20261002_125109_298.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:51:19", "result": {"ok": true, "clicked": {"text": "离开", "x": 1700, "y": 971}, "other_hits": 0}, "state": "running", "battle_context": false}
{"step": 6, "choice": "confirm_21", "action": {"tool": "click", "args": {"x": 1171, "y": 759}}, "jev_ms": 8375, "screen": {"path": "{runtime_root}/shots/shot_20261002_125121_768.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:51:31", "result": {"ok": true, "clicked": [1171, 759]}, "state": "running", "battle_context": false}
{"step": 7, "choice": "confirm_20", "action": {"tool": "click", "args": {"x": 1171, "y": 741}}, "jev_ms": 1078, "screen": {"path": "{runtime_root}/shots/shot_20261002_125132_165.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:51:34", "result": {"ok": true, "clicked": [1171, 741]}, "state": "running", "battle_context": false}
{"step": 8, "choice": "button_30", "action": {"tool": "click_text", "args": {"text": "离开"}}, "jev_ms": 1172, "screen": {"path": "{runtime_root}/shots/shot_20261002_125135_430.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:51:38", "result": {"ok": false, "error": "text not found: 离开", "screen": {"path": "{runtime_root}/shots/shot_20261002_125138_712.png", "w": 1920, "h": 1080}, "items": [{"text": "29 菱 637 42 8416 30 0 29", "x": 686, "y": 38, "w": 590, "h": 43, "score": 0.764}, {"text": "2699", "x": 1448, "y": 40, "w": 143, "h": 62, "score": 0.984}, {"text": "1601", "x": 1652, "y": 47, "w": 71, "h": 47, "score": 0.998}, {"text": "正在探索第3层", "x": 64, "y": 136, "w": 291, "h": 44, "score": 0.996}, {"text": "去·海·边", "x": 60, "y": 188, "w": 85, "h": 28, "score": 0.906}, {"text": "238", "x": 394, "y": 1026, "w": 45, "h": 23, "score": 0.996}, {"text": "271", "x": 512, "y": 1026, "w": 41, "h": 22, "score": 0.997}, {"text": "251", "x": 631, "y": 1028, "w": 30, "h": 19, "score": 0.865}, {"text": "124", "x": 745, "y": 1026, "w": 38, "h": 22, "score": 0.937}, {"text": "203", "x": 1322, "y": 1026, "w": 37, "h": 22, "score": 0.997}, {"text": "201", "x": 1441, "y": 1028, "w": 37, "h": 18, "score": 0.963}, {"text": "CUSTOm LANGUAGE", "x": 1784, "y": 1057, "w": 133, "h": 19, "score": 0.94}]}, "state": "running", "battle_context": false}
{"step": 9, "choice": "route_d", "action": {"tool": "route", "args": {"key": "d"}}, "jev_ms": 1235, "screen": {"path": "{runtime_root}/shots/shot_20261002_125140_616.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:51:43", "result": {"ok": true, "key": "enter"}, "state": "running", "battle_context": false}
{"step": 10, "choice": "wait", "action": {"tool": "wait", "args": {"seconds": 0.7}}, "jev_ms": 1141, "screen": {"path": "{runtime_root}/shots/shot_20261002_125145_743.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:51:49", "result": {"ok": true, "waited": 0.7}, "state": "running", "battle_context": false}
{"step": 11, "choice": "button_71", "action": {"tool": "keypress", "args": {"key": "enter"}}, "jev_ms": 1125, "screen": {"path": "{runtime_root}/shots/shot_20261002_125150_659.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:51:54", "result": {"ok": true, "key": "enter"}, "state": "running", "battle_context": true}
{"step": 12, "choice": "button_71", "action": {"tool": "keypress", "args": {"key": "enter"}}, "jev_ms": 1312, "screen": {"path": "{runtime_root}/shots/shot_20261002_125155_444.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:51:59", "result": {"ok": true, "key": "enter"}, "state": "running", "battle_context": true}
{"step": 13, "choice": "battle", "action": {"tool": "battle", "args": {"rounds": 2}}, "jev_ms": 0, "screen": {"path": "{runtime_root}/shots/shot_20261002_125200_848.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:52:01", "result": {"ok": true, "pairs": 26, "terminal": false}, "state": "running", "battle_context": true}
{"step": 14, "choice": "battle", "action": {"tool": "battle", "args": {"rounds": 2}}, "jev_ms": 0, "screen": {"path": "{runtime_root}/shots/shot_20261002_125249_412.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:52:50", "result": {"ok": true, "pairs": 24, "terminal": false}, "state": "running", "battle_context": true}
{"step": 15, "choice": "battle", "action": {"tool": "battle", "args": {"rounds": 2}}, "jev_ms": 0, "screen": {"path": "{runtime_root}/shots/shot_20261002_125339_680.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:53:40", "result": {"ok": true, "pairs": 20, "terminal": true, "screen": {"path": "{runtime_root}/shots/shot_20261002_125416_993.png", "w": 1920, "h": 1080}}, "state": "running", "battle_context": false}
{"step": 16, "choice": "reward_card_1", "action": {"tool": "click", "args": {"x": 682, "y": 464}}, "jev_ms": 1750, "screen": {"path": "{runtime_root}/shots/shot_20261002_125418_579.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:54:21", "result": {"ok": true, "clicked": [682, 464]}, "state": "running", "battle_context": false}
{"step": 17, "choice": "confirm_reward", "action": {"tool": "keypress", "args": {"key": "enter"}}, "jev_ms": 1093, "screen": {"path": "{runtime_root}/shots/shot_20261002_125422_010.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:54:24", "result": {"ok": true, "key": "enter"}, "state": "running", "battle_context": false}
{"step": 18, "choice": "confirm_reward", "action": {"tool": "keypress", "args": {"key": "enter"}}, "jev_ms": 1797, "screen": {"path": "{runtime_root}/shots/shot_20261002_125424_912.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:54:28", "result": {"ok": true, "key": "enter"}, "state": "running", "battle_context": false}
{"step": 19, "choice": "button_59", "action": {"tool": "click_text", "args": {"text": "拒绝饰品"}}, "jev_ms": 1141, "screen": {"path": "{runtime_root}/shots/shot_20261002_125428_773.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:54:33", "result": {"ok": true, "clicked": {"text": "拒绝饰品", "x": 1424, "y": 869}, "other_hits": 0}, "state": "running", "battle_context": false}
{"step": 20, "choice": "confirm_35", "action": {"tool": "click", "args": {"x": 1170, "y": 759}}, "jev_ms": 1063, "screen": {"path": "{runtime_root}/shots/shot_20261002_125437_621.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:54:41", "result": {"ok": true, "clicked": [1170, 759]}, "state": "running", "battle_context": false}
{"step": 21, "choice": "wait", "action": {"tool": "wait", "args": {"seconds": 0.7}}, "jev_ms": 1125, "screen": {"path": "{runtime_root}/shots/shot_20261002_125442_138.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:54:47", "result": {"ok": true, "waited": 0.7}, "state": "running", "battle_context": false}
{"step": 22, "choice": "pack_inspect_1", "action": {"tool": "click", "args": {"x": 407, "y": 327}}, "jev_ms": 1015, "screen": {"path": "{runtime_root}/shots/shot_20261002_125448_219.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:54:50", "result": {"ok": true, "clicked": [407, 327]}, "state": "running", "battle_context": false}
{"step": 23, "choice": "pack_inspect_4", "action": {"tool": "click", "args": {"x": 1358, "y": 327}}, "jev_ms": 1406, "screen": {"path": "{runtime_root}/shots/shot_20261002_125451_088.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:54:54", "result": {"ok": true, "clicked": [1358, 327]}, "state": "running", "battle_context": false}
{"step": 24, "choice": "pack_inspect_4", "action": {"tool": "click", "args": {"x": 1358, "y": 327}}, "jev_ms": 1219, "screen": {"path": "{runtime_root}/shots/shot_20261002_125454_934.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:54:58", "result": {"ok": true, "clicked": [1358, 327]}, "state": "running", "battle_context": false}
{"step": 25, "choice": "pack_inspect_4", "action": {"tool": "click", "args": {"x": 1358, "y": 327}}, "jev_ms": 1453, "screen": {"path": "{runtime_root}/shots/shot_20261002_125458_565.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:55:01", "result": {"ok": true, "clicked": [1358, 327]}, "state": "running", "battle_context": false}
{"step": 0, "choice": "battle", "action": {"tool": "battle", "args": {"rounds": 2}}, "jev_ms": 0, "screen": {"path": "{runtime_root}/shots/shot_20261002_125602_506.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:56:04", "result": {"ok": true, "pairs": 26, "terminal": false}, "state": "running", "battle_context": true}
{"step": 1, "choice": "battle", "action": {"tool": "battle", "args": {"rounds": 2}}, "jev_ms": 0, "screen": {"path": "{runtime_root}/shots/shot_20261002_125651_343.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:56:53", "result": {"ok": true, "pairs": 28, "terminal": false}, "state": "running", "battle_context": true}
{"step": 2, "choice": "battle", "action": {"tool": "battle", "args": {"rounds": 2}}, "jev_ms": 0, "screen": {"path": "{runtime_root}/shots/shot_20261002_125742_007.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:57:43", "result": {"ok": true, "pairs": 26, "terminal": false}, "state": "running", "battle_context": true}
{"step": 3, "choice": "battle", "action": {"tool": "battle", "args": {"rounds": 2}}, "jev_ms": 0, "screen": {"path": "{runtime_root}/shots/shot_20261002_125829_609.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:58:30", "result": {"ok": true, "pairs": 26, "terminal": true, "screen": {"path": "{runtime_root}/shots/shot_20261002_125915_500.png", "w": 1920, "h": 1080}}, "state": "running", "battle_context": false}
{"step": 4, "choice": "wait", "action": {"tool": "wait", "args": {"seconds": 0.7}}, "jev_ms": 1625, "screen": {"path": "{runtime_root}/shots/shot_20261002_125916_826.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:59:19", "result": {"ok": true, "waited": 0.7}, "state": "running", "battle_context": false}
{"step": 5, "choice": "wait", "action": {"tool": "wait", "args": {"seconds": 0.7}}, "jev_ms": 1078, "screen": {"path": "{runtime_root}/shots/shot_20261002_125921_138.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:59:23", "result": {"ok": true, "waited": 0.7}, "state": "running", "battle_context": false}
{"step": 6, "choice": "route_d", "action": {"tool": "route", "args": {"key": "d"}}, "jev_ms": 1453, "screen": {"path": "{runtime_root}/shots/shot_20261002_125924_650.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:59:27", "result": {"ok": true, "key": "enter"}, "state": "running", "battle_context": false}
{"step": 7, "choice": "button_71", "action": {"tool": "keypress", "args": {"key": "enter"}}, "jev_ms": 1047, "screen": {"path": "{runtime_root}/shots/shot_20261002_125929_638.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:59:33", "result": {"ok": true, "key": "enter"}, "state": "running", "battle_context": true}
{"step": 8, "choice": "battle", "action": {"tool": "battle", "args": {"rounds": 2}}, "jev_ms": 0, "screen": {"path": "{runtime_root}/shots/shot_20261002_125934_304.png", "w": 1920, "h": 1080}, "at": "2026-10-02T12:59:35", "result": {"ok": true, "pairs": 26, "terminal": false}, "state": "running", "battle_context": true}
{"step": 9, "choice": "battle", "action": {"tool": "battle", "args": {"rounds": 2}}, "jev_ms": 0, "screen": {"path": "{runtime_root}/shots/shot_20261002_130023_120.png", "w": 1920, "h": 1080}, "at": "2026-10-02T13:00:25", "result": {"ok": true, "pairs": 24, "terminal": false}, "state": "running", "battle_context": true}
{"step": 10, "choice": "battle", "action": {"tool": "battle", "args": {"rounds": 2}}, "jev_ms": 0, "screen": {"path": "{runtime_root}/shots/shot_20261002_130112_079.png", "w": 1920, "h": 1080}, "at": "2026-10-02T13:01:13", "result": {"ok": true, "pairs": 26, "terminal": false}, "state": "running", "battle_context": true}
{"step": 11, "choice": "battle", "action": {"tool": "battle", "args": {"rounds": 2}}, "jev_ms": 0, "screen": {"path": "{runtime_root}/shots/shot_20261002_130159_780.png", "w": 1920, "h": 1080}, "at": "2026-10-02T13:02:00", "result": {"ok": true, "pairs": 6, "terminal": true, "screen": {"path": "{runtime_root}/shots/shot_20261002_130211_154.png", "w": 1920, "h": 1080}}, "state": "running", "battle_context": false}
{"step": 12, "choice": "wait", "action": {"tool": "wait", "args": {"seconds": 0.7}}, "jev_ms": 1203, "screen": {"path": "{runtime_root}/shots/shot_20261002_130212_818.png", "w": 1920, "h": 1080}, "at": "2026-10-02T13:02:15", "result": {"ok": true, "waited": 0.7}, "state": "running", "battle_context": false}
{"step": 0, "choice": "route_s", "action": {"tool": "route", "args": {"key": "s"}}, "jev_ms": 1875, "screen": {"path": "{runtime_root}/shots/shot_20261002_131243_645.png", "w": 1920, "h": 1080}, "at": "2026-10-02T13:12:47", "result": {"ok": true, "key": "enter"}, "state": "running", "battle_context": false}
{"step": 1, "choice": "skip_dialog", "action": {"tool": "click", "args": {"x": 1699, "y": 970}}, "jev_ms": 1031, "screen": {"path": "{runtime_root}/shots/shot_20261002_131249_331.png", "w": 1920, "h": 1080}, "at": "2026-10-02T13:12:51", "result": {"ok": true, "clicked": [1699, 970]}, "state": "running", "battle_context": false}
{"step": 2, "choice": "wait", "action": {"tool": "wait", "args": {"seconds": 0.7}}, "jev_ms": 1109, "screen": {"path": "{runtime_root}/shots/shot_20261002_131251_660.png", "w": 1920, "h": 1080}, "at": "2026-10-02T13:12:54", "result": {"ok": true, "waited": 0.7}, "state": "running", "battle_context": false}
{"step": 0, "choice": "wait", "action": {"tool": "wait", "args": {"seconds": 0.7}}, "jev_ms": 1250, "screen": {"path": "{runtime_root}/shots/shot_20261002_131354_507.png", "w": 1920, "h": 1080}, "at": "2026-10-02T13:13:58", "result": {"ok": true, "waited": 0.7}, "state": "running", "battle_context": false}
{"step": 0, "choice": "wait", "action": {"tool": "wait", "args": {"seconds": 0.7}}, "jev_ms": 1297, "screen": {"path": "{runtime_root}/shots/shot_20261002_131530_419.png", "w": 1920, "h": 1080}, "at": "2026-10-02T13:15:32", "result": {"ok": true, "waited": 0.7}, "state": "running", "battle_context": false}
{"step": 0, "choice": "sinner_card_1", "action": {"tool": "click", "args": {"x": 221, "y": 988}}, "jev_ms": 1453, "screen": {"path": "{runtime_root}/shots/shot_20261002_131910_134.png", "w": 1920, "h": 1080}, "at": "2026-10-02T13:19:13", "result": {"ok": true, "clicked": [221, 988]}, "state": "running", "battle_context": false}
{"step": 1, "choice": "button_21", "action": {"tool": "click_text", "args": {"text": "进行判定"}}, "jev_ms": 1204, "screen": {"path": "{runtime_root}/shots/shot_20261002_131913_934.png", "w": 1920, "h": 1080}, "at": "2026-10-02T13:19:16", "result": {"ok": true, "clicked": {"text": "进行判定", "x": 1697, "y": 970}, "other_hits": 0}, "state": "running", "battle_context": false}
{"step": 2, "choice": "button_6", "action": {"tool": "click_text", "args": {"text": "进行判定"}}, "jev_ms": 1750, "screen": {"path": "{runtime_root}/shots/shot_20261002_131919_019.png", "w": 1920, "h": 1080}, "at": "2026-10-02T13:19:22", "result": {"ok": false, "error": "text not found: 进行判定", "screen": {"path": "{runtime_root}/shots/shot_20261002_131922_206.png", "w": 1920, "h": 1080}, "items": [{"text": "00:00:23:61", "x": 138, "y": 202, "w": 128, "h": 24, "score": 0.978}, {"text": "REC", "x": 895, "y": 200, "w": 48, "h": 26, "score": 0.991}, {"text": "怠情/忧郁有利", "x": 1260, "y": 200, "w": 307, "h": 39, "score": 0.87}, {"text": "黎明事务所", "x": 1315, "y": 267, "w": 168, "h": 36, "score": 0.998}, {"text": "收尾人浮士德", "x": 1314, "y": 301, "w": 206, "h": 43, "score": 0.995}, {"text": "“那么,请你为我们照亮道路吧。", "x": 115, "y": 505, "w": 360, "h": 36, "score": 0.974}, {"text": "判定阀值", "x": 1182, "y": 558, "w": 102, "h": 32, "score": 0.829}, {"text": "结果", "x": 1568, "y": 558, "w": 58, "h": 31, "score": 0.998}, {"text": "12A", "x": 1174, "y": 593, "w": 120, "h": 73, "score": 0.924}, {"text": "16", "x": 1562, "y": 590, "w": 73, "h": 77, "score": 0.985}, {"text": "判定成功", "x": 1334, "y": 720, "w": 137, "h": 42, "score": 0.991}, {"text": "低", "x": 109, "y": 917, "w": 23, "h": 21, "score": 0.991}, {"text": "极高", "x": 196, "y": 914, "w": 54, "h": 26, "score": 0.999}, {"text": "极高极低", "x": 340, "y": 912, "w": 256, "h": 28, "score": 0.997}, {"text": "极高极低极低", "x": 609, "y": 913, "w": 306, "h": 28, "score": 0.994}, {"text": "一般极低", "x": 909, "y": 912, "w": 226, "h": 31, "score": 0.853}, {"text": "极高极低", "x": 1125, "y": 913, "w": 160, "h": 28, "score": 0.996}, {"text": "SKIP", "x": 1628, "y": 928, "w": 143, "h": 85, "score": 0.959}, {"text": "1240", "x": 493, "y": 1006, "w": 69, "h": 22, "score": 0.902}, {"text": "2027", "x": 805, "y": 1006, "w": 51, "h": 20, "score": 0.891}, {"text": "04", "x": 907, "y": 1001, "w": 74, "h": 28, "score": 0.547}, {"text": "20335", "x": 1006, "y": 1002, "w": 82, "h": 29, "score": 0.99}, {"text": "20945", "x": 1110, "y": 1001, "w": 82, "h": 29, "score": 0.997}, {"text": "25545", "x": 1218, "y": 1004, "w": 74, "h": 25, "score": 0.996}, {"text": "CUSTOM LANGUAGE", "x": 1783, "y": 1053, "w": 135, "h": 25, "score": 0.955}]}, "state": "running", "battle_context": false}
{"step": 3, "choice": "skip_dialog", "action": {"tool": "click", "args": {"x": 1699, "y": 970}}, "jev_ms": 0, "screen": {"path": "{runtime_root}/shots/shot_20261002_131924_093.png", "w": 1920, "h": 1080}, "at": "2026-10-02T13:19:25", "result": {"ok": true, "clicked": [1699, 970]}, "state": "running", "battle_context": false}
{"step": 4, "choice": "wait", "action": {"tool": "wait", "args": {"seconds": 0.7}}, "jev_ms": 1109, "screen": {"path": "{runtime_root}/shots/shot_20261002_131926_319.png", "w": 1920, "h": 1080}, "at": "2026-10-02T13:19:29", "result": {"ok": true, "waited": 0.7}, "state": "running", "battle_context": false}
{"step": 5, "choice": "wait", "action": {"tool": "wait", "args": {"seconds": 0.7}}, "jev_ms": 2375, "screen": {"path": "{runtime_root}/shots/shot_20261002_131931_070.png", "w": 1920, "h": 1080}, "at": "2026-10-02T13:19:35", "result": {"ok": true, "waited": 0.7}, "state": "running", "battle_context": false}
{"step": 6, "choice": "wait", "action": {"tool": "wait", "args": {"seconds": 0.7}}, "jev_ms": 1422, "screen": {"path": "{runtime_root}/shots/shot_20261002_131936_576.png", "w": 1920, "h": 1080}, "at": "2026-10-02T13:19:40", "result": {"ok": true, "waited": 0.7}, "state": "running", "battle_context": false}
{"step": 7, "choice": "wait", "action": {"tool": "wait", "args": {"seconds": 0.7}}, "jev_ms": 1047, "screen": {"path": "{runtime_root}/shots/shot_20261002_131941_268.png", "w": 1920, "h": 1080}, "at": "2026-10-02T13:19:44", "result": {"ok": true, "waited": 0.7}, "state": "running", "battle_context": false}
{"step": 0, "choice": "event_finish", "action": {"tool": "advance_dialog", "args": {"presses": 5}}, "jev_ms": 0, "screen": {"path": "{runtime_root}/shots/shot_20261002_132120_520.png", "w": 1920, "h": 1080}, "at": "2026-10-02T13:21:21", "result": {"ok": true, "key": "enter"}, "state": "running", "battle_context": false}
{"step": 1, "choice": "event_finish", "action": {"tool": "advance_dialog", "args": {"presses": 5}}, "jev_ms": 0, "screen": {"path": "{runtime_root}/shots/shot_20261002_132123_990.png", "w": 1920, "h": 1080}, "at": "2026-10-02T13:21:25", "result": {"ok": true, "key": "enter"}, "state": "running", "battle_context": false}
{"step": 2, "choice": "button_9", "action": {"tool": "click_text", "args": {"text": "确认"}}, "jev_ms": 1188, "screen": {"path": "{runtime_root}/shots/shot_20261002_132130_125.png", "w": 1920, "h": 1080}, "at": "2026-10-02T13:21:33", "result": {"ok": true, "clicked": {"text": "确认", "x": 969, "y": 801}, "other_hits": 0}, "state": "running", "battle_context": false}
{"step": 3, "choice": "wait", "action": {"tool": "wait", "args": {"seconds": 0.7}}, "jev_ms": 1094, "screen": {"path": "{runtime_root}/shots/shot_20261002_132135_103.png", "w": 1920, "h": 1080}, "at": "2026-10-02T13:21:37", "result": {"ok": true, "waited": 0.7}, "state": "running", "battle_context": false}
{"step": 0, "choice": "wait", "action": {"tool": "wait", "args": {"seconds": 0.7}}, "jev_ms": 1344, "screen": {"path": "{runtime_root}/shots/shot_20261002_132236_229.png", "w": 1920, "h": 1080}, "at": "2026-10-02T13:22:39", "result": {"ok": true, "waited": 0.7}, "state": "running", "battle_context": false}
{"step": 0, "choice": "route_d", "action": {"tool": "route", "args": {"key": "d"}}, "jev_ms": 1484, "screen": {"path": "{runtime_root}/shots/shot_20261002_132325_410.png", "w": 1920, "h": 1080}, "at": "2026-10-02T13:23:28", "result": {"ok": true, "key": "enter"}, "state": "running", "battle_context": false}
{"step": 1, "choice": "wait", "action": {"tool": "wait", "args": {"seconds": 0.7}}, "jev_ms": 1156, "screen": {"path": "{runtime_root}/shots/shot_20261002_132330_589.png", "w": 1920, "h": 1080}, "at": "2026-10-02T13:23:33", "result": {"ok": true, "waited": 0.7}, "state": "running", "battle_context": false}
{"step": 2, "choice": "shop_refresh", "action": {"tool": "click", "args": {"x": 1523, "y": 183}}, "jev_ms": 8406, "screen": {"path": "{runtime_root}/shots/shot_20261002_132334_188.png", "w": 1920, "h": 1080}, "at": "2026-10-02T13:23:44", "result": {"ok": true, "clicked": [1523, 183]}, "state": "running", "battle_context": false}
{"step": 3, "choice": "shop_refresh", "action": {"tool": "click", "args": {"x": 1523, "y": 183}}, "jev_ms": 1156, "screen": {"path": "{runtime_root}/shots/shot_20261002_132344_758.png", "w": 1920, "h": 1080}, "at": "2026-10-02T13:23:47", "result": {"ok": true, "clicked": [1523, 183]}, "state": "running", "battle_context": false}
{"step": 4, "choice": "button_33", "action": {"tool": "click_text", "args": {"text": "离开"}}, "jev_ms": 1094, "screen": {"path": "{runtime_root}/shots/shot_20261002_132348_104.png", "w": 1920, "h": 1080}, "at": "2026-10-02T13:23:51", "result": {"ok": true, "clicked": {"text": "离开", "x": 1700, "y": 971}, "other_hits": 0}, "state": "running", "battle_context": false}
{"step": 5, "choice": "confirm_24", "action": {"tool": "click", "args": {"x": 1171, "y": 759}}, "jev_ms": 1157, "screen": {"path": "{runtime_root}/shots/shot_20261002_132353_328.png", "w": 1920, "h": 1080}, "at": "2026-10-02T13:23:56", "result": {"ok": true, "clicked": [1171, 759]}, "state": "running", "battle_context": false}
{"step": 0, "choice": "route_d", "action": {"tool": "route", "args": {"key": "d"}}, "jev_ms": 1594, "screen": {"path": "{runtime_root}/shots/shot_20261002_132555_253.png", "w": 1920, "h": 1080}, "at": "2026-10-02T13:25:58", "result": {"ok": true, "key": "enter"}, "state": "running", "battle_context": false}
{"step": 1, "choice": "wait", "action": {"tool": "wait", "args": {"seconds": 0.7}}, "jev_ms": 1266, "screen": {"path": "{runtime_root}/shots/shot_20261002_132600_756.png", "w": 1920, "h": 1080}, "at": "2026-10-02T13:26:04", "result": {"ok": true, "waited": 0.7}, "state": "running", "battle_context": false}
{"step": 2, "choice": "button_70", "action": {"tool": "keypress", "args": {"key": "enter"}}, "jev_ms": 1110, "screen": {"path": "{runtime_root}/shots/shot_20261002_132605_095.png", "w": 1920, "h": 1080}, "at": "2026-10-02T13:26:09", "result": {"ok": true, "key": "enter"}, "state": "running", "battle_context": true}
{"step": 3, "choice": "button_68", "action": {"tool": "keypress", "args": {"key": "enter"}}, "jev_ms": 1140, "screen": {"path": "{runtime_root}/shots/shot_20261002_132609_563.png", "w": 1920, "h": 1080}, "at": "2026-10-02T13:26:13", "result": {"ok": true, "key": "enter"}, "state": "running", "battle_context": true}
{"step": 4, "choice": "battle", "action": {"tool": "battle", "args": {"rounds": 2}}, "jev_ms": 0, "screen": {"path": "{runtime_root}/shots/shot_20261002_132615_340.png", "w": 1920, "h": 1080}, "at": "2026-10-02T13:26:16", "result": {"ok": true, "pairs": 26, "terminal": false}, "state": "running", "battle_context": true}
{"step": 5, "choice": "battle", "action": {"tool": "battle", "args": {"rounds": 2}}, "jev_ms": 0, "screen": {"path": "{runtime_root}/shots/shot_20261002_132704_956.png", "w": 1920, "h": 1080}, "at": "2026-10-02T13:27:05", "result": {"ok": true, "pairs": 24, "terminal": false}, "state": "running", "battle_context": true}
{"step": 6, "choice": "battle", "action": {"tool": "battle", "args": {"rounds": 2}}, "jev_ms": 0, "screen": {"path": "{runtime_root}/shots/shot_20261002_132751_970.png", "w": 1920, "h": 1080}, "at": "2026-10-02T13:27:53", "result": {"ok": true, "pairs": 0, "terminal": false}, "state": "running", "battle_context": true}
{"step": 0, "choice": "battle", "action": {"tool": "battle", "args": {"rounds": 2}}, "jev_ms": 0, "screen": {"path": "{runtime_root}/shots/shot_20261002_132900_983.png", "w": 1920, "h": 1080}, "at": "2026-10-02T13:29:02", "result": {"ok": true, "pairs": 26, "terminal": false}, "state": "running", "battle_context": true}
{"step": 1, "choice": "battle", "action": {"tool": "battle", "args": {"rounds": 2}}, "jev_ms": 0, "screen": {"path": "{runtime_root}/shots/shot_20261002_132950_736.png", "w": 1920, "h": 1080}, "at": "2026-10-02T13:29:52", "result": {"ok": true, "pairs": 24, "terminal": false}, "state": "running", "battle_context": true}
{"step": 2, "choice": "battle", "action": {"tool": "battle", "args": {"rounds": 2}}, "jev_ms": 0, "screen": {"path": "{runtime_root}/shots/shot_20261002_133040_112.png", "w": 1920, "h": 1080}, "at": "2026-10-02T13:30:41", "result": {"ok": true, "pairs": 24, "terminal": false}, "state": "running", "battle_context": true}
{"step": 3, "choice": "battle", "action": {"tool": "battle", "args": {"rounds": 2}}, "jev_ms": 0, "screen": {"path": "{runtime_root}/shots/shot_20261002_133127_082.png", "w": 1920, "h": 1080}, "at": "2026-10-02T13:31:28", "result": {"ok": true, "pairs": 22, "terminal": true, "screen": {"path": "{runtime_root}/shots/shot_20261002_133211_013.png", "w": 1920, "h": 1080}}, "state": "running", "battle_context": false}
{"step": 4, "choice": "reward_card_1", "action": {"tool": "click", "args": {"x": 682, "y": 464}}, "jev_ms": 1906, "screen": {"path": "{runtime_root}/shots/shot_20261002_133212_720.png", "w": 1920, "h": 1080}, "at": "2026-10-02T13:32:15", "result": {"ok": true, "clicked": [682, 464]}, "state": "running", "battle_context": false}
{"step": 5, "choice": "reward_card_1", "action": {"tool": "click", "args": {"x": 682, "y": 464}}, "jev_ms": 1171, "screen": {"path": "{runtime_root}/shots/shot_20261002_133216_386.png", "w": 1920, "h": 1080}, "at": "2026-10-02T13:32:18", "result": {"ok": true, "clicked": [682, 464]}, "state": "running", "battle_context": false}
{"step": 6, "choice": "reward_card_2", "action": {"tool": "click", "args": {"x": 987, "y": 464}}, "jev_ms": 1266, "screen": {"path": "{runtime_root}/shots/shot_20261002_133219_320.png", "w": 1920, "h": 1080}, "at": "2026-10-02T13:32:21", "result": {"ok": true, "clicked": [987, 464]}, "state": "running", "battle_context": false}
{"step": 7, "choice": "reward_card_2", "action": {"tool": "click", "args": {"x": 987, "y": 464}}, "jev_ms": 1375, "screen": {"path": "{runtime_root}/shots/shot_20261002_133222_370.png", "w": 1920, "h": 1080}, "at": "2026-10-02T13:32:25", "result": {"ok": true, "clicked": [987, 464]}, "state": "running", "battle_context": false}
{"step": 8, "choice": "reward_card_3", "action": {"tool": "click", "args": {"x": 1294, "y": 464}}, "jev_ms": 1188, "screen": {"path": "{runtime_root}/shots/shot_20261002_133225_489.png", "w": 1920, "h": 1080}, "at": "2026-10-02T13:32:27", "result": {"ok": true, "clicked": [1294, 464]}, "state": "running", "battle_context": false}
{"step": 9, "choice": "reward_card_3", "action": {"tool": "click", "args": {"x": 1294, "y": 464}}, "jev_ms": 2406, "screen": {"path": "{runtime_root}/shots/shot_20261002_133228_421.png", "w": 1920, "h": 1080}, "at": "2026-10-02T13:32:32", "result": {"ok": true, "clicked": [1294, 464]}, "state": "running", "battle_context": false}
{"step": 0, "choice": "button_54", "action": {"tool": "click_text", "args": {"text": "拒绝饰品"}}, "jev_ms": 1578, "screen": {"path": "{runtime_root}/shots/shot_20261002_133314_263.png", "w": 1920, "h": 1080}, "at": "2026-10-02T13:33:20", "result": {"ok": true, "clicked": {"text": "拒绝饰品", "x": 1423, "y": 869}, "other_hits": 0}, "state": "running", "battle_context": false}
{"step": 1, "choice": "modal_confirm", "action": {"tool": "click", "args": {"x": 1170, "y": 759}}, "jev_ms": 1141, "screen": {"path": "{runtime_root}/shots/shot_20261002_133324_108.png", "w": 1920, "h": 1080}, "at": "2026-10-02T13:33:28", "result": {"ok": true, "clicked": [1170, 759]}, "state": "running", "battle_context": false}
{"step": 2, "choice": "wait", "action": {"tool": "wait", "args": {"seconds": 0.7}}, "jev_ms": 1125, "screen": {"path": "{runtime_root}/shots/shot_20261002_133328_672.png", "w": 1920, "h": 1080}, "at": "2026-10-02T13:33:30", "result": {"ok": true, "waited": 0.7}, "state": "running", "battle_context": false}
{"step": 3, "choice": "pack_inspect_1", "action": {"tool": "click", "args": {"x": 407, "y": 327}}, "jev_ms": 2265, "screen": {"path": "{runtime_root}/shots/shot_20261002_133331_784.png", "w": 1920, "h": 1080}, "at": "2026-10-02T13:33:35", "result": {"ok": true, "clicked": [407, 327]}, "state": "running", "battle_context": false}
{"step": 4, "choice": "pack_inspect_1", "action": {"tool": "click", "args": {"x": 407, "y": 327}}, "jev_ms": 1171, "screen": {"path": "{runtime_root}/shots/shot_20261002_133335_901.png", "w": 1920, "h": 1080}, "at": "2026-10-02T13:33:38", "result": {"ok": true, "clicked": [407, 327]}, "state": "running", "battle_context": false}
{"step": 5, "choice": "modal_confirm", "action": {"tool": "click", "args": {"x": 981, "y": 878}}, "jev_ms": 1422, "screen": {"path": "{runtime_root}/shots/shot_20261002_133338_590.png", "w": 1920, "h": 1080}, "at": "2026-10-02T13:33:42", "result": {"ok": true, "clicked": [981, 878]}, "state": "running", "battle_context": false}
{"step": 6, "choice": "pack_inspect_1", "action": {"tool": "click", "args": {"x": 407, "y": 327}}, "jev_ms": 1515, "screen": {"path": "{runtime_root}/shots/shot_20261002_133345_336.png", "w": 1920, "h": 1080}, "at": "2026-10-02T13:33:48", "result": {"ok": true, "clicked": [407, 327]}, "state": "running", "battle_context": false}
{"step": 7, "choice": "modal_confirm", "action": {"tool": "click", "args": {"x": 982, "y": 892}}, "jev_ms": 1078, "screen": {"path": "{runtime_root}/shots/shot_20261002_133348_567.png", "w": 1920, "h": 1080}, "at": "2026-10-02T13:33:51", "result": {"ok": true, "clicked": [982, 892]}, "state": "running", "battle_context": false}
{"step": 8, "choice": "pack_drag_1", "action": {"tool": "drag", "args": {"from_x": 326, "from_y": 486, "to_x": 326, "to_y": 983, "duration": 1.8}}, "jev_ms": 1109, "screen": {"path": "{runtime_root}/shots/shot_20261002_133352_345.png", "w": 1920, "h": 1080}, "at": "2026-10-02T13:33:54", "result": {"ok": true, "from": [326, 486], "to": [326, 983], "duration": 1.8}, "state": "running", "battle_context": false}
{"step": 9, "choice": "route_d", "action": {"tool": "route", "args": {"key": "d"}}, "jev_ms": 1078, "screen": {"path": "{runtime_root}/shots/shot_20261002_133357_448.png", "w": 1920, "h": 1080}, "at": "2026-10-02T13:34:00", "result": {"ok": true, "key": "enter"}, "state": "running", "battle_context": false}
{"step": 10, "choice": "route_d", "action": {"tool": "route", "args": {"key": "d"}}, "jev_ms": 1157, "screen": {"path": "{runtime_root}/shots/shot_20261002_133402_291.png", "w": 1920, "h": 1080}, "at": "2026-10-02T13:34:05", "result": {"ok": true, "key": "enter"}, "state": "running", "battle_context": false}
{"step": 11, "choice": "skip_dialog", "action": {"tool": "click", "args": {"x": 1699, "y": 970}}, "jev_ms": 0, "screen": {"path": "{runtime_root}/shots/shot_20261002_133406_950.png", "w": 1920, "h": 1080}, "at": "2026-10-02T13:34:08", "result": {"ok": true, "clicked": [1699, 970]}, "state": "running", "battle_context": false}
{"step": 12, "choice": "wait", "action": {"tool": "wait", "args": {"seconds": 0.7}}, "jev_ms": 1156, "screen": {"path": "{runtime_root}/shots/shot_20261002_133408_666.png", "w": 1920, "h": 1080}, "at": "2026-10-02T13:34:11", "result": {"ok": true, "waited": 0.7}, "state": "running", "battle_context": false}
{"step": 13, "choice": "event_scroll", "action": {"tool": "drag", "args": {"from_x": 1814, "from_y": 275, "to_x": 1814, "to_y": 734, "duration": 0.8}}, "jev_ms": 1140, "screen": {"path": "{runtime_root}/shots/shot_20261002_133412_338.png", "w": 1920, "h": 1080}, "at": "2026-10-02T13:34:15", "result": {"ok": true, "from": [1814, 275], "to": [1814, 734], "duration": 0.8}, "state": "running", "battle_context": false}
{"step": 14, "choice": "event_scroll", "action": {"tool": "drag", "args": {"from_x": 1814, "from_y": 275, "to_x": 1814, "to_y": 734, "duration": 0.8}}, "jev_ms": 1203, "screen": {"path": "{runtime_root}/shots/shot_20261002_133417_062.png", "w": 1920, "h": 1080}, "at": "2026-10-02T13:34:20", "result": {"ok": true, "from": [1814, 275], "to": [1814, 734], "duration": 0.8}, "state": "running", "battle_context": false}
{"step": 0, "choice": "event_scroll", "action": {"tool": "drag", "args": {"from_x": 1814, "from_y": 275, "to_x": 1814, "to_y": 734, "duration": 0.8}}, "jev_ms": 1281, "screen": {"path": "{runtime_root}/shots/shot_20261002_133528_143.png", "w": 1920, "h": 1080}, "at": "2026-10-02T13:35:31", "result": {"ok": true, "from": [1814, 275], "to": [1814, 734], "duration": 0.8}, "state": "running", "battle_context": false}
{"step": 1, "choice": "event_scroll", "action": {"tool": "drag", "args": {"from_x": 1814, "from_y": 275, "to_x": 1814, "to_y": 734, "duration": 0.8}}, "jev_ms": 1578, "screen": {"path": "{runtime_root}/shots/shot_20261002_133533_140.png", "w": 1920, "h": 1080}, "at": "2026-10-02T13:35:36", "result": {"ok": true, "from": [1814, 275], "to": [1814, 734], "duration": 0.8}, "state": "running", "battle_context": false}
{"step": 2, "choice": "event_scroll", "action": {"tool": "drag", "args": {"from_x": 1814, "from_y": 275, "to_x": 1814, "to_y": 734, "duration": 0.8}}, "jev_ms": 1078, "screen": {"path": "{runtime_root}/shots/shot_20261002_133538_013.png", "w": 1920, "h": 1080}, "at": "2026-10-02T13:35:40", "result": {"ok": true, "from": [1814, 275], "to": [1814, 734], "duration": 0.8}, "state": "running", "battle_context": false}
{"step": 3, "choice": "event_scroll", "action": {"tool": "drag", "args": {"from_x": 1814, "from_y": 275, "to_x": 1814, "to_y": 734, "duration": 0.8}}, "jev_ms": 8875, "screen": {"path": "{runtime_root}/shots/shot_20261002_133542_412.png", "w": 1920, "h": 1080}, "at": "2026-10-02T13:35:52", "result": {"ok": true, "from": [1814, 275], "to": [1814, 734], "duration": 0.8}, "state": "running", "battle_context": false}
{"step": 0, "choice": "skip_dialog", "action": {"tool": "click", "args": {"x": 1699, "y": 970}}, "jev_ms": 0, "screen": {"path": "{runtime_root}/shots/shot_20261002_133702_204.png", "w": 1920, "h": 1080}, "at": "2026-10-02T13:37:03", "result": {"ok": true, "clicked": [1699, 970]}, "state": "running", "battle_context": false}
{"step": 1, "choice": "wait", "action": {"tool": "wait", "args": {"seconds": 0.7}}, "jev_ms": 1422, "screen": {"path": "{runtime_root}/shots/shot_20261002_133704_128.png", "w": 1920, "h": 1080}, "at": "2026-10-02T13:37:07", "result": {"ok": true, "waited": 0.7}, "state": "running", "battle_context": false}
{"step": 0, "choice": "event_finish", "action": {"tool": "advance_dialog", "args": {"presses": 5}}, "jev_ms": 0, "screen": {"path": "{runtime_root}/shots/shot_20261002_133744_433.png", "w": 1920, "h": 1080}, "at": "2026-10-02T13:37:45", "result": {"ok": true, "key": "enter"}, "state": "running", "battle_context": false}
{"step": 1, "choice": "event_finish", "action": {"tool": "advance_dialog", "args": {"presses": 5}}, "jev_ms": 0, "screen": {"path": "{runtime_root}/shots/shot_20261002_133748_117.png", "w": 1920, "h": 1080}, "at": "2026-10-02T13:37:49", "result": {"ok": true, "key": "enter"}, "state": "running", "battle_context": false}
{"step": 2, "choice": "event_finish", "action": {"tool": "advance_dialog", "args": {"presses": 5}}, "jev_ms": 0, "screen": {"path": "{runtime_root}/shots/shot_20261002_133751_883.png", "w": 1920, "h": 1080}, "at": "2026-10-02T13:37:53", "result": {"ok": true, "key": "enter"}, "state": "running", "battle_context": false}
{"step": 3, "choice": "event_finish", "action": {"tool": "advance_dialog", "args": {"presses": 5}}, "jev_ms": 0, "screen": {"path": "{runtime_root}/shots/shot_20261002_133755_568.png", "w": 1920, "h": 1080}, "at": "2026-10-02T13:37:57", "result": {"ok": true, "key": "enter"}, "state": "running", "battle_context": false}
{"step": 4, "choice": "event_finish", "action": {"tool": "advance_dialog", "args": {"presses": 5}}, "jev_ms": 0, "screen": {"path": "{runtime_root}/shots/shot_20261002_133759_281.png", "w": 1920, "h": 1080}, "at": "2026-10-02T13:38:00", "result": {"ok": true, "key": "enter"}, "state": "running", "battle_context": false}
{"step": 5, "choice": "event_finish", "action": {"tool": "advance_dialog", "args": {"presses": 5}}, "jev_ms": 0, "screen": {"path": "{runtime_root}/shots/shot_20261002_133803_148.png", "w": 1920, "h": 1080}, "at": "2026-10-02T13:38:04", "result": {"ok": true, "key": "enter"}, "state": "running", "battle_context": false}
{"step": 6, "choice": "event_finish", "action": {"tool": "advance_dialog", "args": {"presses": 5}}, "jev_ms": 0, "screen": {"path": "{runtime_root}/shots/shot_20261002_133806_868.png", "w": 1920, "h": 1080}, "at": "2026-10-02T13:38:08", "result": {"ok": true, "key": "enter"}, "state": "running", "battle_context": false}
{"step": 7, "choice": "event_finish", "action": {"tool": "advance_dialog", "args": {"presses": 5}}, "jev_ms": 0, "screen": {"path": "{runtime_root}/shots/shot_20261002_133810_614.png", "w": 1920, "h": 1080}, "at": "2026-10-02T13:38:12", "result": {"ok": true, "key": "enter"}, "state": "running", "battle_context": false}
{"step": 8, "choice": "event_finish", "action": {"tool": "advance_dialog", "args": {"presses": 5}}, "jev_ms": 0, "screen": {"path": "{runtime_root}/shots/shot_20261002_133815_887.png", "w": 1920, "h": 1080}, "at": "2026-10-02T13:38:17", "result": {"ok": true, "key": "enter"}, "state": "running", "battle_context": false}
{"step": 9, "choice": "button_10", "action": {"tool": "click_text", "args": {"text": "确认"}}, "jev_ms": 1266, "screen": {"path": "{runtime_root}/shots/shot_20261002_133823_570.png", "w": 1920, "h": 1080}, "at": "2026-10-02T13:38:26", "result": {"ok": true, "clicked": {"text": "确认", "x": 969, "y": 801}, "other_hits": 0}, "state": "running", "battle_context": false}
{"step": 10, "choice": "route_d", "action": {"tool": "route", "args": {"key": "d"}}, "jev_ms": 1234, "screen": {"path": "{runtime_root}/shots/shot_20261002_133829_150.png", "w": 1920, "h": 1080}, "at": "2026-10-02T13:38:31", "result": {"ok": true, "key": "enter"}, "state": "running", "battle_context": false}
{"step": 11, "choice": "button_71", "action": {"tool": "keypress", "args": {"key": "enter"}}, "jev_ms": 1719, "screen": {"path": "{runtime_root}/shots/shot_20261002_133833_828.png", "w": 1920, "h": 1080}, "at": "2026-10-02T13:38:38", "result": {"ok": true, "key": "enter"}, "state": "running", "battle_context": true}
{"step": 12, "choice": "battle", "action": {"tool": "battle", "args": {"rounds": 2}}, "jev_ms": 0, "screen": {"path": "{runtime_root}/shots/shot_20261002_133839_452.png", "w": 1920, "h": 1080}, "at": "2026-10-02T13:38:40", "result": {"ok": true, "pairs": 2, "terminal": false}, "state": "running", "battle_context": true}
{"step": 0, "choice": "battle", "action": {"tool": "battle", "args": {"rounds": 2}}, "jev_ms": 0, "screen": {"path": "{runtime_root}/shots/shot_20261002_133845_900.png", "w": 1920, "h": 1080}, "at": "2026-10-02T13:38:47", "result": {"ok": true, "pairs": 26, "terminal": false}, "state": "running", "battle_context": true}
{"step": 1, "choice": "battle", "action": {"tool": "battle", "args": {"rounds": 2}}, "jev_ms": 0, "screen": {"path": "{runtime_root}/shots/shot_20261002_133934_824.png", "w": 1920, "h": 1080}, "at": "2026-10-02T13:39:35", "result": {"ok": true, "pairs": 24, "terminal": false}, "state": "running", "battle_context": true}
{"step": 0, "choice": "battle", "action": {"tool": "battle", "args": {"rounds": 2}}, "jev_ms": 0, "screen": {"path": "{runtime_root}/shots/shot_20261002_134059_395.png", "w": 1920, "h": 1080}, "at": "2026-10-02T13:41:00", "result": {"ok": true, "pairs": 24, "terminal": false}, "state": "running", "battle_context": true}
{"step": 1, "choice": "battle", "action": {"tool": "battle", "args": {"rounds": 2}}, "jev_ms": 0, "screen": {"path": "{runtime_root}/shots/shot_20261002_134147_099.png", "w": 1920, "h": 1080}, "at": "2026-10-02T13:41:48", "result": {"ok": true, "pairs": 16, "terminal": true, "screen": {"path": "{runtime_root}/shots/shot_20261002_134218_295.png", "w": 1920, "h": 1080}}, "state": "running", "battle_context": false}
{"step": 2, "choice": "route_d", "action": {"tool": "route", "args": {"key": "d"}}, "jev_ms": 1234, "screen": {"path": "{runtime_root}/shots/shot_20261002_134219_980.png", "w": 1920, "h": 1080}, "at": "2026-10-02T13:42:22", "result": {"ok": true, "key": "enter"}, "state": "running", "battle_context": false}
{"step": 3, "choice": "button_72", "action": {"tool": "keypress", "args": {"key": "enter"}}, "jev_ms": 1078, "screen": {"path": "{runtime_root}/shots/shot_20261002_134224_584.png", "w": 1920, "h": 1080}, "at": "2026-10-02T13:42:29", "result": {"ok": true, "key": "enter"}, "state": "running", "battle_context": true}
{"step": 4, "choice": "battle", "action": {"tool": "battle", "args": {"rounds": 2}}, "jev_ms": 0, "screen": {"path": "{runtime_root}/shots/shot_20261002_134229_731.png", "w": 1920, "h": 1080}, "at": "2026-10-02T13:42:30", "result": {"ok": true, "pairs": 26, "terminal": false}, "state": "running", "battle_context": true}
{"step": 5, "choice": "battle", "action": {"tool": "battle", "args": {"rounds": 2}}, "jev_ms": 0, "screen": {"path": "{runtime_root}/shots/shot_20261002_134318_383.png", "w": 1920, "h": 1080}, "at": "2026-10-02T13:43:19", "result": {"ok": true, "pairs": 24, "terminal": false}, "state": "running", "battle_context": true}
{"step": 6, "choice": "battle", "action": {"tool": "battle", "args": {"rounds": 2}}, "jev_ms": 0, "screen": {"path": "{runtime_root}/shots/shot_20261002_134407_231.png", "w": 1920, "h": 1080}, "at": "2026-10-02T13:44:08", "result": {"ok": true, "pairs": 26, "terminal": false}, "state": "running", "battle_context": true}
{"step": 7, "choice": "battle", "action": {"tool": "battle", "args": {"rounds": 2}}, "jev_ms": 0, "screen": {"path": "{runtime_root}/shots/shot_20261002_134456_091.png", "w": 1920, "h": 1080}, "at": "2026-10-02T13:44:57", "result": {"ok": true, "pairs": 26, "terminal": false}, "state": "running", "battle_context": true}
{"step": 8, "choice": "wait", "action": {"tool": "wait", "args": {"seconds": 0.7}}, "jev_ms": 1656, "screen": {"path": "{runtime_root}/shots/shot_20261002_134545_987.png", "w": 1920, "h": 1080}, "at": "2026-10-02T13:45:48", "result": {"ok": true, "waited": 0.7}, "state": "running", "battle_context": true}
{"step": 9, "choice": "battle", "action": {"tool": "battle", "args": {"rounds": 2}}, "jev_ms": 0, "screen": {"path": "{runtime_root}/shots/shot_20261002_134549_775.png", "w": 1920, "h": 1080}, "at": "2026-10-02T13:45:51", "result": {"ok": true, "pairs": 2, "terminal": true, "screen": {"path": "{runtime_root}/shots/shot_20261002_134553_792.png", "w": 1920, "h": 1080}}, "state": "running", "battle_context": false}
{"step": 10, "choice": "route_w", "action": {"tool": "route", "args": {"key": "w"}}, "jev_ms": 1093, "screen": {"path": "{runtime_root}/shots/shot_20261002_134555_492.png", "w": 1920, "h": 1080}, "at": "2026-10-02T13:45:57", "result": {"ok": true, "key": "enter"}, "state": "running", "battle_context": false}
{"step": 11, "choice": "skip_dialog", "action": {"tool": "click", "args": {"x": 1699, "y": 970}}, "jev_ms": 0, "screen": {"path": "{runtime_root}/shots/shot_20261002_134559_907.png", "w": 1920, "h": 1080}, "at": "2026-10-02T13:46:01", "result": {"ok": true, "clicked": [1699, 970]}, "state": "running", "battle_context": false}
{"step": 0, "choice": "battle", "action": {"tool": "battle", "args": {"rounds": 2}}, "jev_ms": 0, "screen": {"path": "{runtime_root}/shots/shot_20261002_134858_667.png", "w": 1920, "h": 1080}, "at": "2026-10-02T13:48:59", "result": {"ok": true, "pairs": 26, "terminal": false}, "state": "running", "battle_context": true}
{"step": 1, "choice": "battle", "action": {"tool": "battle", "args": {"rounds": 2}}, "jev_ms": 0, "screen": {"path": "{runtime_root}/shots/shot_20261002_134947_714.png", "w": 1920, "h": 1080}, "at": "2026-10-02T13:49:49", "result": {"ok": true, "pairs": 26, "terminal": false}, "state": "running", "battle_context": true}
{"step": 2, "choice": "battle", "action": {"tool": "battle", "args": {"rounds": 2}}, "jev_ms": 0, "screen": {"path": "{runtime_root}/shots/shot_20261002_135038_538.png", "w": 1920, "h": 1080}, "at": "2026-10-02T13:50:40", "result": {"ok": true, "pairs": 24, "terminal": false}, "state": "running", "battle_context": true}
@@ -0,0 +1,24 @@
{
"step": 2,
"choice": "battle",
"action": {
"tool": "battle",
"args": {
"rounds": 2
}
},
"jev_ms": 0,
"screen": {
"path": "{runtime_root}/shots/shot_20261002_135038_538.png",
"w": 1920,
"h": 1080
},
"at": "2026-10-02T13:50:40",
"result": {
"ok": true,
"pairs": 24,
"terminal": false
},
"state": "running",
"battle_context": true
}
@@ -0,0 +1,4 @@
{
"refresh_used": 0,
"floor": 5
}
@@ -0,0 +1,115 @@
{"step": 1, "action": {"tool": "click_text", "args": {"text": "选择"}}, "result": {"ok": true, "clicked": {"text": "选择", "x": 1709, "y": 868}, "other_hits": 0, "did": "click_text"}, "ms": 5937, "shot": "{runtime_root}/shots/shot_20261002_114728_478.png", "at": "2026-10-02T11:47:34"}
{"step": 2, "action": {"tool": "click_text", "args": {"text": "选择"}}, "result": {"ok": true, "clicked": {"text": "选择", "x": 1709, "y": 868}, "other_hits": 0, "did": "click_text"}, "ms": 7299, "shot": "{runtime_root}/shots/shot_20261002_114734_812.png", "at": "2026-10-02T11:47:42"}
{"step": 3, "action": {"tool": "click", "args": {"x": 1669, "y": 846}}, "result": {"ok": true, "clicked": [1669, 846], "did": "click"}, "ms": 5682, "shot": "{runtime_root}/shots/shot_20261002_114742_514.png", "at": "2026-10-02T11:47:48"}
{"step": 4, "status": "model-error", "error": "ValueError: no action JSON", "shot": "{runtime_root}/shots/shot_20261002_114748_599.png"}
{"step": 5, "action": {"tool": "click_text", "args": {"text": "选择"}}, "result": {"ok": true, "clicked": {"text": "选择", "x": 1709, "y": 868}, "other_hits": 0, "did": "click_text"}, "ms": 5938, "shot": "{runtime_root}/shots/shot_20261002_114757_930.png", "at": "2026-10-02T11:48:03"}
{"step": 6, "action": {"tool": "click", "args": {"x": 1669, "y": 846}}, "result": {"ok": true, "clicked": [1669, 846], "did": "click"}, "ms": 5449, "shot": "{runtime_root}/shots/shot_20261002_114804_263.png", "at": "2026-10-02T11:48:09"}
{"step": 7, "action": {"tool": "click_text", "args": {"text": "选择"}}, "result": {"ok": true, "clicked": {"text": "选择", "x": 1709, "y": 868}, "other_hits": 0, "did": "click_text"}, "ms": 7598, "shot": "{runtime_root}/shots/shot_20261002_114810_118.png", "at": "2026-10-02T11:48:17"}
{"step": 8, "action": {"tool": "click", "args": {"x": 1669, "y": 846}}, "result": {"ok": true, "clicked": [1669, 846], "did": "click"}, "ms": 4882, "shot": "{runtime_root}/shots/shot_20261002_114818_118.png", "at": "2026-10-02T11:48:22"}
{"step": 9, "action": {"tool": "keypress", "args": {"key": "enter"}}, "result": {"ok": true, "key": "enter", "did": "keypress"}, "ms": 5637, "shot": "{runtime_root}/shots/shot_20261002_114823_402.png", "at": "2026-10-02T11:48:29"}
{"step": 10, "action": {"tool": "keypress", "args": {"key": "enter"}}, "result": {"ok": true, "key": "enter", "did": "keypress"}, "ms": 7432, "shot": "{runtime_root}/shots/shot_20261002_114829_448.png", "at": "2026-10-02T11:48:36"}
{"step": 11, "action": {"tool": "click_text", "args": {"text": "选择"}}, "result": {"ok": true, "clicked": {"text": "选择", "x": 1709, "y": 868}, "other_hits": 0, "did": "click_text"}, "ms": 5710, "shot": "{runtime_root}/shots/shot_20261002_114837_283.png", "at": "2026-10-02T11:48:42"}
{"step": 12, "action": {"tool": "click_text", "args": {"text": "选择"}}, "result": {"ok": true, "clicked": {"text": "选择", "x": 1709, "y": 868}, "other_hits": 0, "did": "click_text"}, "ms": 5798, "shot": "{runtime_root}/shots/shot_20261002_114843_397.png", "at": "2026-10-02T11:48:49"}
{"step": 13, "action": {"tool": "click", "args": {"x": 1700, "y": 846}}, "result": {"ok": true, "clicked": [1700, 846], "did": "click"}, "ms": 5365, "shot": "{runtime_root}/shots/shot_20261002_114849_586.png", "at": "2026-10-02T11:48:54"}
{"step": 14, "action": {"tool": "click_text", "args": {"text": "选择"}}, "result": {"ok": true, "clicked": {"text": "选择", "x": 1709, "y": 868}, "other_hits": 0, "did": "click_text"}, "ms": 5782, "shot": "{runtime_root}/shots/shot_20261002_114855_349.png", "at": "2026-10-02T11:49:01"}
{"step": 15, "action": {"tool": "click_text", "args": {"text": "选择"}}, "result": {"ok": true, "clicked": {"text": "选择", "x": 1709, "y": 868}, "other_hits": 0, "did": "click_text"}, "ms": 5248, "shot": "{runtime_root}/shots/shot_20261002_114901_535.png", "at": "2026-10-02T11:49:06"}
{"step": 16, "action": {"tool": "click", "args": {"x": 1669, "y": 846}}, "result": {"ok": true, "clicked": [1669, 846], "did": "click"}, "ms": 4731, "shot": "{runtime_root}/shots/shot_20261002_114907_184.png", "at": "2026-10-02T11:49:11"}
{"step": 17, "action": {"tool": "click", "args": {"x": 1710, "y": 845}}, "result": {"ok": true, "clicked": [1710, 845], "did": "click"}, "ms": 4949, "shot": "{runtime_root}/shots/shot_20261002_114912_316.png", "at": "2026-10-02T11:49:17"}
{"step": 18, "action": {"tool": "click_text", "args": {"text": "选择"}}, "result": {"ok": true, "clicked": {"text": "选择", "x": 1709, "y": 868}, "other_hits": 0, "did": "click_text"}, "ms": 5799, "shot": "{runtime_root}/shots/shot_20261002_114917_667.png", "at": "2026-10-02T11:49:23"}
{"step": 19, "action": {"tool": "click", "args": {"x": 1360, "y": 847}}, "result": {"ok": true, "clicked": [1360, 847], "did": "click"}, "ms": 5648, "shot": "{runtime_root}/shots/shot_20261002_114923_867.png", "at": "2026-10-02T11:49:29"}
{"step": 20, "action": {"tool": "click_text", "args": {"text": "取消"}}, "result": {"ok": true, "clicked": {"text": "× 取消", "x": 775, "y": 740}, "other_hits": 0, "did": "click_text"}, "ms": 7331, "shot": "{runtime_root}/shots/shot_20261002_114929_920.png", "at": "2026-10-02T11:49:37"}
{"step": 21, "action": {"tool": "click_text", "args": {"text": "选择"}}, "result": {"ok": true, "clicked": {"text": "选择", "x": 1709, "y": 868}, "other_hits": 0, "did": "click_text"}, "ms": 6265, "shot": "{runtime_root}/shots/shot_20261002_114937_653.png", "at": "2026-10-02T11:49:43"}
{"step": 22, "action": {"tool": "click", "args": {"x": 1669, "y": 846}}, "result": {"ok": true, "clicked": [1669, 846], "did": "click"}, "ms": 5165, "shot": "{runtime_root}/shots/shot_20261002_114944_319.png", "at": "2026-10-02T11:49:49"}
{"step": 23, "action": {"tool": "keys", "args": {"keys": ["right", "enter"], "delay": 0.5}}, "result": {"did": "keys", "keys": ["right", "enter"]}, "ms": 6872, "shot": "{runtime_root}/shots/shot_20261002_114949_882.png", "at": "2026-10-02T11:49:56"}
{"step": 24, "action": {"tool": "click_text", "args": {"text": "选择"}}, "result": {"ok": true, "clicked": {"text": "选择", "x": 1709, "y": 868}, "other_hits": 0, "did": "click_text"}, "ms": 7625, "shot": "{runtime_root}/shots/shot_20261002_114957_165.png", "at": "2026-10-02T11:50:04"}
{"step": 25, "action": {"tool": "click_text", "args": {"text": "选择"}}, "result": {"ok": true, "clicked": {"text": "选择", "x": 1709, "y": 868}, "other_hits": 0, "did": "click_text"}, "ms": 6199, "shot": "{runtime_root}/shots/shot_20261002_115005_182.png", "at": "2026-10-02T11:50:11"}
{"step": 26, "action": {"tool": "click_text", "args": {"text": "选择"}}, "result": {"ok": true, "clicked": {"text": "选择", "x": 1709, "y": 868}, "other_hits": 0, "did": "click_text"}, "ms": 5399, "shot": "{runtime_root}/shots/shot_20261002_115011_788.png", "at": "2026-10-02T11:50:17"}
{"step": 27, "action": {"tool": "click", "args": {"x": 1700, "y": 770}}, "result": {"ok": true, "clicked": [1700, 770], "did": "click"}, "ms": 7516, "shot": "{runtime_root}/shots/shot_20261002_115017_588.png", "at": "2026-10-02T11:50:25"}
{"step": 28, "action": {"tool": "click_text", "args": {"text": "选择"}}, "result": {"ok": true, "clicked": {"text": "选择", "x": 1709, "y": 868}, "other_hits": 0, "did": "click_text"}, "ms": 5832, "shot": "{runtime_root}/shots/shot_20261002_115025_503.png", "at": "2026-10-02T11:50:31"}
{"step": 29, "action": {"tool": "click", "args": {"x": 1700, "y": 846}}, "result": {"ok": true, "clicked": [1700, 846], "did": "click"}, "ms": 4825, "shot": "{runtime_root}/shots/shot_20261002_115031_738.png", "at": "2026-10-02T11:50:36"}
{"step": 30, "action": {"tool": "click_text", "args": {"text": "选择"}}, "result": {"ok": true, "clicked": {"text": "选择", "x": 1709, "y": 868}, "other_hits": 0, "did": "click_text"}, "ms": 8683, "shot": "{runtime_root}/shots/shot_20261002_115036_974.png", "at": "2026-10-02T11:50:45"}
{"step": 31, "action": {"tool": "click_text", "args": {"text": "选择"}}, "result": {"ok": true, "clicked": {"text": "选择", "x": 1709, "y": 868}, "other_hits": 0, "did": "click_text"}, "ms": 5448, "shot": "{runtime_root}/shots/shot_20261002_115046_045.png", "at": "2026-10-02T11:50:51"}
{"step": 32, "action": {"tool": "get_state"}, "result": {"ok": true, "screen": {"path": "{runtime_root}/shots/shot_20261002_115058_934.png", "w": 1920, "h": 1080}, "items": [{"text": "FFFEFFFFFFFFFFFFFF", "x": 1180, "y": 36, "w": 184, "h": 20, "score": 0.98}, {"text": "GGGGGGGG", "x": 1180, "y": 59, "w": 138, "h": 20, "score": 0.951}, {"text": "HHHHHHHHHHHHHHH", "x": 1178, "y": 80, "w": 161, "h": 24, "score": 0.867}, {"text": "HHIDUHIIHII", "x": 1177, "y": 103, "w": 182, "h": 24, "score": 0.543}, {"text": "获得E.G.O饰品", "x": 982, "y": 231, "w": 138, "h": 28, "score": 0.981}, {"text": "鲜血装饰", "x": 902, "y": 267, "w": 112, "h": 34, "score": 0.999}, {"text": "回合开始时,随机使1名友方", "x": 844, "y": 450, "w": 255, "h": 28, "score": 0.995}, {"text": "单位获得2层伤害强化。", "x": 844, "y": 479, "w": 225, "h": 28, "score": 0.984}, {"text": "优先选取拥有色欲攻击技能的", "x": 844, "y": 537, "w": 268, "h": 28, "score": 0.998}, {"text": "友方单位,且该情况下使其额", "x": 843, "y": 566, "w": 269, "h": 28, "score": 0.997}, {"text": "外获得1层伤害强化。", "x": 843, "y": 595, "w": 203, "h": 28, "score": 0.973}, {"text": "拒绝饰品", "x": 1360, "y": 847, "w": 126, "h": 43, "score": 0.999}, {"text": "选择", "x": 1669, "y": 846, "w": 80, "h": 45, "score": 0.998}, {"text": "DANGER!", "x": 1300, "y": 1005, "w": 152, "h": 49, "score": 0.978}, {"text": "CUSTOm LANGUAGE", "x": 1784, "y": 1057, "w": 134, "h": 20, "score": 0.931}], "did": "get_state"}, "ms": 8285, "shot": "{runtime_root}/shots/shot_20261002_115051_892.png", "at": "2026-10-02T11:51:00"}
{"step": 33, "action": {"tool": "keypress", "args": {"key": "enter"}}, "result": {"ok": true, "key": "enter", "did": "keypress"}, "ms": 5750, "shot": "{runtime_root}/shots/shot_20261002_115100_582.png", "at": "2026-10-02T11:51:06"}
{"step": 34, "action": {"tool": "click_text", "args": {"text": "选择"}}, "result": {"ok": true, "clicked": {"text": "选择", "x": 1709, "y": 868}, "other_hits": 0, "did": "click_text"}, "ms": 5626, "shot": "{runtime_root}/shots/shot_20261002_115106_744.png", "at": "2026-10-02T11:51:12"}
{"step": 35, "action": {"tool": "click", "args": {"x": 1669, "y": 846}}, "result": {"ok": true, "clicked": [1669, 846], "did": "click"}, "ms": 4682, "shot": "{runtime_root}/shots/shot_20261002_115112_760.png", "at": "2026-10-02T11:51:17"}
{"step": 36, "action": {"tool": "click_text", "args": {"text": "选择"}}, "result": {"ok": true, "clicked": {"text": "选择", "x": 1709, "y": 868}, "other_hits": 0, "did": "click_text"}, "ms": 6398, "shot": "{runtime_root}/shots/shot_20261002_115117_846.png", "at": "2026-10-02T11:51:24"}
{"step": 37, "action": {"tool": "click_text", "args": {"text": "选择"}}, "result": {"ok": true, "clicked": {"text": "选择", "x": 1709, "y": 868}, "other_hits": 0, "did": "click_text"}, "ms": 5382, "shot": "{runtime_root}/shots/shot_20261002_115124_646.png", "at": "2026-10-02T11:51:30"}
{"step": 38, "action": {"tool": "click_text", "args": {"text": "选择"}}, "result": {"ok": true, "clicked": {"text": "选择", "x": 1709, "y": 868}, "other_hits": 0, "did": "click_text"}, "ms": 6115, "shot": "{runtime_root}/shots/shot_20261002_115130_429.png", "at": "2026-10-02T11:51:36"}
{"step": 39, "action": {"tool": "click", "args": {"x": 1669, "y": 846}}, "result": {"ok": true, "clicked": [1669, 846], "did": "click"}, "ms": 4799, "shot": "{runtime_root}/shots/shot_20261002_115136_946.png", "at": "2026-10-02T11:51:41"}
{"step": 40, "status": "model-error", "error": "ValueError: no action JSON", "shot": "{runtime_root}/shots/shot_20261002_115142_147.png"}
{"step": 41, "action": {"tool": "click_text", "args": {"text": "选择"}}, "result": {"ok": true, "clicked": {"text": "选择", "x": 1709, "y": 868}, "other_hits": 0, "did": "click_text"}, "ms": 5162, "shot": "{runtime_root}/shots/shot_20261002_115150_660.png", "at": "2026-10-02T11:51:55"}
{"step": 42, "action": {"tool": "click_text", "args": {"text": "选择"}}, "result": {"ok": true, "clicked": {"text": "选择", "x": 1709, "y": 868}, "other_hits": 0, "did": "click_text"}, "ms": 6298, "shot": "{runtime_root}/shots/shot_20261002_115156_228.png", "at": "2026-10-02T11:52:02"}
{"step": 43, "action": {"tool": "click", "args": {"x": 1710, "y": 845}}, "result": {"ok": true, "clicked": [1710, 845], "did": "click"}, "ms": 6015, "shot": "{runtime_root}/shots/shot_20261002_115202_931.png", "at": "2026-10-02T11:52:08"}
{"step": 44, "action": {"tool": "click", "args": {"x": 1669, "y": 846}}, "result": {"ok": true, "clicked": [1669, 846], "did": "click"}, "ms": 4448, "shot": "{runtime_root}/shots/shot_20261002_115209_350.png", "at": "2026-10-02T11:52:13"}
{"step": 45, "action": {"tool": "click_text", "args": {"text": "选择"}}, "result": {"ok": true, "clicked": {"text": "选择", "x": 1709, "y": 868}, "other_hits": 0, "did": "click_text"}, "ms": 5698, "shot": "{runtime_root}/shots/shot_20261002_115214_195.png", "at": "2026-10-02T11:52:19"}
{"step": 46, "action": {"tool": "click", "args": {"x": 1669, "y": 846}}, "result": {"ok": true, "clicked": [1669, 846], "did": "click"}, "ms": 4032, "shot": "{runtime_root}/shots/shot_20261002_115220_295.png", "at": "2026-10-02T11:52:24"}
{"step": 47, "action": {"tool": "click_text", "args": {"text": "选择"}}, "result": {"ok": true, "clicked": {"text": "选择", "x": 1709, "y": 868}, "other_hits": 0, "did": "click_text"}, "ms": 5732, "shot": "{runtime_root}/shots/shot_20261002_115224_730.png", "at": "2026-10-02T11:52:30"}
{"step": 48, "action": {"tool": "click_text", "args": {"text": "选择"}}, "result": {"ok": true, "clicked": {"text": "选择", "x": 1709, "y": 868}, "other_hits": 0, "did": "click_text"}, "ms": 6015, "shot": "{runtime_root}/shots/shot_20261002_115230_863.png", "at": "2026-10-02T11:52:36"}
{"step": 49, "status": "model-error", "error": "ValueError: no action JSON", "shot": "{runtime_root}/shots/shot_20261002_115237_280.png"}
{"step": 50, "action": {"tool": "click_text", "args": {"text": "选择"}}, "result": {"ok": true, "clicked": {"text": "选择", "x": 1709, "y": 868}, "other_hits": 0, "did": "click_text"}, "ms": 6900, "shot": "{runtime_root}/shots/shot_20261002_115246_794.png", "at": "2026-10-02T11:52:53"}
{"step": 51, "action": {"tool": "click", "args": {"x": 1660, "y": 850}}, "result": {"ok": true, "clicked": [1660, 850], "did": "click"}, "ms": 5532, "shot": "{runtime_root}/shots/shot_20261002_115254_095.png", "at": "2026-10-02T11:52:59"}
{"step": 52, "action": {"tool": "click_text", "args": {"text": "选择"}}, "result": {"ok": true, "clicked": {"text": "选择", "x": 1709, "y": 868}, "other_hits": 0, "did": "click_text"}, "ms": 7749, "shot": "{runtime_root}/shots/shot_20261002_115300_035.png", "at": "2026-10-02T11:53:07"}
{"step": 53, "action": {"tool": "click_text", "args": {"text": "选择"}}, "result": {"ok": true, "clicked": {"text": "选择", "x": 1709, "y": 868}, "other_hits": 0, "did": "click_text"}, "ms": 6814, "shot": "{runtime_root}/shots/shot_20261002_115308_178.png", "at": "2026-10-02T11:53:14"}
{"step": 54, "action": {"tool": "click", "args": {"x": 1669, "y": 846}}, "result": {"ok": true, "clicked": [1669, 846], "did": "click"}, "ms": 4682, "shot": "{runtime_root}/shots/shot_20261002_115315_395.png", "at": "2026-10-02T11:53:20"}
{"step": 55, "action": {"tool": "click_text", "args": {"text": "选择"}}, "result": {"ok": true, "clicked": {"text": "选择", "x": 1709, "y": 868}, "other_hits": 0, "did": "click_text"}, "ms": 5815, "shot": "{runtime_root}/shots/shot_20261002_115320_478.png", "at": "2026-10-02T11:53:26"}
{"step": 56, "action": {"tool": "click_text", "args": {"text": "选择"}}, "result": {"ok": true, "clicked": {"text": "选择", "x": 1709, "y": 868}, "other_hits": 0, "did": "click_text"}, "ms": 5398, "shot": "{runtime_root}/shots/shot_20261002_115326_696.png", "at": "2026-10-02T11:53:32"}
{"step": 57, "action": {"tool": "click", "args": {"x": 1670, "y": 852}}, "result": {"ok": true, "clicked": [1670, 852], "did": "click"}, "ms": 6765, "shot": "{runtime_root}/shots/shot_20261002_115332_496.png", "at": "2026-10-02T11:53:39"}
{"step": 58, "action": {"tool": "click_text", "args": {"text": "选择"}}, "result": {"ok": true, "clicked": {"text": "选择", "x": 1709, "y": 868}, "other_hits": 0, "did": "click_text"}, "ms": 6565, "shot": "{runtime_root}/shots/shot_20261002_115339_666.png", "at": "2026-10-02T11:53:46"}
{"step": 59, "action": {"tool": "click_text", "args": {"text": "选择"}}, "result": {"ok": true, "clicked": {"text": "选择", "x": 1709, "y": 868}, "other_hits": 0, "did": "click_text"}, "ms": 7900, "shot": "{runtime_root}/shots/shot_20261002_115346_630.png", "at": "2026-10-02T11:53:54"}
{"step": 60, "action": {"tool": "click", "args": {"x": 1669, "y": 846}}, "result": {"ok": true, "clicked": [1669, 846], "did": "click"}, "ms": 4781, "shot": "{runtime_root}/shots/shot_20261002_115354_932.png", "at": "2026-10-02T11:53:59"}
{"step": 61, "action": {"tool": "click", "args": {"x": 1669, "y": 846}}, "result": {"ok": true, "clicked": [1669, 846], "did": "click"}, "ms": 5232, "shot": "{runtime_root}/shots/shot_20261002_115400_120.png", "at": "2026-10-02T11:54:05"}
{"step": 62, "action": {"tool": "click_text", "args": {"text": "选择"}}, "result": {"ok": true, "clicked": {"text": "选择", "x": 1709, "y": 868}, "other_hits": 0, "did": "click_text"}, "ms": 6165, "shot": "{runtime_root}/shots/shot_20261002_115405_747.png", "at": "2026-10-02T11:54:11"}
{"step": 63, "action": {"tool": "click_text", "args": {"text": "选择"}}, "result": {"ok": true, "clicked": {"text": "选择", "x": 1709, "y": 868}, "other_hits": 0, "did": "click_text"}, "ms": 5599, "shot": "{runtime_root}/shots/shot_20261002_115412_315.png", "at": "2026-10-02T11:54:17"}
{"step": 64, "action": {"tool": "click", "args": {"x": 1669, "y": 846}}, "result": {"ok": true, "clicked": [1669, 846], "did": "click"}, "ms": 5449, "shot": "{runtime_root}/shots/shot_20261002_115418_314.png", "at": "2026-10-02T11:54:23"}
{"step": 65, "action": {"tool": "click_text", "args": {"text": "选择"}}, "result": {"ok": true, "clicked": {"text": "选择", "x": 1709, "y": 868}, "other_hits": 0, "did": "click_text"}, "ms": 5631, "shot": "{runtime_root}/shots/shot_20261002_115424_170.png", "at": "2026-10-02T11:54:29"}
{"step": 66, "action": {"tool": "click_text", "args": {"text": "选择"}}, "result": {"ok": true, "clicked": {"text": "选择", "x": 1709, "y": 868}, "other_hits": 0, "did": "click_text"}, "ms": 5317, "shot": "{runtime_root}/shots/shot_20261002_115430_200.png", "at": "2026-10-02T11:54:35"}
{"step": 67, "action": {"tool": "click", "args": {"x": 1669, "y": 846}}, "result": {"ok": true, "clicked": [1669, 846], "did": "click"}, "ms": 4582, "shot": "{runtime_root}/shots/shot_20261002_115435_916.png", "at": "2026-10-02T11:54:40"}
{"step": 68, "action": {"tool": "click_text", "args": {"text": "选择"}}, "result": {"ok": true, "clicked": {"text": "选择", "x": 1709, "y": 868}, "other_hits": 0, "did": "click_text"}, "ms": 5964, "shot": "{runtime_root}/shots/shot_20261002_115440_903.png", "at": "2026-10-02T11:54:46"}
{"step": 69, "action": {"tool": "click_text", "args": {"text": "选择"}}, "result": {"ok": true, "clicked": {"text": "选择", "x": 1709, "y": 868}, "other_hits": 0, "did": "click_text"}, "ms": 5299, "shot": "{runtime_root}/shots/shot_20261002_115447_273.png", "at": "2026-10-02T11:54:52"}
{"step": 70, "action": {"tool": "click_text", "args": {"text": "选择"}}, "result": {"ok": true, "clicked": {"text": "选择", "x": 1709, "y": 868}, "other_hits": 0, "did": "click_text"}, "ms": 5831, "shot": "{runtime_root}/shots/shot_20261002_115452_967.png", "at": "2026-10-02T11:54:58"}
{"step": 71, "action": {"tool": "click", "args": {"x": 1669, "y": 846}}, "result": {"ok": true, "clicked": [1669, 846], "did": "click"}, "ms": 4299, "shot": "{runtime_root}/shots/shot_20261002_115459_199.png", "at": "2026-10-02T11:55:03"}
{"step": 72, "action": {"tool": "keys", "args": {"keys": ["right", "enter"], "delay": 0.6}}, "result": {"did": "keys", "keys": ["right", "enter"]}, "ms": 8388, "shot": "{runtime_root}/shots/shot_20261002_115503_905.png", "at": "2026-10-02T11:55:12"}
{"step": 73, "action": {"tool": "click_text", "args": {"text": "选择"}}, "result": {"ok": true, "clicked": {"text": "选择", "x": 1709, "y": 868}, "other_hits": 0, "did": "click_text"}, "ms": 6275, "shot": "{runtime_root}/shots/shot_20261002_115512_704.png", "at": "2026-10-02T11:55:18"}
{"step": 74, "action": {"tool": "click_text", "args": {"text": "选择"}}, "result": {"ok": true, "clicked": {"text": "选择", "x": 1709, "y": 868}, "other_hits": 0, "did": "click_text"}, "ms": 5616, "shot": "{runtime_root}/shots/shot_20261002_115519_371.png", "at": "2026-10-02T11:55:24"}
{"step": 75, "action": {"tool": "click_text", "args": {"text": "选择"}}, "result": {"ok": true, "clicked": {"text": "选择", "x": 1709, "y": 868}, "other_hits": 0, "did": "click_text"}, "ms": 5764, "shot": "{runtime_root}/shots/shot_20261002_115525_385.png", "at": "2026-10-02T11:55:31"}
{"step": 76, "status": "model-error", "error": "ValueError: no action JSON", "shot": "{runtime_root}/shots/shot_20261002_115531_550.png"}
{"step": 77, "action": {"tool": "click", "args": {"x": 640, "y": 430}}, "result": {"ok": true, "clicked": [640, 430], "did": "click"}, "ms": 6590, "shot": "{runtime_root}/shots/shot_20261002_115540_718.png", "at": "2026-10-02T11:55:47"}
{"step": 78, "action": {"tool": "click_text", "args": {"text": "选择"}}, "result": {"ok": true, "clicked": {"text": "选择", "x": 1709, "y": 868}, "other_hits": 0, "did": "click_text"}, "ms": 6665, "shot": "{runtime_root}/shots/shot_20261002_115547_702.png", "at": "2026-10-02T11:55:54"}
{"step": 79, "action": {"tool": "click", "args": {"x": 1669, "y": 846}}, "result": {"ok": true, "clicked": [1669, 846], "did": "click"}, "ms": 4715, "shot": "{runtime_root}/shots/shot_20261002_115554_772.png", "at": "2026-10-02T11:55:59"}
{"step": 1, "action": {"tool": "click", "args": {"x": 315, "y": 715}}, "result": {"ok": true, "clicked": [315, 715], "did": "click"}, "ms": 6329, "shot": "{runtime_root}/shots/shot_20261002_120156_156.png", "at": "2026-10-02T12:02:02"}
{"step": 2, "action": {"tool": "click", "args": {"x": 88, "y": 215}}, "result": {"ok": true, "clicked": [88, 215], "did": "click"}, "ms": 4382, "shot": "{runtime_root}/shots/shot_20261002_120202_871.png", "at": "2026-10-02T12:02:07"}
{"step": 3, "status": "model-error", "error": "ValueError: no action JSON", "shot": "{runtime_root}/shots/shot_20261002_120207_656.png"}
{"step": 4, "status": "model-error", "error": "ValueError: no action JSON", "shot": "{runtime_root}/shots/shot_20261002_120216_292.png"}
{"step": 5, "status": "model-error", "error": "ValueError: no action JSON", "shot": "{runtime_root}/shots/shot_20261002_120224_259.png"}
{"step": 6, "status": "model-error", "error": "ValueError: no action JSON", "shot": "{runtime_root}/shots/shot_20261002_120232_216.png"}
{"step": 7, "action": {"tool": "click", "args": {"x": 345, "y": 210}}, "result": {"ok": true, "clicked": [345, 210], "did": "click"}, "ms": 5878, "shot": "{runtime_root}/shots/shot_20261002_120241_285.png", "at": "2026-10-02T12:02:47"}
{"step": 8, "status": "model-error", "error": "ValueError: no action JSON", "shot": "{runtime_root}/shots/shot_20261002_120247_565.png"}
{"step": 9, "status": "model-error", "error": "ValueError: no action JSON", "shot": "{runtime_root}/shots/shot_20261002_120256_043.png"}
{"step": 10, "status": "model-error", "error": "ValueError: no action JSON", "shot": "{runtime_root}/shots/shot_20261002_120304_233.png"}
{"step": 11, "status": "model-error", "error": "URLError: <urlopen error [SSL: UNEXPECTED_EOF_WHILE_READING] EOF occurred in violation of protocol (_ssl.c:1010)>", "shot": "{runtime_root}/shots/shot_20261002_120312_181.png"}
{"step": 12, "status": "model-error", "error": "ValueError: no action JSON", "shot": "{runtime_root}/shots/shot_20261002_120336_594.png"}
{"step": 13, "action": {"tool": "click", "args": {"x": 85, "y": 215}}, "result": {"ok": true, "clicked": [85, 215], "did": "click"}, "ms": 5142, "shot": "{runtime_root}/shots/shot_20261002_120344_680.png", "at": "2026-10-02T12:03:49"}
{"step": 14, "status": "model-error", "error": "ValueError: no action JSON", "shot": "{runtime_root}/shots/shot_20261002_120350_213.png"}
{"step": 15, "status": "model-error", "error": "ValueError: no action JSON", "shot": "{runtime_root}/shots/shot_20261002_120357_981.png"}
{"step": 16, "status": "model-error", "error": "ValueError: no action JSON", "shot": "{runtime_root}/shots/shot_20261002_120406_794.png"}
{"step": 17, "status": "model-error", "error": "ValueError: no action JSON", "shot": "{runtime_root}/shots/shot_20261002_120414_594.png"}
{"step": 18, "status": "model-error", "error": "ValueError: no action JSON", "shot": "{runtime_root}/shots/shot_20261002_120423_015.png"}
{"step": 1, "action": {"tool": "click", "args": {"x": 100, "y": 240}}, "result": {"ok": true, "clicked": [100, 240], "did": "click"}, "ms": 5372, "shot": "{runtime_root}/shots/shot_20261002_120744_582.png", "at": "2026-10-02T12:07:49"}
{"step": 2, "action": {"tool": "click", "args": {"x": 92, "y": 242}}, "result": {"ok": true, "clicked": [92, 242], "did": "click"}, "ms": 6581, "shot": "{runtime_root}/shots/shot_20261002_120750_350.png", "at": "2026-10-02T12:07:56"}
{"step": 3, "action": {"tool": "click_text", "args": {"text": "进入"}}, "result": {"ok": false, "error": "text not found: 进入", "screen": {"path": "{runtime_root}/shots/shot_20261002_120803_330.png", "w": 1920, "h": 1080}, "items": [{"text": "第1112527", "x": 727, "y": 33, "w": 378, "h": 48, "score": 0.748}, {"text": "2699", "x": 1498, "y": 45, "w": 89, "h": 49, "score": 1.0}, {"text": "1076", "x": 1648, "y": 47, "w": 78, "h": 45, "score": 0.993}, {"text": "正在探索第2层", "x": 62, "y": 133, "w": 296, "h": 53, "score": 0.991}, {"text": "茗姆", "x": 626, "y": 155, "w": 131, "h": 55, "score": 0.959}, {"text": "地狱鸡", "x": 55, "y": 183, "w": 80, "h": 37, "score": 0.997}, {"text": "237", "x": 396, "y": 1026, "w": 40, "h": 22, "score": 0.997}, {"text": "271", "x": 512, "y": 1026, "w": 41, "h": 22, "score": 0.997}, {"text": "203", "x": 1323, "y": 1028, "w": 36, "h": 18, "score": 0.961}, {"text": "209", "x": 1437, "y": 1026, "w": 41, "h": 22, "score": 0.998}, {"text": "268", "x": 1554, "y": 1026, "w": 36, "h": 22, "score": 0.991}, {"text": "CUSTOm LANGUAGE", "x": 1784, "y": 1057, "w": 132, "h": 19, "score": 0.935}], "did": "click_text"}, "ms": 7158, "shot": "{runtime_root}/shots/shot_20261002_120757_336.png", "at": "2026-10-02T12:08:04"}
{"step": 4, "action": {"tool": "click", "args": {"x": 105, "y": 258}}, "result": {"ok": true, "clicked": [105, 258], "did": "click"}, "ms": 8489, "shot": "{runtime_root}/shots/shot_20261002_120804_898.png", "at": "2026-10-02T12:08:13"}
{"step": 5, "action": {"tool": "click", "args": {"x": 82, "y": 242}}, "result": {"ok": true, "clicked": [82, 242], "did": "click"}, "ms": 6048, "shot": "{runtime_root}/shots/shot_20261002_120813_788.png", "at": "2026-10-02T12:08:19"}
{"step": 6, "action": {"tool": "get_state"}, "result": {"ok": true, "screen": {"path": "{runtime_root}/shots/shot_20261002_120827_298.png", "w": 1920, "h": 1080}, "items": [{"text": "第1112527", "x": 727, "y": 33, "w": 378, "h": 48, "score": 0.748}, {"text": "2699", "x": 1498, "y": 45, "w": 89, "h": 49, "score": 1.0}, {"text": "1076", "x": 1648, "y": 47, "w": 78, "h": 45, "score": 0.993}, {"text": "正在探索第2层", "x": 62, "y": 133, "w": 296, "h": 53, "score": 0.992}, {"text": "茗姆", "x": 626, "y": 155, "w": 131, "h": 55, "score": 0.959}, {"text": "地狱鸡", "x": 55, "y": 183, "w": 80, "h": 37, "score": 0.997}, {"text": "237", "x": 396, "y": 1026, "w": 40, "h": 22, "score": 0.997}, {"text": "271", "x": 512, "y": 1026, "w": 41, "h": 22, "score": 0.997}, {"text": "24", "x": 747, "y": 1029, "w": 35, "h": 17, "score": 0.813}, {"text": "203", "x": 1323, "y": 1028, "w": 35, "h": 18, "score": 0.994}, {"text": "209", "x": 1438, "y": 1028, "w": 38, "h": 18, "score": 0.999}, {"text": "CUSTOm LANGUAGE", "x": 1784, "y": 1057, "w": 132, "h": 19, "score": 0.935}], "did": "get_state"}, "ms": 8213, "shot": "{runtime_root}/shots/shot_20261002_120820_231.png", "at": "2026-10-02T12:08:28"}
{"step": 7, "action": {"tool": "click", "args": {"x": 100, "y": 360}}, "result": {"ok": true, "clicked": [100, 360], "did": "click"}, "ms": 4651, "shot": "{runtime_root}/shots/shot_20261002_120828_848.png", "at": "2026-10-02T12:08:33"}
{"step": 8, "action": {"tool": "click", "args": {"x": 90, "y": 315}}, "result": {"ok": true, "clicked": [90, 315], "did": "click"}, "ms": 12532, "shot": "{runtime_root}/shots/shot_20261002_120833_900.png", "at": "2026-10-02T12:08:46"}
{"step": 9, "action": {"tool": "click", "args": {"x": 370, "y": 75}}, "result": {"ok": true, "clicked": [370, 75], "did": "click"}, "ms": 5831, "shot": "{runtime_root}/shots/shot_20261002_120846_831.png", "at": "2026-10-02T12:08:52"}
{"step": 10, "status": "model-error", "error": "RemoteDisconnected: Remote end closed connection without response", "model_errs": 1, "shot": "{runtime_root}/shots/shot_20261002_120853_067.png"}
{"step": 11, "action": {"tool": "click", "args": {"x": 1400, "y": 330}}, "result": {"ok": true, "clicked": [1400, 330], "did": "click"}, "ms": 6715, "shot": "{runtime_root}/shots/shot_20261002_120952_950.png", "at": "2026-10-02T12:09:59"}
{"step": 12, "action": {"tool": "click", "args": {"x": 795, "y": 430}}, "result": {"ok": true, "clicked": [795, 430], "did": "click"}, "ms": 8715, "shot": "{runtime_root}/shots/shot_20261002_121000_068.png", "at": "2026-10-02T12:10:08"}
{"step": 13, "action": {"tool": "get_state"}, "result": {"ok": true, "screen": {"path": "{runtime_root}/shots/shot_20261002_121014_836.png", "w": 1920, "h": 1080}, "items": [{"text": "17 菱 1 11 25 8 27 11 0 11", "x": 686, "y": 36, "w": 588, "h": 47, "score": 0.737}, {"text": "2699", "x": 1446, "y": 37, "w": 159, "h": 66, "score": 0.967}, {"text": ".1076", "x": 1588, "y": 48, "w": 140, "h": 42, "score": 0.998}, {"text": "CONNECTING", "x": 1575, "y": 78, "w": 246, "h": 57, "score": 0.974}, {"text": "正在探索第2层", "x": 62, "y": 131, "w": 294, "h": 51, "score": 0.993}, {"text": "地狱鸡", "x": 58, "y": 186, "w": 74, "h": 30, "score": 0.994}, {"text": "4WAR", "x": 1114, "y": 377, "w": 53, "h": 35, "score": 0.909}, {"text": "237", "x": 396, "y": 1026, "w": 42, "h": 22, "score": 0.998}, {"text": "271", "x": 512, "y": 1026, "w": 41, "h": 22, "score": 0.997}, {"text": "251", "x": 632, "y": 1030, "w": 26, "h": 15, "score": 0.569}, {"text": "124", "x": 746, "y": 1028, "w": 36, "h": 18, "score": 0.836}, {"text": "2", "x": 982, "y": 1029, "w": 24, "h": 14, "score": 0.72}, {"text": "203", "x": 1323, "y": 1028, "w": 36, "h": 18, "score": 0.995}, {"text": "209", "x": 1436, "y": 1026, "w": 42, "h": 22, "score": 0.998}, {"text": "268", "x": 1555, "y": 1026, "w": 35, "h": 22, "score": 0.993}, {"text": "CUSTOm LANGUAGE", "x": 1784, "y": 1057, "w": 132, "h": 19, "score": 0.934}], "did": "get_state"}, "ms": 7188, "shot": "{runtime_root}/shots/shot_20261002_121009_188.png", "at": "2026-10-02T12:10:16"}
{"step": 14, "status": "model-error", "error": "ValueError: no action JSON (raw='The screenshot shows a map with nodes. I see icons: a box icon (物品/事件?), a wheel \"600\", a moon icon, a return/back arrow icon, and \"割\" icon, and a purple icon. There\\'s \"CONNECTING\" text.\\n\\nThe OCR show')", "model_errs": 1, "shot": "{runtime_root}/shots/shot_20261002_121016_787.png"}
{"step": 15, "action": {"tool": "click", "args": {"x": 900, "y": 420}}, "result": {"ok": true, "clicked": [900, 420], "did": "click"}, "ms": 17494, "shot": "{runtime_root}/shots/shot_20261002_121036_672.png", "at": "2026-10-02T12:10:54"}
{"step": 16, "action": {"tool": "click", "args": {"x": 1114, "y": 377}}, "result": {"ok": true, "clicked": [1114, 377], "did": "click"}, "ms": 8049, "shot": "{runtime_root}/shots/shot_20261002_121054_560.png", "at": "2026-10-02T12:11:02"}
{"step": 17, "action": {"tool": "get_state"}, "result": {"ok": true, "screen": {"path": "{runtime_root}/shots/shot_20261002_121116_491.png", "w": 1920, "h": 1080}, "items": [{"text": "17 菱 1 11 25 8 27 11 0 11", "x": 686, "y": 36, "w": 588, "h": 47, "score": 0.737}, {"text": "2699", "x": 1446, "y": 37, "w": 159, "h": 66, "score": 0.969}, {"text": ".1076", "x": 1588, "y": 48, "w": 140, "h": 42, "score": 0.999}, {"text": "CONNECTING", "x": 1575, "y": 78, "w": 246, "h": 57, "score": 0.976}, {"text": "正在探索第2层", "x": 62, "y": 133, "w": 294, "h": 49, "score": 0.992}, {"text": "地狱鸡", "x": 58, "y": 186, "w": 74, "h": 30, "score": 0.992}, {"text": "4WAR", "x": 1114, "y": 377, "w": 53, "h": 35, "score": 0.909}, {"text": "237", "x": 396, "y": 1026, "w": 42, "h": 22, "score": 0.998}, {"text": "271", "x": 512, "y": 1026, "w": 41, "h": 22, "score": 0.997}, {"text": "124", "x": 746, "y": 1028, "w": 36, "h": 18, "score": 0.831}, {"text": "203", "x": 1322, "y": 1026, "w": 38, "h": 22, "score": 0.997}, {"text": "209", "x": 1436, "y": 1026, "w": 42, "h": 22, "score": 0.998}, {"text": "268", "x": 1556, "y": 1028, "w": 32, "h": 18, "score": 0.99}, {"text": "CUSTOm LANGUAGE", "x": 1784, "y": 1057, "w": 132, "h": 19, "score": 0.931}], "did": "get_state"}, "ms": 14779, "shot": "{runtime_root}/shots/shot_20261002_121103_006.png", "at": "2026-10-02T12:11:17"}
{"step": 18, "status": "model-error", "error": "RemoteDisconnected: Remote end closed connection without response", "model_errs": 1, "shot": "{runtime_root}/shots/shot_20261002_121118_193.png"}
@@ -0,0 +1,6 @@
{"step": 1, "status": "model-error", "error": "HTTPError: HTTP Error 403: Forbidden", "shot": "{runtime_root}/shots/shot_20261002_114257_613.png"}
{"step": 2, "status": "model-error", "error": "HTTPError: HTTP Error 403: Forbidden", "shot": "{runtime_root}/shots/shot_20261002_114302_872.png"}
{"step": 3, "status": "model-error", "error": "HTTPError: HTTP Error 403: Forbidden", "shot": "{runtime_root}/shots/shot_20261002_114307_310.png"}
{"step": 1, "action": {"tool": "click_text", "args": {"text": "选择"}}, "result": {"ok": true, "clicked": {"text": "选择", "x": 1709, "y": 868}, "other_hits": 0, "did": "click_text"}, "ms": 6813, "shot": "{runtime_root}/shots/shot_20261002_114601_679.png", "at": "2026-10-02T11:46:08"}
{"step": 2, "action": {"tool": "click", "args": {"x": 1669, "y": 846}}, "result": {"ok": true, "clicked": [1669, 846], "did": "click"}, "ms": 4765, "shot": "{runtime_root}/shots/shot_20261002_114608_894.png", "at": "2026-10-02T11:46:13"}
{"step": 3, "action": {"tool": "click_text", "args": {"text": "选择"}}, "result": {"ok": true, "clicked": {"text": "选择", "x": 1709, "y": 868}, "other_hits": 0, "did": "click_text"}, "ms": 7415, "shot": "{runtime_root}/shots/shot_20261002_114614_063.png", "at": "2026-10-02T11:46:21"}
@@ -0,0 +1,31 @@
[lc_mcp] task mirror start {"count": 1}
[DEBUG] 2026-10-02 12:12:30,370 [AALC] module\config\config.py:420: teams_active_queue change to: []
[DEBUG] 2026-10-02 12:12:30,379 [AALC] module\config\config.py:421: teams_be_select change to: [False]
[DEBUG] 2026-10-02 12:12:30,379 [AALC] module\config\config.py:422: teams_order change to: [0]
[DEBUG] 2026-10-02 12:12:30,380 [AALC] module\config\config.py:423: teams_be_select_num change to: 0
[DEBUG] 2026-10-02 12:12:30,423 [AALC] module\config\config.py:51: 配置文件已加载,版本号:DEFAULT VERSION, 配置版本: 1781049600
[INFO] 2026-10-02 12:12:30,906 [RapidOCR] base.py:22: Using engine_name: onnxruntime
[INFO] 2026-10-02 12:12:31,010 [RapidOCR] download_file.py:60: File exists and is valid: D:\codex\lc-mcp\vendor\aalc\.venv\Lib\site-packages\rapidocr\models\ch_PP-OCRv4_det_infer.onnx
[INFO] 2026-10-02 12:12:31,011 [RapidOCR] main.py:55: Using D:\codex\lc-mcp\vendor\aalc\.venv\Lib\site-packages\rapidocr\models\ch_PP-OCRv4_det_infer.onnx
[INFO] 2026-10-02 12:12:31,100 [RapidOCR] base.py:22: Using engine_name: onnxruntime
[INFO] 2026-10-02 12:12:31,103 [RapidOCR] download_file.py:60: File exists and is valid: D:\codex\lc-mcp\vendor\aalc\.venv\Lib\site-packages\rapidocr\models\ch_ppocr_mobile_v2.0_cls_infer.onnx
[INFO] 2026-10-02 12:12:31,103 [RapidOCR] main.py:55: Using D:\codex\lc-mcp\vendor\aalc\.venv\Lib\site-packages\rapidocr\models\ch_ppocr_mobile_v2.0_cls_infer.onnx
[INFO] 2026-10-02 12:12:31,143 [RapidOCR] base.py:22: Using engine_name: onnxruntime
[INFO] 2026-10-02 12:12:31,166 [RapidOCR] download_file.py:60: File exists and is valid: D:\codex\lc-mcp\vendor\aalc\.venv\Lib\site-packages\rapidocr\models\ch_PP-OCRv4_rec_infer.onnx
[INFO] 2026-10-02 12:12:31,167 [RapidOCR] main.py:55: Using D:\codex\lc-mcp\vendor\aalc\.venv\Lib\site-packages\rapidocr\models\ch_PP-OCRv4_rec_infer.onnx
[DEBUG] 2026-10-02 12:12:31,390 [AALC] module\automation\automation.py:83: 使用后台点击模块
[DEBUG] 2026-10-02 12:12:32,155 [AALC] ..\..\lc_mcp\aalc_task.py:35: set_mirror_count change to: 1
[DEBUG] 2026-10-02 12:12:32,159 [AALC] tasks\base\script_task_scheme.py:128: 初始化游戏
[DEBUG] 2026-10-02 12:12:32,161 [AALC] module\automation\automation.py:83: 使用后台点击模块
[DEBUG] 2026-10-02 12:12:33,290 [AALC] module\game_and_screen\game.py:28: 游戏已启动:LimbusCompany.exe,进程ID:32796
[DEBUG] 2026-10-02 12:12:33,488 [AALC] utils\path_manager.py:44: 路径管理器初始化完成,路径: ['dark/zh_cn', 'dark/en', 'dark/share', 'default/zh_cn', 'default/en', 'default/share']
[DEBUG] 2026-10-02 12:12:33,515 [AALC] ..\..\lc_mcp\aalc_task.py:43: 图片缓存已清除
[DEBUG] 2026-10-02 12:12:33,539 [AALC] tasks\base\retry_monitor.py:54: 通用服务器重试监控线程已启动
[DEBUG] 2026-10-02 12:12:33,629 [AALC] ..\..\lc_mcp\aalc_task.py:46: 目标图片:battle/turn_assets.png, 路径: default/share, 相似度:0.28, 目标位置:(35, np.int64(135))
[DEBUG] 2026-10-02 12:12:33,643 [AALC] module\config\config.py:420: teams_active_queue change to: []
[DEBUG] 2026-10-02 12:12:33,644 [AALC] module\config\config.py:421: teams_be_select change to: [False]
[DEBUG] 2026-10-02 12:12:33,644 [AALC] module\config\config.py:422: teams_order change to: [0]
[DEBUG] 2026-10-02 12:12:33,645 [AALC] module\config\config.py:423: teams_be_select_num change to: 0
[DEBUG] 2026-10-02 12:12:33,646 [AALC] tasks\base\retry_monitor.py:68: 通用服务器重试监控线程已停止
[DEBUG] 2026-10-02 12:12:33,646 [AALC] ..\..\lc_mcp\aalc_task.py:59: set_mirror_count change to: 1
[lc_mcp] task mirror done
File diff suppressed because it is too large Load Diff
+192
View File
@@ -0,0 +1,192 @@
{
"snapshot_at_utc": "2026-10-02T05:51:37.084985+00:00",
"log_record_counts": {
"agent_log.jsonl": 70,
"lc_agent_log.jsonl": 115,
"jev_mirror_log.jsonl": 273,
"agent_smoke.jsonl": 2,
"lc_agent_smoke.jsonl": 6
},
"partial_lines_skipped": {},
"redaction_count": 0,
"files": [
{
"path": "logs/agent_log.jsonl",
"source": "{source_root}\\agent_log.jsonl",
"kind": "sanitized_jsonl",
"source_sha256": "043007f37dcea9b8012d332ea4568ad7fec0b0d664f0f6214e752e7cdaeb447b",
"export_sha256": "1a5abcd50ad5449e9e604e0a748ad58defc036ea0e5273aef33e04715fa03c20",
"bytes": 21769
},
{
"path": "logs/lc_agent_log.jsonl",
"source": "{source_root}\\lc_agent_log.jsonl",
"kind": "sanitized_jsonl",
"source_sha256": "beeb226bcbf958615f9791ef3d785758b17c94d897148013e1c4bc26319f2cb4",
"export_sha256": "00da17e08a09bc833e3c2e0841e8613acd13642bd74048565328d54c81a3773b",
"bytes": 33848
},
{
"path": "logs/jev_mirror_log.jsonl",
"source": "{source_root}\\jev_mirror_log.jsonl",
"kind": "sanitized_jsonl",
"source_sha256": "b3b9e64a647b6ee8e3912d82fc18877caf871e289680f986cdc2f0ac1289b544",
"export_sha256": "2763abd957bcec7cb7ad0b0b9e29ec9f1f09501f44e506f7d359047397d133e0",
"bytes": 95659
},
{
"path": "logs/agent_smoke.jsonl",
"source": "{source_root}\\agent_smoke.jsonl",
"kind": "sanitized_jsonl",
"source_sha256": "e23a4202ef43db244d35add355caf8b6cc73b1a601145d1950f79fb8f5110553",
"export_sha256": "5c60a2930ecb98637d069f11dfd8b237953d93ec66e267249121b03e87e599a3",
"bytes": 546
},
{
"path": "logs/lc_agent_smoke.jsonl",
"source": "{source_root}\\lc_agent_smoke.jsonl",
"kind": "sanitized_jsonl",
"source_sha256": "1b30816d1df59bd30ed6bfd04e5c2d3d08e2de48d45306574489a031b8302e7d",
"export_sha256": "3d92086aca23c7a2c4fd14b37f86e04587494387e9a4e6aa2fb1085e4b144db0",
"bytes": 1259
},
{
"path": "logs/jev_mirror_status.json",
"source": "{source_root}\\jev_mirror_status.json",
"kind": "sanitized_snapshot",
"source_sha256": "a4c3cf0de211b30c461f64862bbb42f8e5b8f7fadae4b65190e2103e0a3a09df",
"export_sha256": "0d8a518fb246b1c5d0fe40cf53cc2281de59f2c58ded1f57a703da593cdffe58",
"bytes": 397
},
{
"path": "logs/jev_shop_context.json",
"source": "{source_root}\\jev_shop_context.json",
"kind": "sanitized_snapshot",
"source_sha256": "118a1ff303e5359ac3d4d3e8ad1b5d8e8fad09a432d282d50c468dd7e5b1fd0a",
"export_sha256": "666d765ec48452d542803d7546de2e20e86af7b427486cfb1a7641c1587df92f",
"bytes": 37
},
{
"path": "logs/server.txt",
"source": "{runtime_root}\\server.log",
"kind": "sanitized_text",
"source_sha256": "8390973ba251caa2f6af42148bf1dbedb256be79cec5d95bffdf69e50db72cf7",
"export_sha256": "e73f05226e53c426ec0bbf91c3022c07c6f89ef17563e03fb9b1ce3a0d63da4c",
"bytes": 408954
},
{
"path": "logs/runs/task_20261002_121229_mirror.txt",
"source": "{runtime_root}\\runs\\task_20261002_121229_mirror.log",
"kind": "sanitized_text",
"source_sha256": "47a8dd96e7f30a1261a63c9d922431eb49ffdb00e4e5aa1492b38c51e51e8a93",
"export_sha256": "47a8dd96e7f30a1261a63c9d922431eb49ffdb00e4e5aa1492b38c51e51e8a93",
"bytes": 3910
},
{
"path": "source_snapshots/lc_agent.py",
"source": "{source_root}\\lc_agent.py",
"kind": "sanitized_text",
"source_sha256": "87aa4eb633daa42a5cfc52dd52004f344ce579020de02c08b20324322c3a3524",
"export_sha256": "a7ec89f5d3ba7d85a6deeb772e46af1a60f39795fdfd0d9ca8e58dc8867f26e8",
"bytes": 17108,
"updated_at_utc": "2026-10-02T06:05:59.003197+00:00"
},
{
"path": "source_snapshots/jev_mirror_agent.py",
"source": "{source_root}\\jev_mirror_agent.py",
"kind": "sanitized_text",
"source_sha256": "b1446cb971c993e015c0f9d140d0e9f1b59c31a556812cee38bb1a074bea637b",
"export_sha256": "13d7cd135ad85fa1635122f0e00b6ed406ffb216638b2a96d424a9f0bf7f0987",
"bytes": 36565,
"updated_at_utc": "2026-10-02T06:05:59.003197+00:00"
},
{
"path": "source_snapshots/jev_decision_client.mjs",
"source": "{source_root}\\jev_decision_client.mjs",
"kind": "sanitized_text",
"source_sha256": "0de87b1cb4314ad5a020809717b81f939bb7f8770ea003a3ee39908ebc0fc0da",
"export_sha256": "0de87b1cb4314ad5a020809717b81f939bb7f8770ea003a3ee39908ebc0fc0da",
"bytes": 1707,
"updated_at_utc": "2026-10-02T06:05:59.003197+00:00"
},
{
"path": "source_snapshots/test_jev_mirror_agent.py",
"source": "{source_root}\\test_jev_mirror_agent.py",
"kind": "sanitized_text",
"source_sha256": "f5c7bd8d580809e8b76042bf8c8d79c315bd1a6f8ac69fe41e149bdd93528e5e",
"export_sha256": "54b871057033e98310d2c907e2f80648b878d16bda9460837b4efa6ed0d12227",
"bytes": 9803,
"updated_at_utc": "2026-10-02T06:05:59.003197+00:00"
},
{
"path": "source_snapshots/mirror_dungeon_speedrun_notes.md",
"source": "{source_root}\\mirror_dungeon_speedrun_notes.md",
"kind": "sanitized_text",
"source_sha256": "ea74ecd72c58451b5e9b7fce343a080598287a1a4a052b54b33b272f5b099c6b",
"export_sha256": "1be3781b0327a09eccb90ce64e9f90ee1744170f13d93f5efe43c2e72e12ef2c",
"bytes": 9210,
"updated_at_utc": "2026-10-02T06:05:59.003197+00:00"
},
{
"path": "skill/references/event-choices.md",
"source": "{skill_root}\\references\\event-choices.md",
"kind": "sanitized_text",
"source_sha256": "be9923436fb1e82bf4fd4fca39778054815bd92dc49f4430a1e28593bd4d9e22",
"export_sha256": "be9923436fb1e82bf4fd4fca39778054815bd92dc49f4430a1e28593bd4d9e22",
"bytes": 9398,
"updated_at_utc": "2026-10-02T06:05:59.003197+00:00"
},
{
"path": "skill/references/jev.md",
"source": "{skill_root}\\references\\jev.md",
"kind": "sanitized_text",
"source_sha256": "001355b4685edb8b4d69fe27d59a29c60ec2477997fcfaa58d7d80c305b1950f",
"export_sha256": "9821e3a0f4c8a2b11f99daca8a2fd63b839c282fb14670daec1738d280c408cf",
"bytes": 1978,
"updated_at_utc": "2026-10-02T06:05:59.003197+00:00"
},
{
"path": "skill/references/rupture-route.md",
"source": "{skill_root}\\references\\rupture-route.md",
"kind": "sanitized_text",
"source_sha256": "f0a4f932b93b7afd0e55a4fa7ed523f5ae37367ac84b5027edf9db3907a4e803",
"export_sha256": "f0a4f932b93b7afd0e55a4fa7ed523f5ae37367ac84b5027edf9db3907a4e803",
"bytes": 4813,
"updated_at_utc": "2026-10-02T06:05:59.003197+00:00"
},
{
"path": "skill/references/shortcuts.md",
"source": "{skill_root}\\references\\shortcuts.md",
"kind": "sanitized_text",
"source_sha256": "a70114bdbf6e0d2ce797d09f068e403857e79aea95343fbccda2b65ad1d8a8fb",
"export_sha256": "a70114bdbf6e0d2ce797d09f068e403857e79aea95343fbccda2b65ad1d8a8fb",
"bytes": 2286,
"updated_at_utc": "2026-10-02T06:05:59.003197+00:00"
},
{
"path": "skill/SKILL.md",
"source": "{skill_root}\\SKILL.md",
"kind": "sanitized_text",
"source_sha256": "24d4b20a482fec63ddb2b6e6a968e33651daf642d2ea2c22406b74b8eeb7982b",
"export_sha256": "27f487f3482c317be29910bd903091bc49c4a976123045a2e643baf8143b38b7",
"bytes": 5746,
"updated_at_utc": "2026-10-02T06:05:59.003197+00:00"
}
],
"capture_count": 175,
"capture_archive_bytes": 70151526,
"capture_archive_sha256": "2e122ec17d655576004c0127f07cb3cd08fc43085b2b10d35564f992c786d61d",
"excluded": [
"API/MCP credentials",
"all local configs",
"Codex session transcripts",
"unrelated asset extraction files",
"virtual environments"
],
"limitations": [
"MCP retains only 30 recent captures; deleted frames cannot be reconstructed.",
"Live session still running; snapshot is not proof of dungeon completion."
],
"followup_at_utc": "2026-10-02T06:05:59.003197+00:00",
"followup_note": "User assisted final reward confirmation after assistant clicked claim. Final completion observed; original action-log snapshot remains unchanged."
}
+88
View File
@@ -0,0 +1,88 @@
{
"source": "logs/jev_mirror_log.jsonl",
"records": 273,
"choices": {
"button_17": 1,
"route_w": 2,
"button_7": 2,
"wait": 70,
"button_30": 4,
"button_20": 1,
"button_29": 2,
"confirm_18": 1,
"route_d": 12,
"button_8": 1,
"button_66": 4,
"battle": 74,
"confirm_8": 1,
"confirm_10": 1,
"confirm_9": 1,
"button_52": 1,
"confirm_32": 1,
"route_s": 3,
"button_65": 2,
"reward_card_1": 4,
"confirm_reward": 4,
"button_67": 1,
"swap_14": 1,
"skill_swap_1": 4,
"confirm_swap": 5,
"skill_swap_2": 1,
"resume_game": 1,
"buy_swap": 1,
"swap_15": 2,
"swap_16": 1,
"shop_refresh": 4,
"button_32": 2,
"button_35": 1,
"close_8": 1,
"confirm_21": 1,
"confirm_20": 1,
"button_71": 4,
"button_59": 1,
"confirm_35": 1,
"pack_inspect_1": 4,
"pack_inspect_4": 3,
"skip_dialog": 5,
"sinner_card_1": 1,
"button_21": 1,
"button_6": 1,
"event_finish": 11,
"button_9": 1,
"button_33": 1,
"confirm_24": 1,
"button_70": 1,
"button_68": 1,
"reward_card_2": 2,
"reward_card_3": 2,
"button_54": 1,
"modal_confirm": 3,
"pack_drag_1": 1,
"event_scroll": 6,
"button_10": 1,
"button_72": 1
},
"tools": {
"click_text": 28,
"keypress": 22,
"wait": 70,
"click": 47,
"battle": 74,
"route": 14,
"advance_dialog": 11,
"drag": 7
},
"battle_batches": 74,
"reported_p_enter_pairs": 842,
"jev_latency_ms": {
"count": 222,
"median": 1203.0,
"p95": 2296,
"max": 8875
},
"limitations": [
"Batch pairs are reported attempts, not proof of individual inputs being accepted.",
"Requires-analysis statuses may not be appended to the action log.",
"This snapshot does not confirm final dungeon completion."
]
}
+43
View File
@@ -0,0 +1,43 @@
---
name: limbus-mirror-speedrun
description: 继续或重开边狱公司(Limbus Company)的镜像迷宫/镜牢,按破裂黎明与黑兽纯 P 攻略追求整局通关速度;处理开局配置、卡包、事件、必要强化、技能替换与战斗快捷键。用于用户要求代打镜牢或优化此速通流程时,不用于一般配队讨论或主线事件。
---
# 镜牢破裂纯 P 速通
目标是尽快完成用户授权的一局镜牢。接着当前画面推进;只有用户明确要求重开时才放弃当前局。用户后续纠正覆盖本 skill 的默认配置。
## 读取与续局
- 执行前读取 [破裂黎明配置与楼层规划](references/rupture-route.md)。沿用用户配好的队伍、难度、出战顺序,不为了通用攻略改动配置。
- 遇事件时在 [事件速查](references/event-choices.md) 搜索事件名称或饰品名,只读相关条目。减少额外战斗、判定和分支,保留核心饰品与能节约后续战斗时间的即时恢复。
- 续局先取得当前游戏画面,识别楼层、界面及关键强化是否完成;不要把旧截图、坐标或笔记中的局面当成当前状态。
- 未覆盖的事件查原 Wiki 的对应条目一次,按当前选项文字核对。编号只是辅助,同名复刻/折射事件可能不同。
## 快捷操作
当前用户已安装并授权 `limbus` MCP。优先使用其后台截图、OCR、按键、点击与长按拖拽,不切换前台焦点或移动系统鼠标。先检查任务状态;同一时刻只运行一个执行器,AALC 完整任务运行期间不要叠加手动输入。MCP 无法使用时再读取 `computer-use` skill,使用其允许的原生接口。
- **战斗:P → Return(回车)**,重复至结算。用户明确允许战斗批量操作,无需逐回合截图或分析拼点。先确认已进入战斗,再执行有界短批次,让动画完成,批次末检查结算;避免循环跨入奖励、事件或商店界面。
- 用户更新(2026-10-02):进入关卡后的编队界面也直接按回车开战,保留原队伍,不再次检查或确认编队人员。
- **事件判定先点击 SKIP 跳过对话**,跳完再选择事件选项、罪人或进行判定;SKIP 可用时不提前处理判定。其他对话也优先 SKIP,可用回车加快。确认/继续按钮明确且回车适用时用快捷键;事件和奖励按选项文字选择。
- 用户补充:SKIP 后连续回车推进到罪人选择界面;判定结果出现后快速连按回车结束事件。固定推进无需逐按钮调用模型,到分支选择时再决策。
- 快捷键发送后未生效,立即按新画面用鼠标点对应按钮;不反复尝试同一快捷键消耗时间。
- 最终结算点击“领取”后,继续按回车确认;未生效再点击确认按钮。看到“探索完成”后仍需领取并确认,不能只停在结算页。
- 游戏快捷键以用户提供的操作指南为准,读 [快捷键速查](references/shortcuts.md) 再使用地图导航。方向键或 W/S/D 选择节点,**选中后直接按回车进入,无需再次确认**,将选方向+回车合成一个动作;空格在战斗中是暂停/继续,不放进 P+回车循环。
- 用户要求快速执行:明确的连续确认、地图进入和开始战斗可合并为短批次,留出必要加载时间;不要每按一个按钮都截图。到事件、奖励、卡包等需要选择的界面再观察。界面变化不确定或快捷键失败时重新观察。
- 卡包下拉使用 MCP `drag`,保持左键按下并缓慢拖动;以当前截图核对起点、终点与选择结果。用户明确要求自行修复拖拽,不能仅因快速拖拽未被识别就交回用户。
- 有确认弹窗时仅操作弹窗控件;背景中的同名按钮仍可能被 OCR 识别,不能再次点击背景“离开”代替弹窗“确认”。
- 用户按 Esc 中止电脑操作或发出停止指令,立即停止该轮原生操作,不自动重试。
## 速度与完成标准
用户已明确指定 Jev 负责固定场景、路线及常规操作决策。调用方式见 [Jev 接入](references/jev.md)。主助手只在 Jev 返回 `requires_analysis` 或出现具体接口故障时分析、修复,然后交回 Jev。最新战斗指令优先:一旦战斗开始,仅执行 P+回车直到结算,不再逐批请求模型;有界批次末只检查是否结算,未结算继续下一批。执行器仅暴露当前画面核对过的候选动作,不能执行模型返回的任意代码。当前执行器为 `{source_root}/jev_mirror_agent.py`,状态与问题保存在同目录的 `jev_mirror_status.json`。
略过无关观测、采购、合成、调队和反复比较,保留符咒 ++ 与关键技能替换。大量理智损失可能增加纯 P 战斗回合,不能只按当前事件点击次数选择。
加载画面会保留旧库存/按钮;CONNECTING 未结束时禁止输入。场景处理先识别上层弹窗,再处理背景界面。层末多卡饰品与苦难必须选择后推进,不能混用单卡额外观测的“拒绝饰品”。识别无变化时忽略录像计时与动画数字;已经读过的卡包详情保留结论,避免重复观测。
持续到本局通关结算,或用户中止/必须手动接管的具体步骤。只有看到最终通关结算才能报告完成。研究完攻略或做完一层不算通关;不承诺复现视频的 12 分钟用时。
用户纠正流程时,在授权范围内更新相应参考文件和现有 [速通笔记]({source_root}/mirror_dungeon_speedrun_notes.md);先读笔记,保留用户其他编辑。资料核对日期:2026-10-01。
@@ -0,0 +1,111 @@
# 镜牢事件速查:以整局用时为原则
核对日期:2026-10-01。结果依据[边狱公司灰机 Wiki:探索事件](https://limbuscompany.huijiwiki.com/wiki/%E6%8E%A2%E7%B4%A2%E4%BA%8B%E4%BB%B6)的镜像迷宫及活动卡包总览;以下选择是针对破裂纯 P 的速通推断,并非 Wiki 对速度的实测排名。默认队伍仍能顺利纯 P 推进。
## 决策次序
1. 缺成捆的符咒、鸡胸等核心时,优先直接获取。无关免费饰品与资金/即时恢复竞争时,优先能帮助后续换技能和纯 P 的结果。
2. 核心不缺时,选无需判定、无需战斗、可立即结束的离开/恢复/资金选项。两项都立即结束时,选有实际帮助的一项。
3. 避免额外集中战斗、失败会强制战斗的判定、反复尝试及长分支。不为小奖励挑战这些路径。
4. 没有安全直出时,选成功率高且失败不会追加战斗/大幅降理智的一次判定,用界面成功率最高的合适人格。不为事件另配队或花 E.G.O. 资源。
5. 少量生命代价可换取立即结束,但低血或濒临混乱时重新判断。大量全队理智损失可能增加后续回合,不能一律视为最快。
**编号按 Wiki 总览,执行时核对当前文字和结果提示。** 同名复刻、折射与活动版本可能不同;未知条目回查 Wiki,不猜选项。不因这份参考重复观测战斗。
## 核心与佛像
| 事件/识别名 | 默认速通选择 | 原因/条件 |
| --- | --- | --- |
| 无我入定/鲜血装饰/红色坐像 | **1:侧耳倾听** | 无判定或战斗;平均理智≥0 时全体恢复 15 体力、理智,否则直接结束。2 判定,3 战斗 |
| 因而无人哭泣/成捆的符咒 | **1** | 直接取得核心符咒,不走判定或战斗分支 |
| 电击蜈蚣/标准负载电池(起始之镜) | **1** | 直接拿电池;2 判定,3 战斗 |
| 炸鸡对决(地狱鸡) | **1:鸡肉就是鸡肉喽。**,核对奖励 | 当前译名“干巴柴涩鸡胸肉”与“火热多汁琵琶腿”,旧译名为干松紧致鸡胸肉与鸡翅;3 也直接给鸡胸。2 仅鸡翅 |
| 鸡群的激情探戈(地狱鸡) | **2** | 直接拿探戈蘸酱,不为小奖励判定或赌概率 |
| 晚霞旅人/朱红蛾群 | **2** | 无判定,下场战斗前 3 回合提供体力、理智恢复。1 也是免费饰品+即时恢复,当前理智低时可选 1 |
| 简历、奇怪的机器 | 分别 **2、1** | 分别直接获得 50、100 经费 |
| 往昔的睡袋(湖之镜) | **2** | 直接全体恢复体力、理智,不判定 |
| 冠汤翼蜥、你变强了吗 | 分别 **1、2** | 直接全体恢复 10 体力、理智,避开判定或战斗 |
## 常见免费奖励和直出
免费饰品优先于有损失、战斗或额外分支的替代项;另有安全离开项且饰品无关时直接离开。
| 事件/饰品识别名 | 默认选项 | 要点 |
| --- | --- | --- |
| 输血袋 | 1;需要恢复时 2 | 免费饰品或即时恢复 |
| 绅士精灵/绿光果实 | 2 | 免费饰品,避开 1 的二级分支、3 战斗 |
| 悲泣蟾蜍/融落眼球 | 2;低理智时 1 | 1 仅平均理智<25 时恢复最低理智者;2 给饰品 |
| 灰色大衣、刺青大器晚成 | 1 | 免费饰品,替代项可能扣体力或理智 |
| 梦中的电子羊 | **当前第 2 项:你不是特别的。** | 本局游戏文字明确给免费饰品,实际已获得;不要套用 Wiki 总览编号 1 |
| 此刻的神色 | 2 | 免费饰品,1/3 可能有损失 |
| 四百朵玫瑰/卡蜜拉(镜中之镜) | 2 | 免费饰品,避免体力/理智代价 |
| 精灵提灯/仲冬夜梦魇(镜中之镜) | 2 | 免费饰品,其他分支可能战斗或有损失 |
| 凶弹射手/追忆吊坠、特别合约 | 1 | 免费饰品,不判定、不付理智代价 |
| 浸染棉花/白树棉 | 3 | 直接离开;其他项可能反复判定后战斗或直接战斗 |
| 红焰蛾/炼狱炎蝶之梦(起始之镜) | 2 | 直接离开,3 战斗 |
| 石版字符、谷底之星、蒸汽运输机/辉光变动仪 | 分别 2、3、2 | 安全直出 |
| 员工证、夜视镜、止痛片、贪婪之锤 | 2 | 安全直出,避开判定或损失分支 |
| 巫毒娃娃 | 3;需要饰品时 2 | 安全直出或免费饰品 |
| 生存的里程标、异想狩猎 | 分别 2、1 | 安全直出;另一项都是免费饰品 |
| 归乡路途 | 1→分支 1 | 免费饰品,其他路径可能大量降理智 |
| 终末日历 | 2 | 安全直出 |
| 破碎罗盘 | 4;缺经费时 1→分支 1 | 直接结束;另一条拿 50 经费,但增加分支 |
| 拉·曼却领嘉年华游行、旋转木马、折射的四百朵玫瑰 | 2 | 安全直出 |
| 循环往复的信念与承诺 | 2 | 不走多段经费赌局 |
| 舍吾皮肉/肉斩、T公司时间预付机、那一日的语音记录(诅咒事件) | 2 | 直接结束,不为无关诅咒饰品改变纯 P 流程 |
## 没有安全直出时
以下是默认方向,不代替队伍实际成功率;只快速核对当前判定一次。
| 事件 | 建议 | 避免的主要代价 |
| --- | --- | --- |
| 迷失乘客 | 1 的较低门槛单次判定 | 2 直接战斗 |
| 咖啡与纸鹤 | 2 的饰品判定 | 1 成功也有全体体力代价 |
| 轻蔑螺旋/倒错症 | 优先 2 判定 | 1 全体扣体力、理智;3 战斗 |
| 幻痛 | 优先 2,用成功率高的人格 | 1 直接全体降理智 |
| 长腿精灵 | 2 判定 | 1 直接战斗;2 失败仍扣理智 |
| 烟霾铁丝网 | 2 判定 | 失败无损失,门槛较 1 低 |
| 荆棘之路 | 健康且经费足时 2 判定 | 失败失经费;其他路径失败可能全队扣体力、理智 |
| 噬梦浊流 | 默认 1 的较低门槛判定 | 3 战斗;1 失败也恢复所选人格 |
| 古代遗像、保密协议 | 分别 1、2 | 较低门槛,失败无损失 |
| 发条装置/时间不倒翁、受缚之王 | 分别 1、2 | 失败无损失;满级队伍不强求等级收益 |
| 折射的往昔的睡袋 | 优先 1 判定 | 2 全体降 20 理智 |
| 黑色账簿 | 1→分支 1 的选项 1 结束 | 避开全队降理智和额外判定 |
| 镌刻的异文 | 1 判定 | 2 失败触发战斗 |
| 满满当当的燃料罐 | 1 判定胜率明显高时 1,否则与 2 的 50% 战斗概率比较 | 两项均可能战斗,不存在保证无战斗的出口 |
## 活动卡包快速出口
无关奖励不判定;核心缺失、急需恢复时按画面例外处理。
| 卡包/事件 | 速通处理 |
| --- | --- |
| 紫罗兰的正午:培训与机械装置、安保部 | 选 1/2 中相关的免费奖励,避开 3 判定;安保部 3 失败战斗 |
| 紫罗兰的正午:恢复体力、恢复理智值或支付经费 | 1 直接恢复并给 80 经费 |
| 20区的奇迹:诺姆、床 | 2 离开 |
| 肉斩骨断:生锈的刀柄、红色流苏、木质酒杯 | 2 离开;陈旧的刀柄版本为 1 离开,勿混用 |
| 时间杀人时间:T公司税金征收、圣愚的据点、时间杀人现场 | 2 离开 |
| 时间杀人时间:T公司的街道 | 3 离开 |
| 时间杀人时间:T公司征收员 | 1 判定,其他项战斗 |
| 时间杀人时间复刻:圣愚 | 2 离开;已有前置饰品且 3 可直接拿有用奖励时可选 3 |
| WARP:罐装冰淇淋、E型次元短剑 | 分别 3、1 离开 |
| WARP:生物发电型电池、义体关节伺服电机 | 2 免费奖励,省去判定 |
| WARP复刻:休息时发现的硬血武器、有用的装备、卖东西的乘客 | 健康时 2 离开;需要恢复且不挤占关键预算时才付钱 |
| 由子弹画下的句点:锯齿讲台、事务所 | 2 离开 |
| LCB体检:我们就是样本、尝尝看、仔细地观察周围 | 健康时分别 1、2、1;最后一项重伤时可选 2,成败都恢复全体体力 |
| LCB体检:同意调查 | 健康时 2;需要恢复时 1,成败都恢复全体体力 |
| LCB体检复刻:红焰蛾出逃、精灵提灯出逃 | 2 离开,避免失败战斗 |
| 深夜清扫:卯足、忠义锁链、似曾相识的音响 | 2 离开 |
| 憎恶与绝望:憎恶皇后收容单元、脑叶公司仓库 | 2 免费奖励;仓库同时给 50 经费 |
| 切磋琢春:处罚黑兽-酉、奇怪的红布 | 2 离开,不为无关奖励判定 |
| 善意的巡礼:伊比利亚人与阿戈尔人、过去的辉煌荣光、恐鱼食物 | 1 离开 |
| 善意的巡礼:灯塔守卫者与大静谧的故事、与海嗣激战正酣的审判官 | 2 离开 |
| 琥珀色的黄昏:惩戒鸟、1.76兆赫 | 3 离开;已有前置饰品且 1 直接拿有用奖励时可选 1 |
| 琥珀色的黄昏:爱娜温、蜂后 | 2 离开;歌唱机为 3 离开 |
| 绞丝结线:回收环指作品的LCE组员们、野兽派环指画廊、寂静的中指走廊 | 分别 3、2、2 离开 |
| 经验记忆:金笠的过去 1、3 | 1 离开;过去 2 可选 1 免费奖励 |
本文为速通摘要,不覆盖主线探索。Wiki 结果是依据;版本变化或文字不符时回查对应事件,不能套用到同名活动变体。
归因:[边狱公司中文 Wiki 社区「探索事件」](https://limbuscompany.huijiwiki.com/wiki/%E6%8E%A2%E7%B4%A2%E4%BA%8B%E4%BB%B6)。对结果做了节选、概括,并添加速通判断;相关 Wiki 改编内容按 [CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/) 署名及相同方式共享。
@@ -0,0 +1,15 @@
# Jev 场景与路线决策
2026-10-01 用户授权通过其 OpenCode API 接入 Jev,目标为加快镜牢推进。
- 官方接口:`https://opencode.ai/zen/v1/systemone`;用户给的 Go 模型列表中没有 Jev,不把 Go chat/completions 当作 Jev 接口。
- 已实测 `jev-1.13-free` 返回 HTTP 200,结构为 `answers.action.choice`,当前请求耗时约 1.3–1.5 秒。这不是整局速度保证。
- 现有客户端:`{source_root}/jev_decision_client.mjs`,导出的 `decide(state, criteria, options)` 返回有限选项编号、概率和请求耗时。
- 密钥从 `options.apiKey`、`OPENCODE_API_KEY` 或用户已有本机配置注入;不把密钥复制到脚本、笔记、skill 或日志,也不打印配置全文。重启后若没有凭据,不能假装已接通。
- 只发送精简游戏状态和选项文字,避免整段聊天、其他窗口、完整桌面截图等无关内容。
- 先按用户规则排除不合适的选项,再将候选交给模型。当前界面和用户新指令优先;不把模型置信度当作游戏事实。
- 用户更新(2026-10-02):固定场景、路线及所有常规动作均由 Jev 从候选中选择;主助手仅在 `requires_analysis` 或具体接口故障后介入。战斗动作可包含有界 P→回车短批次。API 短暂错误可重试一次,持续失败交回主助手修复。
- 后续战斗指令覆盖逐批决策:战斗开始后仅 P+回车循环直至结算;有界批次末检查结束标志,战斗中不再调用 Jev 或分析拼点。结算后恢复 Jev 决策。
- 执行器 `{source_root}/jev_mirror_agent.py` 通过 limbus MCP 操作;Windows 单实例互斥避免输入交叠。状态为 `jev_mirror_status.json`,动作日志为 `jev_mirror_log.jsonl`。确认弹窗候选使用当前截图坐标并排除背景按钮。商店没有出战角色技能替换时,每店最多刷新 4 次。
依据:[OpenCode Zen:Jev](https://opencode.ai/docs/zen/#jev)。
@@ -0,0 +1,68 @@
# 破裂黎明/黑兽:用户配置与楼层规划
这是此用户的速通默认配置,记录于 2026-10-01。用户的新指示与当前游戏界面优先。
## 开局
1. 星之恩惠:**起始之星、星际旅行、全面的可能性**。用户最初称编号 1、3、10;按名称核对,避免版本排序变化。
2. **保持基础等级,不强化恩惠**,不点单项或全部强化。
3. 破裂起始 E.G.O. 饰品:**荆棘套索、荧光灯**。
4. 额外 E.G.O. 饰品观测:**拒绝饰品**并确认。
5. 入层三级饰品:**标准负载电池**,用户简称“电池”。
不强化的是开局恩惠;**二层成捆的符咒强化到 ++ 仍然需要做**。
**饰品必须到商店才能强化**(用户确认)。地图上的 E.G.O. 饰品窗口用于查看持有与强化效果,不是强化入口;其 +/++ 是效果预览,不能当成已购买强化。二层遇商店时优先完成符咒 ++,确认经费变化与实际强化标识。
商店强化面板可直接选 ++;本局实测一次支付 150 经费即完成,无需分两次购买。以当前报价为准。鸡胸当前译名为“干巴柴涩鸡胸肉”,Wiki 旧译名“干松紧致鸡胸肉”;鸡腿当前为“火热多汁琵琶腿”。
## 沿用队伍
用户已配置好队伍。曾确认的出战顺序:黎明辛克莱、鸿园君主鸿璐、黑兽希斯克利夫、黑兽奥提斯、黎明格里高尔、鸿园流浪武者良秀、黎明浮士德。此顺序用于识别原配置,不要求重新配置。沿用当前用户设置;不要因替补等级警告额外升级或换人。
用户再次确认按上述顺序选择。**黎明辛克莱是“黎明事务所收尾人”;“黎明事务所代表”是格里高尔,不能误选成第一位。** 浮士德也有“收尾人”标题,需结合罪人标识和肖像确认。不要凭“黎明”二字或卡片位置识别人。
## 楼层推进
**符纸=成捆的符咒**:Ⅰ级破裂饰品,黑色底板上有两张折叠符纸,红色符文、黄色纸边。按名称和图标核对卡包通关奖励。
| 楼层 | 优先完成 | 顺路再做 |
| --- | --- | --- |
| 1F | 选通关奖励含成捆的符咒的卡包并取得;商店按技能表替换 | 无关饰品略过 |
| 2F | 成捆的符咒 ++;优先 Hell's Chicken 获取干松紧致鸡胸肉,维持破裂层数;换技能 | 没鸡胸继续,不重开 |
| 3F | 菲辛改为 1→3;原作者推荐 Bearable 卡包 | 快感 |
| 4F | 推进、换技能 | 缺失的相关饰品 |
| 5F | 优先换技能并通关 | 顺路高级饰品;不专门做斩击四级 |
用户补充(2026-10-02):第五层优先“2号线”卡包;卡包刷新次数为零时允许使用卡包观测。层末应先选择苦难再直接推进,不能误当额外观测而默认拒绝饰品。
资源冲突时优先关键技能,同时保留符咒 ++ 的预算与优先级。路线减少战斗节点和绕路,不为额外小奖励扩展运营。
## 层末饰品与苦难
必需饰品(例如成捆的符咒)优先保留。**非必需选项避开增加敌方体力上限、提高防御等级的苦难**,按卡片实际描述判断;防御技能/守备技能威力与防御等级不是同一项。不要为了少点一下留空导致随机苦难。
已验证的一层例子:成捆的符咒+物理屏蔽力场;后者苦难为守备技能最终威力 +1,符合用户“不加血量、不加防御等级”的选择。巫毒娃娃的防御等级 +2 和马蹄铁饰物的防御等级 +1 均不选作非必需奖励。
## 技能替换
箭头表示用左侧技能换成右侧技能;“菲辛”指黎明事务所辛克莱。
| 人格 | 1–2F | 3–5F |
| --- | --- | --- |
| 黎明辛克莱(菲辛) | 1→2 | 1→3 |
| 黑兽奥提斯 | 2→3 | 2→3 |
| 其他出战人格 | 1→3 | 1→3 |
符合表的替换通常直接完成,避免反复比较。
用户补充(2026-10-02):商店没有出战角色可替换技能时允许刷新,**每个商店至多 4 次**;有可替换角色则按表执行,达到刷新上限后继续推进。
商店刷新时 CONNECTING 会保留旧库存画面;加载结束前禁止再次刷新、购买或离开。新库存有未购买的出战角色技能替换时,必须按表完成替换后再离开。
## 来源与适用范围
- 用户明确纠正了恩惠、起始饰品、拒绝观测、电池与快捷键;这些优先于视频泛用建议。
- [绅士丶蚂蚱:破裂黎明纯 P 周回](https://www.bilibili.com/video/BV1exaV6yELm/):换技能优先的楼层策略。
- [Cabric:黎明黑兽五层攻略](https://www.youtube.com/watch?v=h5wFVUd2X2c):卡包与机制补充。
- 困难镜牢与视频条件尚未全部核对;以游戏画面修正,不直接套用视频用时。
@@ -0,0 +1,33 @@
# 巴士快捷键
来源:用户于 2026-10-01 提供的三张游戏内 UI 操作指南截图及后续明确纠正。
| 场景 | 功能 | 按键 |
| --- | --- | --- |
| 通用 | 弹窗确认 | Enter 或 Space |
| 故事 | 跳过对话 | Enter 或 Space |
| 提取 | 跳过动画 | Enter 或 Space |
| 选项事件 | 加载下一段文本 | Enter 或 Space |
| 战斗 | 暂停/继续 | **Space** |
| 战斗 | 开始战斗/开始行动 | **Enter** |
| 战斗 | 胜率/伤害按键 | **P** |
| 通用 | 关闭弹窗、取消/返回原菜单、退出游戏 | Esc(随当前界面而变) |
| 战斗 | 移动视角 | ↑/←/↓/→ 或 W/A/S/D |
| 镜像迷宫地图 | 移动至下个节点 | ↑/↓/→ 或 W/S/D |
| 镜像迷宫地图 | 取消节点选择 | ← 或 A |
| 镜像迷宫地图 | 确认进入关卡/商店(用户补充) | **Enter** |
| 战斗 | 显示拼点箭头 | Tab |
| 通用 | 打开 UI 操作指南 | F1 |
| 战斗 | 放大/缩小 | 鼠标滚轮或 Q/E |
| 镜像迷宫地图 | 画面左右移动 | Q/E |
## 速通用法
- 战斗先 P 再 Enter,按用户要求批量循环;**不要混入 Space**,它会暂停战斗。
- 对话用 SKIP 或 Enter,Space 也是可用替代;这些文本快捷键不代表可以自动选对事件答案。
- 地图方向键优先用于当前画面中已有、可达且符合路线的目标。用户更新(2026-10-02):方向选中后直接按 Enter 进入,不再次观察或确认;执行器合并选方向+回车。
- 地图的 A/左箭头是取消节点,不能当成向左前进;Q/E 只平移画面。
- 用户已确认:**选中关卡或商店后,按 Enter 进入**,不用再寻找“进入”按钮。奖励或商店内其他动作仍按当前界面确认,不能扩展成所有操作都盲按 Enter。
- **快捷键优先;一次发送后确认未生效,就用鼠标点击对应按钮**,不要反复按键等待。用户已明确授权此回退方式。
- 最终结算:点击“领取”后按 **Enter** 确认奖励;未生效再点击确认按钮,返回主界面后结束。
- 原生控制工具可能把用户物理按 Esc 视为中止。这与游戏内 Esc 导航不同;检测到操作中止时按上级要求停止,不自动重试。
@@ -0,0 +1,39 @@
// Only send a concise game-state description and explicit permitted choices.
// Credentials are supplied in memory or OPENCODE_API_KEY, never stored here.
export async function decide(state, criteria, options = {}) {
const apiKey = options.apiKey ?? process.env.OPENCODE_API_KEY;
if (!apiKey) throw new Error('OPENCODE_API_KEY is required');
if (typeof state !== 'string' || !state.trim()) throw new Error('State text is required');
if (!criteria || Object.keys(criteria).length < 2) throw new Error('At least two choices are required');
const started = performance.now();
const response = await fetch('https://opencode.ai/zen/v1/systemone', {
method: 'POST',
redirect: 'error',
headers: { Authorization: `Bearer ${apiKey}`, 'Content-Type': 'application/json' },
signal: AbortSignal.timeout(options.timeoutMs ?? 7000),
body: JSON.stringify({
model: options.model ?? 'jev-1.13-free',
state,
questions: {
action: {
type: 'choice',
instructions: 'Choose the action that respects the stated user rules and completes the Limbus Company Mirror Dungeon fastest. Use only the supplied choices.',
criteria,
},
},
}),
});
if (!response.ok) throw new Error(`Jev HTTP ${response.status}`);
const body = await response.json();
const answer = body.answers?.action;
if (answer?.type !== 'choice' || !Object.hasOwn(criteria, answer.choice)) {
throw new Error('Jev returned an unsupported choice');
}
return {
choice: answer.choice,
confidence: answer.confidence,
probabilities: answer.probabilities,
latencyMs: Math.round(performance.now() - started),
model: body.model,
};
}
@@ -0,0 +1,608 @@
"""Jev chooses every scene/action; lc-mcp performs only validated candidates."""
import argparse
import json
import math
import os
import re
import subprocess
import sys
import time
import urllib.request
from pathlib import Path
from lc_agent import Bridge
STOP_FILE = Path(r'{source_root}\JEV_STOP')
SYSTEM_RULES = (
'你负责识别固定场景、路线和所有下一步决策。目标是最快完成当前一局镜牢。'
'只能选择所给候选;不要反复点击未生效的按钮。战斗选 battle 宏,P+回车,不用空格。'
'刚选路线、回车开战或上一动作是战斗时,特写或加载没有OCR文字很正常;选短等或战斗宏,不仅因OCR为空要求分析。'
'遇到事件判定先点SKIP跳过对话,跳完后再选择事件选项、罪人或进行判定;剧情同样优先SKIP。'
'事件当前有“选择后获得”且无需判定、无需战斗的选项时直接选择它,不反复滚动;避开写着战斗胜利后的选项。'
'确定确认/进入/开始战斗直接执行。地图优先可达事件和商店,减少战斗。'
'选好路线直接回车进入,关卡编队界面也直接回车开战;保留原编队,不再检查人员。'
'保留当前编队。成捆的符咒++和鸡胸为核心,略过额外观测;其他苦难避开敌方体力上限和防御等级。'
'3层起辛克莱1换3,黑兽奥提斯2换3,其他出战1换3。只在商店强化饰品。'
'商店没有出战角色可替换技能时允许刷新,当前商店最多4次;有可替换角色先按技能表替换。'
'第五层优先2号线卡包;卡包刷新次数为零时允许使用卡包观测。层末必须选择苦难再推进,不能当额外观测默认拒绝饰品。'
'卡包信息不清先点对应放大镜查看;核心饰品齐全时按通关速度选择现有卡包,不为可选饰品反复刷新。'
'信息不足、重复操作仍无效、苦难无法明确核对,或你判断需要主助手分析时选 requires_analysis。'
)
def text_items(state):
return state.get('items') or []
def button_enabled(state, item):
try:
from PIL import Image
import numpy as np
x, y, w, h = (int(item[k]) for k in ('x', 'y', 'w', 'h'))
with Image.open(state['screen']['path']) as image:
crop = np.array(image.convert('L').crop((x, y, x + w, y + h)))
return float(np.quantile(crop, 0.9)) > 85
except (OSError, KeyError, ImportError):
return False
def map_candidates(state):
"""Only observe reachable nodes; Jev chooses their route."""
import cv2
import numpy as np
from PIL import Image
assets = Path(r'D:\codex\lc-mcp\vendor\aalc\assets\images\default\share\mirror')
with Image.open(state['screen']['path']) as image:
rgb = np.array(image.convert('RGB'))
gray = cv2.cvtColor(rgb, cv2.COLOR_RGB2GRAY)
scale = min(rgb.shape[0] / 1440, rgb.shape[1] / 2560)
with Image.open(assets / 'mybus_default_distance.png') as image:
bus = cv2.cvtColor(np.array(image.convert('RGB')), cv2.COLOR_RGB2GRAY)
bus = cv2.resize(bus, None, fx=scale, fy=scale, interpolation=cv2.INTER_AREA)
_, confidence, _, location = cv2.minMaxLoc(cv2.matchTemplate(gray, bus, cv2.TM_CCOEFF_NORMED))
if confidence < 0.88:
return {}
bx, by = location[0] + bus.shape[1] // 2, location[1] + bus.shape[0] // 2
result = {}
orb = cv2.ORB_create(nfeatures=1000, scaleFactor=1.2, edgeThreshold=10)
for key, dy, direction in (('w', -400, '上方'), ('d', 50, '正前方'), ('s', 450, '下方')):
x, y = int(bx + 500 * scale), int(by + dy * scale)
if not (0 < x < rgb.shape[1] and 0 < y < rgb.shape[0]*.82):
continue
radius = int(125 * scale)
roi = rgb[max(0,y-radius):min(rgb.shape[0],y+radius), max(0,x-radius):min(rgb.shape[1],x+radius)]
hsv = cv2.cvtColor(roi, cv2.COLOR_RGB2HSV)
red = ((hsv[:,:,0] < 12) | (hsv[:,:,0] > 168)) & (hsv[:,:,1] > 150) & (hsv[:,:,2] > 150)
green = (hsv[:,:,0] > 27) & (hsv[:,:,0] < 85) & (hsv[:,:,1] > 110) & (hsv[:,:,2] > 150)
white = (hsv[:,:,1] < 100) & (hsv[:,:,2] > 175)
colored = int((red | green).sum()) >= 80
if not colored and int(white.sum()) < 80:
continue
target = cv2.resize(cv2.cvtColor(roi, cv2.COLOR_RGB2GRAY), None, fx=2, fy=2)
_, target_desc = orb.detectAndCompute(target, None)
scores = []
if target_desc is not None:
for name, label in (('shop','商店'),('event','事件'),('battle','普通战斗'),
('risky_encounter','精英战斗'),('focused_encounter','集中战斗')):
with Image.open(assets / 'road_in_mir' / (name + '.png')) as image:
template = np.array(image.convert('L'))
template = cv2.resize(template, None, fx=2*scale, fy=2*scale)
_, desc = orb.detectAndCompute(template, None)
if desc is not None:
matches = cv2.BFMatcher(cv2.NORM_HAMMING).knnMatch(desc, target_desc, k=2)
score = sum(len(pair) == 2 and pair[0].distance < 0.7*pair[1].distance for pair in matches)
scores.append((score, label))
score, label = max(scores, default=(0, '类型未识别'))
if not colored and score < 8:
continue
if score < 8:
label = '类型未识别'
result['route_' + key] = {
'description': '%s有高亮可达节点:%s,图标匹配数%d,中心(%d,%d)。按方向键选中后直接回车进入,无需二次确认。' % (direction,label,score,x,y),
'action': {'tool': 'route', 'args': {'key': key}},
}
return result
def candidates(state, previous_battle=False, refresh_used=0):
items = text_items(state)
texts = [item['text'].replace(' ', '') for item in items]
combined = '\n'.join(texts)
width = state.get('screen', {}).get('w', 1920)
height = state.get('screen', {}).get('h', 1080)
options = {'requires_analysis': {
'description': '你判断信息不足或需要主助手分析:暂停并返回当前游戏截图和问题。',
'action': {'tool': 'requires_analysis', 'args': {}},
}, 'wait': {
'description': '短暂等待0.7秒后重新读取画面;CONNECTING或界面动画尚未完成时用,不发送输入。',
'action': {'tool': 'wait', 'args': {'seconds': 0.7}},
}}
# Refresh requests leave the previous stock visible until networking ends.
# Never buy, refresh again, or leave based on that stale inventory.
if any('CONNECTING' in t.upper() for t in texts):
return options
if '探索完成' in texts:
claim = next((i for i in items if i['text'].replace(' ', '') == '领取'
and button_enabled(state,i)), None)
if claim:
options['claim_final'] = {
'description':'最终探索完成:点击领取并按回车确认奖励。',
'action':{'tool':'claim_final','args':{'x':claim['x']+claim['w']//2,
'y':claim['y']+claim['h']//2}},
}
return options
if '判定成功' in combined or '判定失败' in combined or '结果' in texts:
continuation = next((i for i in items if i['text'].replace(' ', '') == '继续'
and button_enabled(state,i)), None)
options['event_finish'] = {
'description': '判定结果已出现,快速连按回车结束事件并返回地图。',
'action': ({'tool':'click','args':{'x':continuation['x']+continuation['w']//2,
'y':continuation['y']+continuation['h']//2}}
if continuation else {'tool': 'advance_dialog', 'args': {'presses': 5}}),
}
return options
for index, item in enumerate(items):
if item['text'].replace(' ', '').upper() == 'SKIP' and button_enabled(state, item):
options['skip_dialog'] = {
'description': '先点击SKIP跳过当前对话,再读取事件选项或判定;当前不选择罪人或进行判定。',
'action': {'tool': 'click', 'args': {'x': item['x'] + item['w']//2,
'y': item['y'] + item['h']//2}},
}
return options
if '应该让谁' in combined and '选择一位罪人' not in combined and '进行判定' not in combined:
options['event_advance'] = {
'description': '对话已经跳过,按回车继续到选择罪人的判定界面。',
'action': {'tool': 'advance_dialog', 'args': {}},
}
return options
for index, item in enumerate(items):
if item['text'].replace(' ', '').lstrip('×xX') == '关闭':
options['close_%d' % index] = {
'description': '关闭当前饰品查看/强化窗口,返回商店继续换技能;电池不是当前必要强化目标。',
'action': {'tool': 'keypress', 'args': {'key': 'esc'}},
}
if '迷宫进度' in texts:
for index, item in enumerate(items):
if item['text'].replace(' ', '') == '继续':
options['resume_game'] = {
'description': '关闭迷宫进度菜单并继续当前商店操作。',
'action': {'tool': 'click', 'args': {'x': item['x']+item['w']//2,
'y': item['y']+item['h']//2}},
}
return options
if any('是否消耗' in t and '技能替换' in t for t in texts):
header = next((t for t in texts if '替换' in t and '技能' in t and '是否' not in t), '')
skills = sorted([i for i in items if re.fullmatch(r'SKILL\s*[123]', i['text'])
and height*.28 < i['y'] < height*.5], key=lambda i: i['x'])
target = ('SKILL2', 'SKILL3') if '奥提斯' in header else (
('SKILL1', 'SKILL2') if '辛克莱' in header and state.get('floor', 3) < 3 else ('SKILL1', 'SKILL3'))
if tuple(i['text'].replace(' ', '') for i in skills) == target:
for item in items:
if item['text'] == '购买':
options['buy_swap'] = {
'description': '已核对本层所需技能替换 %s→%s,点击购买完成。' % target,
'action': {'tool': 'click', 'args': {'x': item['x']+item['w']//2,
'y': item['y']+item['h']//2}},
}
return options
if any('当前持有技能' in t for t in texts):
header = next((t for t in texts if '替换' in t and '技能' in t), '')
target = ('SKILL2', 'SKILL3') if '奥提斯' in header else (
('SKILL1', 'SKILL2') if '辛克莱' in header and state.get('floor', 3) < 3 else ('SKILL1', 'SKILL3'))
target_selected = False
for number, fraction in enumerate((0.235, 0.49, 0.745), 1):
cx = round(width*fraction)
skill_texts = [i for i in items if 'SKILL' in i['text'].upper()
and abs(i['x']+i['w']/2 - (cx + width*.075)) < width*.05
and height*.3 < i['y'] < height*.7]
skill_texts.sort(key=lambda i: i['y'])
if len(skill_texts) == 2:
if tuple(i['text'].upper().replace(' ', '') for i in skill_texts) != target:
continue
detail = skill_texts[0]['text'] + ' → ' + skill_texts[1]['text']
options['skill_swap_%d' % number] = {
'description': header + ':第%d项 %s;按楼层技能表选这一项。' % (number, detail),
'action': {'tool': 'click', 'args': {'x': cx, 'y': round(height*.45)}},
}
try:
import cv2
import numpy as np
from PIL import Image
with Image.open(state['screen']['path']) as image:
border = np.array(image.convert('RGB').crop((int(cx-width*.12), int(height*.31),
int(cx-width*.107), int(height*.69))))
hsv = cv2.cvtColor(border, cv2.COLOR_RGB2HSV)
target_selected = float(((hsv[:,:,0] > 8) & (hsv[:,:,0] < 35) &
(hsv[:,:,1] > 200) & (hsv[:,:,2] > 220)).mean()) > .18
except (KeyError, OSError, ImportError):
pass
for item in items:
if target_selected and item['text'].replace(' ', '') == '确认' and button_enabled(state, item):
options['confirm_swap'] = {
'description': '确认已经选中的技能替换,支付本项费用。未选项目时应先点技能替换项。',
'action': {'tool': 'click', 'args': {'x': item['x'] + item['w']//2,
'y': item['y'] + item['h']//2}},
}
return options
if '追加的苦难' in combined and '获得E.G.O' in combined:
for number, fraction in enumerate((.188, .395, .60, .813), 1):
cx = round(width*fraction)
details = ';'.join(i['text'] for i in items
if abs(i['x']+i['w']/2-cx) < width*.102
and height*.22 < i['y'] < height*.77)
if details:
options['hardship_%d' % number] = {
'description': '层末第%d张饰品与苦难:%s。必需饰品优先;其他避开体力上限和防御等级。' % (number,details),
'action': {'tool':'click', 'args':{'x':cx, 'y':round(height*.43)}},
}
for item in items:
if '选择' in item['text'] and '/' in item['text'] and button_enabled(state,item):
options['hardship_confirm'] = {
'description':'选择数量足够后确认层末饰品和苦难,直接前进。',
'action':{'tool':'click','args':{'x':item['x']+item['w']//2,'y':item['y']+item['h']//2}},
}
return options
# Nested confirmation/detail windows override the reward/pack behind them.
modal_question = ('确认' in texts and any('取消' in t for t in texts)
and any('吗?' in t or '吗?' in t for t in texts))
pack_detail = '出现头目' in combined and '详细内容' in combined
if modal_question or pack_detail:
buttons = [i for i in items if i['text'].replace(' ', '') == '确认'
and button_enabled(state, i)]
if buttons:
item = min(buttons, key=lambda i: i['y'])
options['modal_confirm'] = {
'description': '确认当前最上层弹窗;不操作背景奖励卡或卡包。',
'action': {'tool': 'click', 'args': {'x': item['x'] + item['w']//2,
'y': item['y'] + item['h']//2}},
}
return options
if any('选择遭遇战奖励卡' in t for t in texts):
for number, fraction in enumerate((0.355, 0.514, 0.674), 1):
cx = round(width*fraction)
detail = ';'.join(i['text'] for i in items
if abs(i['x']+i['w']/2-cx) < width*.07 and height*.48 < i['y'] < height*.65)
if detail:
options['reward_card_%d' % number] = {
'description': '遭遇战奖励卡第%d张:%s。优先减少额外操作,略过无关饰品。' % (number, detail),
'action': {'tool': 'click', 'args': {'x': cx, 'y': round(height*.43)}},
}
if not any('0/1' in t for t in texts):
for index, item in enumerate(items):
if item['text'].replace(' ', '') == '确认' and button_enabled(state, item):
options['confirm_reward'] = {
'description': '奖励卡已选中,确认领取。',
'action': {'tool': 'keypress', 'args': {'key': 'enter'}},
}
return options
# A confirmation dialog blocks the controls underneath it. Keep its
# observed coordinates instead of re-running an ambiguous text search.
confirmations = [(index, item) for index, item in enumerate(items)
if item['text'].replace(' ', '') == '确认']
modal = confirmations and (any('取消' in t for t in texts) or
any('吗?' in t or '吗?' in t for t in texts))
if modal:
for index, item in confirmations:
if button_enabled(state, item):
options['confirm_%d' % index] = {
'description': '当前确认弹窗的“确认”按钮;确认本次操作,背景控件被弹窗遮挡。',
'action': {'tool': 'click', 'args': {'x': item['x'] + item['w'] // 2,
'y': item['y'] + item['h'] // 2}},
}
return options
if any('选择' in t and '层主题卡包' in t for t in texts):
# This screen has five clipped bags; title OCR anchors each visible bag.
for number, fraction in enumerate((0.17, 0.335, 0.5, 0.665, 0.83), 1):
cx = round(width * fraction)
titles = [i['text'] for i in items if abs(i['x'] + i['w']/2 - cx) < width*.06
and height*.60 < i['y'] < height*.68]
label = '/'.join(titles) or '标题OCR暂未识别'
options['pack_inspect_%d' % number] = {
'description': '查看第%d个卡包“%s”的放大镜详情,核对怪物和通关奖励。' % (number, label),
'action': {'tool': 'click', 'args': {'x': round(cx + width*.042), 'y': round(height*.303)}},
}
if titles:
options['pack_drag_%d' % number] = {
'description': '选择第%d个卡包“%s”:长按卡包中部并缓慢向下拖到底。' % (number, label),
'action': {'tool': 'drag', 'args': {'from_x': cx, 'from_y': round(height*.45),
'to_x': cx, 'to_y': round(height*.91), 'duration': 1.8}},
}
return options
in_shop = '商店' in texts and '刷新' in texts
party = ('辛克莱', '鸿璐', '希斯克利夫', '奥提斯', '格里高尔', '良秀', '浮士德')
swaps = [(index, item) for index, item in enumerate(items)
if '替换' in item['text'] and any(name in item['text'] for name in party)
and not any('已购买' in sold['text']
and abs(sold['x']+sold['w']/2-item['x']-item['w']/2) < width*.07
and 0 < item['y']-sold['y'] < height*.25 for sold in items)]
if in_shop:
for index, item in swaps:
options['swap_%d' % index] = {
'description': '商店出战角色技能替换入口:' + item['text'] + ';打开后核对技能表。',
'action': {'tool': 'click', 'args': {'x': item['x'] + item['w']//2,
'y': max(0, item['y'] - round(height*.095))}},
}
if not swaps and refresh_used < 4:
for index, item in enumerate(items):
if item['text'].replace(' ', '') == '刷新' and button_enabled(state, item):
options['shop_refresh'] = {
'description': '没有出战角色可替换技能,刷新商店;本店已刷新%d/4次。' % refresh_used,
'action': {'tool': 'click', 'args': {'x': item['x'] + item['w'] // 2,
'y': item['y'] + item['h'] // 2}},
}
end_screen = any(t.upper() in ('VICTORY', 'DEFEAT') or any(m in t for m in
('正在探', '获得E.G.O饰品', '开始战斗', '主题卡包', '应该让谁上前', '选择遭遇战奖励卡')) for t in texts)
battle = any(m in combined.upper() for m in ('WAVE', 'TURN', 'DURANTE', '胜率', '伤害'))
if not end_screen and (battle or previous_battle):
options['battle'] = {'description': '仍处于战斗或特写:执行短批次 P→回车,两次后检查结算,不分析拼点。',
'action': {'tool': 'battle', 'args': {'rounds': 2}}}
known_buttons = ('确认', '继续', '进入', '开始战斗', 'SKIP', '进行判定', '拒绝饰品',
'离开', '下一层', '前往下一层', '领取奖励', '结束探索', 'TOUCHTOSTART', '选择')
for index, item in enumerate(items):
label = item['text'].replace(' ', '')
if in_shop and (swaps or 'shop_refresh' in options) and label == '离开':
continue
if label in known_buttons and button_enabled(state, item):
options['button_%d' % index] = {
'description': '当前可见且非灰色按钮:%s;点击 OCR 中心。' % label,
'action': ({'tool': 'keypress', 'args': {'key': 'enter'}} if label in ('进入', '开始战斗')
else {'tool': 'click_text', 'args': {'text': item['text']}}),
}
if (not battle and not in_shop and state.get('screen', {}).get('path')
and Path(state['screen']['path']).is_file()
and not any(t in combined for t in ('确认', '继续', '获得E.G.O', 'SKIP', '选项'))):
options.update(map_candidates(state))
if any(t in combined for t in ('应该让谁', '选择一位罪人')):
for index, item in enumerate(items):
if item['text'] in ('极高', '高') and item['y'] > height * 0.8 and item['w'] < width * 0.07:
options['sinner_%d' % index] = {
'description': '选择预计成功率%s的罪人卡,卡中心x=%d。' % (item['text'], item['x'] + item['w'] // 2),
'action': {'tool': 'click', 'args': {'x': item['x'] + item['w'] // 2,
'y': min(height - 35, item['y'] + int(height * 0.06))}},
}
if '选择一位罪人' in combined:
try:
import cv2
import numpy as np
from PIL import Image
with Image.open(state['screen']['path']) as image:
rgb = np.array(image.convert('RGB'))
for number in range(12):
cx = round(width*(.061 + number*.0542))
crop = rgb[round(height*.841):round(height*.878), max(0,cx-round(width*.026)):cx+round(width*.026)]
hsv = cv2.cvtColor(crop, cv2.COLOR_RGB2HSV)
gold = (hsv[:,:,0] > 18) & (hsv[:,:,0] < 36) & (hsv[:,:,1] > 160) & (hsv[:,:,2] > 180)
if int(gold.sum()) > 100:
options['sinner_card_%d' % number] = {
'description': '第%d张罪人卡的成功率标识为金黄色(高/极高),选择此卡。' % (number+1),
'action': {'tool': 'click', 'args': {'x': cx, 'y': round(height*.915)}},
}
except (OSError, KeyError, ImportError):
pass
if '选项' in texts:
if not any('选择后' in t and '获得' in t and '判定' not in t for t in texts):
options['event_scroll'] = {
'description': '向下拖动事件选项列表的滚动条,查看是否还有无需判定、无需战斗的直接离开选项。',
'action': {'tool': 'drag', 'args': {'from_x': round(width*.945), 'from_y': round(height*.255),
'to_x': round(width*.945), 'to_y': round(height*.68), 'duration': .8}},
}
for index, item in enumerate(items):
if item['x'] > width * 0.52 and height * 0.23 < item['y'] < height * 0.75 and item['h'] > height * 0.025 and item.get('score', 0) > 0.93:
if not any(t in item['text'] for t in ('判定', '获得', '成功', '全体', '战斗胜利')):
outcome = ';'.join(i['text'] for i in items if i['x'] > width*.52
and item['y']+item['h'] < i['y'] < item['y']+height*.085)
options['event_%d' % index] = {'description': '当前事件选项:' + item['text'] + ';结果:' + outcome,
'action': {'tool': 'click_text', 'args': {'text': item['text']}}}
return options
def decide(cfg, state, options, recent):
body = {'model': 'jev-1.13-free',
'state': '目标:按用户已配置的队伍和速通规则推进当前镜牢。当前楼层:%s\n当前游戏 OCR(坐标仅供辨识):\n' % state.get('floor', '尚未识别') +
'\n'.join('%s @%d,%d' % (i['text'], i['x'], i['y']) for i in text_items(state)
if not i['text'].upper().startswith('STEAM')) +
'\n截图视觉与可用控件观察(不是预先做出的决定):\n' +
'\n'.join(val['description'] for key,val in options.items() if key != 'requires_analysis') +
'\n最近动作和执行结果:' + json.dumps(recent[-4:], ensure_ascii=False),
'questions': {'action': {'type': 'choice', 'instructions': SYSTEM_RULES,
'criteria': {key: val['description'] for key, val in options.items()}}}}
request = urllib.request.Request(
'https://opencode.ai/zen/v1/systemone',
data=json.dumps(body, ensure_ascii=False).encode('utf-8'),
headers={'Authorization': 'Bearer ' + cfg['apiKey'], 'Content-Type': 'application/json',
'User-Agent': 'Mozilla/5.0'}, method='POST')
start = time.monotonic()
for attempt in range(2):
try:
with urllib.request.urlopen(request, timeout=7) as response:
result = json.load(response)
break
except (OSError, TimeoutError):
if attempt:
raise
time.sleep(0.3)
answer = result.get('answers', {}).get('action', {})
choice = answer.get('choice')
if answer.get('type') != 'choice' or choice not in options:
raise ValueError('Jev returned an unsupported candidate')
return choice, round((time.monotonic() - start) * 1000)
def execute(bridge, action):
if action['tool'] == 'claim_final':
result = bridge.call('click', action['args'])
if not result.get('ok'):
return result
time.sleep(.4)
return bridge.call('keypress', {'key':'enter'})
if action['tool'] == 'advance_dialog':
for _ in range(min(5, action.get('args', {}).get('presses', 2))):
result = bridge.call('keypress', {'key': 'enter'})
if not result.get('ok'):
return result
time.sleep(.2)
return result
if action['tool'] == 'route':
result = bridge.call('keypress', {'key': action['args']['key']})
if not result.get('ok'):
return result
time.sleep(0.35)
result = bridge.call('keypress', {'key': 'enter'})
if not result.get('ok'):
return result
time.sleep(0.7)
return bridge.call('keypress', {'key': 'enter'})
if action['tool'] == 'wait':
time.sleep(0.7)
return {'ok': True, 'waited': 0.7}
if action['tool'] == 'battle':
deadline = time.monotonic() + 45
pairs = 0
while time.monotonic() < deadline and not STOP_FILE.exists():
for _ in range(2):
for key in ('p', 'enter'):
result = bridge.call('keypress', {'key': key})
if not result.get('ok'):
return result
pairs += 1
time.sleep(0.8)
state = bridge.call('get_state')
if not state.get('ok'):
return state
texts = [i['text'].replace(' ', '') for i in text_items(state)]
terminal = any(t.upper() in ('VICTORY', 'DEFEAT') or any(m in t for m in
('正在探', '获得E.G.O饰品', '开始战斗', '主题卡包',
'应该让谁上前', '选择遭遇战奖励卡', '选项事件', '选择苦难')) for t in texts)
if terminal:
return {'ok': True, 'pairs': pairs, 'terminal': True, 'screen': state.get('screen')}
return {'ok': True, 'pairs': pairs, 'terminal': False}
return bridge.call(action['tool'], action.get('args'))
def main():
parser = argparse.ArgumentParser()
parser.add_argument('config')
parser.add_argument('--steps', type=int, default=250)
parser.add_argument('--seconds', type=int, default=1200)
args = parser.parse_args()
# 防止另一个终端重复启动同一个游戏的执行器。
import ctypes
kernel = ctypes.windll.kernel32
kernel.CreateMutexW.restype = ctypes.c_void_p
kernel.CreateMutexW.argtypes = [ctypes.c_void_p, ctypes.c_int, ctypes.c_wchar_p]
lease = kernel.CreateMutexW(None, False, 'Local\\LimbusMirrorJevController')
if not lease or kernel.GetLastError() == 183:
print(json.dumps({'state':'already_running'}), flush=True)
if lease:
kernel.CloseHandle(ctypes.c_void_p(lease))
return
cfg = json.loads(Path(args.config).read_text(encoding='utf-8'))
log = Path(r'{source_root}\jev_mirror_log.jsonl')
status = Path(r'{source_root}\jev_mirror_status.json')
bridge = Bridge()
deadline = time.monotonic() + args.seconds
recent = []
repeats = {}
previous_battle = False
if log.exists():
last_lines = log.read_text(encoding='utf-8').splitlines()
if last_lines:
last_record = json.loads(last_lines[-1])
previous_battle = last_record.get('battle_context', last_record.get('action', {}).get('tool') == 'battle')
context_path = Path(r'{source_root}\jev_shop_context.json')
context = json.loads(context_path.read_text(encoding='utf-8')) if context_path.exists() else {'refresh_used': 0}
stable_since = time.monotonic()
last_fingerprint = None
try:
for step in range(args.steps):
if STOP_FILE.exists() or time.monotonic() > deadline:
status.write_text(json.dumps({'state': 'stopped', 'step': step}), encoding='utf-8')
return
state = bridge.call('get_state')
if not state.get('ok'):
state = {'ok': False, 'items': [{'text': 'MCP 截图暂不可用;游戏窗口可能正在重建。' + str(state.get('error','')),
'x':0,'y':0,'w':0,'h':0,'score':1.0}]}
fingerprint = tuple(item['text'] for item in text_items(state)
if item.get('score', 0) > 0.93 and not item['text'].replace('.', '').isdigit())
if any('正在探' in i['text'] or '主题卡包' in i['text'] for i in text_items(state)):
context['refresh_used'] = 0
for item in text_items(state):
match = re.search(r'(?:第|选择)([1-5])层', item['text'].replace(' ', ''))
if match:
context['floor'] = int(match[1])
context_path.write_text(json.dumps(context), encoding='utf-8')
state['floor'] = context.get('floor', 3)
options = candidates(state, previous_battle, context['refresh_used'])
if fingerprint != last_fingerprint:
stable_since = time.monotonic()
last_fingerprint = fingerprint
stable_seconds = round(time.monotonic() - stable_since)
if stable_seconds > 30:
recent.append({'observation':'画面已%d秒没有有效改变,请你判断是否需要主助手排查。' % stable_seconds})
for key in list(options):
action_id = json.dumps(options[key]['action'], sort_keys=True)
if (options[key]['action'] == {'tool': 'keypress', 'args': {'key': 'enter'}}
and repeats.get((fingerprint, action_id), 0) >= 1):
button = next((i for i in text_items(state)
if i['text'].replace(' ', '') in ('进入', '开始战斗', '确认', '继续')
and button_enabled(state, i)), None)
if button:
options[key]['action'] = {'tool': 'click', 'args': {
'x': button['x'] + button['w']//2, 'y': button['y'] + button['h']//2}}
options[key]['description'] += ' 回车未生效,改为点击当前按钮。'
action_id = json.dumps(options[key]['action'], sort_keys=True)
if key not in ('requires_analysis', 'wait', 'battle') and repeats.get((fingerprint, action_id), 0) >= 2:
del options[key]
# User explicitly prescribed the complete battle loop. Only scene
# transitions return to Jev; combat does not require new decisions.
if 'event_finish' in options:
choice, latency = 'event_finish', 0
elif 'skip_dialog' in options:
choice, latency = 'skip_dialog', 0
elif 'event_advance' in options:
choice, latency = 'event_advance', 0
elif 'battle' in options:
choice, latency = 'battle', 0
else:
choice, latency = decide(cfg, state, options, recent)
action = options[choice]['action']
record = {'step': step, 'choice': choice, 'action': action, 'jev_ms': latency,
'screen': state.get('screen'), 'at': time.strftime('%Y-%m-%dT%H:%M:%S')}
if choice == 'requires_analysis':
record.update(state='requires_analysis', items=text_items(state))
status.write_text(json.dumps(record, ensure_ascii=False), encoding='utf-8')
print(json.dumps(record, ensure_ascii=False), flush=True)
return
action_id = json.dumps(action, sort_keys=True)
repeats[(fingerprint, action_id)] = repeats.get((fingerprint, action_id), 0) + 1
result = execute(bridge, action)
if choice == 'shop_refresh':
context['refresh_used'] += 1
context_path.write_text(json.dumps(context), encoding='utf-8')
started_battle = choice.startswith('button_') and any(
i['text'].replace(' ', '') == '开始战斗' for i in text_items(state))
previous_battle = ((action['tool'] == 'battle' and not result.get('terminal')) or started_battle
or (previous_battle and action['tool'] == 'wait'))
record.update(result=result, state='running', battle_context=previous_battle)
with log.open('a', encoding='utf-8') as output:
output.write(json.dumps(record, ensure_ascii=False) + '\n')
status.write_text(json.dumps(record, ensure_ascii=False), encoding='utf-8')
recent.append({'action': action, 'ok': result.get('ok'), 'unchanged_attempt': repeats[(fingerprint, action_id)]})
print(json.dumps({k:v for k,v in record.items() if k != 'items'}, ensure_ascii=False), flush=True)
time.sleep(0.35)
except Exception as error:
record = {'state': 'requires_analysis', 'error': '%s: %s' % (type(error).__name__, str(error))}
status.write_text(json.dumps(record, ensure_ascii=False), encoding='utf-8')
print(json.dumps(record, ensure_ascii=False), flush=True)
finally:
bridge.proc.stdin.close()
try:
bridge.proc.wait(timeout=5)
except subprocess.TimeoutExpired:
bridge.proc.kill()
kernel.CloseHandle(ctypes.c_void_p(lease))
if __name__ == '__main__':
main()
@@ -0,0 +1,367 @@
# -*- coding: utf-8 -*-
"""Closed-loop Limbus Company Mirror Dungeon driver.
IO goes through the user's lc-mcp (AALC) bridge: OCR state + background
click/keypress/drag. Decisions come from deepseek-v4.1-flash on the zen API.
Usage: python lc_agent.py <config.json>
config.json:
{
"steps": 200,
"model": "deepseek-v4.1-flash",
"apiKey": "oc_sk_...",
"baseUrl": "https://opencode.ai/zen/go/v1",
"logFile": "D:\\codex\\limbus_tools\\lc_agent_log.jsonl",
"shotDir": "D:\\codex\\limbus_tools\\lc_shots"
}
"""
import base64
import io
import json
import os
import subprocess
import sys
import time
import urllib.request
from pathlib import Path
ROOT = Path(r"D:\codex\lc-mcp")
BRIDGE = ROOT / "lc_mcp" / "bridge.py"
STOP_FILE = Path(r"{source_root}\STOP")
SKY = {
"tool": "click|click_text|keypress|drag|wait_for_text|screenshot|get_state",
}
TOOLS_DOC = """可用工具(只输出一个 JSON):
{"tool":"battle","args":{"rounds":8}} // 战斗宏:自动 p → enter 循环 rounds 轮,战斗中优先用这个
{"tool":"keys","args":{"keys":["enter","enter"],"delay":0.8}} // 顺序按几个键
{"tool":"keypress","args":{"key":"enter"}} // 单键: enter/esc/space/p/a-z/up/down/left/right
{"tool":"click_text","args":{"text":"进入"}} // 按 OCR 文字点击(有文字时最稳)
{"tool":"click_image","args":{"name":"mirror/road_in_mir/event.png"}} // 按 AALC 模板图点击(没文字的图标/按钮/地图节点用这个,最稳)
{"tool":"find_image","args":{"name":"mirror/road_in_mir/shop.png"}} // 只查找模板图,返回 found/x/y
{"tool":"list_images","args":{"prefix":"mirror/"}} // 列出可选模板图
{"tool":"click","args":{"x":960,"y":540}} // 按客户区坐标点击(1920x1080),最后手段
{"tool":"drag","args":{"from_x":600,"from_y":330,"to_x":600,"to_y":640,"duration":1.2}} // 长按拖拽,卡包选择用
{"tool":"wait_for_text","args":{"text":"SKIP","timeout":20}}
{"tool":"get_state"} // 重新观察
{"tool":"done","args":{"reason":"..."}} // 整局通关结算出现,或确实需要人类接管
常用模板图(AALC 自带):
mirror/road_in_mir/event.png(事件节点) shop.png(商店) battle.png(普通战斗) risky_encounter.png(危险战斗)
mirror/road_in_mir/enter_assets.png(进入按钮) up.png / down.png / mid.png(地图上下选节点)
mirror/road_in_mir/acquire_ego_gift_refuse_assets.png(观测「拒绝饰品」) refuse_gift_assets.png
mirror/road_in_mir/select_encounter_reward_card_assets.png mirror/get_reward_card/get_reward_card_confirm_assets.png
mirror/road_in_mir/clear_floor.png mirror/road_in_mir/to_window_assets.png
"""
SYSTEM = f"""你是《边狱公司》(Limbus Company) 镜像迷宫速通的**执行器**。你看到的是游戏窗口的 OCR 文字清单 + 截图,要输出**下一步一个操作**,追求整局最快通关。
{TOOLS_DOC}
决策规则(按优先级):
0. **工具选择**:有图标没文字时优先 click_image(模板图);有文字时用 click_text;click 坐标是最后手段。
1. **战斗中**(OCR 出现 WAVE / TURN / 胜率 / 伤害 / MAX):立刻用 {{"tool":"battle","args":{{"rounds":8}}}}。不要按 space(会暂停)。战斗动画中也可以继续发,游戏会排队。
2. **剧情/对话**(出现 SKIP 按钮):用 click_text 点 "SKIP" 跳过整段。只有多段文本才用 enter。
3. **判定事件**("应该让谁上前"/"选择一位罪人来进行判定"):点带「极高」标记的出战罪人卡(底部一排,卡上有 极高/高/低)。用 click 点那张卡的中下部。
4. **事件选项**:避开额外战斗和判定;优先能直接结束的选项。选完出现 SKIP 就 skip。
5. **奖励界面**:优先含「破裂」的 E.G.O 饰品;避开「体力上限」「防御等级」增加的苦难;有「选择 N/M」按钮时选完再点它。
5b. **额外E.G.O饰品观测**(画面中央单张饰品卡 + 右下「拒绝饰品」/「选择」两个按钮):**用 click_image("mirror/road_in_mir/acquire_ego_gift_refuse_assets.png")** 或 click_text "拒绝饰品"。用户明确要求:不要额外观测饰品。
5c. 如果「选择」按钮点了没用,说明还没选中卡片或该按钮不可用 —— 改点「拒绝饰品」或按 esc,不要在同一个按钮上反复点。
6. **卡包选择**(标题「选择N层主题卡包」):必须拖拽。用 drag 从目标卡包中心向下拖(如 from(600,330) to(600,640), duration 1.2)。选哪个包都行,速度优先。
7. **地图**:先用 find_image 找 mirror/road_in_mir/event.png(事件)或 shop.png(商店),找到就 click_image 点它,减少战斗;找不到事件/商店就点 battle.png / risky_encounter.png。节点详情面板出现后用 click_text 点 "进入"。
8. **商店**:先看有没有我方人格(辛克莱/鸿璐/希斯克利夫/奥提斯/格里高尔/良秀/浮士德)的「替换XX的技能」,有就买;成捆的符咒还没 ++ 就先「强化饰品」。然后点 "离开" → "确认"。
9. **任何弹窗**:优先 click_text 点 "确认"/"继续"/"进入"。
10. 连续 3 步画面没变说明方法错了,换一个明显不同的操作(换工具或换坐标)。同一个动作别重复超过 2 次。
11. 只输出 JSON,不要解释。
已知:HARD 难度;队伍是破裂纯 P;关键饰品 成捆的符咒(要 ++)、干巴柴紧致鸡胸肉、荆棘索套、荧光灯、标准负载电池。
"""
class Bridge:
def __init__(self):
self.proc = subprocess.Popen(
[sys.executable if False else r"D:\codex\lc-mcp\vendor\aalc\.venv\Scripts\python.exe",
"-X", "utf8", str(BRIDGE)],
cwd=str(ROOT), env=dict(os.environ, PYTHONUTF8="1"),
stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.DEVNULL,
text=True, encoding="utf-8", bufsize=1,
)
self.n = 0
self.send({"jsonrpc": "2.0", "id": 1, "method": "initialize", "params": {
"protocolVersion": "2024-11-05", "capabilities": {},
"clientInfo": {"name": "dsh-lc-agent", "version": "1"}}})
self.await_id(1)
self.send({"jsonrpc": "2.0", "method": "notifications/initialized"})
def send(self, obj):
self.proc.stdin.write(json.dumps(obj, ensure_ascii=False) + "\n")
self.proc.stdin.flush()
def await_id(self, mid):
while True:
line = self.proc.stdout.readline()
if not line:
raise RuntimeError("bridge closed")
line = line.strip()
if not line:
continue
try:
msg = json.loads(line)
except ValueError:
continue
if msg.get("id") == mid:
return msg
def call(self, tool, args=None, timeout=None):
self.n += 1
mid = 1000 + self.n
self.send({"jsonrpc": "2.0", "id": mid, "method": "tools/call",
"params": {"name": tool, "arguments": args or {}}})
msg = self.await_id(mid)
if msg is None:
return {"ok": False, "error": "no response"}
if "error" in msg:
return {"ok": False, "error": msg["error"]}
res = msg["result"]
try:
return json.loads(res["content"][0]["text"])
except Exception:
return {"ok": False, "raw": res}
def shrink(path, out_dir, max_w=1280):
"""Downscale the AALC PNG to a small JPEG data URL for the vision model."""
try:
from PIL import Image
except Exception:
return None
try:
im = Image.open(path).convert("RGB")
except Exception:
return None
if im.width > max_w:
im = im.resize((max_w, int(im.height * max_w / im.width)), Image.LANCZOS)
os.makedirs(out_dir, exist_ok=True)
out = os.path.join(out_dir, "model_view.jpg")
im.save(out, "JPEG", quality=72)
with open(out, "rb") as f:
return "data:image/jpeg;base64," + base64.b64encode(f.read()).decode("ascii")
def summarize(items, limit=90):
lines = []
for it in items[:limit]:
lines.append(f'{it["text"]} @({it["x"]},{it["y"]})')
return "\n".join(lines)
def ask(cfg, image_url, ocr_text, recent, step, stuck):
nudge = ""
if stuck:
nudge = ("\n\n⚠️ 最近几步画面完全没变化,说明当前操作方式无效:"
"立刻换一个**完全不同**的工具或目标(例如 keypress esc / click_text 拒绝饰品 / "
"click_text 确认 / click_text 进入 / drag 拖卡包),不要再点同一个按钮。\n")
body = {
"model": cfg["model"],
"temperature": 0,
"max_tokens": 900,
"reasoning_effort": "minimal",
"messages": [
{"role": "system", "content": SYSTEM},
{"role": "user", "content": [
{"type": "text", "text": (
f"第 {step} 步。\n最近操作:{' | '.join(recent[-5:]) or '无'}\n"
f"OCR 文字清单(text @x,y):\n{ocr_text}{nudge}\n\n输出下一步 JSON。")},
{"type": "image_url", "image_url": {"url": image_url, "detail": "low"}},
]},
],
}
data = json.dumps(body, ensure_ascii=False).encode("utf-8")
req = urllib.request.Request(
cfg["baseUrl"].rstrip("/") + "/chat/completions", data=data,
headers={"Authorization": "Bearer " + cfg["apiKey"],
"Content-Type": "application/json",
"x-opencode-session": cfg.get("sessionId", "dsh-lc-agent"),
# Cloudflare in front of the zen API returns 1010 without a browser UA.
"User-Agent": ("Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 "
"(KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36")},
method="POST")
with urllib.request.urlopen(req, timeout=120) as resp:
payload = json.loads(resp.read().decode("utf-8"))
msg = (payload.get("choices") or [{}])[0].get("message") or {}
return msg.get("content") or "", msg.get("reasoning_content") or ""
def parse_action(text):
raw = text.replace("```json", "\n").replace("```", "\n")
for i, ch in enumerate(raw):
if ch != "{":
continue
depth = 0
instr = False
esc = False
for j in range(i, len(raw)):
c = raw[j]
if instr:
if esc:
esc = False
elif c == "\\":
esc = True
elif c == '"':
instr = False
continue
if c == '"':
instr = True
elif c == "{":
depth += 1
elif c == "}":
depth -= 1
if depth == 0:
try:
obj = json.loads(raw[i:j + 1])
if isinstance(obj, dict) and isinstance(obj.get("tool"), str):
return obj
except ValueError:
pass
break
raise ValueError("no action JSON")
def run_action(br, action):
tool = action["tool"]
args = action.get("args") or {}
if tool == "battle":
rounds = max(1, min(int(args.get("rounds") or 6), 20))
done = 0
for _ in range(rounds):
br.call("keypress", {"key": "p"})
time.sleep(0.6)
br.call("keypress", {"key": "enter"})
time.sleep(1.0)
done += 1
return {"did": "battle", "rounds": done}
if tool == "keys":
keys = [k for k in (args.get("keys") or []) if isinstance(k, str)][:20]
delay = float(args.get("delay") or 0.8)
for k in keys:
br.call("keypress", {"key": k})
time.sleep(delay)
return {"did": "keys", "keys": keys}
if tool == "battle_until_text":
return {"did": "noop"}
res = br.call(tool, args)
res["did"] = tool
return res
def main():
cfg = json.loads(Path(sys.argv[1]).read_text(encoding="utf-8"))
if cfg.get('decisionEngine') == 'jev':
from jev_mirror_agent import main as jev_main
return jev_main()
log_path = Path(cfg["logFile"])
log_path.parent.mkdir(parents=True, exist_ok=True)
recent = []
br = Bridge()
step = 0
last_sig = None
stuck = 0
model_errs = 0
while step < int(cfg["steps"]):
step += 1
if STOP_FILE.exists():
print(json.dumps({"status": "stopped-by-file", "step": step}, ensure_ascii=False))
return
t0 = time.time()
state = br.call("get_state")
if not state.get("ok"):
print(json.dumps({"step": step, "status": "state-error", "state": state}, ensure_ascii=False))
time.sleep(2)
continue
items = state.get("items") or []
shot = (state.get("screen") or {}).get("path")
# Progress watchdog: if the OCR text stops changing, the current approach
# is not reaching the game. Nudge the model, then force an escape.
sig = "|".join(it.get("text", "") for it in items)
if sig == last_sig:
stuck += 1
else:
stuck = 0
last_sig = sig
if stuck >= 4:
br.call("keypress", {"key": "esc"})
time.sleep(0.8)
rec = {"step": step, "status": "watchdog-esc", "stuck": stuck, "shot": shot,
"at": time.strftime("%Y-%m-%dT%H:%M:%S")}
log_path.open("a", encoding="utf-8").write(json.dumps(rec, ensure_ascii=False) + "\n")
print(json.dumps(rec, ensure_ascii=False))
stuck = 0
last_sig = None
continue
img = shrink(shot, cfg.get("shotDir", r"{source_root}\lc_shots")) if shot else None
if not img:
print(json.dumps({"step": step, "status": "no-image"}, ensure_ascii=False))
time.sleep(2)
continue
try:
content, reasoning = ask(cfg, img, summarize(items), recent, step, stuck >= 2)
try:
action = parse_action(content or reasoning)
except Exception:
# One stricter retry: the model sometimes answers in prose or
# spends the whole budget on reasoning.
content2, reasoning2 = ask(
cfg, img,
summarize(items) + "\n\n上一次回复没有给出 JSON。现在**只输出一行 JSON**,以 {\"tool\": 开头。",
recent, step, False)
try:
action = parse_action(content2 or reasoning2)
except Exception:
raise ValueError(f"no action JSON (raw={((content or reasoning) or '')[:200]!r})")
except Exception as e:
model_errs += 1
rec = {"step": step, "status": "model-error", "error": f"{type(e).__name__}: {e}",
"model_errs": model_errs, "shot": shot}
log_path.open("a", encoding="utf-8").write(json.dumps(rec, ensure_ascii=False) + "\n")
print(json.dumps(rec, ensure_ascii=False))
if model_errs >= 3:
# Don't stall on a flaky model: nudge the game forward so the next
# observation has new information to work with.
model_errs = 0
try:
br.call("keypress", {"key": "enter"})
except Exception:
pass
time.sleep(1.5)
continue
model_errs = 0
try:
result = run_action(br, action)
except Exception as e:
rec = {"step": step, "status": "exec-error", "action": action,
"error": f"{type(e).__name__}: {e}", "shot": shot}
log_path.open("a", encoding="utf-8").write(json.dumps(rec, ensure_ascii=False) + "\n")
print(json.dumps(rec, ensure_ascii=False))
time.sleep(2)
continue
rec = {"step": step, "action": action, "result": result,
"ms": int((time.time() - t0) * 1000), "shot": shot,
"at": time.strftime("%Y-%m-%dT%H:%M:%S")}
log_path.open("a", encoding="utf-8").write(json.dumps(rec, ensure_ascii=False) + "\n")
print(json.dumps({"step": step, "action": json.dumps(action, ensure_ascii=False),
"did": result.get("did"), "ms": rec["ms"], "shot": shot}, ensure_ascii=False))
sys.stdout.flush()
recent.append(json.dumps(action, ensure_ascii=False))
if action.get("tool") == "done":
return
time.sleep(float(cfg.get("settle", 0.4)))
print(json.dumps({"status": "step-budget-exhausted", "step": step}, ensure_ascii=False))
if __name__ == "__main__":
main()
@@ -0,0 +1,116 @@
# 镜牢速通:破裂黎明/黑兽纯 P
记录日期:2026-10-01;用户规则更新至 2026-10-02。
目标:尽快完成整局,按楼层推进;保留关键强化与换技能,减少无关运营。
## 开局固定配置(用户明确指定)
1. 星之恩惠选 :**起始之星、星际旅行、全面的可能性**。
2. **恩惠保持基础等级,不强化**;不要点击单项或全部强化按钮。
3. E.G.O. 饰品选**破裂**组的**荆棘套索、荧光灯**。
4. **不需要额外观测饰品**;进入额外 E.G.O. 饰品观测页面后,直接选择**拒绝饰品**。
5. **入层三级饰品选择“标准负载电池”**(简称“电池”)。
注意:不强化的是开局星之恩惠;二层的**符纸 ++**仍然必须做。
**饰品只能在商店强化**;地图饰品窗口的 +/++ 是效果预览。二层遇商店优先把成捆的符咒强化到 ++,以实际强化标识确认。
## 楼层推进顺序
**符纸的游戏内名称为“成捆的符咒”**(用户截图确认):Ⅰ级破裂饰品,图标是黑色底板上的两张折叠符纸,带红色符文和黄色纸边。按此名称与图标识别卡包奖励。
| 楼层 | 优先操作 | 有余力再做 |
| --- | --- | --- |
| 1F | 优先选通关奖励含**符纸**的卡包,取得符纸;遇商店按下表换技能。 | — |
| 2F | **符纸强化到 ++**;优先选 **Hell's Chicken**,主动获取**鸡胸**以维持破裂层数;按下表换技能。 | — |
| 3F | 菲辛的换技能目标改为 **1 → 3**;原作者推荐 **Bearable** 卡包。 | 制作**快感**。 |
| 4F | 继续推进、按下表换技能。 | 补缺失的相关饰品。 |
| 5F | **优先“2号线”卡包**;优先换技能并通关,不必专门做斩击四级饰品。 | 卡包刷新次数为零时允许卡包观测;顺路高级饰品。 |
没拿到鸡胸也继续推进,**不要因此重开**。饰品与换技能竞争资源时,优先关键技能;符纸 ++ 的优先级保留。
## 技能替换速查
箭头表示“用左侧技能换成右侧技能”。
| 人格 | 1–2F | 3–5F |
| --- | --- | --- |
| 菲辛 | **1 → 2** | **1 → 3** |
| 黑兽奥 | **2 → 3** | **2 → 3** |
| 其他人格 | **1 → 3** | **1 → 3** |
看到符合上表的替换通常直接换,少做反复比较。
用户补充(2026-10-02):商店没有出战角色可替换技能时,允许刷新,**每个商店至多 4 次**。有出战角色可换时按技能表执行;达到上限即继续推进。
刷新后出现 CONNECTING 时,旧库存仍可见;必须等加载结束,禁止据旧库存再次刷新或退出。有未购买的出战角色技能替换时先完成替换,不能直接离开。快捷键一次未生效即点击当前对应按钮。
## 层末苦难
- 除必需饰品外,选择**不加敌方血量、不加防御等级**的选项。不要漏选后让系统随机分配苦难;
- 层末必须先选择苦难再直接推进,不能把此界面误当额外饰品观测而默认拒绝。
## 场景执行表(优先减少重复步骤)
| 当前画面 | 固定操作 | 到哪里再重新决策 |
| --- | --- | --- |
| CONNECTING/加载 | 等待,不购买、不刷新、不退出 | 新画面加载完成 |
| 上层确认弹窗 | 只操作弹窗按钮 | 弹窗关闭 |
| 地图节点/关卡编队 | 方向+Enter;编队界面再 Enter | 战斗或下一个选择界面 |
| 战斗 | 持续 P → Enter,不分析拼点、不逐按钮调用模型 | 结算、奖励、地图或事件 |
| 事件对话 | SKIP;再用 Enter 推进 | 选项或罪人判定出现 |
| 事件选项 | 已有无需战斗/判定的直接领取分支就选,避免反复滚动 | 下一处分支或结果 |
| 事件结果 | Enter 推进;可见“继续”且按键无效就直接点击 | 返回地图 |
| 商店 | 可换出战技能先换;无可换技能再刷新,最多 4 次 | 新库存;不根据加载旧库存继续操作 |
| 层末多卡奖励/苦难 | 先选饰品和苦难,再确认推进 | 下一层;不能按“额外观测”默认拒绝 |
| 最终结算 | 点击“领取” → Enter 确认;无效就点确认 | 返回主界面,结束执行 |
无变化判断比较界面标题、选项、按钮状态,忽略录像计时和战斗动画中的数字。快捷键一次未生效就回退按钮;不重新核对已确定的编队、路线或技能表。卡包详情已读过的结论应保留,不能关闭后再次从零观测同一卡包。
## 执行原则
- 战斗循环按 **P → 回车**,直到结束;不逐回合截图分析,只在检查是否已结算时查看画面。
- **事件判定先点击 SKIP 跳过对话**,再选择事件选项、罪人或进行判定;SKIP 可用时不提前处理判定。其他对话也优先 SKIP,可用回车加快。
- 事件对话跳过后,继续按回车直到出现罪人选择界面;判定结果出现后快速连按回车结束事件。固定推进不逐按钮请求模型。
- **回车**可触发对话及其他按钮;有明确的确认、继续按钮时,优先使用快捷键。
- 路线优先选择可直接结束的事件、商店等非战斗节点,避免为小奖励增加复杂判定。
- 商店保留符纸 ++、关键维持饰品和快速换技能;略过无关采购、合成与反复比较。
- 困难镜牢与视频条件未全部核对,按当前画面修正,不能把视频用时直接套到当前局。
- 电脑操作优先使用用户安装的 limbus MCP 后台接口;只运行一个执行器,不抢前台焦点。用户要求快速执行,战斗使用有界 P+回车宏;需要选项的界面核对当前画面。
## 事件选择与可复用 skill
- 按**整局用时**选择:优先核心符咒/鸡胸,其次即时恢复、经费或直接结束;避免额外战斗、多段判定和无关奖励。大量理智损失可能拖慢后续纯 P。
- **炸鸡对决选第一项**,直接获得鸡胸与鸡翅;第三项也给鸡胸,第二项仅鸡翅。
- 当前游戏译名:鸡胸为**干巴柴涩鸡胸肉**,鸡腿为**火热多汁琵琶腿**。
- 商店符咒强化可直接选 **++**,本局一次支付 **150 经费**完成;以当前报价为准。
- 可复用 skill:[$limbus-mirror-speedrun]({skill_root}/SKILL.md)。[事件速查表]({skill_root}/references/event-choices.md)按名称查询,以当前选项文字核对编号。
## 游戏内快捷键(用户操作指南截图)
- **P → Enter**:胜率/伤害按键后开始战斗/行动。
- **Enter/Space**:弹窗确认、故事跳对话、提取跳动画、选项事件加载下一段文本;对话也可直接点 SKIP。
- **战斗 Space=暂停/继续**,不加入战斗循环。
- **关卡/商店:方向选中后直接按 Enter 进入,无需再次确认**(用户补充);执行器将选方向+回车合并为一个动作。
- 进入关卡后的编队界面继续按 **Enter** 开战,不再次检查编队;沿用原队伍。
- **快捷键未生效时立即改用鼠标点按钮**,不反复尝试(用户补充)。
- **地图 ↑/↓/→ 或 W/S/D**:移至下个节点后直接回车进入;**←/A**:取消节点选择;**Q/E**:地图左右平移。
- 战斗 **方向键/WASD** 移动视角,**滚轮/Q/E** 缩放,**Tab** 显示拼点箭头。
- **F1** 打开操作指南;**Esc** 随界面关闭弹窗、取消、返回或退出。完整表见 [快捷键速查]({skill_root}/references/shortcuts.md)。
## Jev 接入(用户授权)
- 已实测 `jev-1.13-free` 决策接口返回 HTTP 200,耗时约 1.3–1.5 秒;端点为 `https://opencode.ai/zen/v1/systemone`。
- 客户端:[jev_decision_client.mjs]({source_root}/jev_decision_client.mjs)。凭据由环境变量或未跟踪的本地配置提供,上传源码与反馈时排除凭据和配置文件。
- 用户更新(2026-10-02):固定场景、路线与常规动作均交给 Jev;仅在它返回 `requires_analysis` 或具体接口故障时由主助手排查。执行器只执行已核对的候选动作,不运行模型任意代码。
- 最新战斗指令:开战后仅 P+回车循环到结算,不逐批请求 Jev。批次末只识别是否已结束,战斗特写没有 OCR 文字也继续;结算后交回 Jev。
## 本局实测与待验证
2026-10-02 已看到第五层“探索完成”;点击领取后由用户完成回车确认,随后观察到主界面。此局包含人工纠正,不能记成全自动速通成功。商店加载保护、层末苦难选择和完整自动领取流程已修改并做回归检查,下一局仍需确认实际效果;12 分钟目标尚未复现。
## 来源
- B 站 UP 绅士丶蚂蚱:[破裂黎明纯 P 周回](https://www.bilibili.com/video/BV1exaV6yELm/)。楼层规划采用其换技能优先策略。
- 原作者 Cabric:[黎明黑兽五层攻略](https://www.youtube.com/watch?v=h5wFVUd2X2c)。卡包、配队与机制补充来自原攻略。
- [边狱公司 Wiki:探索事件](https://limbuscompany.huijiwiki.com/wiki/%E6%8E%A2%E7%B4%A2%E4%BA%8B%E4%BB%B6)。事件结果于 2026-10-01 核对,速通排序为针对当前纯 P 流程的判断。
@@ -0,0 +1,169 @@
import tempfile
import unittest
from pathlib import Path
from unittest import mock
import jev_mirror_agent as agent
class SceneRegressionTest(unittest.TestCase):
@mock.patch.object(agent.time, 'sleep')
def test_final_claim_click_is_followed_by_enter(self, _sleep):
bridge = mock.Mock()
bridge.call.return_value = {'ok': True}
agent.execute(bridge, {'tool':'claim_final','args':{'x':1292,'y':816}})
self.assertEqual(bridge.call.call_args_list,
[mock.call('click',{'x':1292,'y':816}),
mock.call('keypress',{'key':'enter'})])
@mock.patch.object(agent, 'button_enabled', return_value=True)
def test_event_dialog_skip_precedes_judgement_and_options(self, _enabled):
state = {'items': [{'text': text, 'x': 1200, 'y': 400, 'w': 120, 'h': 40, 'score': 1.0}
for text in ('SKIP', '进行判定', '选项', '侧耳倾听')]}
options = agent.candidates(state, previous_battle=True)
self.assertEqual(set(options), {'wait', 'requires_analysis', 'skip_dialog'})
self.assertEqual(options['skip_dialog']['action'],
{'tool': 'click', 'args': {'x': 1260, 'y': 420}})
def test_floor_three_sinclair_cannot_choose_first_floor_swap(self):
state = {'floor': 3, 'items': [
{'text': '当前持有技能', 'x': 900, 'y': 160, 'w': 100, 'h': 30},
{'text': '替换辛克莱的技能', 'x': 400, 'y': 180, 'w': 300, 'h': 40}]}
for x, first, second in ((543, 'SKILL1', 'SKILL2'), (1033, 'SKILL2', 'SKILL3'),
(1520, 'SKILL1', 'SKILL3')):
state['items'].extend({'text': label, 'x': x, 'y': y, 'w': 106, 'h': 42}
for label, y in ((first, 360), (second, 579)))
options = agent.candidates(state)
self.assertIn('skill_swap_3', options)
self.assertNotIn('skill_swap_1', options)
self.assertNotIn('skill_swap_2', options)
state['floor'] = 2
options = agent.candidates(state)
self.assertIn('skill_swap_1', options)
self.assertNotIn('skill_swap_3', options)
@mock.patch.object(agent, 'button_enabled', return_value=True)
def test_sold_swap_is_not_offered_again(self, _enabled):
state = {'items': [
{'text': '商店', 'x': 343, 'y': 162, 'w': 86, 'h': 50},
{'text': '刷新', 'x': 1496, 'y': 167, 'w': 54, 'h': 33},
{'text': '替换辛克莱的技能', 'x': 848, 'y': 499, 'w': 179, 'h': 28},
{'text': '已购买', 'x': 897, 'y': 326, 'w': 82, 'h': 34}]}
options = agent.candidates(state)
self.assertNotIn('swap_2', options)
self.assertIn('shop_refresh', options)
def test_real_green_shop_node_is_not_omitted(self):
screenshot = Path(r'{user_home}\lc_mcp\shots\shot_20261002_123920_523.png')
if not screenshot.exists():
self.skipTest('local game fixture unavailable')
options = agent.map_candidates({'screen': {'path': str(screenshot)}})
self.assertIn('route_w', options)
self.assertIn('商店', options['route_w']['description'])
@mock.patch.object(agent.time, 'sleep')
def test_battle_macro_continues_through_empty_ocr_and_stops_at_reward(self, _sleep):
bridge = mock.Mock()
states = iter([{'ok': True, 'items': []},
{'ok': True, 'items': [{'text': '选择遭遇战奖励卡'}]}])
bridge.call.side_effect = lambda tool, args=None: next(states) if tool == 'get_state' else {'ok': True}
with mock.patch.object(agent, 'STOP_FILE') as stop:
stop.exists.return_value = False
result = agent.execute(bridge, {'tool': 'battle', 'args': {}})
self.assertEqual(result['pairs'], 4)
self.assertTrue(result['terminal'])
keys = [call.args[1]['key'] for call in bridge.call.call_args_list if call.args[0] == 'keypress']
self.assertEqual(keys, ['p', 'enter']*4)
@mock.patch.object(agent.time, 'sleep')
def test_route_enters_without_a_second_snapshot(self, _sleep):
bridge = mock.Mock()
bridge.call.return_value = {'ok': True}
agent.execute(bridge, {'tool': 'route', 'args': {'key': 'w'}})
self.assertEqual(bridge.call.call_args_list,
[mock.call('keypress', {'key': 'w'}),
mock.call('keypress', {'key': 'enter'}),
mock.call('keypress', {'key': 'enter'})])
@mock.patch.object(agent, 'button_enabled', return_value=True)
def test_battle_entry_uses_enter_without_party_changes(self, _enabled):
state = {'items': [{'text': '开始战斗', 'x': 100, 'y': 100, 'w': 100, 'h': 40}]}
self.assertEqual(agent.candidates(state)['button_0']['action'],
{'tool': 'keypress', 'args': {'key': 'enter'}})
@mock.patch.object(agent, 'button_enabled', return_value=True)
def test_shop_refresh_is_capped_and_only_for_missing_party_swap(self, _enabled):
state = {'items': [{'text': text, 'x': 100, 'y': 100, 'w': 100, 'h': 40}
for text in ('商店', '刷新', '替换以实玛利的技能')]}
self.assertIn('shop_refresh', agent.candidates(state, refresh_used=3))
self.assertNotIn('shop_refresh', agent.candidates(state, refresh_used=4))
state['items'][-1]['text'] = '替换辛克莱的技能'
self.assertNotIn('shop_refresh', agent.candidates(state))
self.assertIn('swap_2', agent.candidates(state))
@mock.patch.object(agent, 'button_enabled', return_value=True)
def test_confirmation_blocks_background_leave(self, _enabled):
items = [{'text': text, 'x': x, 'y': y, 'w': 80, 'h': 40}
for text, x, y in [('要离开商店吗?', 700, 400),
('取消', 700, 600), ('确认', 1100, 600),
('离开', 1650, 950)]]
options = agent.candidates({'items': items}, previous_battle=True)
self.assertEqual(set(options), {'wait', 'requires_analysis', 'modal_confirm'})
self.assertEqual(options['modal_confirm']['action'],
{'tool': 'click', 'args': {'x': 1140, 'y': 620}})
@mock.patch.object(agent, 'button_enabled', return_value=True)
def test_nested_reward_confirmation_excludes_background_cards(self, _enabled):
state = {'items': [{'text': t, 'x': x, 'y': y, 'w': 80, 'h': 40}
for t,x,y in [('选择遭遇战奖励卡',600,178), ('可选择0/1',1383,178),
('要在不选择奖励的情况下继续吗?',742,489),
('×取消',747,678),
('确认',1102,679), ('确认',1197,776)]]}
options = agent.candidates(state)
self.assertEqual(set(options), {'wait', 'requires_analysis', 'modal_confirm'})
self.assertEqual(options['modal_confirm']['action']['args']['y'], 699)
@mock.patch.object(agent, 'button_enabled', return_value=True)
def test_event_result_uses_visible_continue_button(self, _enabled):
state = {'items':[{'text':t,'x':x,'y':y,'w':80,'h':40}
for t,x,y in [('结果',1088,162),('继续',1639,936),
('是在感谢我们吗?',112,707)]]}
options = agent.candidates(state)
self.assertEqual(options['event_finish']['action'],
{'tool':'click','args':{'x':1679,'y':956}})
def test_loading_offers_wait_and_never_auto_escalates(self):
state = {'items': [{'text': 'CONNECTING', 'x': 100, 'y': 10, 'w': 100, 'h': 30}]}
options = agent.candidates(state)
self.assertEqual(set(options), {'wait', 'requires_analysis'})
@mock.patch.object(agent, 'button_enabled', return_value=True)
def test_shop_loading_blocks_stale_stock_refresh_and_leave(self, _enabled):
state = {'items': [{'text': text, 'x': 100, 'y': 100, 'w': 100, 'h': 40}
for text in ('商店', '刷新', '替换辛克莱的技能', '离开', 'CONNECTING')]}
self.assertEqual(set(agent.candidates(state)), {'wait', 'requires_analysis'})
@mock.patch.object(agent, 'button_enabled', return_value=True)
def test_shop_cannot_leave_with_party_swap_or_remaining_refresh(self, _enabled):
state = {'items': [{'text': text, 'x': 100, 'y': 100, 'w': 100, 'h': 40}
for text in ('商店', '刷新', '替换奥提斯的技能', '离开')]}
self.assertNotIn('button_3', agent.candidates(state, refresh_used=4))
state['items'][2]['text'] = '替换李箱的技能'
self.assertNotIn('button_3', agent.candidates(state, refresh_used=3))
self.assertIn('button_3', agent.candidates(state, refresh_used=4))
def test_disabled_selection_is_not_clickable_candidate(self):
state = {'items': [{'text': '选择', 'x': 100, 'y': 10, 'w': 80, 'h': 40}]}
self.assertFalse(any(o['action']['tool'] == 'click_text' for o in agent.candidates(state).values()))
def test_battle_cinematic_keeps_macro_available(self):
state = {'items': [{'text': '破裂+5', 'x': 100, 'y': 10, 'w': 80, 'h': 40}]}
self.assertIn('battle', agent.candidates(state, previous_battle=True))
def test_reward_stops_battle_candidates(self):
state = {'items': [{'text': text, 'x': 100, 'y': 10, 'w': 80, 'h': 40}
for text in ('获得E.G.O饰品', '造成更多伤害')]}
self.assertNotIn('battle', agent.candidates(state, previous_battle=True))
if __name__ == '__main__':
unittest.main()
+49
View File
@@ -0,0 +1,49 @@
test_battle_cinematic_keeps_macro_available (test_jev_mirror_agent.SceneRegressionTest.test_battle_cinematic_keeps_macro_available) ... ok
test_battle_entry_uses_enter_without_party_changes (test_jev_mirror_agent.SceneRegressionTest.test_battle_entry_uses_enter_without_party_changes) ... ok
test_battle_macro_continues_through_empty_ocr_and_stops_at_reward (test_jev_mirror_agent.SceneRegressionTest.test_battle_macro_continues_through_empty_ocr_and_stops_at_reward) ... ok
test_confirmation_blocks_background_leave (test_jev_mirror_agent.SceneRegressionTest.test_confirmation_blocks_background_leave) ... ok
test_disabled_selection_is_not_clickable_candidate (test_jev_mirror_agent.SceneRegressionTest.test_disabled_selection_is_not_clickable_candidate) ... ok
test_event_dialog_skip_precedes_judgement_and_options (test_jev_mirror_agent.SceneRegressionTest.test_event_dialog_skip_precedes_judgement_and_options) ... ok
test_event_result_uses_visible_continue_button (test_jev_mirror_agent.SceneRegressionTest.test_event_result_uses_visible_continue_button) ... ok
test_final_claim_click_is_followed_by_enter (test_jev_mirror_agent.SceneRegressionTest.test_final_claim_click_is_followed_by_enter) ... ok
test_floor_three_sinclair_cannot_choose_first_floor_swap (test_jev_mirror_agent.SceneRegressionTest.test_floor_three_sinclair_cannot_choose_first_floor_swap) ... ok
test_loading_offers_wait_and_never_auto_escalates (test_jev_mirror_agent.SceneRegressionTest.test_loading_offers_wait_and_never_auto_escalates) ... ok
test_nested_reward_confirmation_excludes_background_cards (test_jev_mirror_agent.SceneRegressionTest.test_nested_reward_confirmation_excludes_background_cards) ... ok
test_real_white_event_routes_work_without_map_heading_ocr (test_jev_mirror_agent.SceneRegressionTest.test_real_white_event_routes_work_without_map_heading_ocr) ... ok
test_reward_stops_battle_candidates (test_jev_mirror_agent.SceneRegressionTest.test_reward_stops_battle_candidates) ... ok
test_route_enters_without_a_second_snapshot (test_jev_mirror_agent.SceneRegressionTest.test_route_enters_without_a_second_snapshot) ... ok
test_shop_cannot_leave_with_party_swap_or_remaining_refresh (test_jev_mirror_agent.SceneRegressionTest.test_shop_cannot_leave_with_party_swap_or_remaining_refresh) ... ok
test_shop_loading_blocks_stale_stock_refresh_and_leave (test_jev_mirror_agent.SceneRegressionTest.test_shop_loading_blocks_stale_stock_refresh_and_leave) ... ok
test_shop_refresh_is_capped_and_only_for_missing_party_swap (test_jev_mirror_agent.SceneRegressionTest.test_shop_refresh_is_capped_and_only_for_missing_party_swap) ... ok
test_sold_swap_is_not_offered_again (test_jev_mirror_agent.SceneRegressionTest.test_sold_swap_is_not_offered_again) ... ok
test_rejects_unknown_params (test_lc_mcp.AalcTaskArgsTest.test_rejects_unknown_params) ... unknown params for mirror: exp
usage: python -m lc_mcp.aalc_task <all|daily|reward|enkephalin|mirror> [json]
ok
test_empty_matches_nothing (test_lc_mcp.MatchTest.test_empty_matches_nothing) ... ok
test_exact_first (test_lc_mcp.MatchTest.test_exact_first) ... ok
test_ignores_spaces_and_case (test_lc_mcp.MatchTest.test_ignores_spaces_and_case) ... ok
test_bad_arguments_are_tool_errors (test_lc_mcp.ProtocolTest.test_bad_arguments_are_tool_errors) ... ok
test_click_text (test_lc_mcp.ProtocolTest.test_click_text) ... ok
test_drag_duration_and_rejected_arguments (test_lc_mcp.ProtocolTest.test_drag_duration_and_rejected_arguments) ... ok
test_engine_unavailable (test_lc_mcp.ProtocolTest.test_engine_unavailable) ... ok
test_images (test_lc_mcp.ProtocolTest.test_images) ... ok
test_initialize_and_list (test_lc_mcp.ProtocolTest.test_initialize_and_list) ... ok
test_task_exit_codes (test_lc_mcp.ProtocolTest.test_task_exit_codes) ... ok
test_task_lifecycle_blocks_manual_input (test_lc_mcp.ProtocolTest.test_task_lifecycle_blocks_manual_input) ... ok
test_wait_for_text (test_lc_mcp.ProtocolTest.test_wait_for_text) ... ok
test_background_keypress_holds_and_releases_on_error (test_lc_mcp.RuntimeTest.test_background_keypress_holds_and_releases_on_error) ... ok
test_drag_checks_bounds_before_sending_input (test_lc_mcp.RuntimeTest.test_drag_checks_bounds_before_sending_input) ... ok
test_pythonw_streams_are_redirected_to_log (test_lc_mcp.RuntimeTest.test_pythonw_streams_are_redirected_to_log) ... ok
test_stdio_isolates_bootstrap_output_and_uses_utf8 (test_lc_mcp.RuntimeTest.test_stdio_isolates_bootstrap_output_and_uses_utf8) ... ok
test_template_scale_tracks_client_and_restores_config_on_error (test_lc_mcp.RuntimeTest.test_template_scale_tracks_client_and_restores_config_on_error) ... ok
test_bridge_end_to_end (test_lc_mcp.TransportTest.test_bridge_end_to_end) ... ok
test_bridge_offline (test_lc_mcp.TransportTest.test_bridge_offline) ... ok
test_client_disconnect_is_not_a_server_error (test_lc_mcp.TransportTest.test_client_disconnect_is_not_a_server_error) ... ok
test_stdio_server (test_lc_mcp.TransportTest.test_stdio_server) ... ok
test_wrong_token_rejected (test_lc_mcp.TransportTest.test_wrong_token_rejected) ... [lc_mcp] rejected connection from ('127.0.0.1', 56692)
ok
----------------------------------------------------------------------
Ran 41 tests in 6.467s
OK
+58
View File
@@ -0,0 +1,58 @@
# 2026-10-03 主线实测与耗时复盘
## 结果先说明
- **4-48 Bud(东柏/Spicebush)未通关,没有主线推进成果。** 不能把进入战斗、压低敌方血量或单元测试通过当成通关。
- lc-mcp 已拉取安装,AALC 子模块使用仓库固定版本;本机服务与 MCP bridge 已实际连接游戏。
- Jev 请求已实测成功,但**没有运行完整的 Jev 主线自动执行器**。仅三次候选抉择调用,后续由 Codex 分步操作。
- 用户随后确认也在手动操作游戏。因此部分回合推进、菜单变化和重试结果存在混合操作,不能全部归因于 MCP。
- 用户改为要求练角色、查攻略后,检查了养成界面并进入经验本菜单;**尚未购买/消耗经验票升级,也没有开始经验本刷取**。收到“先上传测试数据与慢的原因”后停止游戏操作。
## 本次环境与实际证据
Windows / Python 3.12.14;基础提交 `030527f5de5c83dd8ea6e53288c1c52f3b4a85bb`;AALC 提交 `7452fad5a45a0fadb59a753fafbf40434d987c19`。游戏客户区 1276×717,前台输入,后台截图。登录/进入关卡时遇到服务器重试提示。
账号当时等级 36,当前未通关主线为 4-48。战斗实测队伍包含 W 堂吉诃德 35/同步 IV、W 良秀 35/IV、六协会以实玛利 35/III、G 格里高尔 34/III、剑契理想 34/II、W 浮士德 35/III、W 鸿璐 35/II。支援检查的理想与良秀列表未显示可借角色;不能据此断言所有罪人都没有支援。
三次 Jev 调用的实际耗时:1484、1282、1312 ms,均值约 1359 ms。原始三条 JSONL 经凭据、账号号段和本地路径清理后保留于 [logs/story_decisions.jsonl](logs/story_decisions.jsonl)。第二条选择进入编队,第三条建议补到七人;提示没有完整给出东柏机制,后者不能当成正确攻略决策。
截图仅选择没有账号底栏的四张,保留原始 PNG 字节:
| 截图 | 能证明什么 | 不能证明什么 |
| --- | --- | --- |
| [七人队第 1 回合](captures/turn1-winrate.png) | 已真实进入 4-48,选择过 Win Rate | 通关/自动执行器已运行 |
| [第 3 回合开花](captures/turn3-blooming.png) | 多名罪人被困,自动配置没有妥善处理机制 | 单一操作者下输入故障的因果 |
| [失败画面](captures/defeat.png) | 这一轮出现 DEFEAT | 主线已推进 |
| [经验票库存](captures/training-ticket-inventory.png) | 升级窗口显示 IV 0、III 0、II 7 | 已经使用这些票/完成养成 |
截图只保留最近 30 张,较早的安装和首轮战斗截图已经轮转删除。操作时间线是根据本次可见工具输出整理的**人工复盘**,不是完整机器动作日志。服务日志只记录部分 OCR 与启动信息,不能补造为全量点击轨迹。文件哈希见 [manifest.json](manifest.json)。
## 为什么慢
1. **安装排错过度串行。** 初次 Git 拉取受大体积反馈资产与下载问题影响,反复处理环境、依赖、服务焦点及 Jev 路由;没有尽早缩小下载范围并完成最小连接验证。之后 sparse clone 才解决安装路径问题。这里没有足够完整计时数据,不能编造各阶段分钟数。
2. **主要操作循环仍由大模型逐步驱动。** 一个普通动作常经过 shell 启动 bridge、MCP 调用、截图+OCR、再次读 PNG,再由模型决定下一步。近期这类工具组合本身约需 3–9 秒;动作间又有几十秒推理间隔,多个简单菜单操作被拆成多轮,用户实际等待远高于工具耗时。
3. **把简单操作也当成复杂决策。** 对已确认的菜单、剧情跳过、编队选择没有建立短路径;重复解释、读图、试坐标,耗费模型额度。该问题属于本次执行方式,不能甩给 Jev:三次 Jev 返回仅约 1.3 秒,且未接管持续推进。
4. **坐标与战斗 UI 变化处理不当。** 选择技能后镜头/HUD 会移动,使用选择前坐标继续拖动无法可靠验证目标。后来“点击技能 → 读新画面 → 点击敌方槽位”确实选中过目标。把所有失败都称为拖动输入 bug 证据不足。
5. **没有及时明确唯一操作者。** 看到无指令时回合推进后,先继续排查按键和自动战斗;用户后来明确“我操作的”。这使若干重试和回合记录无法独立归因,排错时间也被浪费。应先确认操作权并停止竞争输入。
6. **攻略检索太晚。** 前几轮主要依赖自动配技能和满员队伍,直到失败后才查东柏的开花、召唤物及决斗机制。实际阵容含同步 II 角色,七人铺开又限制主力多槽,不能仅按等级接近推荐值判断足够。
## 已落地修改与验证范围
- 前台输入先检查游戏焦点,必要时附加输入线程;激活失败时拒绝发送输入。按键/鼠标释放置于 `finally`。
- 前台拖动先移动到起点并等待,支持同点按住;实际同点按住已打开人格详情。**复杂战斗拖动重定向仍未在唯一操作者条件下完成验证。**
- 较短点击在本机多次未产生可见界面变化;同点按住 0.4 秒成功打开升级窗口。前台点击按住时长由 0.12 改为 0.35 秒。此调整仍需单操作者对照复测,不能声称已彻底修复掉点击。
- Jev 客户端尊重配置的 `baseUrl`/`model`/稳定 session,校验候选结果,支持 curl transport;密钥经 stdin header 传递,不放入 curl 命令行。用户提供的 Go 路由未成功提供 Jev 抉择,原生 Zen `/systemone` 路由实测成功;未用其他模型冒充 Jev。
- `battle_batch.py` 改为只在当前战斗 UI 显示 Win Rate 时点击该控件,不再反复 P 切换 Win Rate/Damage。该脚本不是东柏策略执行器,**不得当成 4-48 自动通关方案**。
- 本次回归:94 项单元/传输测试通过,输出见 [test-results.txt](test-results.txt)。这些测试不能证明实战通关;普通点击时长、复杂拖动和批次脚本需要进一步实测。
## 攻略结论与后续短路径
结合本机已有高练度角色,优先 W 堂吉诃德、W 良秀,再检查六协会以实玛利和可用的恢复精神力角色。先筹经验票,将主力补至游戏当前允许的等级;没有领取或购买新人格,也没有使用狂气抽卡。准备五人队并让前两位主力获得额外技能槽;前两回合避免丢失关键拼点,及时清除小花、用防御抵消回避,避开给同一角色连续叠开花,留 E.G.O 资源处理强力群攻与决斗。
参考来源(社区攻略,具体技能效果仍以当局游戏说明为准):[4-48 详细实战攻略](https://www.reddit.com/r/limbuscompany/comments/1ef3czm/)、[逐回合视频攻略摘要](https://vortexgaming.io/en/postdetail/562569)、[人格等级规则](https://limbuscompany.wiki.gg/wiki/Identity)。
降低下一次耗时的具体办法:固定唯一操作者;把确定的菜单动作批成有状态检查的短脚本;只在新阶段、失效或 Boss 机制节点读完整图片;记录每步 observation/action/result/latency;把候选抉择交给 Jev,仅异常交给主模型;把“装好了、测试通过、实际打过”分别记录。
## 导出边界
仅包含本次报告、人工时间线、清理后的三条 Jev 日志、本次时段的服务日志片段、四张游戏截图及测试输出。未包含 API key、MCP token、私有配置、Codex 聊天文件或其他桌面应用截图。代码修复随本反馈分支提供,未推送到默认分支。
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 976 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 MiB

@@ -0,0 +1,202 @@
[DEBUG] 2026-10-03 09:41:01,651 [AALC] module\ocr\ocr.py:72: OCR识别结果:('fmod.', 'FACE THE SIN,SAVE THE E.G.0', 'Clear all caches', '1.116.1', 'STEAI', '[ACCOUNT_REDACTED]')
[DEBUG] 2026-10-03 09:41:50,246 [AALC] module\ocr\ocr.py:72: OCR识别结果:('fMod.', 'Aservererrorhasoccurred.', 'Please try again in a moment.', 'Close', 'Retry 5', 'Clear all caches', '.1.116.1', 'STEAM', '[ACCOUNT_REDACTED]')
[WARNING] 2026-10-03 09:42:26,492 [AALC] ..\..\lc_mcp\aalc_engine.py:105: 窗口句柄无效,可能窗口已关闭,重新获取, 当前句柄为 3476014
[INFO] 2026-10-03 09:42:26,497 [AALC] ..\..\lc_mcp\aalc_engine.py:105: 重新获取窗口句柄成功, 新句柄为 918882
[DEBUG] 2026-10-03 09:42:29,507 [AALC] module\ocr\ocr.py:72: OCR识别结果:('FACETHE SINSSUE THE EGO', "Clear'alfcachey", '[ACCOUNT_REDACTED]')
[DEBUG] 2026-10-03 09:46:46,218 [AALC] module\ocr\ocr.py:72: OCR识别结果:('2026.9.1', 'TARGETE', 'Greg', "Hmmm...'m growing restless.When the hell can we getto work?", 'AHANDY-DANDYGUIDE', 'LTHE NEWEXECUTIVEMANAGERSOFLIMBU', 'DIGESTBEFOREGETTINGTOWORK', '[ACCOUNT_REDACTED]', '960,', '193', 'UNACY', 'Window', 'Sinners', 'Drive', 'Theater', 'Extract', '2646', 'Dispense', 'Inventory')
[DEBUG] 2026-10-03 09:47:32,066 [AALC] module\ocr\ocr.py:72: OCR识别结果:('2026.9.1', 'TARGETE', 'Greg', "Hmmm...'m growing restless.When the hell can we getto work?", 'AHANDY-DANDY GUIDE', 'THENEWEXECUTIVEMANAGEROFLMBU', 'DIGESTBEFOREGETINGTWORK', '[ACCOUNT_REDACTED]', '036', '193', 'UNACY', 'Window', 'Sinners', 'Drive', 'Theater', 'Extract', '2646', 'Dispense', 'Inventory')
[DEBUG] 2026-10-03 09:47:36,340 [AALC] module\ocr\ocr.py:72: OCR识别结果:('SSHSOENITBKOSS', '2026.9.1', 'TARGETE', 'Greg', "Hmmm...'m growing restless.When the hell can we get to work?", 'AHANDY-DANDYGUIDE', 'LTHE NEWEXECUTIVEMANAGERSOFLIMBU', 'ODIGESTBEFOREGETTINGTOWORK', '[ACCOUNT_REDACTED]', '036', '193', 'UNACY', 'Window', 'Sinners', 'Drive', 'Theater', 'Extract', '2646', 'Dispense', 'Inventory')
[DEBUG] 2026-10-03 09:48:03,601 [AALC] module\ocr\ocr.py:72: OCR识别结果:('Inferno', 'Luxca', 'MIRROROF', 'NAMESAND', 'R', '21.51m', '[ACCOUNT_REDACTED]', '036', '193', 'UNACY', 'Window', 'Sinners', 'Drive', 'Theater', 'Extract', 'Dispense', '2646', 'Inventory')
[DEBUG] 2026-10-03 09:48:06,908 [AALC] module\ocr\ocr.py:72: OCR识别结果:('Inferno', 'Luxca', 'MIRROROF', 'NAMESAND', '21.50m', '[ACCOUNT_REDACTED]', '036', '193', 'UNACY', 'Window', 'Sinners', 'Drive', 'Theater', 'Extract', 'Dispense', '2646', 'Inventory')
[DEBUG] 2026-10-03 09:48:25,003 [AALC] module\ocr\ocr.py:72: OCR识别结果:('Inferno', 'Luxca', 'MIRROROF', 'NAMESAND', 'ER', '21.51m', '[ACCOUNT_REDACTED]', '036', '193', 'UNACY', 'Window', 'Sinners', 'Drive', 'Theater', 'Extract', 'Dispense', '2646', 'Inventory')
[DEBUG] 2026-10-03 09:48:28,990 [AALC] module\ocr\ocr.py:72: OCR识别结果:('0:', 'Inferno', 'uxca', 'MIRROROF', 'NAMESAND', "CANTO'I", 'The Unconfronting', '21.51m', '[ACCOUNT_REDACTED]', '036', '193', 'UNACY', 'Window', 'Sinners', 'Drive', 'Theater', 'Extract', 'Dispense', '2646', 'Inventory')
[DEBUG] 2026-10-03 09:48:41,219 [AALC] module\ocr\ocr.py:72: OCR识别结果:('Inferno', 'Luxca', '985-03', 'MIRROROF', 'TheGaze Bearing', 'NAMESAND', 'R', '984-05', 'Corrit', '21.51m', '[ACCOUNT_REDACTED]', '036', '193', 'UNACY', 'Window', 'Sinners', 'Drive', 'Theater', 'Extract', 'Dispense', '2646', 'Inventory')
[WARNING] 2026-10-03 09:48:50,175 [RapidOCR] main.py:118: The text detection result is empty
[DEBUG] 2026-10-03 09:48:50,176 [AALC] module\ocr\ocr.py:72: OCR识别结果:None
[DEBUG] 2026-10-03 09:49:53,668 [AALC] module\ocr\ocr.py:72: OCR识别结果:('Progress', 'EX Cleared', '42', 'Talent and Genius', 'Off the Bus', 'Drones and Abnormal', '[ACCOUNT_REDACTED]', '036', '10', '193', 'LUNACY', 'Window', 'Sinners', 'Drive', 'Theater', 'Extract', 'Dispense', '120/120', '2646', 'Inventory')
[DEBUG] 2026-10-03 09:50:09,279 [AALC] module\ocr\ocr.py:72: OCR识别结果:('Progress', 'EX Cleared', 'Hole', '[ACCOUNT_REDACTED]', '193', '9E0,', '10', 'LUNACY', 'LV', 'Window', 'Sinners', 'Drive', 'Theater', 'Extract', 'Dispense', '120/120', '2646', 'Inventory')
[DEBUG] 2026-10-03 09:50:26,828 [AALC] module\ocr\ocr.py:72: OCR识别结果:('[ACCOUNT_REDACTED]', '036', '10', '193', 'LUNACY', 'LV', 'Window', 'Sinners', 'Drive', 'Theater', 'Extract', 'Dispense', '120/120', '2646', 'Inventory')
[DEBUG] 2026-10-03 09:50:49,488 [AALC] module\ocr\ocr.py:72: OCR识别结果:('-h', 'Constellations', '4-31', 'Seized', '[ACCOUNT_REDACTED]', '036', '10', '193', 'LUNACY', 'LV', 'Window', 'Sinners', 'Drive', 'Theater', 'Extract', 'Dispense', '120/120', '2646', 'Inventory')
[DEBUG] 2026-10-03 09:51:05,871 [AALC] module\ocr\ocr.py:72: OCR识别结果:('l Clear Statistics', '4-31Seized', '4-31', 'Seized', 'Difficulty', 'EX Objectives', 'LV.30', 'Clearwithin10turns', 'Effective Affinities', 'Enemy Info', 'Enter -20', '[ACCOUNT_REDACTED]', '10', '193', '036', 'LUNACY', 'LV', '120/120', '2646', 'Inventory')
[DEBUG] 2026-10-03 09:51:19,323 [AALC] module\ocr\ocr.py:72: OCR识别结果:('EX Cleared', '4-31', 'Seized', '[ACCOUNT_REDACTED]', '036', '10', '193', 'LUNACY', 'LV', 'Window', 'Sinners', 'Drive', 'Theater', 'Extract', 'Dispense', '120/120', '2646', 'Inventory')
[DEBUG] 2026-10-03 09:51:31,814 [AALC] module\ocr\ocr.py:72: OCR识别结果:('EXClearel', '4-32', 'Seized2', '[ACCOUNT_REDACTED]', '036', '193', 'LUNACY', 'LV', 'Window', 'Sinners', 'Drive', 'Theater', 'Extract', 'Dispense', '2646', 'Inventory')
[DEBUG] 2026-10-03 09:51:46,853 [AALC] module\ocr\ocr.py:72: OCR识别结果:('Progress', 'EXCleare', 'Class12', '4-39', 'Glorious Past 2', '4-40', 'Glorious Past 3', '[ACCOUNT_REDACTED]', '036', '10', '193', 'LUNACY', '2646', 'Window', 'Sinners', 'Drive', 'Theater', 'Extract', 'Dispense', '120/120', 'Inventory')
[DEBUG] 2026-10-03 09:52:04,908 [AALC] module\ocr\ocr.py:72: OCR识别结果:('Progress', 'rer', 'Class12', 'GloriousPast3', '[ACCOUNT_REDACTED]', '036', '10', '193', 'LUNACY', 'Window', 'Sinners', 'Drive', 'Theater', 'Extract', '2646', 'Dispense', '120/120', 'Inventory')
[DEBUG] 2026-10-03 09:52:26,130 [AALC] module\ocr\ocr.py:72: OCR识别结果:('Progress', 'EX Cleared', '4-44 An Age Without', 'Class', '[ACCOUNT_REDACTED]', '036', '10', '193', 'LUNACY', '2646', 'Window', 'Sinners', 'Drive', 'Theater', 'Extract', 'Dispense', '120/120', 'Inventory')
[DEBUG] 2026-10-03 09:52:43,442 [AALC] module\ocr\ocr.py:72: OCR识别结果:('Progress', 'EX Cleared', '4-43 AnAge Without Tec', 'Class12', '[ACCOUNT_REDACTED]', '036', '193', 'LUNACY', '2646', 'Window', 'Sinners', 'Drive', 'Theater', 'Extract', 'Dispense', 'Inventory')
[DEBUG] 2026-10-03 09:53:01,266 [AALC] module\ocr\ocr.py:72: OCR识别结果:('Progress', 'EX Cleared', '紫', '4-45', 'Offer to Join', 'mabyuEhh', 'Tel', '[ACCOUNT_REDACTED]', '036', '193', 'LUNACY', 'LV', 'Window', 'Sinners', 'Drive', 'Theater', 'Extract', 'Dispense', '120/120', '2646', 'Inventory')
[DEBUG] 2026-10-03 09:53:20,326 [AALC] module\ocr\ocr.py:72: OCR识别结果:('Progress', 'EX Cleared', '4-46', 'Offer to Join 2', '[ACCOUNT_REDACTED]', '193', '036', '10', 'LUNACY', 'LV', '2646', 'Window', 'Sinners', 'Drive', 'Theater', 'Extract', 'Dispense', '120/120', 'Inventory')
[DEBUG] 2026-10-03 09:53:36,674 [AALC] module\ocr\ocr.py:72: OCR识别结果:('Progress', 'EXCleared', 'NO.[ACCOUNT_REDACTED]', '193', '036', 'LUNACY', 'LV', 'Window', 'Sinners', 'Drive', 'Theater', 'Extract', 'Dispense', '2646', 'Inventory')
[DEBUG] 2026-10-03 09:54:06,196 [AALC] module\ocr\ocr.py:72: OCR识别结果:('Progress', '[ACCOUNT_REDACTED]', '193', '036', 'LUNACY', 'LV', 'Window', 'Sinners', 'Drive', 'Theater', 'Extract', 'Dispense', '120/120', '2646', 'Inventory')
[DEBUG] 2026-10-03 09:54:22,212 [AALC] module\ocr\ocr.py:72: OCR识别结果:('Progress', 'EX Cleared', 'Bud', 'Screening', 'Rod', '[ACCOUNT_REDACTED]', '036', '193', 'LUNACY', 'LV', '2646', 'Window', 'Sinners', 'Drive', 'Theater', 'Extract', 'Dispense', '120', '120', 'Inventory')
[DEBUG] 2026-10-03 09:54:37,687 [AALC] module\ocr\ocr.py:72: OCR识别结果:('CONNECTING', '4-47', 'Sereening Room', '[ACCOUNT_REDACTED]', '036', '10', '193', 'LUNACY', 'LV', '120/120', '2646', 'Inventory')
[DEBUG] 2026-10-03 09:55:15,721 [AALC] module\ocr\ocr.py:72: OCR识别结果:('l Clear Statistics', '4-48 Bud', '4-48', 'Bud', 'Difficulty', 'EX Objeetives', 'LV.35', 'Clearwithin15turns', 'Effective Affinities', 'Enemy lnfo', 'Clear Rewards', 'Enter -20', '[ACCOUNT_REDACTED]', '193', 'Screening', 'Room', '9E0,', '10', 'LUNACY', 'LV', '120/120', '2646', 'Inventory')
[DEBUG] 2026-10-03 09:55:18,242 [AALC] module\ocr\ocr.py:72: OCR识别结果:('l Clear Statistics', '4-48 Bud', '4-48', 'Bud', 'Difficulty', 'EX Objeetives', 'LV.35', 'Clearwithin15turns', 'Effective Affinities', 'Enemy lnfo', 'Clear Rewards', 'Enter -20', '[ACCOUNT_REDACTED]', '193', 'Screening', 'Room', '9E0,', '10', 'LUNACY', 'LV', '120/120', '2646', 'Inventory')
[DEBUG] 2026-10-03 09:55:54,093 [AALC] module\ocr\ocr.py:72: OCR识别结果:('l Clear Statistics', '4-48 Bud', '4-48', 'Bud', 'Difficulty', 'EX Objeetives', 'LV.35', 'Clearwithin15turns', 'Effective Affinities', 'Enemy lnfo', 'Clear Rewards', 'Enter -20', '[ACCOUNT_REDACTED]', '193', 'Screening', 'Room', '9E0,', '10', 'LUNACY', 'LV', '120/120', '2646', 'Inventory')
[DEBUG] 2026-10-03 09:55:58,219 [AALC] module\ocr\ocr.py:72: OCR识别结果:('l Clear Statistics', '4-48 Bud', '4-48', 'Bud', 'Difficulty', 'EX Objeetives', 'LV.35', 'Clearwithin15turns', 'Effective Affinities', 'Enemy lnfo', 'Clear Rewards', 'Enter', '-20', '[ACCOUNT_REDACTED]', '193', 'Screening', 'Room', '9E0,', '10', 'LUNACY', 'LV', '120/120', '2646', 'Inventory')
[DEBUG] 2026-10-03 09:56:24,257 [AALC] module\ocr\ocr.py:72: OCR识别结果:('Creating your Team', 'LV.55', 'Lv.55', 'LV.50', 'LV.55', 'LV.55', 'LV.55', 'LCB', 'LCB', 'Sinner', 'LCB', 'LCB', 'LCB', 'LCB', 'Sinner', 'Sinner', 'Sinner', 'Sinner', 'Details', 'Lv.55', 'LV.55', 'LV.50', 'LV.50', 'LV.55', 'LV.50', 'Sinners(Team)', 'LCB', 'LCB', 'LCB', 'LCB', 'LCB', 'LCB', 'Sinner', 'Sinner', 'Sinner', 'Sinner', 'YoucanconfigurevariousTeamsfromyour', '12LimbusCompanySinnersandtheir', 'Identities.')
[DEBUG] 2026-10-03 09:56:28,615 [AALC] module\ocr\ocr.py:72: OCR识别结果:('Creating your Team', 'LV.55', 'Lv.55', 'LV.50', 'LV.55', 'LV.55', 'LV.55', 'LCB', 'LCB', 'Sinner', 'LCB', 'LCB', 'LCB', 'LCB', 'Sinner', 'Sinner', 'Sinner', 'Sinner', 'Details', 'Lv.55', 'LV.55', 'LV.50', 'LV.50', 'LV.55', 'LV.50', 'Sinners(Team)', 'LCB', 'LCB', 'LCB', 'LCB', 'LCB', 'LCB', 'Sinner', 'Sinner', 'Sinner', 'Sinner', 'YoucanconfigurevariousTeamsfromyour', '12LimbusCompanySinnersandtheir', 'Identities.')
[DEBUG] 2026-10-03 09:57:02,402 [AALC] module\ocr\ocr.py:72: OCR识别结果:('TEAMS #1', '《', 'Details', 'Preset#1', 'Dante', 'SELECTED', 'SELECTED', 'SELECTED', 'All E.6.0', 'TEAMS', 'LV.35', 'LV.35', 'LV.35', 'LV.04', 'LV.35', 'WCorp.L2', 'WCorp.L3', 'WCorp.L3', 'Rosespanner', 'WCorp.L2', 'TEAMS#1', 'Salsu', 'Cleanup Agent', 'Cleanup Agent', 'Cleanup Agent', 'Cleanup Agent', 'Fagades', 'TEAMS#2', 'TEAMS#3', 'Support', 'TEAMS#4', 'SELECTED', 'SELECTED', 'Details', 'TEAMS#5', 'LV.34', 'LV.17', 'LV.35', 'LV.14', 'LV.14', 'LV.17', 'GCorp.', 'CClear Selection', 'TEAMS#6', 'LCB', 'Liu Assoc.', ' Corp.', 'Zwei Assoc.', 'LCB', 'Manager', 'outhSection4', 'Mittelhammer', 'South Section G', 'Sinner', 'Corporal', 'Participant', 'TEALS#7', 'Limit', 'To Battle!')
[DEBUG] 2026-10-03 09:57:55,092 [AALC] module\config\config.py:420: teams_active_queue change to: []
[DEBUG] 2026-10-03 09:57:55,103 [AALC] module\config\config.py:421: teams_be_select change to: [False]
[DEBUG] 2026-10-03 09:57:55,104 [AALC] module\config\config.py:422: teams_order change to: [0]
[DEBUG] 2026-10-03 09:57:55,104 [AALC] module\config\config.py:423: teams_be_select_num change to: 0
[DEBUG] 2026-10-03 09:57:55,140 [AALC] module\config\config.py:51: 配置文件已加载,版本号:DEFAULT VERSION, 配置版本: [ACCOUNT_REDACTED]
[INFO] 2026-10-03 09:57:55,674 [RapidOCR] base.py:22: Using engine_name: onnxruntime
[INFO] 2026-10-03 09:57:55,870 [RapidOCR] download_file.py:60: File exists and is valid: {repo}\vendor\aalc\.venv\Lib\site-packages\rapidocr\models\ch_PP-OCRv4_det_infer.onnx
[INFO] 2026-10-03 09:57:55,871 [RapidOCR] main.py:55: Using {repo}\vendor\aalc\.venv\Lib\site-packages\rapidocr\models\ch_PP-OCRv4_det_infer.onnx
[INFO] 2026-10-03 09:57:55,970 [RapidOCR] base.py:22: Using engine_name: onnxruntime
[INFO] 2026-10-03 09:57:55,976 [RapidOCR] download_file.py:60: File exists and is valid: {repo}\vendor\aalc\.venv\Lib\site-packages\rapidocr\models\ch_ppocr_mobile_v2.0_cls_infer.onnx
[INFO] 2026-10-03 09:57:55,976 [RapidOCR] main.py:55: Using {repo}\vendor\aalc\.venv\Lib\site-packages\rapidocr\models\ch_ppocr_mobile_v2.0_cls_infer.onnx
[INFO] 2026-10-03 09:57:56,017 [RapidOCR] base.py:22: Using engine_name: onnxruntime
[INFO] 2026-10-03 09:57:56,114 [RapidOCR] download_file.py:60: File exists and is valid: {repo}\vendor\aalc\.venv\Lib\site-packages\rapidocr\models\ch_PP-OCRv4_rec_infer.onnx
[INFO] 2026-10-03 09:57:56,115 [RapidOCR] main.py:55: Using {repo}\vendor\aalc\.venv\Lib\site-packages\rapidocr\models\ch_PP-OCRv4_rec_infer.onnx
[DEBUG] 2026-10-03 09:57:56,370 [AALC] module\automation\automation.py:88: 使用前台点击模块
[DEBUG] 2026-10-03 09:57:56,376 [AALC] utils\path_manager.py:44: 路径管理器初始化完成,路径: ['dark/zh_cn', 'dark/en', 'dark/share', 'default/zh_cn', 'default/en', 'default/share']
[DEBUG] 2026-10-03 09:58:50,189 [AALC] module\ocr\ocr.py:72: OCR识别结果:('TEAMS #1', '《', 'Details', 'Preset#1', 'Dante', 'SELECTED', 'SELECTED', 'SELECTED', 'All E.6.0', 'TEAMS', 'LV.35', 'LV.35', 'LV.35', 'LV.04', 'LV.35', 'WCorp.L2', 'WCorp.L3', 'WCorp.L3', 'Rosespanner', 'WCorp.L2', 'TEAMS#1', 'Salsu', 'Cleanup Agent', 'Cleanup Agent', 'Cleanup Agent', 'Cleanup Agent', 'Fagades', 'TEAMS#2', 'TEAMS#3', 'Support', 'TEAMS#4', 'SELECTED', 'SELECTED', 'Details', 'TEAMS#5', 'LV.34', 'LV.17', 'LV.35', 'LV.14', 'LV.14', 'LV.17', 'GCorp.', 'CClear Selection', 'TEAMS#6', 'LCB', 'Liu Assoc.', ' Corp.', 'Zwei Assoc.', 'LCB', 'Manager', 'outhSection4', 'Mittelhammer', 'South Section G', 'Sinner', 'Corporal', 'Participant', 'TEALS#7', 'Limit', 'To Battle!')
[DEBUG] 2026-10-03 09:59:12,559 [AALC] module\ocr\ocr.py:72: OCR识别结果:('TEAMS #1', 'K', 'Details', '7', 'Preset#1', 'MlI lidestities', 'Dante', 'SELECTED', 'SELECTED', 'SELECTED', 'SELECTED', 'SELECTED', 'All E.6.0', 'TEAMS', 'LV.35', 'LV.35', 'LV.35', 'LV.04', 'Lv.35', 'Blade Lineage', 'WCorp.L2', 'WCorp.L3', 'WCorp.L3', 'Rosespanner', 'WCorp.L2', 'TEAMS#1', 'Salsu', 'Cleanup Agent', 'Cleanup Agent', 'Cleanup Agent', 'Cleanup Agent', 'Fagades', 'TEAMS#2', 'TEAMS#3', 'Support', 'TEAMS#4', 'SELECTED', 'SELECTED', 'Details', 'TEAMS#5', 'LV.34', 'LV.17', 'LV.35', 'LV.14', 'LV.14', 'LV.17', 'GCorp.', 'CClear Selection', 'TEAMS#6', 'LCB', 'Liu Assoc.', ' Corp.', 'Zwei Assoc.', 'LCB', 'Manager', 'outhSection4', 'Mittelhammer', 'South Section G', 'Sinner', 'Corporal', 'Participant', 'TEALS#7', 'Limit', 'To Battle!')
[DEBUG] 2026-10-03 09:59:33,635 [AALC] module\ocr\ocr.py:72: OCR识别结果:('TEAMS #1', 'K', 'Details', '7', 'Preset#1', 'MlI lidestities', 'Dante', 'SELECTED', 'SELECTED', 'SELECTED', 'SELECTED', 'SELECTED', 'All E.6.0', 'TEAMS', 'LV.35', 'LV.35', 'LV.35', 'LV.04', 'Lv.35', 'Blade Lineage', 'WCorp.L2', 'WCorp.L3', 'WCorp.L3', 'Rosespanner', 'WCorp.L2', 'TEAMS#1', 'Salsu', 'Cleanup Agent', 'Cleanup Agent', 'Cleanup Agent', 'Cleanup Agent', 'Fagades', 'TEAMS#2', '00', 'TEAMS#3', 'Support', 'TEAMS#4', 'SELECTED', 'SELECTED', 'Details', 'TEAMS#5', 'LV.34', 'LV.17', 'LV.35', 'LV.14', 'LV.14', 'LV.17', 'G Corp.', 'CClear Selection', 'TEAMS#6', 'LCB', 'Liu Assoc.', ' Corp.', 'Zwei Assoc.', 'LCB', 'Manager', 'outhSection4', 'Mittelhammer', 'South Section G', 'Sinner', 'Corporal', 'Participant', 'TEALS#7', 'Limit', 'To Battle!')
[DEBUG] 2026-10-03 09:59:40,240 [AALC] module\ocr\ocr.py:72: OCR识别结果:('CONNECTING', 'TEAMS #1', 'K', 'Details', 'Preset#1', '7', 'MlI lidestities', 'Dante', 'SELECTED', 'SELECTED', 'SELECTED', 'SELECTED', 'SELECTED', 'All E.6.0', 'TEAMS', 'LV.35', 'LV.35', 'LV.35', 'LV.04', 'Lv.35', 'Blade Lineage', 'WCorp.L2', 'WCorp.L3', 'WCorp.L3', 'Rosespanner', 'WCorp.L2', 'TEAMS#1', 'Salsu', 'Cleanup Agent', 'Cleanup Agent', 'Cleanup Agent', 'Cleanup Agent', 'Fagades', 'TEAMS#2', 'TEAMS#3', 'Support', 'TEAMS#4', 'SELECTED', 'SELECTED', 'Details', 'TEAMS#5', 'LV.34', 'LV.17', 'LV.35', 'LV.14', 'LV.14', 'LV.17', 'G Corp.', 'CClear Selection', 'TEAMS#6', 'LCB', 'Liu Assoc.', ' Corp.', 'Zwei Assoc.', 'LCB', 'Manager', 'outhSection4', 'Mittelhammer', 'South Section G', 'Sinner', 'Corporal', 'Partieipant', 'TEALS#7', 'Limit', 'To Battle!')
[DEBUG] 2026-10-03 10:00:22,481 [AALC] module\ocr\ocr.py:72: OCR识别结果:('?', 'TEAMS #1', 'Details', 'SINICOST', '07', 'Preset#I', 'Dante', 'SELECTEI', 'Thecurrentaveragelevel ofyourdeployedldentities', 'CTED', 'islowerthantherecommendedlevel forthisStage.', 'All E.6.0', 'TEAMS', 'LV', 'Lv. 35', 'Blade Line', 'StarttheEncounteranyway?', 'TEAMS#1', 'Corp.L2', 'SE', 'up Agent', 'Fagades', 'TEAMS#2', 'CurrentAvg.Level:34', 'TEAMS#3', 'Recommended Level:35', 'Support', 'TEAMS#4', 'CTED', 'Details', 'TEAMS#5', 'LN.34', 'G Corp.', 'CClearSelection', 'TEAMS#6', 'X Cancel', 'Enter', 'Mlanager', 'Sin', 'TEAL*S#7', 'Partieipant', 'Limit', 'To Battle!')
[DEBUG] 2026-10-03 10:00:40,736 [AALC] module\ocr\ocr.py:72: OCR识别结果:('?', 'TEAMS #1', 'Details', 'SINICOST', '07', 'Preset#I', 'Dante', 'SELECTEI', 'Thecurrentaveragelevel ofyourdeployedldentities', 'CTED', 'islowerthantherecommendedlevel forthisStage.', 'All E.6.0', 'TEAMS', 'LV', 'Lv. 35', 'Blade Line', 'StarttheEncounteranyway?', 'TEAMS#1', 'Corp.L2', 'SE', 'up Agent', 'Fagades', 'TEAMS#2', 'CurrentAvg.Level:34', 'TEAMS#3', 'Recommended Level:35', 'Support', 'TEAMS#4', 'CTED', 'Details', 'TEAMS#5', 'LN.34', 'G Corp.', 'CClearSelection', 'TEAMS#6', 'X Cancel', 'Enter', 'Mlanager', 'Sin', 'TEAL*S#7', 'Partieipant', 'Limit', 'To Battle!')
[DEBUG] 2026-10-03 10:00:48,850 [AALC] module\ocr\ocr.py:72: OCR识别结果:('X Cancel', 'Enter', 'CONNECTING', 'TEAMS #1', 'K', 'Details', 'SINICOST', '37', 'Preset#1', 'Dante', 'SELECTED', 'SELECTED', 'SELECTED', 'SELECTED', 'SELECTED', 'All E.6.0', 'TEAMS', 'Lv. 34', 'Lv.35', 'LV.35', 'LV.35', 'LV.04', 'Lv. 35', 'Blade Lineage', 'WCorp.L2', 'WCorp.L3', 'WCorp.L3', 'Rosespanner', 'WCorp.L2', 'TEAMS#1', 'Salsu', 'Cleanup Agent', 'Cleanup Agent', 'Cleanup Agent', 'Cleanup Agent', 'Fagades', 'TEAMS#2', '00', 'TEAMS#3', 'Support', 'TEAMS#4', 'SELECTED', 'SELECTED', 'Details', 'TEAMS#5', 'LV.17', 'Lv.35', 'LV.14', 'LV.14', 'LV.17', 'G Corp.', 'Clear Selection', 'TEAMS#6', 'LCB', 'Liu Assoc.', 'NCorp.', 'Zwei Assoe.', 'LCB', 'Manager', 'Sinner', 'outh Section4', 'Mittelhammer', 'South Section G', 'Sinner', 'Corporal', 'Participant', 'TEAS#7', 'Limit', 'To Battle!')
[DEBUG] 2026-10-03 10:01:45,052 [AALC] module\ocr\ocr.py:72: OCR识别结果:('Screening Room', 'Technology', 'Liberation Alliance', 'Dongbaek', 'Kaff.. Kof..')
[DEBUG] 2026-10-03 10:03:01,378 [AALC] module\ocr\ocr.py:72: OCR识别结果:('Screening Room', 'Technology', 'Liberation Alliance', 'Dongbaek', 'Kaff.. Kof...')
[DEBUG] 2026-10-03 10:03:17,159 [AALC] module\ocr\ocr.py:72: OCR识别结果:('Screening Room', 'Technology', 'Liberation Alliance', 'Dongbaek', 'Kaff.. Kof..')
[DEBUG] 2026-10-03 10:03:50,691 [AALC] module\ocr\ocr.py:72: OCR识别结果:('Screening Room', 'D', 'Are you sure you want to skip?', 'X Cancel', 'Confirm', 'Technology', 'Liberation Alliance', 'Dongbaek', 'Kaff... Kof...')
[DEBUG] 2026-10-03 10:04:14,658 [AALC] module\ocr\ocr.py:72: OCR识别结果:('Screening Room', 'Are you sure you want to skip?', 'X Cancel', 'Confirm', 'Technology', 'Liberation Alliance', 'Dongbaek', 'Kaff...Kof....')
[DEBUG] 2026-10-03 10:04:18,167 [AALC] module\ocr\ocr.py:72: OCR识别结果:('Screening Room', 'Are you sure you want to skip?', 'X Cancel', 'Confirm', 'Dongbaek', 'Kaff... Koff.')
[DEBUG] 2026-10-03 10:04:42,313 [AALC] module\ocr\ocr.py:72: OCR识别结果:('WAVE', 'MAX', 'TURN', 'Win', 'Rate', 'Damage')
[DEBUG] 2026-10-03 10:05:17,792 [AALC] module\ocr\ocr.py:72: OCR识别结果:('WAVE', 'MAX', 'TURN', 'Win', 'Rate', 'Damage')
[DEBUG] 2026-10-03 10:05:53,887 [AALC] module\ocr\ocr.py:72: OCR识别结果:('I', 'Frontal Assault', 'Body', '1353')
[DEBUG] 2026-10-03 10:06:29,418 [AALC] module\ocr\ocr.py:72: OCR识别结果:('WAVE', 'MAX', 'TURN', 'Win', 'Rate', 'Damage')
[DEBUG] 2026-10-03 10:07:10,750 [AALC] module\ocr\ocr.py:72: OCR识别结果:('Cleanup Support', 'Like Flowers in Full Blo', '181', 'DONGBAEKE.G.O::SPICEBUSH')
[DEBUG] 2026-10-03 10:07:14,211 [AALC] module\ocr\ocr.py:72: OCR识别结果:('FC', '12', 'Like Flowers in Ful', 'Normal', 'Blooni', '59', '1277', '??-??-77', 'DONGBAEK E.G.O.:SPICEBUSH')
[DEBUG] 2026-10-03 10:07:17,320 [AALC] module\ocr\ocr.py:72: OCR识别结果:('+2', 'E.C.', 'Body', '1257', 'ACDAEn.Cm', '18', '5')
[DEBUG] 2026-10-03 10:07:19,943 [AALC] module\ocr\ocr.py:72: OCR识别结果:('Poise +3', 'Poise Count+1')
[DEBUG] 2026-10-03 10:07:23,520 [AALC] module\ocr\ocr.py:72: OCR识别结果:('Bip', '[OnHit] Inflict 1Rupture', '[Heads Hit] Gain+4*Charge Count', '*Charge+1', 'C', 'Charge Count +4', 'Body', '1228', 'MCDAFI/ C C', '21')
[DEBUG] 2026-10-03 10:07:25,988 [AALC] module\ocr\ocr.py:72: OCR识别结果:('103', 'ody', '1224')
[DEBUG] 2026-10-03 10:07:28,167 [AALC] module\ocr\ocr.py:72: OCR识别结果:None
[DEBUG] 2026-10-03 10:07:59,508 [AALC] module\ocr\ocr.py:72: OCR识别结果:('WAVE', 'MAX', 'TURN', 'Win', 'Rate', 'Damage', 'STAGGER', 'STAgGER', '195', '150', '1030')
[DEBUG] 2026-10-03 10:08:39,579 [AALC] module\ocr\ocr.py:72: OCR识别结果:('WAVE', 'MAX', 'TURN', 'Win', 'Rate', 'STAGGER', 'STAGGER', '195', '150', '1030', '12')
[DEBUG] 2026-10-03 10:09:41,994 [AALC] module\ocr\ocr.py:72: OCR识别结果:('Flowering Buds', '[On Hit] Inflict +3Rupture Count', '[On Hit] Inflict 3Blooming', '22-22-22-271', '1203', 'DONGBAEKE.G.O:SPICEBUSH')
[DEBUG] 2026-10-03 10:09:44,763 [AALC] module\ocr\ocr.py:72: OCR识别结果:('I', 'Hack', 'Body', '1190')
[DEBUG] 2026-10-03 10:09:47,108 [AALC] module\ocr\ocr.py:72: OCR识别结果:None
[DEBUG] 2026-10-03 10:09:49,298 [AALC] module\ocr\ocr.py:72: OCR识别结果:None
[DEBUG] 2026-10-03 10:09:54,366 [AALC] module\ocr\ocr.py:72: OCR识别结果:('WAVE', 'MAX', "Doagain whatyoujustdid.You'veanother crushingblow", 'inyou,right?', 'URN', 'Dante', '園', 'Cleanup', 'Win', 'Rate', 'Damage', 'STAGGER', 'STAGGER', 'STAgGER', '195', '103', '12', '150')
[DEBUG] 2026-10-03 10:09:57,884 [AALC] module\ocr\ocr.py:72: OCR识别结果:('WAVE', 'MAX', "Do again whatyoujustdid.You'veanother crushingblow", 'in you,right?', 'TURN', 'Dante', 'SOON-TO-BLOON FLOWER', 'Win', 'Rate', 'STAGGER', 'STAGGER', 'STAGGER', '195', '103', '12', '50')
[DEBUG] 2026-10-03 10:11:07,987 [AALC] module\ocr\ocr.py:72: OCR识别结果:('WAV', 'MAX', '10', 'Details', '20', 'Details', '2', 'Details', 'To Eqrrnie', '0%', '小', '2', '带', '?', 'Suddenly, Dne Day', 'Lantern', 'AEDD', '33', 'E', '20', 'E', 'AkWeigit', 'AKWelghnt ', 'Atk Wel(gnit ', '1 [On Hit] Inflet6 of a', ' [On Hit] Heal 40% of', '[Before Attack] Galn +5 XCharge', 'random statuschosen from', 'leep efewep', 'Count', 'Burn, * Bleed', 'Tremor,', ' [0n Hig infiet 5 Spark', 'Resistances', '1.0001.00', '0.75', '1.002.00 1.00', '2.00', 'Suddenly, One Day')
[DEBUG] 2026-10-03 10:12:26,404 [AALC] module\ocr\ocr.py:72: OCR识别结果:('WAW', 'MAX', '10', 'Details', '20', 'Details', '2', 'Details', 'To Eqrrnie', '0%', '2', '2', 'Suddenly, Dne Day', 'Lantern', 'AEDD', 'X33', 'AikWeigi', 'E', 'Ak Woigit', 'AKWelghnt ', ' [on Hit] Inflet of a', '[Before Attack] Gain +5 XCharge', 'random status,chosen from', ' [On Hit] Heal 40% of', 'Count', 'Burn,BleedTremor,', 'leep efewep', '[0n Hig Inflet 5 Spark', '$Rupture, ana Sinking', 'Resistances', '1.000 1.00', '0.75', '1.002.001.00', '2.00', 'Suddenly,One Day')
[DEBUG] 2026-10-03 10:12:57,290 [AALC] module\ocr\ocr.py:72: OCR识别结果:('WAVE', 'MAX', 'TURN', 'SOON-TO-BLOON RLOWER', 'TART', 'Win', 'Rate', 'Damage', 'STAGGER', 'STAGGER', 'STAGGER', '103', '12', '50')
[DEBUG] 2026-10-03 10:13:19,633 [AALC] module\ocr\ocr.py:72: OCR识别结果:('MAX', '10', 'Details', 'To Corrnile', '0%', '2', '?', 'La Sangee de Saneho', 'LEX', 'WWelgm', '[On Hig inflet B Bleed', '[Heads Hit] Heal by 50% of ', 'damage dealt', 'Resistances', '2.008 0.75 ', '1.00', '1.002.01 1.00', '1.00', 'La Sangre de Sancho')
[DEBUG] 2026-10-03 10:16:09,500 [AALC] module\ocr\ocr.py:72: OCR识别结果:('WAVE', 'MAX', 'Win', 'Rate', 'Damag', 'STAGGER', 'STAGGER', 'STAgGER', '103', '12', '50')
[DEBUG] 2026-10-03 10:17:11,323 [AALC] module\ocr\ocr.py:72: OCR识别结果:('BudLy35', '3032)', 'Skill Effects', 'L', 'Keywords', '[On Hit]Inflict1Blooming', 'Blooming', 'Turn End:At5+Count,take', 'Sloth damage by (Count)% of', 'MaxHP,and become Fully', 'Bloomed', 'At less than 5 Count, lose', '(Count *5) SP, then reduce', 'Count by1', 'Win', 'Rate', 'Damage', 'STAgGER', 'STAGGER', 'STAGGER', '195', '103', '12', '150')
[DEBUG] 2026-10-03 10:18:32,236 [AALC] module\ocr\ocr.py:72: OCR识别结果:('WAVE', 'MAX', 'TURN', '3', 'START', 'Win', 'Rate', 'Damage', 'STAGGER', 'STAGGER', 'STAGGER', '195', '103', '12', '150')
[DEBUG] 2026-10-03 10:20:10,036 [AALC] module\config\config.py:420: teams_active_queue change to: []
[DEBUG] 2026-10-03 10:20:10,049 [AALC] module\config\config.py:421: teams_be_select change to: [False]
[DEBUG] 2026-10-03 10:20:10,051 [AALC] module\config\config.py:422: teams_order change to: [0]
[DEBUG] 2026-10-03 10:20:10,051 [AALC] module\config\config.py:423: teams_be_select_num change to: 0
[DEBUG] 2026-10-03 10:20:10,094 [AALC] module\config\config.py:51: 配置文件已加载,版本号:DEFAULT VERSION, 配置版本: [ACCOUNT_REDACTED]
[INFO] 2026-10-03 10:20:10,700 [RapidOCR] base.py:22: Using engine_name: onnxruntime
[INFO] 2026-10-03 10:20:10,902 [RapidOCR] download_file.py:60: File exists and is valid: {repo}\vendor\aalc\.venv\Lib\site-packages\rapidocr\models\ch_PP-OCRv4_det_infer.onnx
[INFO] 2026-10-03 10:20:10,904 [RapidOCR] main.py:55: Using {repo}\vendor\aalc\.venv\Lib\site-packages\rapidocr\models\ch_PP-OCRv4_det_infer.onnx
[INFO] 2026-10-03 10:20:11,018 [RapidOCR] base.py:22: Using engine_name: onnxruntime
[INFO] 2026-10-03 10:20:11,025 [RapidOCR] download_file.py:60: File exists and is valid: {repo}\vendor\aalc\.venv\Lib\site-packages\rapidocr\models\ch_ppocr_mobile_v2.0_cls_infer.onnx
[INFO] 2026-10-03 10:20:11,025 [RapidOCR] main.py:55: Using {repo}\vendor\aalc\.venv\Lib\site-packages\rapidocr\models\ch_ppocr_mobile_v2.0_cls_infer.onnx
[INFO] 2026-10-03 10:20:11,074 [RapidOCR] base.py:22: Using engine_name: onnxruntime
[INFO] 2026-10-03 10:20:11,168 [RapidOCR] download_file.py:60: File exists and is valid: {repo}\vendor\aalc\.venv\Lib\site-packages\rapidocr\models\ch_PP-OCRv4_rec_infer.onnx
[INFO] 2026-10-03 10:20:11,168 [RapidOCR] main.py:55: Using {repo}\vendor\aalc\.venv\Lib\site-packages\rapidocr\models\ch_PP-OCRv4_rec_infer.onnx
[DEBUG] 2026-10-03 10:20:11,442 [AALC] module\automation\automation.py:88: 使用前台点击模块
[DEBUG] 2026-10-03 10:20:11,449 [AALC] utils\path_manager.py:44: 路径管理器初始化完成,路径: ['dark/zh_cn', 'dark/en', 'dark/share', 'default/zh_cn', 'default/en', 'default/share']
[DEBUG] 2026-10-03 10:20:37,259 [AALC] module\ocr\ocr.py:72: OCR识别结果:('WAVE', 'MAX', 'TURN', '式', 'Win', 'Rate', 'Damage', 'STAgGER-', 'STAGGER-', 'STAGGER')
[DEBUG] 2026-10-03 10:21:22,806 [AALC] module\ocr\ocr.py:72: OCR识别结果:('WAVE', 'MAX', 'TURN', 'SOON-TO-BLOON FLOWER', 'START', 'Win', 'Rate', 'Damage', 'STAGGER-', 'STAGGER', 'STAGGER')
[DEBUG] 2026-10-03 10:21:52,567 [AALC] module\ocr\ocr.py:72: OCR识别结果:('WAVE', 'MAX', 'TURN', 'Win', 'Rate', 'Damage', 'STAgGER', 'STAgGER', 'STAGGER')
[DEBUG] 2026-10-03 10:22:34,973 [AALC] module\ocr\ocr.py:72: OCR识别结果:('WAVE', 'MAX', 'TURN', ' Settings', '← Resume', 'Q Retry Stage', 'X Give Up', 'Win', 'Rate', 'Damage', 'STAGGER', 'STAGGER', 'STAGGER', '889')
[DEBUG] 2026-10-03 10:22:58,359 [AALC] module\ocr\ocr.py:72: OCR识别结果:('WAVE', 'MAX', 'TURN', ' Settings', '← Resume', 'Q Retry Stage', 'X Give Up', 'Win', 'Rate', 'Damage', 'STAGGER-', 'STAGGER', 'STAGGER', '889')
[DEBUG] 2026-10-03 10:23:01,377 [AALC] module\ocr\ocr.py:72: OCR识别结果:('WAVE', 'TURN', 'START', 'Win', 'Rate', 'Damage', 'STAGGER-', 'STAGGER', 'STAGGER', '88')
[DEBUG] 2026-10-03 10:23:31,100 [AALC] module\ocr\ocr.py:72: OCR识别结果:('WAVE', 'MAX', 'TURN', 'Win', 'Rate', 'Damage')
[DEBUG] 2026-10-03 10:24:17,138 [AALC] module\ocr\ocr.py:72: OCR识别结果:('WAVE', 'MAX', 'TURN', 'Win', 'Rate', 'Damage')
[DEBUG] 2026-10-03 10:24:36,062 [AALC] module\ocr\ocr.py:72: OCR识别结果:('ngent Fragrance', '[On Hit] Inflict 2 Blooming', '77-77-77-21', '1436', 'DONGBAEK E.G.OSPICEBUSH', '162')
[DEBUG] 2026-10-03 10:24:38,792 [AALC] module\ocr\ocr.py:72: OCR识别结果:('I', 'Leap', '27-7-2-21436', 'G1', '22?', 'DONGBAEK E.G.O:SPICEBUSH')
[DEBUG] 2026-10-03 10:24:41,585 [AALC] module\ocr\ocr.py:72: OCR识别结果:('Leap', '[Heads Hit] Inflict 2Fragile', 'Charge', 'ody')
[DEBUG] 2026-10-03 10:24:43,950 [AALC] module\ocr\ocr.py:72: OCR识别结果:('ormal', '148', '0')
[DEBUG] 2026-10-03 10:24:46,456 [AALC] module\ocr\ocr.py:72: OCR识别结果:('+3', 'Hack', 'Body', '1368')
[DEBUG] 2026-10-03 10:24:48,713 [AALC] module\ocr\ocr.py:72: OCR识别结果:None
[DEBUG] 2026-10-03 10:24:51,129 [AALC] module\ocr\ocr.py:72: OCR识别结果:('2Pse+3', 'Poise Count +', '195')
[DEBUG] 2026-10-03 10:24:53,573 [AALC] module\ocr\ocr.py:72: OCR识别结果:('Leap',)
[DEBUG] 2026-10-03 10:24:57,810 [AALC] module\ocr\ocr.py:72: OCR识别结果:('WAVE', 'MAX', 'Trytobea bit more careful withyourhealth.No,', "mean...'mjustworried foryou isall.", 'TURN', 'Dante', 'Win', 'Rate', 'Damage')
[DEBUG] 2026-10-03 10:25:01,269 [AALC] module\ocr\ocr.py:72: OCR识别结果:('WAVE', 'MAX', 'Trytobea bit more careful withyourhealth.No,', "mean...'m just worried foryou is all.", 'TURN', 'Dante', 'Win', 'Rate', 'Damage')
[DEBUG] 2026-10-03 10:26:11,281 [AALC] module\ocr\ocr.py:72: OCR识别结果:('WAVE', 'MAX', 'TURN', ' Settings', '← Resume', 'Q Retry Stage', 'X Give Up', 'Win', 'Rate', 'Damage', '95')
[DEBUG] 2026-10-03 10:26:13,861 [AALC] module\ocr\ocr.py:72: OCR识别结果:('WAVE', 'TURN', 'Win', 'Rate', 'Damage')
[DEBUG] 2026-10-03 10:26:53,461 [AALC] module\ocr\ocr.py:72: OCR识别结果:('h-h', 'Defeat', 'When anenemyruns outofSanity andfallsintoPanic,', 'theyll suffernegativeeffects,givingyouanadvantage.', 'Check the E.G.Oyour Sinners have equipped and their required', 'resourcestoform a teamof ldentitiesthatcan efficiently gather', 'theminbattle.', 'E.G.O canshiftthebattle inyourfavorif usedwhenyour', 'Sinnershave enoughSanity.', 'DEFEAT', 'Return', "I'll need...more experience and training, it seems...", 'Confirm')
[DEBUG] 2026-10-03 10:27:23,047 [AALC] module\ocr\ocr.py:72: OCR识别结果:('h-h', 'Defeat', 'When anenemyruns outofSanity andfallsintoPanic,', 'theyll suffernegativeeffects,givingyouanadvantage.', 'Check the E.G.Oyour Sinners have equipped and their required', 'resourcestoform a teamof ldentitiesthatcan efficiently gather', 'theminbattle.', 'E.G.O canshiftthebattle inyourfavorif usedwhenyour', 'Sinnershave enoughSanity.', 'DEFEAT', 'Return', "I'll need...more experience and training, it seems.", 'Confirm')
[DEBUG] 2026-10-03 10:27:26,201 [AALC] module\ocr\ocr.py:72: OCR识别结果:('Progress', 'EX Cleared', '米', 'Bud', 'Screening', 'NO.[ACCOUNT_REDACTED]', '036', '10', '193', 'LUNACY', 'LV', '124/120', '2646', 'Inventory')
[DEBUG] 2026-10-03 10:27:29,897 [AALC] module\ocr\ocr.py:72: OCR识别结果:('Progress', 'EX Cleared', '米', 'Bud', 'Screening', 'Room', '[ACCOUNT_REDACTED]', '193', '036', 'LUNACY', 'LV', '2646', 'Window', 'Sinners', 'Drive', 'Theater', 'Extract', 'Dispense', 'Inventory')
[DEBUG] 2026-10-03 10:27:34,142 [AALC] module\ocr\ocr.py:72: OCR识别结果:('Progress', 'EX Cleared', '米', 'Bud', 'Screening', 'Room', '[ACCOUNT_REDACTED]', '193', '036', 'LUNACY', 'LV', 'Window', 'Sinners', 'Drive', 'Theater', 'Extract', 'Dispense', '124', '120', '2646', 'Inventory')
[DEBUG] 2026-10-03 10:27:38,177 [AALC] module\ocr\ocr.py:72: OCR识别结果:('Progress', 'EX Cleared', '米', '4-48', 'Bud', 'Screening', 'Room', '[ACCOUNT_REDACTED]', '193', '036', 'LUNACY', 'LV', 'Window', 'Sinners', 'Drive', 'Theater', 'Extract', 'Dispense', '24', '2646', 'Inventory')
[DEBUG] 2026-10-03 10:27:41,817 [AALC] module\ocr\ocr.py:72: OCR识别结果:('Progress', 'EX Cleared', '米', 'Bud', 'Screening', 'Room', '[ACCOUNT_REDACTED]', '193', '036', 'LUNACY', 'LV', '2646', 'Window', 'Sinners', 'Drive', 'Theater', 'Extract', 'Dispense', 'Inventory')
[DEBUG] 2026-10-03 10:27:45,417 [AALC] module\ocr\ocr.py:72: OCR识别结果:('Progress', 'EX Cleared', '米', 'Bud', 'Screening', 'Room', '[ACCOUNT_REDACTED]', '193', '036', 'LUNACY', 'LV', 'Window', 'Sinners', 'Drive', 'Theater', 'Extract', 'Dispense', '1242', '2646', 'Inventory')
[DEBUG] 2026-10-03 10:27:48,140 [AALC] module\ocr\ocr.py:72: OCR识别结果:('Progress', 'EX Cleared', '米', '4-48', 'Bud', 'Screening', 'Room', '[ACCOUNT_REDACTED]', '193', '036', '10', 'LUNACY', 'LV', 'Window', 'Sinners', 'Drive', 'Theater', 'Extract', 'Dispense', '2646', '120', 'Inventory')
[DEBUG] 2026-10-03 10:29:12,564 [AALC] module\ocr\ocr.py:72: OCR识别结果:('Progress', 'EX Cleared', '米', 'h', 'Bud', 'Screening', 'Room', '[ACCOUNT_REDACTED]', '10', '193', '036', 'LUNACY', 'LV', 'Window', 'Sinners', 'Drive', 'Theater', 'Extract', 'Dispense', '124/120', '2646', 'Inventory')
[DEBUG] 2026-10-03 10:29:15,755 [AALC] module\ocr\ocr.py:72: OCR识别结果:('CONNECTING', 'hh', 'Screening Room', '[ACCOUNT_REDACTED]', '036', '10', '193', 'LUNACY', 'LV', '124/120', '2646', 'Inventory', 'Theater', 'Extract', 'Jispens')
[DEBUG] 2026-10-03 10:29:20,154 [AALC] module\ocr\ocr.py:72: OCR识别结果:('4-48', 'Bud', 'Aservererrorhasoccurred.', 'Pleasetry again in a moment.', 'Close', 'Retry 2', 'Screening Room', '[ACCOUNT_REDACTED]', '9E0,', '10', '193', 'LUNACY', 'LV', '124/120', '2646', 'Inventory')
[DEBUG] 2026-10-03 10:29:23,953 [AALC] module\ocr\ocr.py:72: OCR识别结果:('4-48', 'Bud', 'Aservererrorhasoccurred.', 'Pleasetry again in a moment.', 'Close', 'Retry 4', 'Screening Room', '[ACCOUNT_REDACTED]', '9E0,', '10', '193', 'LUNACY', 'LV', '124/120', '2646', 'Inventory')
[DEBUG] 2026-10-03 10:29:27,683 [AALC] module\ocr\ocr.py:72: OCR识别结果:('#4-48', 'Bud', 'Aservererrorhasoccurred.', 'Pleasetry again in a moment.', 'Close', 'Retry 5', 'Screening Room', '[ACCOUNT_REDACTED]', '9E0,', '10', '193', 'LUNACY', 'LV', '124/120', '2646', 'Inventory')
[DEBUG] 2026-10-03 10:29:30,471 [AALC] module\ocr\ocr.py:72: OCR识别结果:('4-48', 'Bud', 'Aservererrorhasoccurred.', 'Pleasetry again in a moment.', 'Close', 'Retry 3', 'Screening Room', '[ACCOUNT_REDACTED]', '9E0,', '10', '193', 'LUNACY', 'LV', '1244', '2646', 'Inventory')
[DEBUG] 2026-10-03 10:30:47,939 [AALC] module\ocr\ocr.py:72: OCR识别结果:('TEAMS #1', 'K', 'Details', '7', 'Preset#1', 'Dante', 'SELECTED', 'SELECTED', 'SELECTED', 'SELECTED', 'SELECTED', 'All E.6.0', 'TEAMS', 'LV.35', 'LV.35', 'LV.35', 'LV.04', 'Lv.35', 'Blade Lineage', 'WCorp.L2', 'WCorp.L3', 'WCorp.L3', 'Rosespanner', 'WCorp.L2', 'TEAMS#1', 'Salsu', 'Cleanup Agent', 'Cleanup Agent', 'Cleanup Agent', 'Cleanup Agent', 'Fagades', 'TEAMS#2', 'TEAMS#3', 'Support', 'TEAMS#4', 'SELECTED', 'SELECTED', 'Details', 'TEAMS#5', 'LV.34', 'LV.17', 'LV.35', 'LV.14', 'LV.14', 'LV.17', 'GCorp.', 'CClear Selection', 'TEAMS#6', 'LCB', 'Liu Assoc.', ' Corp.', 'Zwei Assoc.', 'LCB', 'Manager', 'outhSection4', 'Mittelhammer', 'South Section G', 'Sinner', 'Participant', 'TEALS#7', 'Limit', 'To Battle!')
[DEBUG] 2026-10-03 10:30:53,816 [AALC] module\ocr\ocr.py:72: OCR识别结果:('TEAMS #1', 'K', 'Details', '7', 'Preset#1', 'MlI lidestities', 'Dante', 'SELECTED', 'SELECTED', 'SELECTED', 'SELECTED', 'SELECTED', 'All E.6.0', 'TEAMS', 'LV.35', 'LV.35', 'LV.35', 'LV.04', 'Lv.35', 'Blade Lineage', 'WCorp.L2', 'WCorp.L3', 'WCorp.L3', 'Rosespanner', 'WCorp.L2', 'TEAMS#1', 'Salsu', 'Cleanup Agent', 'Cleanup Agent', 'Cleanup Agent', 'Cleanup Agent', 'Fagades', 'TEAMS#2', 'TEAMS#3', 'Support', 'TEAMS#4', 'SELECTED', 'SELECTED', 'Details', 'TEAMS#5', 'LV.34', 'LV.17', 'LV.35', 'LV.14', 'LV.14', 'LV.17', 'GCorp.', 'CClear Selection', 'TEAMS#6', 'LCB', 'Liu Assoc.', ' Corp.', 'Zwei Assoc.', 'LCB', 'Manager', 'outhSection4', 'Mittelhammer', 'South Section G', 'Sinner', 'Corporal', 'Partieipant', 'TEALS#7', 'Limit', 'To Battle!')
[DEBUG] 2026-10-03 10:31:00,431 [AALC] module\ocr\ocr.py:72: OCR识别结果:('TEAMS #1', 'K', 'Details', '7', 'Preset#1', 'Dante', 'SELECTED', 'SELECTED', 'SELECTED', 'SELECTED', 'SELECTED', 'All E.6.0', 'TEAMS', 'LV.35', 'LV.35', 'LV.35', 'LV.04', 'Lv.35', 'Blade Lineage', 'WCorp.L2', 'WCorp.L3', 'WCorp.L3', 'Rosespanner', 'WCorp.L2', 'TEAMS#1', 'Salsu', 'Cleanup Agent', 'Cleanup Agent', 'Cleanup Agent', 'Cleanup Agent', 'Fagades', 'TEAMS#2', 'TEAMS#3', 'Support', 'TEAMS#4', 'SELECTED', 'SELECTED', 'Details', 'TEAMS#5', 'LV.34', 'LV.17', 'LV.35', 'LV.14', 'LV.14', 'LV.17', 'GCorp.', 'CClear Selection', 'TEAMS#6', 'LCB', 'Liu Assoc.', ' Corp.', 'Zwei Assoc.', 'LCB', 'Manager', 'outhSection4', 'Mittelhammer', 'South Section G', 'Sinner', 'Corporal', 'Partieipant', 'TEALS#7', 'Limit', 'To Battle!')
[DEBUG] 2026-10-03 10:31:07,266 [AALC] module\ocr\ocr.py:72: OCR识别结果:('TEAMS #1', 'K', 'Details', '7', 'Preset#1', 'Dante', 'SELECTED', 'SELECTED', 'SELECTED', 'SELECTED', 'SELECTED', 'All E.6.0', 'TEAMS', 'LV.35', 'LV.35', 'LV.35', 'LV.04', 'Lv.35', 'Blade Lineage', 'WCorp.L2', 'WCorp.L3', 'WCorp.L3', 'Rosespanner', 'WCorp.L2', 'TEAMS#1', 'Salsu', 'Cleanup Agent', 'Cleanup Agent', 'Cleanup Agent', 'Cleanup Agent', 'Fagades', 'TEAMS#2', 'TEAMS#3', 'Support', 'TEAMS#4', 'SELECTED', 'SELECTED', 'Details', 'TEAMS#5', 'LV.34', 'LV.17', 'LV.35', 'LV.14', 'LV.14', 'LV.17', 'GCorp.', 'CClear Selection', 'TEAMS#6', 'LCB', 'Liu Assoc.', ' Corp.', 'Zwei Assoc.', 'LCB', 'Manager', 'outhSection4', 'Mittelhammer', 'South Section G', 'Sinner', 'Corporal', 'Partieipant', 'TEALS#7', 'Limit', 'To Battle!')
[DEBUG] 2026-10-03 10:31:12,891 [AALC] module\ocr\ocr.py:72: OCR识别结果:('TEAMS #1', 'K', 'Details', '7', 'Preset#1', 'Dante', 'SELECTED', 'SELECTED', 'SELECTED', 'SELECTED', 'SELECTED', 'All E.6.0', 'TEAMS', 'LV.35', 'LV.35', 'LV.35', 'LV.04', 'Lv.35', 'Blade Lineage', 'WCorp.L2', 'WCorp.L3', 'WCorp.L3', 'Rosespanner', 'WCorp.L2', 'TEAMS#1', 'Salsu', 'Cleanup Agent', 'Cleanup Agent', 'Cleanup Agent', 'Cleanup Agent', 'Fagades', 'TEAMS#2', 'TEAMS#3', 'Support', 'TEAMS#4', 'SELECTED', 'SELECTED', 'Details', 'TEAMS#5', 'LV.34', 'LV.17', 'LV.35', 'LV.14', 'LV.14', 'LV.17', 'GCorp.', 'CClear Selection', 'TEAMS#6', 'LCB', 'Liu Assoc.', ' Corp.', 'Zwei Assoc.', 'LCB', 'Manager', 'outhSection4', 'Mittelhammer', 'South Section G', 'Sinner', 'Corporal', 'Participant', 'TEALS#7', 'Limit', 'To Battle!')
[DEBUG] 2026-10-03 10:31:19,612 [AALC] module\ocr\ocr.py:72: OCR识别结果:('TEAMS #1', 'K', 'Details', '7', 'Preset#1', 'MlI lidestities', 'Dante', 'SELECTED', 'SELECTED', 'SELECTED', 'SELECTED', 'SELECTED', 'All E.6.0', 'TEAMS', 'LV.35', 'LV.35', 'LV.35', 'LV.04', 'Lv.35', 'Blade Lineage', 'WCorp.L2', 'WCorp.L3', 'WCorp.L3', 'Rosespanner', 'WCorp.L2', 'TEAMS#1', 'Salsu', 'Cleanup Agent', 'Cleanup Agent', 'Cleanup Agent', 'Cleanup Agent', 'Fagades', 'TEAMS#2', '00', 'TEAMS#3', 'Support', 'TEAMS#4', 'SELECTED', 'SELECTED', 'Details', 'TEAMS#5', 'LV.34', 'LV.17', 'LV.35', 'LV.14', 'LV.14', 'LV.17', 'G Corp.', 'CClear Selection', 'TEAMS#6', 'LCB', 'Liu Assoc.', ' Corp.', 'Zwei Assoc.', 'LCB', 'Manager', 'outhSection4', 'Mittelhammer', 'South Section G', 'Sinner', 'Partieipant', 'TEALS#7', 'Limit', 'To Battle!')
[DEBUG] 2026-10-03 10:31:26,017 [AALC] module\ocr\ocr.py:72: OCR识别结果:('TEAMS #1', 'K', 'Details', '7', 'Preset#1', 'MlI lidestities', 'Dante', 'SELECTED', 'SELECTED', 'SELECTED', 'SELECTED', 'SELECTED', 'All E.6.0', 'TEAMS', 'LV.35', 'LV.35', 'LV.35', 'LV.04', 'Lv.35', 'Blade Lineage', 'WCorp.L2', 'WCorp.L3', 'WCorp.L3', 'Rosespanner', 'WCorp.L2', 'TEAMS#1', 'Salsu', 'Cleanup Agent', 'Cleanup Agent', 'Cleanup Agent', 'Cleanup Agent', 'Fagades', 'TEAMS#2', '00', 'TEAMS#3', 'Support', 'TEAMS#4', 'SELECTED', 'SELECTED', 'Details', 'TEAMS#5', 'LV.34', 'LV.17', 'LV.35', 'LV.14', 'LV.14', 'LV.17', 'G Corp.', 'CClear Selection', 'TEAMS#6', 'LCB', 'Liu Assoc.', ' Corp.', 'Zwei Assoc.', 'LCB', 'Manager', 'outhSection4', 'Mittelhammer', 'South Section G', 'Sinner', 'Corporal', 'Participant', 'TEALS#7', 'Limit', 'To Battle!')
[DEBUG] 2026-10-03 10:32:49,008 [AALC] module\ocr\ocr.py:72: OCR识别结果:('TEAMS#1', 'SUPPORTIDENTITIES:YISANG', '人', 'Details', 'Selected Identity', 'TEAIIS', 'Details', 'ALL', "Crow'sEyeViev", 'TETH', 'HE', 'No Support Identities for this Sinner.', 'ALEPH', 'South')
[DEBUG] 2026-10-03 10:35:49,464 [AALC] module\ocr\ocr.py:72: OCR识别结果:('TEAMS#1', 'SUPPORTIDENTITIES:YISANG', '人', 'Details', 'Selected Identity', 'TEAIIS', 'Details', 'ALL', "Crow'sEyeViev", 'TETH', 'HE', 'No Support Identities for this Sinner.', 'ALEPH', 'South')
[DEBUG] 2026-10-03 10:36:08,033 [AALC] module\ocr\ocr.py:72: OCR识别结果:('TEAMS #1', 'SUPPORTIDENTITIES:RYOSHU', '人', 'Details', 'Selected Identity', 'Details', 'ALL', 'ForestfortheHame', 'TETH', 'HE', 'No Support Identities for this Sinner.', 'ALEPH')
[DEBUG] 2026-10-03 10:36:38,687 [AALC] module\ocr\ocr.py:72: OCR识别结果:('TEAMS #1', 'K', 'Details', '7', 'Preset#1', 'Dante', 'SELECTED', 'SELECTED', 'SELECTED', 'SELECTED', 'SELECTED', 'All E.6.0', 'TEAMS', 'LV.35', 'LV.35', 'LV.35', 'LV.04', 'Lv.35', 'Blade Lineage', 'WCorp.L2', 'WCorp.L3', 'WCorp.L3', 'Rosespanner', 'WCorp.L2', 'TEAMS#1', 'Salsu', 'Cleanup Agent', 'Cleanup Agent', 'Cleanup Agent', 'Cleanup Agent', 'Fagades', 'TEAMS#2', 'TEAMS#3', 'Support', 'TEAMS#4', 'SELECTED', 'SELECTED', 'Details', 'TEAMS#5', 'LV.34', 'LV.17', 'LV.35', 'LV.14', 'LV.14', 'LV.17', 'GCorp.', 'CClear Selection', 'TEAMS#6', 'LCB', 'Liu Assoc.', ' Corp.', 'Zwei Assoc.', 'LCB', 'Manager', 'outhSection4', 'Mittelhammer', 'South Section G', 'Sinner', 'Partieipant', 'TEALS#7', 'Limit', 'To Battle!')
[DEBUG] 2026-10-03 10:37:01,500 [AALC] module\ocr\ocr.py:72: OCR识别结果:None
[DEBUG] 2026-10-03 10:37:15,588 [AALC] module\ocr\ocr.py:72: OCR识别结果:('DCQ@O目', 'Screening Room', 'Technology', 'Liberation Alliance', 'Dongbaek', 'Kaff.. Koff..')
[DEBUG] 2026-10-03 10:37:30,144 [AALC] module\ocr\ocr.py:72: OCR识别结果:('WAVE', 'MAX', 'Trytobea bit more careful withyourhealth.No,', "mean...'mjust worried foryou is all.", 'TURN', 'Dante', 'Win', 'Rate', 'Damage', '46')
[DEBUG] 2026-10-03 10:37:55,431 [AALC] module\ocr\ocr.py:72: OCR识别结果:('MAX', '5.5', 'Skill Effects', 'Reywords', '[On Use] Spend 10XCharge', '*Charge', 'Count to gain +4 Coin Power', 'Atlessthan10XCharge', 'Rip Space', 'Resource used by certain skills', 'Count, lose 20% HP', 'for additional effects.Its Count', 'can go up to 20.Count lowers', '[HeadsHit] Inflict5', 'by1at the end ofeach turn.', 'Rupture', 'Rupture', 'Whenhitbyanattack,take', "fixed damage bythe effect's", 'Potency.', 'Then, reduce its Count by 1.')
[DEBUG] 2026-10-03 10:38:11,152 [AALC] module\ocr\ocr.py:72: OCR识别结果:('WAVE', 'MAX', 'TURN', 'Win', 'Rate', 'Damage', '14G')
[DEBUG] 2026-10-03 10:38:27,060 [AALC] module\ocr\ocr.py:72: OCR识别结果:('WAVE', 'MAX', 'TURN', 'Win', 'Rate', 'Damage', '6')
[DEBUG] 2026-10-03 10:38:29,451 [AALC] module\ocr\ocr.py:72: OCR识别结果:('WAVE', 'MAX', 'TURN', 'Win', 'Rate', 'Damage')
[DEBUG] 2026-10-03 10:39:00,853 [AALC] module\ocr\ocr.py:72: OCR识别结果:('Pungent Fragrance', '27-7--211392', '???', 'DONGBAEK E.G.O:SPICEBUSH')
[DEBUG] 2026-10-03 10:39:29,723 [AALC] module\ocr\ocr.py:72: OCR识别结果:('Dismember', '[On Hit] Inflict 5Rupture', 'HeadsHit]Heal by50%ofdamagedealt', 'Body', '1265', 'MODAFI/ F')
[DEBUG] 2026-10-03 10:39:54,615 [AALC] module\ocr\ocr.py:72: OCR识别结果:('Thatwasgreatworkyoudidthere.Keepitrolling,will', 'you?', 'Dante')
[DEBUG] 2026-10-03 10:40:28,320 [AALC] module\ocr\ocr.py:72: OCR识别结果:('WAVE', 'MAX', 'TURN', 'Win', 'Rate', 'Damage', 'TAGGER-', 'STAGGER')
[DEBUG] 2026-10-03 10:40:30,101 [AALC] module\ocr\ocr.py:72: OCR识别结果:('WAVE', 'MAX', 'TURN', 'Win', 'Rate', 'Damage', 'TAGGER-', 'STAGGER')
[DEBUG] 2026-10-03 10:40:32,886 [AALC] module\ocr\ocr.py:72: OCR识别结果:('WAVE', 'MAX', 'TURN', 'FJLLY BLDONEO FLOWER', 'Win', 'Rate', 'Damage', 'STAGGER')
[DEBUG] 2026-10-03 10:41:46,689 [AALC] module\ocr\ocr.py:72: OCR识别结果:(' Settings', '←Resume', 'Q Retry Stage', 'X Give Up')
[DEBUG] 2026-10-03 10:42:22,868 [AALC] module\ocr\ocr.py:72: OCR识别结果:('MAX', 'TURN', ' Settings', '← Resume', 'Q Retry Stage', 'X Give Up', 'Win', 'Rate', 'Damage', 'STAGGER', 'STAGGER', 'STAGGER', '-15')
[DEBUG] 2026-10-03 10:42:27,722 [AALC] module\ocr\ocr.py:72: OCR识别结果:('WAVE', 'TURN', '3', 'Win', 'Rate', 'Damage', 'STAgGER', 'STAGGER', 'STAGGER', '82', '-15')
[DEBUG] 2026-10-03 10:44:12,948 [AALC] module\ocr\ocr.py:72: OCR识别结果:('Progress', 'EX Cleared', '米', 'Bud', 'Screening', 'Room', '[ACCOUNT_REDACTED]', '193', '036', 'LUNACY', 'LV', 'Window', 'Sinners', 'Drive', 'Theater', 'Extract', 'Dispense', '2646', '120', 'Inventory')
[DEBUG] 2026-10-03 10:44:36,557 [AALC] module\ocr\ocr.py:72: OCR识别结果:('Progress', 'EX Cleared', '米', '4-48', 'Bud', 'Screening', 'Room', '[ACCOUNT_REDACTED]', '193', '036', '10', 'LUNACY', 'LV', '2646', 'Window', 'Sinners', 'Drive', 'Theater', 'Extract', 'Dispense', '24', 'Inventory')
[DEBUG] 2026-10-03 10:44:40,085 [AALC] module\ocr\ocr.py:72: OCR识别结果:('Progress', 'EX Cleared', '米', 'Bud', 'Screening', 'Room', '[ACCOUNT_REDACTED]', '193', '036', '10', 'LUNACY', 'LV', 'Window', 'Sinners', 'Drive', 'Theater', 'Extract', 'Dispense', '124/120', '2646', 'Inventory')
[DEBUG] 2026-10-03 10:45:16,084 [AALC] module\ocr\ocr.py:72: OCR识别结果:('Preset #1', 'TEAMS #1', '《', 'Details', '311', '11', 'Dante', '13', 'TEAMS', 'TEAMS#1', 'All E.6.0', 'TEAMS#2', 'Lv.35', 'LV.35', 'LV.35', 'LV.04', 'LV.35', '12', 'Blade Lineage', 'WCorp.L2', 'wCorp.L3', 'WCorp.L3', 'Rosespanner', 'WCorp.L2', 'Salsu', 'Cleanup Agent', 'Cleanup Agent', 'Cleanup Agent', 'WorkshopFixer', 'Cleanup Agent', 'TEAMS#3', '18', 'Fagades', 'TEAMS#4', 'TEAMS#5', '0!', 'Support', 'TEAMS#6', 'Details', 'TEAMS#7', 'LV.34', 'LV.17', 'LV.35', 'LV.14', 'LV.14', 'Lv.17', 'G Corp.', 'TEAMS#8', 'LCB', 'Liu Assoe.', ' Corp.', 'Zwei Assoe.', 'LCB', 'Manager', 'outhSection4', 'Mittelhammer', 'South Section G', 'Sinner', '[ACCOUNT_REDACTED]', '193', '036', 'UNACY', 'Window', 'Sinners', 'Drive', 'Theater', 'Extract', 'Dispense', '2646', 'Inventory')
[DEBUG] 2026-10-03 10:45:35,791 [AALC] module\ocr\ocr.py:72: OCR识别结果:('TEAMS#1', 'IDENTITIES:DONQUIXOTE', 'Identities', 'E.G.0', 'Facades', 'Details', 'Selected Identity', 'Details', 'ALL', 'SELECTED', 'Lv35', 'Lv-30', 'W Corp.L3', 'NCorp.', 'LaSangredeSan', 'ACleanug Agent', 'Mittelhammer', 'LCB', 'Sinner', 'TETH', 'HE', 'ALEPH')
[DEBUG] 2026-10-03 10:45:56,711 [AALC] module\ocr\ocr.py:72: OCR识别结果:('TEAMS#1', 'IDENTITIES:DONQUIXOTE', 'Identities', 'E.G.0', 'Facades', 'Details', 'Selected Identity', 'Details', 'ALL', 'SELECTED', 'Lv35', 'Lv-30', 'LV.', 'W Corp.L3', 'NCorp.', 'LCB', 'LaSangredeSan', 'ACleanug Agent', 'nittelhammer', 'TETH', 'HE', 'ALEPH')
[DEBUG] 2026-10-03 10:46:17,329 [AALC] module\ocr\ocr.py:72: OCR识别结果:('Don', 'awCorp.', 'Ixnte', 'W Corp. L3 Cleanup Agent', 'LV35', '0/4899', 'Level UpA', 'MAX', 'Summary', 'Skill', 'E.G.0', 'Sanity', 'ALEPH', 'La Sangre', 'de Sancho', 'Status', 'Resistances', '16113-634', 'Normal', 'Ineff.', 'Fatal', '川', 'DEFENSE', '-C', '[x1]', '[X0.5]', '[x2]')
[DEBUG] 2026-10-03 10:46:41,212 [AALC] module\ocr\ocr.py:72: OCR识别结果:('Don', 'awCorp.', 'Ixnte', 'W Corp. L3 Cleanup Agent', 'LV35', '0/4899', 'Level UpA', 'MAX', 'Summary', 'Skill', 'E.G.0', 'Sanity', 'ALEPH', 'La Sangre', 'de Sancho', 'Status', 'Resistances', '16113-634', 'Ineff.', 'Fatal', '川', 'DEFENSE', 'C', '[x1]', '[X.5]', '[x2]')
[DEBUG] 2026-10-03 10:46:45,905 [AALC] module\ocr\ocr.py:72: OCR识别结果:('Don', 'awCorp.', 'xnte', 'W Corp. L3 Cleanup Agent', 'LV35', '0/4899', 'Level UpA', 'MAX', 'Summary', 'Skill', 'E.G.0', 'Sanity', 'ALEPH', 'La Sangre', 'de Sancho', 'Status', 'Resistances', '16113-634', 'Normal', 'Ineff.', 'Fatal', '川', 'DEFENSE', 'C', '[x1]', '[x0.5]', '[x2]')
[DEBUG] 2026-10-03 10:47:14,280 [AALC] module\ocr\ocr.py:72: OCR识别结果:('D', 'D', 'awCorp.', 'Power-up', 'leanup Agent', 'MAX', 'Items.', '35·35', 'Identity Training TicketIV (Owned:0)', 'Sanity', 'EXP0/4899', 'Status', 'Identity Training Ticketll (Owned:0)', 'HP', '161161', '0', 'ALEPH', 'Defense Level 34 34', 'Identity Training Ticketll(owned:7)', 'Skill1Skil12Skill3 Defense', '8X383835', 'X Cancel', 'Confirm', 'Status', '16113-67', 'DEFENSE')
[DEBUG] 2026-10-03 10:48:24,629 [AALC] module\config\config.py:420: teams_active_queue change to: []
[DEBUG] 2026-10-03 10:48:24,638 [AALC] module\config\config.py:421: teams_be_select change to: [False]
[DEBUG] 2026-10-03 10:48:24,639 [AALC] module\config\config.py:422: teams_order change to: [0]
[DEBUG] 2026-10-03 10:48:24,641 [AALC] module\config\config.py:423: teams_be_select_num change to: 0
[DEBUG] 2026-10-03 10:48:24,687 [AALC] module\config\config.py:51: 配置文件已加载,版本号:DEFAULT VERSION, 配置版本: [ACCOUNT_REDACTED]
[INFO] 2026-10-03 10:48:25,173 [RapidOCR] base.py:22: Using engine_name: onnxruntime
[INFO] 2026-10-03 10:48:25,321 [RapidOCR] download_file.py:60: File exists and is valid: {repo}\vendor\aalc\.venv\Lib\site-packages\rapidocr\models\ch_PP-OCRv4_det_infer.onnx
[INFO] 2026-10-03 10:48:25,321 [RapidOCR] main.py:55: Using {repo}\vendor\aalc\.venv\Lib\site-packages\rapidocr\models\ch_PP-OCRv4_det_infer.onnx
[INFO] 2026-10-03 10:48:25,414 [RapidOCR] base.py:22: Using engine_name: onnxruntime
[INFO] 2026-10-03 10:48:25,416 [RapidOCR] download_file.py:60: File exists and is valid: {repo}\vendor\aalc\.venv\Lib\site-packages\rapidocr\models\ch_ppocr_mobile_v2.0_cls_infer.onnx
[INFO] 2026-10-03 10:48:25,417 [RapidOCR] main.py:55: Using {repo}\vendor\aalc\.venv\Lib\site-packages\rapidocr\models\ch_ppocr_mobile_v2.0_cls_infer.onnx
[INFO] 2026-10-03 10:48:25,458 [RapidOCR] base.py:22: Using engine_name: onnxruntime
[INFO] 2026-10-03 10:48:25,472 [RapidOCR] download_file.py:60: File exists and is valid: {repo}\vendor\aalc\.venv\Lib\site-packages\rapidocr\models\ch_PP-OCRv4_rec_infer.onnx
[INFO] 2026-10-03 10:48:25,472 [RapidOCR] main.py:55: Using {repo}\vendor\aalc\.venv\Lib\site-packages\rapidocr\models\ch_PP-OCRv4_rec_infer.onnx
[DEBUG] 2026-10-03 10:48:25,713 [AALC] module\automation\automation.py:88: 使用前台点击模块
[DEBUG] 2026-10-03 10:48:25,719 [AALC] utils\path_manager.py:44: 路径管理器初始化完成,路径: ['dark/zh_cn', 'dark/en', 'dark/share', 'default/zh_cn', 'default/en', 'default/share']
[DEBUG] 2026-10-03 10:48:58,149 [AALC] module\ocr\ocr.py:72: OCR识别结果:('CONNECTING', 'TEAMS #1', 'Details', '面', 'SINICOST', 'Preset#1', 'Dante', 'MlI lidestities', 'TEAMS', 'TEAMS#1', 'hEN', 'Lv.35', 'LV.35', 'LV.04', 'Lv.35', 'Blade Lineage', 'WCorp.L2', 'WCorp.L3', 'WCorp.L3', 'Rosespanner', 'WCorp.L2', 'All E.6.0', 'TEAMS#2', 'Salsu', 'Cleanup Agent', 'Cleanup Agent', 'Ceanup Agent', 'WorkshopFixer', 'Cleanup Agent', 'TEAMS#3', 'Fagades', 'TEAMS#4', '梦9', 'TEAMS#5', 'Details', 'Support', 'TEAMS#6', 'LV.34', 'LV.35', "hL'7", 'LV.17', 'TEAMS#7', 'LCB', 'Liu Assoc.', 'N Corp.', 'Zwei Assoc.', 'LCB', 'Manager', 'outh Section', 'Mittelhammer', 'South Section 6', 'Sinner', 'TEAMS#8', '[ACCOUNT_REDACTED]', '193', '036', 'NACY', 'Window', 'Theater', 'Sinners', 'Drive', 'Extract', 'Dispense', '2646', 'Inventory')
[DEBUG] 2026-10-03 10:49:41,479 [AALC] module\ocr\ocr.py:72: OCR识别结果:('Inferno', 'Luxca', 'MIRROROF', 'NAMESAND', 'R', '21.50m', '[ACCOUNT_REDACTED]', '036', '193', 'UNACY', 'Window', 'Sinners', 'Drive', 'Theater', 'Extract', 'Dispense', '2646', 'Inventory')
[DEBUG] 2026-10-03 10:50:03,482 [AALC] module\ocr\ocr.py:72: OCR识别结果:('STAGE', 'STAGE', 'STAGE', 'Luxcavation', '01', 'EXP Luxcavation #1', '02', 'EXP Luxcavation #2', '03', 'EXP Luxcavation #3', 'EXP', 'Consecutive Battle x1', 'ConsecutiveBattle x1', 'Consecutive Battle x1', 'Thread', 'Useful Types', 'UsefulTypes', 'UsefulTypes', 'Difficulty:Ly8', 'Difficulty: Lv 18', 'Difficulty:Lv28', 'Rewards', '福', 'Rewards', 'Rewards', 'Enter', 'Enter', ' 2', 'Enter', '2', ' Skip Battle', 'P', 'Skip Battle', 'Skip Battle', '[ACCOUNT_REDACTED]', '9E0,', '10', '193', 'LUNACY', 'LV', '124/120', '2646', 'Inventory')
[DEBUG] 2026-10-03 10:50:33,489 [AALC] module\ocr\ocr.py:72: OCR识别结果:('STAGE', 'STAGE', 'Luxcavation', 'STAGE', '01', 'EXPLuxcavation #1', '02', 'EXP Luxcavation #2', '03', 'EXP Luxcavation #3', 'EXP', 'Consecutive Battle x1', 'Consecutive Battle 1', 'ConsecutiveBattlex1', 'Thread', 'UsefulTypes', 'UsefulTypes', 'Useful Types', 'Difficulty: Lv 8', 'Difficulty:LV18', 'Difficulty: Lv.28', 'Rewards', 'P', 'Rewards', 'Rewards', 'Enter', 'Enter', '2', '吧', 'Skip Battle', 'Skip Battle', 'Skip Battle', '[ACCOUNT_REDACTED]', '9E0,', '10', '193', 'LUNACY', 'LV', '124/120', '2646', 'Inventory')
@@ -0,0 +1,3 @@
{"choice": "requires_analysis", "jev_ms": 1484, "screen": {"path": "{user_home}/lc_mcp/shots/shot_20261003_094641_436.png", "w": 1276, "h": 717}, "ocr": "2026.9.1\nTARGETE\nGreg\nHmmm...'m growing restless.When the hell can we getto work?\nAHANDY-DANDYGUIDE\nLTHE NEWEXECUTIVEMANAGERSOFLIMBU\nDIGESTBEFOREGETTINGTOWORK\nV894413125\n960,\n193\nUNACY\nWindow\nSinners\nDrive\nTheater\nExtract\n2646\nDispense\nInventory"}
{"choice": "enter_deployment", "jev_ms": 1282, "stage": "4-48", "state": "用户希望推进主线并跳过剧情。地图已确认4-47绿色已通关,4-48 Bud 棕色未通关。关卡详情等级35,EX要求15回合内通关,Enter消耗20普通体力;当前120/120体力、2646狂气。Enter后是战前编队,可先检查队伍。"}
{"choice": "fill_seven", "jev_ms": 1312, "stage": "4-48", "state": "4-48战前编队,参加上限7人,当前仅选5人:W唐35、W良秀35、刘以实玛利35、G格里高尔34、剑契理想34。还有W浮士德35和W鸿璐35可选,其他人格4到17级。七名等级接近关卡35级,三阶同步。"}
+66
View File
@@ -0,0 +1,66 @@
{
"exported_at_utc": "2026-10-03T02:55:31.845399+00:00",
"base_commit": "030527f5de5c83dd8ea6e53288c1c52f3b4a85bb",
"test_exit_code": 0,
"tests_passed": 94,
"main_story_cleared": false,
"jev_calls_logged": 3,
"simultaneous_human_input_confirmed": true,
"game_input_stopped_for_export": true,
"timeline_provenance": "manual reconstruction, not a complete action trace",
"screenshots": 4,
"excluded": [
"API keys",
"MCP token",
"private configurations",
"Codex transcripts",
"account-bottom-bar screenshots"
],
"files": [
{
"path": "captures/defeat.png",
"bytes": 1620164,
"sha256": "21f4712a3f3f215c72bfc941903faa272d9cc991dbb8eafc8e9ce86ff1582e0d"
},
{
"path": "captures/training-ticket-inventory.png",
"bytes": 999470,
"sha256": "6fc05740962e2a2fa471f43d41a88965b6b6dc217f21d799257d2936197fffae"
},
{
"path": "captures/turn1-winrate.png",
"bytes": 1355703,
"sha256": "99ce5b7f623bb4a336c342cfbbbc3262fabec67e1f8f61279d025b98867311e5"
},
{
"path": "captures/turn3-blooming.png",
"bytes": 1724843,
"sha256": "30a4f3924dca2c2ec3bb1950a85be80a6dedcd3c5b32c9e7abdc7c2f3fa16386"
},
{
"path": "logs/server-excerpt.txt",
"bytes": 56113,
"sha256": "da7c47598f38b0bac4bc4918b503d9bfbc641c812754089af9de7e46df2d78d3"
},
{
"path": "logs/story_decisions.jsonl",
"bytes": 1081,
"sha256": "b363b444dd3e18fc589f35b22fa19ff922953745a9e2cfaab2acbfe7b7c61d57"
},
{
"path": "README.md",
"bytes": 7606,
"sha256": "518dea5f19e2dd3beec627a173e86337f2a31e4e8020dab523cd407cf1bb33cc"
},
{
"path": "test-results.txt",
"bytes": 14030,
"sha256": "0e1fd946db3376cd7b727b2f28edfd8955c2e6427895f5a339593589f3c262a0"
},
{
"path": "timeline.jsonl",
"bytes": 3103,
"sha256": "965f2195f3af3e554b89089cc4735ee3cfcc656f31065a72e7ce59027e58fc83"
}
]
}
+107
View File
@@ -0,0 +1,107 @@
{"step": 0, "choice": "run_complete", "action": {"tool": "run_complete", "args": {}}, "jev_ms": 0, "ocr_ms": 0, "screen": null, "at": "2026-10-03T10:55:22", "state": "completed"}
{"step": 0, "choice": "wait", "action": {"tool": "wait", "args": {"seconds": 0.7}}, "jev_ms": 0, "ocr_ms": 0, "screen": null, "at": "2026-10-03T10:55:22", "action_ms": 0, "finished_at": "2026-10-03T10:55:22", "result": {"ok": true, "waited": 0.7}, "state": "running", "battle_context": false}
{"step": 1, "choice": "wait", "action": {"tool": "wait", "args": {"seconds": 0.7}}, "jev_ms": 0, "ocr_ms": 0, "screen": null, "at": "2026-10-03T10:55:22", "action_ms": 0, "finished_at": "2026-10-03T10:55:22", "result": {"ok": true, "waited": 0.7}, "state": "running", "battle_context": false}
test_choice_outside_permitted_actions_is_rejected (test_jev_client.JevClientTest.test_choice_outside_permitted_actions_is_rejected) ... ok
test_configured_model_endpoint_session_and_instructions_reach_api (test_jev_client.JevClientTest.test_configured_model_endpoint_session_and_instructions_reach_api) ... ok
test_curl_credentials_only_on_stdin_and_http_errors_not_retried (test_jev_client.JevClientTest.test_curl_credentials_only_on_stdin_and_http_errors_not_retried) ... ok
test_session_id_stays_stable_across_decisions (test_jev_client.JevClientTest.test_session_id_stays_stable_across_decisions) ... ok
test_completed_run_archives_context_for_next_run (test_jev_mirror_agent.MainLoopTest.test_completed_run_archives_context_for_next_run) ... ok
test_tool_errors_are_observed_instead_of_aborting (test_jev_mirror_agent.MainLoopTest.test_tool_errors_are_observed_instead_of_aborting) ... ok
test_ambiguous_event_is_not_assumed_free (test_jev_mirror_agent.SceneRegressionTest.test_ambiguous_event_is_not_assumed_free) ... ok
test_battle_cinematic_keeps_macro_available (test_jev_mirror_agent.SceneRegressionTest.test_battle_cinematic_keeps_macro_available) ... ok
test_battle_entry_uses_enter_without_party_changes (test_jev_mirror_agent.SceneRegressionTest.test_battle_entry_uses_enter_without_party_changes) ... ok
test_battle_macro_continues_through_empty_ocr_and_stops_at_reward (test_jev_mirror_agent.SceneRegressionTest.test_battle_macro_continues_through_empty_ocr_and_stops_at_reward) ... ok
test_battle_macro_stops_at_judgement_before_more_inputs (test_jev_mirror_agent.SceneRegressionTest.test_battle_macro_stops_at_judgement_before_more_inputs) ... ok
test_battle_macro_stops_on_party_death (test_jev_mirror_agent.SceneRegressionTest.test_battle_macro_stops_on_party_death) ... ok
test_claim_confirmation_only_uses_modal (test_jev_mirror_agent.SceneRegressionTest.test_claim_confirmation_only_uses_modal) ... ok
test_claimed_rewards_stop_at_lobby_without_entering_again (test_jev_mirror_agent.SceneRegressionTest.test_claimed_rewards_stop_at_lobby_without_entering_again) ... ok
test_confirmation_blocks_background_leave (test_jev_mirror_agent.SceneRegressionTest.test_confirmation_blocks_background_leave) ... ok
test_death_screen_stops_battle_candidates_without_accepting_deaths (test_jev_mirror_agent.SceneRegressionTest.test_death_screen_stops_battle_candidates_without_accepting_deaths) ... ok
test_disabled_selection_is_not_clickable_candidate (test_jev_mirror_agent.SceneRegressionTest.test_disabled_selection_is_not_clickable_candidate) ... ok
test_event_dialog_skip_precedes_judgement_and_options (test_jev_mirror_agent.SceneRegressionTest.test_event_dialog_skip_precedes_judgement_and_options) ... ok
test_event_encounter_result_clicks_start_battle (test_jev_mirror_agent.SceneRegressionTest.test_event_encounter_result_clicks_start_battle) ... ok
test_event_fallback_does_not_treat_encounter_trigger_as_free_reward (test_jev_mirror_agent.SceneRegressionTest.test_event_fallback_does_not_treat_encounter_trigger_as_free_reward) ... ok
test_event_gift_outcome_does_not_become_startup_selection (test_jev_mirror_agent.SceneRegressionTest.test_event_gift_outcome_does_not_become_startup_selection) ... ok
test_event_result_uses_visible_continue_button (test_jev_mirror_agent.SceneRegressionTest.test_event_result_uses_visible_continue_button) ... ok
test_explicit_extra_observation_can_be_declined (test_jev_mirror_agent.SceneRegressionTest.test_explicit_extra_observation_can_be_declined) ... ok
test_fallback_judgement_precedes_reselecting_sinner (test_jev_mirror_agent.SceneRegressionTest.test_fallback_judgement_precedes_reselecting_sinner) ... ok
test_final_claim_click_is_followed_by_enter (test_jev_mirror_agent.SceneRegressionTest.test_final_claim_click_is_followed_by_enter) ... ok
test_floor_pack_rules_are_enforced_before_decision (test_jev_mirror_agent.SceneRegressionTest.test_floor_pack_rules_are_enforced_before_decision) ... ok
test_floor_three_sinclair_cannot_choose_first_floor_swap (test_jev_mirror_agent.SceneRegressionTest.test_floor_three_sinclair_cannot_choose_first_floor_swap) ... ok
test_generic_button_clicks_the_checked_item (test_jev_mirror_agent.SceneRegressionTest.test_generic_button_clicks_the_checked_item) ... ok
test_gift_damage_description_is_not_battle (test_jev_mirror_agent.SceneRegressionTest.test_gift_damage_description_is_not_battle) ... ok
test_in_battle_judgement_overrides_previous_battle (test_jev_mirror_agent.SceneRegressionTest.test_in_battle_judgement_overrides_previous_battle) ... ok
test_jev_rate_limit_fails_without_sleep_or_second_request (test_jev_mirror_agent.SceneRegressionTest.test_jev_rate_limit_fails_without_sleep_or_second_request) ... ok
test_layer_confirmation_requires_full_selection_then_batches_enter (test_jev_mirror_agent.SceneRegressionTest.test_layer_confirmation_requires_full_selection_then_batches_enter) ... ok
test_loading_ocr_missing_n_blocks_input (test_jev_mirror_agent.SceneRegressionTest.test_loading_ocr_missing_n_blocks_input) ... ok
test_loading_offers_wait_and_never_auto_escalates (test_jev_mirror_agent.SceneRegressionTest.test_loading_offers_wait_and_never_auto_escalates) ... ok
test_map_templates_are_loaded_once (test_jev_mirror_agent.SceneRegressionTest.test_map_templates_are_loaded_once) ... ok
test_nested_reward_confirmation_excludes_background_cards (test_jev_mirror_agent.SceneRegressionTest.test_nested_reward_confirmation_excludes_background_cards) ... ok
test_pending_thunderbranch_cannot_leave_shop (test_jev_mirror_agent.SceneRegressionTest.test_pending_thunderbranch_cannot_leave_shop) ... ok
test_purple_shop_is_reachable_by_lit_arrow (test_jev_mirror_agent.SceneRegressionTest.test_purple_shop_is_reachable_by_lit_arrow) ... ok
test_real_white_event_routes_work_without_map_heading_ocr (test_jev_mirror_agent.SceneRegressionTest.test_real_white_event_routes_work_without_map_heading_ocr) ... ok
test_reward_stops_battle_candidates (test_jev_mirror_agent.SceneRegressionTest.test_reward_stops_battle_candidates) ... ok
test_route_enters_without_a_second_snapshot (test_jev_mirror_agent.SceneRegressionTest.test_route_enters_without_a_second_snapshot) ... ok
test_screenshot_decoded_once_for_repeated_checks (test_jev_mirror_agent.SceneRegressionTest.test_screenshot_decoded_once_for_repeated_checks) ... ok
test_server_error_blocks_shop_and_retries_modal (test_jev_mirror_agent.SceneRegressionTest.test_server_error_blocks_shop_and_retries_modal) ... ok
test_shop_cannot_leave_with_party_swap_or_remaining_refresh (test_jev_mirror_agent.SceneRegressionTest.test_shop_cannot_leave_with_party_swap_or_remaining_refresh) ... ok
test_shop_leave_modal_without_ocr_question_mark (test_jev_mirror_agent.SceneRegressionTest.test_shop_leave_modal_without_ocr_question_mark) ... ok
test_shop_loading_blocks_stale_stock_refresh_and_leave (test_jev_mirror_agent.SceneRegressionTest.test_shop_loading_blocks_stale_stock_refresh_and_leave) ... ok
test_shop_refresh_is_capped_and_only_for_missing_party_swap (test_jev_mirror_agent.SceneRegressionTest.test_shop_refresh_is_capped_and_only_for_missing_party_swap) ... ok
test_single_extra_gift_decline_preserves_core_and_multi_cards (test_jev_mirror_agent.SceneRegressionTest.test_single_extra_gift_decline_preserves_core_and_multi_cards) ... ok
test_sinner_very_high_precedes_high_and_generic_gold (test_jev_mirror_agent.SceneRegressionTest.test_sinner_very_high_precedes_high_and_generic_gold) ... ok
test_sold_swap_is_not_offered_again (test_jev_mirror_agent.SceneRegressionTest.test_sold_swap_is_not_offered_again) ... ok
test_special_shop_cannot_leave_before_core_upgrade (test_jev_mirror_agent.SceneRegressionTest.test_special_shop_cannot_leave_before_core_upgrade) ... ok
test_startup_three_gifts_selects_battery_and_cannot_decline (test_jev_mirror_agent.SceneRegressionTest.test_startup_three_gifts_selects_battery_and_cannot_decline) ... ok
test_success_condition_in_event_option_is_not_result (test_jev_mirror_agent.SceneRegressionTest.test_success_condition_in_event_option_is_not_result) ... ok
test_takeover_interrupts_between_p_and_enter (test_jev_mirror_agent.SceneRegressionTest.test_takeover_interrupts_between_p_and_enter) ... ok
test_takeover_stops_remaining_dialog_confirmations (test_jev_mirror_agent.SceneRegressionTest.test_takeover_stops_remaining_dialog_confirmations) ... ok
test_thunderbranch_observation_exception_keeps_startup_battery_priority (test_jev_mirror_agent.SceneRegressionTest.test_thunderbranch_observation_exception_keeps_startup_battery_priority) ... ok
test_two_card_reward_uses_observed_anchor (test_jev_mirror_agent.SceneRegressionTest.test_two_card_reward_uses_observed_anchor) ... ok
test_unrecognized_gift_choice_is_never_declined (test_jev_mirror_agent.SceneRegressionTest.test_unrecognized_gift_choice_is_never_declined) ... ok
test_tool_errors_can_be_returned_instead_of_raised (test_jev_mirror_agent.SessionTest.test_tool_errors_can_be_returned_instead_of_raised) ... ok
test_originals_saved_before_override_and_restored (test_lc_mcp.AalcTaskArgsTest.test_originals_saved_before_override_and_restored) ... ok
test_rejects_unknown_params (test_lc_mcp.AalcTaskArgsTest.test_rejects_unknown_params) ... unknown params for mirror: exp
usage: python -m lc_mcp.aalc_task <all|daily|reward|enkephalin|mirror> [json]
ok
test_empty_matches_nothing (test_lc_mcp.MatchTest.test_empty_matches_nothing) ... ok
test_exact_first (test_lc_mcp.MatchTest.test_exact_first) ... ok
test_ignores_spaces_and_case (test_lc_mcp.MatchTest.test_ignores_spaces_and_case) ... ok
test_bad_arguments_are_tool_errors (test_lc_mcp.ProtocolTest.test_bad_arguments_are_tool_errors) ... ok
test_click_text (test_lc_mcp.ProtocolTest.test_click_text) ... ok
test_drag_duration_and_rejected_arguments (test_lc_mcp.ProtocolTest.test_drag_duration_and_rejected_arguments) ... ok
test_engine_unavailable (test_lc_mcp.ProtocolTest.test_engine_unavailable) ... ok
test_images (test_lc_mcp.ProtocolTest.test_images) ... ok
test_initialize_and_list (test_lc_mcp.ProtocolTest.test_initialize_and_list) ... ok
test_task_exit_codes (test_lc_mcp.ProtocolTest.test_task_exit_codes) ... ok
test_task_lifecycle_blocks_manual_input (test_lc_mcp.ProtocolTest.test_task_lifecycle_blocks_manual_input) ... ok
test_wait_for_text (test_lc_mcp.ProtocolTest.test_wait_for_text) ... ok
test_background_click_holds_and_releases_without_moving_window (test_lc_mcp.RuntimeTest.test_background_click_holds_and_releases_without_moving_window) ... ok
test_background_keypress_holds_and_releases_on_error (test_lc_mcp.RuntimeTest.test_background_keypress_holds_and_releases_on_error) ... ok
test_drag_checks_bounds_before_sending_input (test_lc_mcp.RuntimeTest.test_drag_checks_bounds_before_sending_input) ... ok
test_focus_retry_detaches_threads_even_on_failure (test_lc_mcp.RuntimeTest.test_focus_retry_detaches_threads_even_on_failure) ... ok
test_foreground_drag_targets_current_client_and_releases_on_failure (test_lc_mcp.RuntimeTest.test_foreground_drag_targets_current_client_and_releases_on_failure) ... ok
test_foreground_focus_failure_does_not_send_input (test_lc_mcp.RuntimeTest.test_foreground_focus_failure_does_not_send_input) ... ok
test_foreground_input_activates_game_before_sending (test_lc_mcp.RuntimeTest.test_foreground_input_activates_game_before_sending) ... ok
test_foreground_input_releases_on_interruption (test_lc_mcp.RuntimeTest.test_foreground_input_releases_on_interruption) ... ok
test_foreground_move_settle_failure_sends_no_button_press (test_lc_mcp.RuntimeTest.test_foreground_move_settle_failure_sends_no_button_press) ... ok
test_pythonw_streams_are_redirected_to_log (test_lc_mcp.RuntimeTest.test_pythonw_streams_are_redirected_to_log) ... ok
test_stdio_isolates_bootstrap_output_and_uses_utf8 (test_lc_mcp.RuntimeTest.test_stdio_isolates_bootstrap_output_and_uses_utf8) ... ok
test_template_list_is_scanned_once (test_lc_mcp.RuntimeTest.test_template_list_is_scanned_once) ... ok
test_template_scale_tracks_client_and_restores_config_on_error (test_lc_mcp.RuntimeTest.test_template_scale_tracks_client_and_restores_config_on_error) ... ok
test_leftover_restored_before_next_start_or_start_refused (test_lc_mcp.TaskRestoreTest.test_leftover_restored_before_next_start_or_start_refused) ... ok
test_stop_restores_overridden_config (test_lc_mcp.TaskRestoreTest.test_stop_restores_overridden_config) ... ok
test_bridge_end_to_end (test_lc_mcp.TransportTest.test_bridge_end_to_end) ... ok
test_bridge_offline (test_lc_mcp.TransportTest.test_bridge_offline) ... ok
test_client_disconnect_is_not_a_server_error (test_lc_mcp.TransportTest.test_client_disconnect_is_not_a_server_error) ... ok
test_non_ascii_token_is_denied_not_crashed (test_lc_mcp.TransportTest.test_non_ascii_token_is_denied_not_crashed) ... [lc_mcp] rejected connection from ('127.0.0.1', 56231)
ok
test_stdio_server (test_lc_mcp.TransportTest.test_stdio_server) ... ok
test_wrong_token_rejected (test_lc_mcp.TransportTest.test_wrong_token_rejected) ... [lc_mcp] rejected connection from ('127.0.0.1', 56234)
ok
----------------------------------------------------------------------
Ran 94 tests in 8.693s
OK
+12
View File
@@ -0,0 +1,12 @@
{"at_local": "2026-10-03T09:46:41+08:00", "kind": "jev_decision", "result": "requires_analysis", "latency_ms": 1484, "note": "first sanitized Jev record; login scene had already changed", "provenance": "manual_reconstruction_from_observed_tool_outputs"}
{"at_local": "2026-10-03T10:26:48+08:00", "kind": "observed_result", "result": "defeat_return_20", "latency_ms": null, "note": "earlier screenshot observed during session, now rotated; timeline is a manual reconstruction", "provenance": "manual_reconstruction_from_observed_tool_outputs"}
{"at_local": "2026-10-03T10:37:26+08:00", "kind": "battle_observation", "result": "turn1_seven_sinners", "latency_ms": null, "note": "7 sinners still present; attempted removal was not confirmed", "provenance": "manual_reconstruction_from_observed_tool_outputs"}
{"at_local": "2026-10-03T10:37:50+08:00", "kind": "input_observation", "result": "skill_selected_camera_changed", "latency_ms": null, "note": "Don Rip Space selected; HUD and camera moved", "provenance": "manual_reconstruction_from_observed_tool_outputs"}
{"at_local": "2026-10-03T10:38:09+08:00", "kind": "input_observation", "result": "target_selected", "latency_ms": null, "note": "selected enemy slot after re-observing camera", "provenance": "manual_reconstruction_from_observed_tool_outputs"}
{"at_local": "2026-10-03T10:40:30+08:00", "kind": "battle_observation", "result": "turn3_blooming", "latency_ms": null, "note": "multiple fully bloomed sinners; simultaneous human input later confirmed", "provenance": "manual_reconstruction_from_observed_tool_outputs"}
{"at_local": "2026-10-03T10:42:25+08:00", "kind": "battle_observation", "result": "defeat", "latency_ms": null, "note": "DEFEAT image retained; retry menu action cannot be independently attributed", "provenance": "manual_reconstruction_from_observed_tool_outputs"}
{"at_local": "2026-10-03T10:44:10+08:00", "kind": "map_observation", "result": "4-48_uncleared", "latency_ms": null, "note": "4-47 green, 4-48 brown; 124/120 energy, 193 modules, 2646 lunacy", "provenance": "manual_reconstruction_from_observed_tool_outputs"}
{"at_local": "2026-10-03T10:46:13+08:00", "kind": "training_observation", "result": "w_don_level35_uptie4", "latency_ms": null, "note": "same-point hold opened identity details", "provenance": "manual_reconstruction_from_observed_tool_outputs"}
{"at_local": "2026-10-03T10:47:09+08:00", "kind": "inventory_observation", "result": "training_tickets_IV0_III0_II7", "latency_ms": null, "note": "no ticket spent", "provenance": "manual_reconstruction_from_observed_tool_outputs"}
{"at_local": "2026-10-03T10:49:57+08:00", "kind": "menu_observation", "result": "exp_luxcavation_menu", "latency_ms": null, "note": "visible EXP 1/2/3; no sweep or combat result", "provenance": "manual_reconstruction_from_observed_tool_outputs"}
{"at_local": "2026-10-03T10:50:27+08:00", "kind": "menu_observation", "result": "exp_menu_still_visible", "latency_ms": null, "note": "no EXP run started; user then requested export and slowdown report", "provenance": "manual_reconstruction_from_observed_tool_outputs"}
@@ -0,0 +1,49 @@
# 第二局镜牢:运行与修复记录
本局从 2026-10-02 18:13:22(UTC+8)开始计时。计时包括配置、网络等待、用户重启游戏、界面识别错误、代码修复与实际战斗;最终领取奖励并确认返回后才结束。`run.json` 是当前完成状态的依据,尚未结算时不能称为通关。
用户在第五层玫瑰标牌战斗中接管,执行器已终止,停止自动按键。记录接管时累计用时 9738.9 秒(2 小时 42 分 19 秒);不代表通关用时,未记录最终领取完成。这次执行明显未达到速通目标。
## 已核对的配置和进度
- 星之恩惠 1、3、10,未强化;起始荆棘套索、荧光灯;入层三级三选一取得标准负载电池。
- 第一层“宅邸的副产物”取得成捆的符咒,第二层选择地狱鸡,第三层沉迷的色欲,第四层堕落的忧郁。前四层均未选择二号线。
- 二层奖励没有足够符合不加生命/防御的选项,用户明确选择最低增幅的锐利(体力上限 +5%、攻击等级 +1)。三层同类情况选体力增幅最低且不加防御的两项,已向用户说明。
- 第二层特殊商店错误离开;第三层商店补做符咒 ++,实际经费从 1375 降至 1225,强化后文字与数值已核对。
- 第四层特殊商店用非核心 III+II+II 合成得到快感,消耗 5 星芒祈愿;随后支付 300 经费直接强化至 ++(1360→1060),实际库存与效果已核对。证据为 `thrill_acquired.png` 和 `thrill_enhanced.png`。
- 第四层奖励全部增加体力,用户明确选第 1+2 项:体力增幅较低,接受第二项防御等级+2。不是全局放宽选择规则。
- 第五层三次刷新未出现二号线,刷新归零后使用卡包观测,支付 20 星芒将首个候选替换为二号线并下拉进入。`floor5_line2.png` 是实际五层地图证据。
- 本局 Jev 接入检查返回 HTTP 429,使用已告知用户的固定候选回退;不能把回退决策记录为 Jev 成功调用。
## 真实问题与修复
1. 开局游戏无响应,用户约 18:31 重启。继续原局,没有重置计时。
2. 紫色事件/商店节点识别遗漏。结合当前可达箭头检测与节点模板,增加紫色商店回归场景。
3. 18:58 特殊商店未识别为商店,跳过核心强化及可替换技能。识别同时支持“商店”和“特殊商店”,并测试核心未强化及仍有可用技能时不能直接离开。截图 `special_shop_missed.png` 是错误发生时的真实画面。
4. 单张额外饰品与多张层末苦难共用“拒绝饰品”。只允许自动拒绝明确的单张非核心额外奖励,保留核心及多卡场景。
5. 重复动作候选删除后,未知场景计时变量仍为 None,导致 TypeError。改为候选删除后再更新计时,实际恢复运行成功。
6. 噬梦浊流事件选择了“拔出荧光灯”,引入额外遭遇战。补识别“触发遭遇战”等结果,不能将其当免费奖励;后续应按事件笔记优先较低门槛判定。
7. 事件结果页显示“开始战斗”,连续回车无效。新增结果页开始战斗按钮识别,实际点击后恢复。
8. 战中切入“选择一位罪人来进行判定”时仍发送 P+回车,造成数分钟无效输入。扩大战斗退出边界并同步候选识别;新增实际宏执行回归测试,要求判定出现后立即返回、不再继续发键。首次进入判定的准确时间未保留,不能把整段宏耗时都断言为卡住时间。
9. 后台点击按住时间太短,Unity 有时只显示悬停。修复为后台消息按下/抬起各留 120ms,不移动系统鼠标。第一版错误使用 WindowMoveInput 私有方法,实际 BackgroundInput 调用报错;已改用真实公开接口,测试 mock 限制同样的接口,随后实际合成与强化点击成功。
10. 商店离开弹窗和层末奖励确认改用回车;回车未生效再点击按钮。层末实测连续回车进入第五层卡包界面。
11. 第五层卡包刷新期间游戏再次无响应,用户约 20:31 重启。继续原存档,计时保持连续。
## 验证与证据限制
64 项 unittest 全套通过;随后回车确认策略修改后,40 项控制器测试再次通过。覆盖战中判定中断、特殊商店、后台点击、紫色节点、奖励拒绝边界及最终领取确认。动作日志只包含执行器已完成并写出的动作;主助手手动恢复点击及用户接管时被中断批次未计入按键统计。游戏仅保留最近 30 张截图,已删除的画面无法恢复。
本目录不包含 API 密钥、MCP 令牌、完整本地配置或聊天记录。代码变更在仓库 `scripts/jev_mirror_agent.py` 与 `tests/test_jev_mirror_agent.py`;运行中的状态快照不能代替最终通关证据。
## 用户接管后的流程优化
后续修改仅在文件和离线测试中完成,没有恢复游戏输入,也没有将本局改记为通关:
- 二号线限制在候选生成时执行,第一至第四层排除,第五层只允许它;没出现则使用剩余刷新,归零后按用户规则观测。
- 层末必须选足数量,再一次发送三个回车。事件结果发送短批次回车;失败时回退到当前候选绑定的按钮,避免背景同名控件。
- 明确极高/非常高的判定卡优先于高和颜色推测。缺少结果文字的事件选项不会被当作免费奖励。
- 雷枝加入观测例外,取得后记为待强化;开局三级三选一仍优先电池。快感尽量在第二、三层合成并完成 ++,第四层补做;不将新顺序写成这次已经做到。
- Jev 401/403/429 不重复等待调用;当前会话记录原因并转为固定候选回退。新增 OCR、动作实际毫秒与结束时间,后续可分开判断延迟。
- 批量动作每个按键前检查停止标记,接管时不再继续发送余下回车。
更新后的全套 73 项 unittest 通过,skill 校验通过;速度效果尚未用新的一局实测。当前可复用 skill 位于 `docs/skills/limbus-mirror-speedrun/`,最新笔记为 `docs/mirror_dungeon_speedrun_notes.md`。
File diff suppressed because one or more lines are too long
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

@@ -0,0 +1,5 @@
{
"state": "user_takeover",
"reason": "User took control; controller terminated and no further game input will be sent.",
"at": "2026-10-02T20:55:40.9011624+08:00"
}
@@ -0,0 +1 @@
{"refresh_used": 0, "floor": 5, "symbol_upgraded": true, "battery_obtained": true, "thrill_obtained": true, "thrill_upgraded": true}
@@ -0,0 +1,10 @@
{
"action_records": 409,
"battle_batches": 51,
"sent_p_enter_pairs": 1080,
"jev_successful_decisions": 0,
"limitations": [
"Only executed actions are logged; manual recovery inputs are documented in README.",
"Recent screenshots rotate; missing captures are not reconstructed."
]
}
@@ -0,0 +1,169 @@
# 镜牢速通:破裂黎明/黑兽纯 P
记录日期:2026-10-01;用户规则更新至 2026-10-02。
目标:尽快完成整局,按楼层推进;保留关键强化与换技能,减少无关运营。
## 开局固定配置(用户明确指定)
1. 星之恩惠选 :**起始之星、星际旅行、全面的可能性**。
2. **恩惠保持基础等级,不强化**;不要点击单项或全部强化按钮。
3. E.G.O. 饰品选**破裂**组的**荆棘套索、荧光灯**。
4. **不需要额外观测饰品**;进入额外 E.G.O. 饰品观测页面后,直接选择**拒绝饰品**。
5. **入层三级饰品选择“标准负载电池”**(简称“电池”)。
注意:不强化的是开局星之恩惠;二层的**符纸 ++**仍然必须做。
**饰品只能在商店强化**;地图饰品窗口的 +/++ 是效果预览。二层遇商店优先把成捆的符咒强化到 ++,以实际强化标识确认。
## 楼层推进顺序
**符纸的游戏内名称为“成捆的符咒”**(用户截图确认):Ⅰ级破裂饰品,图标是黑色底板上的两张折叠符纸,带红色符文和黄色纸边。按此名称与图标识别卡包奖励。
| 楼层 | 优先操作 | 有余力再做 |
| --- | --- | --- |
| 1F | 优先选通关奖励含**符纸**的卡包,取得符纸;遇商店按下表换技能。 | — |
| 2F | **符纸强化到 ++**;优先选 **Hell's Chicken**,主动获取**鸡胸**以维持破裂层数;按下表换技能。 | — |
| 3F | 菲辛的换技能目标改为 **1 → 3**;按当前头目和路线选择可纯 P、战斗较短的卡包。旧称 Bearable 尚未对应正式名称,不作为固定首选。 | 制作**快感**并强化至 ++。 |
| 4F | 继续推进、按下表换技能。 | 补缺失的相关饰品。 |
| 5F | **必选“2号线”卡包,第一至第四层禁止选择它**;优先换技能并通关,不必专门做斩击四级饰品。 | 卡包刷新次数为零时允许卡包观测;顺路高级饰品。 |
没拿到鸡胸也继续推进,**不要因此重开**。饰品与换技能竞争资源时,优先关键技能;符纸 ++ 的优先级保留。
## 快感合成:先区分普通/特殊商店
用户补充(2026-10-02):**取得快感后,必须在商店强化到二级(++)再继续。** 在强化界面选择 ++,支付实际报价并确认库存名称为“快感++”;只看到 ++ 效果预览不算完成强化。
快感属于普通合成池的四级破裂饰品,不是固定材料配方。商店选择“合成饰品”并指定破裂,用非核心材料达到当前商店的四级门槛;以界面显示的产物等级和关键词预览为准,不能把出四级理解为必出快感。
| 商店 | 四级门槛 | 可用材料等级组合 |
| --- | --- | --- |
| 普通商店 | 总点数 ≥25 | 332=26;重合可用 431=28、422=27 |
| 特殊商店 | 总点数 ≥22 | 322=22、331=23;重合可用 421=24 |
材料点数:Ⅰ=3、Ⅱ=6、Ⅲ=10、Ⅳ=15。普通商店的 322/331 只出三级,在特殊商店才可出四级;**特殊商店的 411 仅21点,仍不够四级**。特殊商店最多放5件材料;2222=24点也可出四级,具体组合按非核心库存和词条成功率选择,不为了凑固定数字消耗核心饰品。
2/3/4–5件材料命中指定词条的基础概率为60%/90%/99%;每次花5星芒祈愿可提高为90%/99%/99.99%。这是词条概率,不是快感本身的概率。没出快感时,先按商店类型重新计算点数,不照搬普通商店组合。符咒++、电池、鸡胸等核心保留。
核对日期:2026-10-02。[名与蛛之镜:合成规则](https://limbuscompany.huijiwiki.com/wiki/名与蛛之镜)。
本局实测:四层特殊商店用非核心Ⅲ+Ⅱ+Ⅱ,预览四级破裂;消耗5星芒祈愿(2826→2821),实际合成“快感”。材料点击选入,不拖拽。一次成功不代表此组合必出快感。
本局强化实测:快感从基础直接选择 ++,支付300经费(1360→1060);库存名称已确认为“快感++”,回合开始施加6强度、3层破裂,回合结束最多计算10层。费用以当次界面报价为准。
## 技能替换速查
箭头表示“用左侧技能换成右侧技能”。
| 人格 | 1–2F | 3–5F |
| --- | --- | --- |
| 菲辛 | **1 → 2** | **1 → 3** |
| 黑兽奥 | **2 → 3** | **2 → 3** |
| 其他人格 | **1 → 3** | **1 → 3** |
看到符合上表的替换通常直接换,少做反复比较。
用户补充(2026-10-02):商店没有出战角色可替换技能时,允许刷新,**每个商店至多 4 次**。有出战角色可换时按技能表执行;达到上限即继续推进。
刷新后出现 CONNECTING 时,旧库存仍可见;必须等加载结束,禁止据旧库存再次刷新或退出。有未购买的出战角色技能替换时先完成替换,不能直接离开。快捷键一次未生效即点击当前对应按钮。
特殊商店同样执行强化与换技能;标题识别必须包含“特殊商店”。2026-10-02 实际漏识导致二层提前退出,已修复并增加回归测试。二层起符咒未确认 ++ 时禁止自动离开。
用户补充:离开商店时直接按回车快速退出,不再额外检查、观察或询问;只有回车未生效时才点击弹窗确认。
## 层末苦难
- 除必需饰品外,选择**不加敌方血量、不加防御等级**的选项。不要漏选后让系统随机分配苦难;
- 层末必须先选择苦难再直接推进,不能把此界面误当额外饰品观测而默认拒绝。
- 用户补充:每层选完奖励后直接连续回车确认并进入下一层,不再额外检查、观察或询问;未生效才点击对应按钮。
## 场景执行表(优先减少重复步骤)
| 当前画面 | 固定操作 | 到哪里再重新决策 |
| --- | --- | --- |
| 进入镜牢确认弹窗 | 直接 Enter;未生效立即点击确认 | 开局或恢复的当前界面 |
| CONNECTING/加载 | 等待,不购买、不刷新、不退出 | 新画面加载完成 |
| 上层确认弹窗 | 只操作弹窗按钮 | 弹窗关闭 |
| 地图节点/关卡编队 | 方向+Enter;编队界面再 Enter | 战斗或下一个选择界面 |
| 战斗 | 持续 P → Enter,不分析拼点、不逐按钮调用模型 | 结算、奖励、地图或事件 |
| 事件对话 | SKIP;再用 Enter 推进 | 选项或罪人判定出现 |
| 事件选项 | 已有无需战斗/判定的直接领取分支就选,避免反复滚动 | 下一处分支或结果 |
| 事件结果 | Enter 推进;可见“继续”且按键无效就直接点击 | 返回地图 |
| 商店 | 可换出战技能先换;无可换技能再刷新,最多 4 次 | 新库存;不根据加载旧库存继续操作 |
| 层末多卡奖励/苦难 | 先选饰品和苦难,再确认推进 | 下一层;不能按“额外观测”默认拒绝 |
| 最终结算 | 点击“领取” → Enter 确认;无效就点确认 | 返回主界面,结束执行 |
无变化判断比较界面标题、选项、按钮状态,忽略录像计时和战斗动画中的数字。快捷键一次未生效就回退按钮;不重新核对已确定的编队、路线或技能表。卡包详情已读过的结论应保留,不能关闭后再次从零观测同一卡包。
## 执行原则
- 战斗循环按 **P → 回车**,直到结束;不逐回合截图分析,只在检查是否已结算时查看画面。
- **事件判定先点击 SKIP 跳过对话**,再选择事件选项、罪人或进行判定;SKIP 可用时不提前处理判定。其他对话也优先 SKIP,可用回车加快。
- 事件对话跳过后,继续按回车直到出现罪人选择界面;判定结果出现后快速连按回车结束事件。固定推进不逐按钮请求模型。
- **回车**可触发对话及其他按钮;有明确的确认、继续按钮时,优先使用快捷键。
- 路线优先选择可直接结束的事件、商店等非战斗节点,避免为小奖励增加复杂判定。
- 商店保留符纸 ++、关键维持饰品和快速换技能;略过无关采购、合成与反复比较。
- 困难镜牢与视频条件未全部核对,按当前画面修正,不能把视频用时直接套到当前局。
- 电脑操作优先使用用户安装的 limbus MCP 后台接口;只运行一个执行器,不抢前台焦点。用户要求快速执行,战斗使用有界 P+回车宏;需要选项的界面核对当前画面。
## 事件选择与可复用 skill
- 按**整局用时**选择:优先核心符咒/鸡胸,其次即时恢复、经费或直接结束;避免额外战斗、多段判定和无关奖励。大量理智损失可能拖慢后续纯 P。
- **炸鸡对决选第一项**,直接获得鸡胸与鸡翅;第三项也给鸡胸,第二项仅鸡翅。
- 当前游戏译名:鸡胸为**干巴柴涩鸡胸肉**,鸡腿为**火热多汁琵琶腿**。
- 商店符咒强化可直接选 **++**,本局一次支付 **150 经费**完成;以当前报价为准。
- 可复用 skill:[$limbus-mirror-speedrun]({user_home}/.codex/skills/limbus-mirror-speedrun/SKILL.md)。[事件速查表]({user_home}/.codex/skills/limbus-mirror-speedrun/references/event-choices.md)按名称查询,以当前选项文字核对编号。
## 游戏内快捷键(用户操作指南截图)
- **P → Enter**:胜率/伤害按键后开始战斗/行动。
- **Enter/Space**:弹窗确认、故事跳对话、提取跳动画、选项事件加载下一段文本;对话也可直接点 SKIP。
- **战斗 Space=暂停/继续**,不加入战斗循环。
- **关卡/商店:方向选中后直接按 Enter 进入,无需再次确认**(用户补充);执行器将选方向+回车合并为一个动作。
- 进入关卡后的编队界面继续按 **Enter** 开战,不再次检查编队;沿用原队伍。
- **快捷键未生效时立即改用鼠标点按钮**,不反复尝试(用户补充)。
- **地图 ↑/↓/→ 或 W/S/D**:移至下个节点后直接回车进入;**←/A**:取消节点选择;**Q/E**:地图左右平移。
- 战斗 **方向键/WASD** 移动视角,**滚轮/Q/E** 缩放,**Tab** 显示拼点箭头。
- **F1** 打开操作指南;**Esc** 随界面关闭弹窗、取消、返回或退出。完整表见 [快捷键速查]({user_home}/.codex/skills/limbus-mirror-speedrun/references/shortcuts.md)。
## Jev 接入(用户授权)
- 已实测 `jev-1.13-free` 决策接口返回 HTTP 200,耗时约 1.3–1.5 秒;端点为 `https://opencode.ai/zen/v1/systemone`。
- 客户端:[jev_decision_client.mjs]({runtime}/jev_decision_client.mjs)。凭据由环境变量或未跟踪的本地配置提供,上传源码与反馈时排除凭据和配置文件。
- 用户更新(2026-10-02):固定场景、路线与常规动作均交给 Jev;仅在它返回 `requires_analysis` 或具体接口故障时由主助手排查。执行器只执行已核对的候选动作,不运行模型任意代码。
- 最新战斗指令:开战后仅 P+回车循环到结算,不逐批请求 Jev。批次末只识别是否已结束,战斗特写没有 OCR 文字也继续;结算后交回 Jev。
## 本局实测与待验证
2026-10-02 已看到第五层“探索完成”;点击领取后由用户完成回车确认,随后观察到主界面。此局包含人工纠正,不能记成全自动速通成功。商店加载保护、层末苦难选择和完整自动领取流程已修改并做回归检查,下一局仍需确认实际效果;12 分钟目标尚未复现。
## 2026-10-02 第二局实测(用户接管,未通关)
- 本局计时从 14:19:55.538 接管开始,到 17:33:45 记录用户接管,共 3 小时 13 分 49 秒。包含开局配置、接口等待、修复和全部操作停顿;这是交接前耗时,不是通关用时。
- 入层三级饰品被执行器误当额外观测拒绝,未取得标准负载电池;这是执行错误,不能作为后续默认流程。
- 三、四层所有苦难均增加敌方体力,无法完全遵守“不加血量”;本局选了不加防御等级的组合。拒绝层末奖励会随机附加苦难,不能用它规避负面。
- 2 号线被第四层选用,第五层观测列表显示无法选择。用户明确纠正:**第一至第四层禁止选择二号线,只留到第五层**;本局第五层刷新用尽后观测并选择“时间杀人时间”。
- Jev 遇 HTTP 429,临时使用现有规则的确定性执行器;不能记为 Jev 全程决策成功。
- 本轮修复包括:饰品伤害文字误判战斗、选项中的判定成功误判结果、事件后续推进、加载 OCR 容错、奖励双卡位置、商店技能列定位及服务器错误弹窗优先重试。47 项仓库回归检查通过;本局第五层头目纯 P 团灭一次,死亡重试画面未被战斗循环识别为结束,此处仍需修复。测试通过不能代表整局通关。
- 用户允许最后头目手动拼点/治疗 E.G.O 后,又明确接管。自动执行器已停止。随后用户报告已完成镜牢并领取奖励,记为用户接管后完成,不能记录为自动通关;实际领取时刻未知,交接前耗时不等于总通关用时。
## 2026-10-02 机制核对与电池修复
- 开局三级三选一是“全面的可能性”的奖励,与额外观测分开。**必须选标准负载电池并确认**,不得拒绝;领取后一次核对库存,不每场重复查看。核心符咒、电池、鸡胸不出售、不合成。
- 日志确认第二局 14:34:59 执行了“拒绝饰品”;决策提示漏写电池且通用按钮开放了拒绝。这是执行错误,不是用户没有配置。
- 本地及仓库执行器已补必选电池规则、按卡名选取及确认候选;未知三选一不暴露拒绝,只有明确额外观测才允许拒绝。新增三选一选择/确认、未知卡名禁止拒绝、额外观测及事件结果不误判等回归检查,当前共 **51 项通过**。尚未重新实机验证电池领取,也没有恢复用户接管的游戏。
- 2 号线固定事件、事件、商店、玫瑰标牌,共 4 节点;仍按用户要求只留第五层。拒绝层末奖励不能规避随机苦难。符咒 ++ 的低伤害门槛与斩击补层数是必需强化原因。
- 其余鸡胸当前触发限制、最后商店恢复、替代头目与版本差异见 [机制参考]({user_home}/.codex/skills/limbus-mirror-speedrun/references/mechanics.md)。速度判断属于流程推断,未实测为更短整局用时。
## 第二至第四层选包优先级(初步,未逐包计时)
- 第二层缺鸡胸时优先地狱鸡;地狱鸡只在第二层出现,不在三四层反复寻找。已有鸡胸或当前没出现时,从现有候选比较纯 P 可通过性、战斗与头目耗时,不为无关奖励运营。
- 第三、四层核心齐全且长度相同时,初步优先考察 Addicting Lust(因而无人哭泣/长腿精灵)和 Degraded Gloom(悲泣蟾蜍/无头鱼)。两者没有实测固定先后,仅作为机制筛选候选组。
- 压抑的暴怒、空转的怠惰作为次选比较,不能因为上局打过就自动列首选。多波、阶段复杂、未验证纯 P 可通过的头目降低优先级;四节点长线包不自动优于普通包。
- 旧笔记中的 Bearable 尚未对应当前正式卡包名称,暂停作为第三层固定首选。当前 Wiki 卡包总表与旧赛季表存在楼层/头目差异,以当前难度的可用卡包及游戏详情为准。完整条件表见 [楼层规划]({user_home}/.codex/skills/limbus-mirror-speedrun/references/rupture-route.md)。
- 第一层仍选带符纸的卡包;第一至第四层禁止二号线,第五层按用户要求优先二号线。以上暂定排序不修改游戏或启动执行器。
## 来源
- B 站 UP 绅士丶蚂蚱:[破裂黎明纯 P 周回](https://www.bilibili.com/video/BV1exaV6yELm/)。楼层规划采用其换技能优先策略。
- 原作者 Cabric:[黎明黑兽五层攻略](https://www.youtube.com/watch?v=h5wFVUd2X2c)。卡包、配队与机制补充来自原攻略。
- [边狱公司 Wiki:探索事件](https://limbuscompany.huijiwiki.com/wiki/%E6%8E%A2%E7%B4%A2%E4%BA%8B%E4%BB%B6)。事件结果于 2026-10-01 核对,速通排序为针对当前纯 P 流程的判断。
@@ -0,0 +1,24 @@
{
"run_id": "mirror_20261002_181322",
"start_utc": "2026-10-02T18:13:22+08:00",
"start_local": "2026-10-02T18:13:22+08:00",
"status": "user_takeover",
"start_definition": "Before entering the dungeon; includes setup, API waits, fixes, loading and all delays.",
"end_definition": "Final rewards claimed and confirmed; observe return to dungeon lobby or home.",
"dungeon_completed": false,
"final_reward_claimed": false,
"deviations": [
{
"reason": "Jev connection check returned HTTP 429; deterministic fallback used instead of repeatedly waiting."
},
{
"reason": "Game became unresponsive during starting gift selection; user restarted it at 18:31. Recovered the same run; timer includes the interruption."
},
{
"reason": "18:58:43: special shop missed because classifier only matched exact ordinary shop title; left without upgrading symbol or buying available Gregor/Faust swaps. Fixed classifier and added regression; must upgrade at next available shop."
},
"20:31 用户重启无响应游戏;已恢复前四层通关存档,计时连续。"
],
"takeover_local": "2026-10-02T20:55:40.9011624+08:00",
"elapsed_to_takeover_seconds": 9738.9
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 928 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 MiB

+141
View File
@@ -0,0 +1,141 @@
{
"schema_version": 1,
"logs": [
{
"source": "docs/feedback/2026-10-02/logs/jev_mirror_log.jsonl",
"sha256": "2763abd957bcec7cb7ad0b0b9e29ec9f1f09501f44e506f7d359047397d133e0",
"records": 273,
"action_records": 273,
"tool_counts": {
"advance_dialog": 11,
"battle": 74,
"click": 47,
"click_text": 28,
"drag": 7,
"keypress": 22,
"route": 14,
"wait": 70
},
"state_counts": {
"running": 273
},
"recorded_latency_ms": {
"jev_ms": {
"present_records": 273,
"missing_records": 0,
"invalid_records": 0,
"zero_records": 51,
"positive_records": 222,
"sum_ms": 331526,
"positive_median_ms": 1203.0,
"positive_p95_nearest_rank_ms": 2296,
"positive_max_ms": 8875
},
"ocr_ms": {
"present_records": 0,
"missing_records": 273,
"invalid_records": 0,
"zero_records": 0,
"positive_records": 0,
"sum_ms": null,
"positive_median_ms": null,
"positive_p95_nearest_rank_ms": null,
"positive_max_ms": null
},
"action_ms": {
"present_records": 0,
"missing_records": 273,
"invalid_records": 0,
"zero_records": 0,
"positive_records": 0,
"sum_ms": null,
"positive_median_ms": null,
"positive_p95_nearest_rank_ms": null,
"positive_max_ms": null
}
},
"battle_pair_attempts": {
"reported_batches": 74,
"unreported_batches": 0,
"sum": 842
},
"action_timestamp_spans": {
"naive_local": {
"records": 273,
"first": "2026-10-02T12:09:25",
"last": "2026-10-02T13:50:40",
"span_seconds": 6075.0
}
},
"missing_or_invalid_action_timestamps": 0
},
{
"source": "docs/feedback/mirror_20261002_181322/actions.jsonl",
"sha256": "91ddc1edce0b952df9faad3974d008d37d608f0819995d09a6c8115c326741a0",
"records": 409,
"action_records": 408,
"tool_counts": {
"advance_dialog": 35,
"battle": 51,
"click": 92,
"click_text": 28,
"keypress": 31,
"route": 27,
"wait": 144
},
"state_counts": {
"new_run": 1,
"running": 408
},
"recorded_latency_ms": {
"jev_ms": {
"present_records": 408,
"missing_records": 0,
"invalid_records": 0,
"zero_records": 408,
"positive_records": 0,
"sum_ms": 0,
"positive_median_ms": null,
"positive_p95_nearest_rank_ms": null,
"positive_max_ms": null
},
"ocr_ms": {
"present_records": 0,
"missing_records": 408,
"invalid_records": 0,
"zero_records": 0,
"positive_records": 0,
"sum_ms": null,
"positive_median_ms": null,
"positive_p95_nearest_rank_ms": null,
"positive_max_ms": null
},
"action_ms": {
"present_records": 0,
"missing_records": 408,
"invalid_records": 0,
"zero_records": 0,
"positive_records": 0,
"sum_ms": null,
"positive_median_ms": null,
"positive_p95_nearest_rank_ms": null,
"positive_max_ms": null
}
},
"battle_pair_attempts": {
"reported_batches": 51,
"unreported_batches": 0,
"sum": 1080
},
"action_timestamp_spans": {
"naive_local": {
"records": 408,
"first": "2026-10-02T18:17:21",
"last": "2026-10-02T20:52:04",
"span_seconds": 9283.0
}
},
"missing_or_invalid_action_timestamps": 0
}
]
}
@@ -0,0 +1,232 @@
# Jev 决策与 AALC 自动化复用研究
研究日期:2026-10-03。分析基线:远端 lc-mcp `97eca204`、本地可靠性修复 `7188b4a`,AALC 子模块 `7452fad5`(V1.6.1-beta.3)。
本次交付包括代码研究、离线识别样例、可复现日志统计,以及 Jev/执行模型共用的决策预留接口。完整 AALC 混合执行器尚未接入,尚未进行新的游戏速度实测。
## 结论:本地识别页面,Jev 判断选择,AALC 执行流程
采用用户明确提出的流程:AALC 的图片匹配、地图识别及 OCR 产出页面状态,交给 Jev 判断。Jev 接收文字或结构化状态;截图留在本地用于识别和复核。
官方说明 Jev 不支持图片、音频和视频输入,支持字符串、JSON 对象或数组。官方也提示其中文等 CJK 输入准确率目前低于英文。因此应优先用稳定的英文枚举描述场景和节点,保留中文原文供事件判断与审计,实际准确率需要用本项目样本测量。[TypeSafe:State](https://docs.typesafe.ai/concepts/state)
```mermaid
flowchart LR
A[MCP 启动任务和查询状态] --> B[唯一游戏执行进程]
B --> C[AALC 截图 / 模板匹配 / 局部 OCR]
C --> D[页面状态与证据]
D --> E[代码筛选合法候选]
E --> F{是否需要语义判断}
F -->|需要| G[Jev 选择候选 ID]
F -->|确定步骤| H[AALC 场景流程]
G --> H
H --> I[检查页面变化与目标结果]
I --> C
```
这里的自动化单位应是“进入一个节点”“处理一个商店目标”“完成一次事件判定”,让一次决策对应一段有终点的动作。确认按钮、加载等待、已知事件的后续对话、战斗输入等确定步骤可由代码推进。地图及商店需要新的信息或发生分支时再决策。
## 当前实现已有的能力与缺口
| 位置 | 已有能力 | 对此次优化的影响 |
| --- | --- | --- |
| `lc_mcp/aalc_engine.py:79–114` | AALC 截图与 OCR;返回文字、位置、OCR 分数 | 已能在本地生成文字观测。当前每次 `get_state` 都保存 PNG 并做整帧 OCR |
| `scripts/jev_mirror_agent.py:57–127` | 复用 AALC 总线、箭头、节点图片,以 OpenCV 匹配和 ORB 识别可达节点 | 已能直接产出地图候选,无需视觉模型;匹配数和亮度阈值不是校准后的正确率 |
| `scripts/jev_mirror_agent.py:130–539` | 页面文字规则、卡包限制、场景动作候选 | 部分硬约束已在代码内生效;许多信息仍藏在描述文字或手工更新的运行上下文中 |
| `scripts/jev_mirror_agent.py` 的 `decide()` | 向 Zen System One 发送 OCR 文字,接收候选 ID | 研究开始时硬编码免费模型并丢弃概率;本次已改为读取实际模型、保留概率及 confidence |
| `scripts/jev_decision_client.mjs` | 返回 choice、confidence、probabilities、model | 是独立实现,Python 主循环没有调用它;需要统一行为与配置 |
| `scripts/jev_mirror_agent.py` 的决策分支 | 原来 401/403/429 后持续规则回退 | 本次已改为执行模型交接,并记录决策来源;自动冷却恢复仍待长期执行器实现 |
| `lc_mcp/aalc_task.py` | 通过 `run_task` 启动完整 AALC 镜牢任务 | 当前镜牢参数仅覆盖次数,未提供配置预览、策略选择或决策钩子 |
| `lc_mcp/tasks.py:62–79` | 根据任务子进程退出码报告成功 | 退出码 0 只说明进程结束,不能直接代表完成镜牢及领取奖励 |
目前 Jev 输入包含全屏 OCR、候选描述、最近动作和所有全局规则。应改成针对当前页面的状态及规则,避免将楼层、技能、卡包、商店、战斗等要求同时塞入每次选择。
## 离线证明:现成识别代码已经能输出可用状态
对 `tests/fixtures/floor4_white_events.png` 调用现有 `map_candidates()`,识别出:
- `route_w`:上方可达事件节点,ORB 匹配数 53。
- `route_d`:正前方可达事件节点,ORB 匹配数 30。
导出文件:[页面状态与 Jev 请求样例](jev_page_state_example_20261003.json)。此次只读取现有测试图片,未向 Jev 请求,也未向游戏发送输入。样例中的楼层明确标为未提取,不能因为文件名带有 floor4 就当成识别结果。
现成函数返回的是候选描述。下一步应让识别器直接返回 `node_type`、`reachable`、匹配分数、证据区域和动作引用,减少再次解析自然语言描述。候选坐标由执行器持有,Jev 只需要知道节点语义及合法候选 ID。
建议的页面状态合同如下,数值仅用于说明结构:
```json
{
"schema_version": 1,
"observation_id": "frame-123",
"scene": {"value": "shop", "status": "observed", "evidence": ["shop_coins_template"]},
"floor": {"value": 3, "status": "confirmed"},
"coins": {"value": 350, "status": "observed", "source": "shop_coin_ocr"},
"goals": ["enhance_core_gift", "replace_allowed_skills"],
"legal_candidates": [
{"id": "enhance_core", "kind": "enhance", "affordable": true},
{"id": "leave_shop", "kind": "leave"}
],
"unknown_fields": ["current_gift_upgrade_level"],
"last_action": {"id": "open_enhance", "verified_effect": false}
}
```
`status` 要区分本帧观测、先前确认、未知及冲突。OCR 分数、模板分数、场景识别强度、Jev 的 confidence 分别记录,不能混成一个“可信度”。空 OCR 可能是动画或加载,必须结合场景证据和前一动作判断。
同一帧的观测供识别与候选生成共用;输入后使旧观测失效。执行前校验 observation ID、页面关键标志和候选是否仍可用。结果没有证据时保留“待确认”,不能仅因点击 API 返回 `ok` 就把库存升级等目标标为完成。
## 可以复用的 AALC 配置与流程
配置来源为 `vendor/aalc/module/config/config_typing.py`、`assets/config/config.example.yaml`,以下映射根据实际消费配置的代码核对。
| 场景 | 现有配置 | 现有执行点 | 复用边界 |
| --- | --- | --- | --- |
| 任务与队伍 | `teams_active_queue`、`teams`、`fixed_team_use`、`fixed_team_use_select`、`hard_mirror` | `script_task_scheme.Mirror_task()`,`Mirror` 初始化与选队 | 复用有效队伍队列及普通/困难适用范围,启动前检查确有可执行队伍 |
| 队伍与编队 | `sinner_order`、`chosen_sinners`、`team_number`、`re_formation_each_floor` | `Mirror.select_mirror_team()`、战斗编队流程 | `sinner_order` 是各罪人的优先序,不能直接当成角色 ID 数组 |
| 开局增益与饰品 | `opening_bonus`、`opening_items`、`opening_items_select`、`opening_items_system`、`use_starlight` | `Mirror.enter_mir_with_star()`、开局饰品选择 | 优先使用已有配置;枚举索引与用户指定饰品需用资源及页面核对 |
| 地图 | `mirror_keyboard_navigation`、`mirror_keyboard_simple_pathfinding` | `MirrorMap`、`Mirror.search_road()`、`enter_next_node()` | 正常模式已有节点图及路线缓存;简单模式总选上方,不能保证更快通关 |
| 卡包 | `theme_pack_list.yaml`、每队 `theme_pack_weight_team_N.yaml`、`use_custom_theme_pack_weight` | `select_theme_pack()` | 权重是偏好,低权重仍可能在最终回退时被选中;不等价于按楼层禁选 |
| 商店购物与刷新 | `shopping_strategy`、`shopping_strategy_select`、`max_keyword_refresh`、`max_normal_refresh`、`ignore_shop` | `Shop.buy_gifts()`、`Shop.in_shop()` | 可复用商品识别及购买流程;需要与当前 MCP 的每店刷新限制统一 |
| 合成与强化 | `shop_strategy`、`do_not_fuse`、`do_not_enhance`、`aggressive_save_systems`、`second_system*` | `Shop.fuse_gift()`、`enhance_gifts()`、`ego_gift_to_power_up()` | 支持体系策略,但不是任意指定核心饰品的保护与预算规则 |
| 技能替换 | `skill_replacement`、`skill_replacement_select`、`skill_replacement_mode` | `Shop.replacement_skill()` | 原生模式按优先角色集合使用同一个替换模式,缺少每角色、每楼层规则 |
| 事件与判定 | 原生事件模板及判定识别 | `Mirror.event_handling()`、`tasks/event` | 复用判定及后续点击;选项未知时需要 Jev 判断,不能套用首项回退 |
| 奖励与结束 | `reward_cards*`、`save_rewards`、`no_weekly_bonuses` 等 | `Mirror.run()` 结算流程、`run_state.py` | 根据配置明确是否领取;正常完整运行需有实际结算与返回大厅的证据 |
| 战斗 | `defense_*` 等 | `battle.fight()` 或已验证的 P+Enter 宏 | 原生完整战斗逻辑包含不同策略,需要匹配本次运行策略后才能替换 |
### 三个不能只靠原配置解决的要求
1. **按楼层严格选择卡包。** 当前 MCP 已实现前四层不选 2 号线、第五层指定 2 号线的部分候选过滤。AALC `select_theme_pack.py:111–149` 在刷新回退后仍选择最高权重,所以把禁选包权重设为 -5 不保证禁选。应保留硬过滤,再复用卡包识别、权重及拖动动作。`select_event_pack` 只是第五层选最左侧包,也不是指定包名。
2. **按罪人及楼层替换技能。** AALC `in_shop.py:1210–1233` 选择前 1/3/7/12 个优先罪人,所有人用同一 `skill_replacement_mode`。当前规则中的奥提斯 2→3、其他角色 1→3、辛克莱从第三层开始,需额外策略表及对应执行适配。
3. **跨体系保护核心与先后预算。** AALC 激进合成保护表及体系保护见 `in_shop.py:417–445`,普通合成还依赖舍弃体系及固定资源列表。不能假定破裂队配置会保护标准负载电池等全部指定核心。原生商店顺序为技能→治疗→出售→购买→合成→强化;“先把核心强化到目标等级并保留技能预算”需要明确动作顺序和每次付款后的验证。
这些确定约束应放在代码和配置里。Jev 只在通过约束的候选之间判断。
## 已接入的决策预留接口
新增 `scripts/decision_router.py`,并接入当前 `jev_mirror_agent.py`。支持四个模式:
| 模式 | 行为 |
| --- | --- |
| `auto`(缺省) | 指定 Jev model 且有凭据时调用 Jev;否则交给执行模型 |
| `jev` | 使用明确配置的 Jev;未配置完整或调用失败时交给执行模型 |
| `executor` | 交给当前执行模型,即使配置里有 Jev 凭据也不调用 Jev |
| `fixed` | 显式使用原固定策略;保留 `LC_FIXED_FALLBACK=1` 的覆盖行为 |
统一接口接收页面状态、合法候选、最近动作和 run ID,返回候选 ID 及决策来源。Jev 成功时保留 model、confidence、probabilities 和耗时;失败时使用执行模型回调或发布交接请求。
嵌入运行时的回调形式是 `executor_decider(request)`,可传给 `DecisionRouter` 或当前主脚本的 `main(executor_decider=...)`。它可返回候选 ID,或 `{"request_id": "同一个请求 ID", "choice": "合法候选 ID"}`。执行模型得到独立的观测和候选副本,不能通过修改请求来改变执行器持有的动作。未列出的候选和不匹配的请求 ID 被拒绝。凭据及 Provider 配置不在交接内容中。
独立脚本没有访问当前聊天模型的 API,因此通过 stdout、状态文件及 `decision_request.json` 发布 `requires_decision` 并退出当前控制循环。调用方的执行模型接收交接、重新检查页面并处理,然后 `--resume` 继续本局;这类状态已加入可续跑集合。嵌入长期执行器时由调用方提供回调,可在同一进程中连续完成选择与执行。
交接请求包括 run ID、request ID、观测、候选、规则和最近动作,并明确要求外部输入前重新观察。它是一次观测的决策通知,不能自动执行遗留请求文件。当前实现尚未提供从响应文件自动消费答案的命令,也尚未实现执行模型的自动调度连接。
### 启动前需要的配置检查
本地当前 checkout 没有 `vendor/aalc/config.yaml`,其他电脑实测反馈也没有提供完整运行配置。配置表依据源码和示例文件,不代表已读取另一台电脑的实际配置。
未来增加只读配置预览,列出有效队伍、队列、镜牢模式、开局配置、商店策略、卡包权重及与额外约束的冲突。沿用 AALC 现有队列迁移规则,不能随意重建队伍序号。
`Mirror_task()` 在没有适用队伍或队列为空时直接退出循环(`script_task_scheme.py:321–325`),当前任务包装仍可能以 0 退出并报告 `succeeded`。启动预检查应阻止这种空执行;运行结果应包含请求次数、实际完成次数和结算状态。
## Jev 接入方案
OpenCode 官方列出 `jev-1.13`、`jev-1.13-free` 及 `https://opencode.ai/zen/v1/systemone`,支持 `choice`、`noul`、`score` 和单请求多问题。免费别名被标为限时提供,不能把它硬编码为长期可用前提。[OpenCode:Jev](https://opencode.ai/docs/zen/#jev)
TypeSafe 直连接口使用 `https://api.typesafe.ai/v1/systemone`。Provider、model、endpoint 和对应凭据应成套配置;不能直接把 Zen 凭据或模型别名套入另一个 Provider。[TypeSafe:API](https://docs.typesafe.ai/api)
统一 Provider 选择已由本次 `DecisionRouter` 落地;后续完善场景输入及客户端生命周期:
- 已读取实际 model,校验候选 ID 和响应类型;Provider endpoint 与 timeout 的完整配置仍待扩展。
- 已保留 choice、probabilities、confidence、返回 model 和请求耗时,并记录交接原因。
- `choice` 用于当前路线、事件选项或合法商品选择;`noul` 可判断某事件描述是否包含额外战斗;数量、预算、刷新次数和楼层比较由代码计算。
- 同一页面上相互独立的问题可以合并成一次请求,例如事件选项分类与选项选择;需要先买入商品才能知道的新库存不能在旧状态下并行决定。[TypeSafe:多问题模式](https://docs.typesafe.ai/patterns/fan-out)
- 429 使用有上限的退避及可恢复的冷却状态;可行时读取 Retry-After。401/403 单独记录配置问题。重试失败不自动切换到付费模型。
- 合法确定动作在回退期间可继续执行。未知选择按当前策略重新观察或暂停,不能将回退称为 Jev 已成功判断。
Confidence 是根据选项概率计算的统计量,不能直接当作“动作正确率”。应保存它及前两名的差距,用本项目标注样本分别校准事件、卡包和商店阈值。[TypeSafe:Confidence](https://docs.typesafe.ai/confidence)
官方明确指出 Jev 的精确计算、复杂间接推理、无关长状态和候选顺序等局限。对应本项目应做候选预过滤、使用每场景短规则,并在离线评测中变换候选顺序检查一致性。[TypeSafe:Jev 1.13 局限](https://docs.typesafe.ai/model-jaggedness/jev-1.13)
JSON 状态经 Zen 网关的实际兼容性仍需真实请求确认;适配层可先将精简 JSON 序列化为字符串,保留同样字段与语义。此次没有做 API 可用性或中文准确率实测。
## 实测日志对速度优化的约束
由新工具 `scripts/analyze_feedback.py` 统计,完整数据和输入 SHA-256 见 [统计结果](feedback_latency_profile_20261003.json)。
| 指标 | 2026-10-02 第一批日志 | mirror_20261002_181322 |
| --- | ---: | ---: |
| JSONL 记录数 | 273 | 409 |
| 动作记录数 | 273 | 408(另 1 条为 new_run) |
| 正值 `jev_ms` 记录 | 222 | 0 |
| 记录的 Jev 耗时之和 | 331.526 秒 | 0 秒 |
| 正值 Jev 中位数 / P95 | 1.203 / 2.296 秒 | 无 |
| battle 批次数 | 74 | 51 |
| 记录的 P+Enter 尝试数 | 842 | 1080 |
| wait 动作数 | 70 | 144 |
| 单独记录 `ocr_ms` / `action_ms` | 均无 | 均无 |
第一批日志是过程快照,最终记录说明通关后由用户按 Enter 确认领取,不能作为全自动完成证据。第二轮 `run.json` 记录因 HTTP 429 回退、两次游戏重启及最终人工接管,总时长 9738.9 秒;没有记录完成镜牢或领取最终奖励。
正值 `jev_ms` 是日志所记录请求耗时,失败或未落盘的请求可能不在其中。P+Enter 次数是输入尝试,不是游戏接受次数或战斗回合数。动作时间戳跨度包含加载、停顿与人工处理,不能按截图或时间差推断 OCR、游戏动画和人工时间的各自占比。
从现有证据可以得出:降低 Jev 延迟是可测量的一部分,但无法单独解决第二轮的长时间卡住和接管。必须同时提高状态识别、关键目标完成率和无进展恢复能力。
### 优先验证的速度改进
| 改进 | 源码依据 | 测量方式 |
| --- | --- | --- |
| 模板先识别场景,再按场景做局部 OCR | 当前 `get_state` 整帧 OCR;许多页面已有 AALC 特征模板 | 同一截图集对比识别准确率与 capture/template/OCR 耗时 |
| 复用一帧观测及已核实目标坐标 | 当前 `click_text` 在 `get_state` 后又做一次 OCR(`protocol.py:151–164`) | 统计一次场景动作中的 OCR 调用数;输入后检查观测失效 |
| 一次 Jev 决策运行一段 AALC 流程 | 当前路线、事件、商店多次 MCP 往返,确定步骤也可能反复决策 | 每节点、每商店的 Jev 次数、MCP 次数、耗时与失败率 |
| 保留地图路线缓存,按需求更新节点成本 | AALC `MirrorMap` 缓存路线;图权重 event=1、shop=2、battle=4 | 选路误判率、实际战斗次数、每层耗时;不能用“总选上方”代替 |
| 以场景变化结束等待,保留有上限的重试 | AALC 商店、卡包、路线有固定等待;当前 agent 也有固定 sleep | 动画完成到下一动作的空闲时间、漏输入率及卡住时间 |
| 检测语义状态无进展并重新识别 | 旧记录存在重复战斗输入、特殊商店漏判和无响应 | 当前回合/场景关键标志等语义状态的停留时间,避免把战斗动画当无进展 |
**不能仅调配置就宣称当前 MCP 加速。** AALC `auto.take_screenshot()` 默认按 `screenshot_interval`(0.85 秒)节流,但 MCP `_grab()` 直接调用 `ScreenShot.take_screenshot()`,不经过该节流。把配置间隔调小不会直接改变当前 `get_state` 的耗时。`mouse_action_interval` 也只覆盖相关 AALC 操作,不能替代 agent 内部固定等待。
当前后台按键的按下/释放持续时间是先前可靠性验证的一部分。应先减少重复观测和跨进程往返,再根据游戏接受率调整间隔,不能用按键尝试数增长作为速度改善证据。
## 单一执行进程与接入边界
当前 MCP 已在 AALC 长任务运行时阻止手动输入(`protocol.py:145–146`)。混合模式应让同一个任务进程读取配置、观察页面、请求 Jev、执行 AALC 动作并发布状态;主 MCP 负责启动、状态和停止。
`Mirror` 初始化时复制 TeamSetting,并持有 Shop、地图缓存与统计状态,适合在一次运行中持续复用。不能每次 Jev 选择后重新启动整套 AALC 任务,也不能让外部 agent 与正在运行的 AALC 同时操作。
原生 AALC 尚没有通用决策插件接口。`Mirror.run()` 直接调用模块级 `select_theme_pack()`;仅继承 `Mirror` 不能自动接管该分支。接入需要明确边界:
1. 先在 lc-mcp 增加配置检查、统一 DecisionClient 和页面状态层。
2. 建立一个持续的混合任务进程,持有本次 Mirror/Shop 状态。
3. 为地图、卡包、事件、商店目标添加小范围决策钩子或适配入口;保留已有执行方法。涉及 AALC 调用点的改动需以独立、可维护的补丁管理,避免全局 monkeypatch。
4. 对带有角色、楼层及核心预算要求的商店流程使用专门适配,不能直接调用整段 `Shop.in_shop()` 并假定其固定顺序符合额外规则。
## 实施顺序与验收
| 阶段 | 交付 | 先通过的检查 |
| --- | --- | --- |
| 1. 状态与配置 | 只读 profile 预览、队伍预检查、页面状态合同、分段计时 | 不导入有副作用的配置初始化来做静态预览;不泄漏凭据;空队列明确报错 |
| 2. Jev 决策 | 统一 Python 客户端、紧凑输入、概率保留、429 冷却恢复 | 离线响应回放覆盖未知候选、低信息、限流、超时和中止;真实连接测试单独记录 |
| 3. AALC 复用 | 单进程混合执行、地图/事件/卡包入口,再逐步接商店 | 关键目标有结果证据;候选过期停止;运行中可取消;原配置与额外约束同时遵守 |
| 4. 提速实测 | 基线与混合模式在同机、同队伍/规则/分辨率下比较多次运行 | 全自动完成及确认领取、人工接管次数、每层/每商店耗时、无进展时间、OCR/Jev/MCP 次数 |
新增计时应至少分为 capture、template、ocr、decision、input、等待及验证;为失败的 Jev 请求另记 attempt 延迟。保存实际决策引擎、model、profile 摘要哈希、页面类型、执行目标和结果证据。此前 `ocr_ms` 实际包裹整个 `get_state` 往返,不能称为纯 OCR 内核耗时。
离线截图集先覆盖已知问题:紫色可达节点、特殊商店、加载中的旧库存、事件判定、卡包楼层限制、最终领取及返回大厅。用标注页面/选项评估识别和决策,随后做实机验证。没有相同条件的新实测前,不承诺具体通关分钟数。
## 本次可复现产物
- 本报告:`docs/jev_aalc_automation_research_20261003.md`。
- 离线页面状态及请求样例:`docs/jev_page_state_example_20261003.json`。
- 日志统计:`docs/feedback_latency_profile_20261003.json`。
- 统计工具:`scripts/analyze_feedback.py`(标准库,只读日志,不连接游戏、MCP 或网络)。
在仓库根目录运行:
```powershell
python scripts/analyze_feedback.py docs/feedback/2026-10-02/logs/jev_mirror_log.jsonl docs/feedback/mirror_20261002_181322/actions.jsonl
```
决策接口实现:`scripts/decision_router.py`,主脚本接入及续跑支持:`scripts/jev_mirror_agent.py`、`scripts/run_state.py`。验证覆盖 Provider 路由、无配置交接、Jev 限流/超时/无效回复、候选及请求 ID 校验、交接无输入和本局续跑。
本次全量离线回归:124 项全部通过,耗时 8.670 秒。执行模型回调到路线动作的闭环使用 mock MCP 验证;图片匹配使用真实测试截图离线验证。日志统计重新生成一致,缺失耗时没有被当成 0。`git diff --check` 通过。
本次未改变正在运行的输入方式、系统驱动或 AALC 运行配置;未发送真实 Jev 请求。完整 AALC 混合执行器、配置工具和分段识别方案仍为后续实施设计。
+69
View File
@@ -0,0 +1,69 @@
{
"schema_version": 1,
"source": {
"mode": "offline_fixture",
"fixture": "tests/fixtures/floor4_white_events.png",
"sha256": "55ecd21353493b15c2967a7f6a0de34ce6ce9e3402eac63a42a69f74234ebcc8",
"recognizer": "scripts/jev_mirror_agent.py:map_candidates",
"method": "OpenCV template matching, arrow brightness and ORB icon matching; no vision-model API"
},
"observed_candidates": {
"route_w": {
"description": "上方有高亮可达节点:事件,图标匹配数53,中心(1059,343)。按方向键选中后直接回车进入,无需二次确认。",
"action": {
"tool": "route",
"args": {
"key": "w"
}
}
},
"route_d": {
"description": "正前方有高亮可达节点:事件,图标匹配数30,中心(1059,680)。按方向键选中后直接回车进入,无需二次确认。",
"action": {
"tool": "route",
"args": {
"key": "d"
}
}
}
},
"jev_request_example": {
"model": "jev-1.13-free",
"state": {
"scene": "map",
"scene_evidence": "Bus template and adjacent-node observations from the offline map fixture",
"floor": {
"value": null,
"status": "not_extracted_from_this_image"
},
"routes": [
{
"id": "route_w",
"observation": "上方有高亮可达节点:事件,图标匹配数53,中心(1059,343)。按方向键选中后直接回车进入,无需二次确认。"
},
{
"id": "route_d",
"observation": "正前方有高亮可达节点:事件,图标匹配数30,中心(1059,680)。按方向键选中后直接回车进入,无需二次确认。"
}
],
"goal": "Prefer a reachable event or shop over battle when the node type is reliably identified."
},
"questions": {
"next_route": {
"type": "choice",
"instructions": "Choose one supplied route from the current observations. Choose reobserve if the available information is insufficient.",
"criteria": {
"route_w": "上方有高亮可达节点:事件,图标匹配数53,中心(1059,343)。按方向键选中后直接回车进入,无需二次确认。",
"route_d": "正前方有高亮可达节点:事件,图标匹配数30,中心(1059,680)。按方向键选中后直接回车进入,无需二次确认。",
"reobserve": "Refresh the local template/OCR observation if no route has a reliably identified type."
}
}
}
},
"limitations": [
"Offline recognition only; the example request was not sent to Jev.",
"The existing recognizer emits textual node descriptions rather than typed node fields.",
"Reachability/icon-match observations do not establish a calibrated accuracy or confidence probability.",
"The adapter must validate structured state support at the configured gateway; JSON-as-text is a compatible fallback."
]
}
+23
View File
@@ -0,0 +1,23 @@
# MCP 运行可靠性改进(2026-10-03)
基于 `97eca204` 的代码与另一台电脑提交的 2026-10-02 实测资料,修复离线复现确认的问题。改动未修改 AALC 子模块、输入后端或系统驱动;未启动游戏或重启常驻服务。
原先运行结束后,`claim_requested` 等上下文会遗留在磁盘。下一次执行器若读到这个标记与大厅文字,会把一个新的运行记录直接写成完成。现在运行记录与上下文共享 `run_id`;已完成局的状态不会被新局复用。领取和返回截图绑定当前局,缺少证据时不能设置完成字段。默认续跑有效的未完成记录;`--new-run` 建立全新状态,`--resume` 要求已有未完成记录。
旧版本未完成记录允许迁移:保留楼层、强化等进度,删除未绑定当前局的领取及战斗标记。没有运行记录的孤立上下文会重置。两份记录的标识不一致时停止并报告原因。JSON 快照改为临时文件写完后原子替换,中断不再留下半份 JSON。战斗上下文随当前局保存,也不再为推断它而读取全部历史动作日志。
原先客户端会无限阻塞在回复读取上;标准错误管道无人读取时也可能堵住子进程。现在标准输入、输出和错误流由独立线程处理,请求有期限,并在等待期间检查停止标记与运行预算。默认期限 30 秒,文字等待工具按其轮询时长增加 5 秒余量,仍受控制器总预算约束。初始化失败、超时、停止或无效回复均清理客户端子进程和管道。错误日志仅保留有限尾部供本地诊断。
超时不代表远端动作没有执行。客户端关闭连接后不会重放请求;状态日志记录 `outcome_unknown` 和相关工具名。停止或总预算耗尽时标记 stopped;超时和其他异常标记 requires_analysis。领取、完成、要求分析和异常终止会留下日志;步骤上限到达时也有明确停止状态。固定候选模式不再强制要求无用的 API 密钥。连接清理即使出错,也会释放执行器互斥句柄。
独立 `battle_batch.py` 原先漏掉判定、奖励卡与全员死亡界面。现在两个战斗入口共享场景识别,并在每个按键前检查停止标记和预算;空 OCR 的特写仍允许继续当前战斗,明确的退出界面则返回。新客户端在等待 MCP 回复期间也能响应停止。普通睡眠与已接收的服务端操作不保证立即取消。
MCP 请求现在先验证 JSON-RPC 外层、参数对象与工具名称/参数类型。坏请求返回协议错误,后续合法请求继续处理;通知不返回响应,也不能作为无 ID 的输入调用执行。`null` 请求不再被当作空行忽略。另修复完整任务启动与已经开始的手动输入之间的竞态:忙碌时立即拒绝启动完整任务,查询与停止任务仍不等待游戏工具锁。
验证使用 Python 3.12 的临时环境。全套 unittest:**105 项通过,无跳过**,其中原有 73 项,新增 32 项。新增测试包含真实子进程管道的无响应、阻塞写入、密集 stderr、中文响应、初始化失败与取消;还通过实际 bridge 连入隔离的 FakeEngine TCP 服务,验证新客户端与原有桥接的兼容性。其他测试核对旧状态迁移、领取证据、原子写入失败、任务并发、按键中途停止和终止界面。所有游戏输入均为 mock 或 FakeEngine,没有操作真实游戏。
测试通过证明这些离线边界已修复,不能证明自动通关或提速。另一台电脑的第一局最后确认由用户完成,第二局以人工接管结束;后续完整流程、截图识别和速度效果仍需要新的一局实测。商店合成/强化、未明确识别的事件等仍可能要求主助手核对。约 70 MB 历史截图压缩包未下载,已分析保存的独立证据截图与日志。
下一轮实测应从开局到领取后返回大厅使用同一 run_id,保留人工干预记录;出现 outcome_unknown 时先核对游戏画面,避免重复确认已经执行的操作。新开局使用 --new-run,重启游戏后继续同一存档使用 --resume。停止文件需要在准备继续时移除。
本轮提交只包含程序、测试和说明文件,没有包含个人运行记录、凭据、虚拟环境或历史物理驱动资料。
+173
View File
@@ -0,0 +1,173 @@
# 镜牢速通:破裂黎明/黑兽纯 P
记录日期:2026-10-01;用户规则更新至 2026-10-02。
目标:尽快完成整局,按楼层推进;保留关键强化与换技能,减少无关运营。
## 开局固定配置(用户明确指定)
1. 星之恩惠选 :**起始之星、星际旅行、全面的可能性**。
2. **恩惠保持基础等级,不强化**;不要点击单项或全部强化按钮。
3. E.G.O. 饰品选**破裂**组的**荆棘套索、荧光灯**。
4. **一般不需要额外观测饰品**;用户新例外允许选择破裂体系的**雷枝**,取得后在后续商店强化。其他无关观测仍拒绝。
5. **入层三级饰品选择“标准负载电池”**(简称“电池”)。
注意:不强化的是开局星之恩惠;二层的**符纸 ++**仍然必须做。
**饰品只能在商店强化**;地图饰品窗口的 +/++ 是效果预览。二层遇商店优先把成捆的符咒强化到 ++,以实际强化标识确认。
## 楼层推进顺序
**符纸的游戏内名称为“成捆的符咒”**(用户截图确认):Ⅰ级破裂饰品,图标是黑色底板上的两张折叠符纸,带红色符文和黄色纸边。按此名称与图标识别卡包奖励。
| 楼层 | 优先操作 | 有余力再做 |
| --- | --- | --- |
| 1F | 优先选通关奖励含**符纸**的卡包,取得符纸;遇商店按下表换技能。 | — |
| 2F | **符纸强化到 ++**;优先选 **Hell's Chicken**,主动获取**鸡胸**以维持破裂层数;按下表换技能。 | 非核心材料足够时合成快感并强化 ++。 |
| 3F | 菲辛的换技能目标改为 **1 → 3**;选可纯 P、战斗较短的卡包;尽量完成快感合成及 ++。旧称 Bearable 尚未对应正式名称,不作为固定首选。 | 强化已取得的雷枝。 |
| 4F | 继续推进、按下表换技能。 | 补做快感 ++ 和缺失的相关饰品。 |
| 5F | **必选“2号线”卡包,第一至第四层禁止选择它**;优先换技能并通关,不必专门做斩击四级饰品。 | 卡包刷新次数为零时允许卡包观测;顺路高级饰品。 |
没拿到鸡胸也继续推进,**不要因此重开**。饰品与换技能竞争资源时,优先关键技能;符纸 ++ 的优先级保留。
## 快感合成:先区分普通/特殊商店
用户补充(2026-10-02):**取得快感后,必须在商店强化到二级(++)再继续。** 在强化界面选择 ++,支付实际报价并确认库存名称为“快感++”;只看到 ++ 效果预览不算完成强化。
最新要求:**尽量在第四层前合成快感并强化至 ++**,优先第二、三层商店;第四层只是补做机会。预留符咒 ++、快感强化及关键技能替换预算,用现有非核心材料,不无界刷新、合成或重开。
**雷枝是允许观测的破裂饰品例外**:出现时可领取,之后在商店强化;保留它,不用作合成材料。雷枝强化级数按实际报价和预算处理,用户未指定必须 ++。开局三级三选一仍选标准负载电池,不用雷枝替代。
快感属于普通合成池的四级破裂饰品,不是固定材料配方。商店选择“合成饰品”并指定破裂,用非核心材料达到当前商店的四级门槛;以界面显示的产物等级和关键词预览为准,不能把出四级理解为必出快感。
| 商店 | 四级门槛 | 可用材料等级组合 |
| --- | --- | --- |
| 普通商店 | 总点数 ≥25 | 332=26;重合可用 431=28、422=27 |
| 特殊商店 | 总点数 ≥22 | 322=22、331=23;重合可用 421=24 |
材料点数:Ⅰ=3、Ⅱ=6、Ⅲ=10、Ⅳ=15。普通商店的 322/331 只出三级,在特殊商店才可出四级;**特殊商店的 411 仅21点,仍不够四级**。特殊商店最多放5件材料;2222=24点也可出四级,具体组合按非核心库存和词条成功率选择,不为了凑固定数字消耗核心饰品。
2/3/4–5件材料命中指定词条的基础概率为60%/90%/99%;每次花5星芒祈愿可提高为90%/99%/99.99%。这是词条概率,不是快感本身的概率。没出快感时,先按商店类型重新计算点数,不照搬普通商店组合。符咒++、电池、鸡胸等核心保留。
核对日期:2026-10-02。[名与蛛之镜:合成规则](https://limbuscompany.huijiwiki.com/wiki/名与蛛之镜)。
本局实测:四层特殊商店用非核心Ⅲ+Ⅱ+Ⅱ,预览四级破裂;消耗5星芒祈愿(2826→2821),实际合成“快感”。材料点击选入,不拖拽。一次成功不代表此组合必出快感。
本局强化实测:快感从基础直接选择 ++,支付300经费(1360→1060);库存名称已确认为“快感++”,回合开始施加6强度、3层破裂,回合结束最多计算10层。费用以当次界面报价为准。
## 技能替换速查
箭头表示“用左侧技能换成右侧技能”。
| 人格 | 1–2F | 3–5F |
| --- | --- | --- |
| 菲辛 | **1 → 2** | **1 → 3** |
| 黑兽奥 | **2 → 3** | **2 → 3** |
| 其他人格 | **1 → 3** | **1 → 3** |
看到符合上表的替换通常直接换,少做反复比较。
用户补充(2026-10-02):商店没有出战角色可替换技能时,允许刷新,**每个商店至多 4 次**。有出战角色可换时按技能表执行;达到上限即继续推进。
刷新后出现 CONNECTING 时,旧库存仍可见;必须等加载结束,禁止据旧库存再次刷新或退出。有未购买的出战角色技能替换时先完成替换,不能直接离开。快捷键一次未生效即点击当前对应按钮。
特殊商店同样执行强化与换技能;标题识别必须包含“特殊商店”。2026-10-02 实际漏识导致二层提前退出,已修复并增加回归测试。二层起符咒未确认 ++ 时禁止自动离开。
用户补充:离开商店时直接按回车快速退出,不再额外检查、观察或询问;只有回车未生效时才点击弹窗确认。
## 层末苦难
- 除必需饰品外,选择**不加敌方血量、不加防御等级**的选项。不要漏选后让系统随机分配苦难;
- 层末必须先选择苦难再直接推进,不能把此界面误当额外饰品观测而默认拒绝。
- 用户补充:每层选完奖励后直接连续回车确认并进入下一层,不再额外检查、观察或询问;未生效才点击对应按钮。
## 场景执行表(优先减少重复步骤)
| 当前画面 | 固定操作 | 到哪里再重新决策 |
| --- | --- | --- |
| 进入镜牢确认弹窗 | 直接 Enter;未生效立即点击确认 | 开局或恢复的当前界面 |
| CONNECTING/加载 | 等待,不购买、不刷新、不退出 | 新画面加载完成 |
| 上层确认弹窗 | 只操作弹窗按钮 | 弹窗关闭 |
| 地图节点/关卡编队 | 方向+Enter;编队界面再 Enter | 战斗或下一个选择界面 |
| 战斗 | 持续 P → Enter,不分析拼点、不逐按钮调用模型 | 结算、奖励、地图或事件 |
| 事件对话 | SKIP;再用 Enter 推进 | 选项或罪人判定出现 |
| 事件选项 | 已有无需战斗/判定的直接领取分支就选,避免反复滚动 | 下一处分支或结果 |
| 事件结果 | Enter 推进;可见“继续”且按键无效就直接点击 | 返回地图 |
| 商店 | 可换出战技能先换;无可换技能再刷新,最多 4 次 | 新库存;不根据加载旧库存继续操作 |
| 层末多卡奖励/苦难 | 先选饰品和苦难,再确认推进 | 下一层;不能按“额外观测”默认拒绝 |
| 最终结算 | 点击“领取” → Enter 确认;无效就点确认 | 返回主界面,结束执行 |
无变化判断比较界面标题、选项、按钮状态,忽略录像计时和战斗动画中的数字。快捷键一次未生效就回退按钮;不重新核对已确定的编队、路线或技能表。卡包详情已读过的结论应保留,不能关闭后再次从零观测同一卡包。
## 执行原则
- 战斗循环按 **P → 回车**,直到结束;不逐回合截图分析,只在检查是否已结算时查看画面。
- **事件判定先点击 SKIP 跳过对话**,再选择事件选项、罪人或进行判定;SKIP 可用时不提前处理判定。其他对话也优先 SKIP,可用回车加快。
- 事件对话跳过后,继续按回车直到出现罪人选择界面;判定结果出现后快速连按回车结束事件。固定推进不逐按钮请求模型。
- **回车**可触发对话及其他按钮;有明确的确认、继续按钮时,优先使用快捷键。
- 路线优先选择可直接结束的事件、商店等非战斗节点,避免为小奖励增加复杂判定。
- 商店保留符纸 ++、关键维持饰品和快速换技能;略过无关采购、合成与反复比较。
- 困难镜牢与视频条件未全部核对,按当前画面修正,不能把视频用时直接套到当前局。
- 电脑操作优先使用用户安装的 limbus MCP 后台接口;只运行一个执行器,不抢前台焦点。用户要求快速执行,战斗使用有界 P+回车宏;需要选项的界面核对当前画面。
## 事件选择与可复用 skill
- 按**整局用时**选择:优先核心符咒/鸡胸,其次即时恢复、经费或直接结束;避免额外战斗、多段判定和无关奖励。大量理智损失可能拖慢后续纯 P。
- **炸鸡对决选第一项**,直接获得鸡胸与鸡翅;第三项也给鸡胸,第二项仅鸡翅。
- 当前游戏译名:鸡胸为**干巴柴涩鸡胸肉**,鸡腿为**火热多汁琵琶腿**。
- 商店符咒强化可直接选 **++**,本局一次支付 **150 经费**完成;以当前报价为准。
- 可复用 skill:[$limbus-mirror-speedrun](skills/limbus-mirror-speedrun/SKILL.md)。[事件速查表](skills/limbus-mirror-speedrun/references/event-choices.md)按名称查询,以当前选项文字核对编号。
## 游戏内快捷键(用户操作指南截图)
- **P → Enter**:胜率/伤害按键后开始战斗/行动。
- **Enter/Space**:弹窗确认、故事跳对话、提取跳动画、选项事件加载下一段文本;对话也可直接点 SKIP。
- **战斗 Space=暂停/继续**,不加入战斗循环。
- **关卡/商店:方向选中后直接按 Enter 进入,无需再次确认**(用户补充);执行器将选方向+回车合并为一个动作。
- 进入关卡后的编队界面继续按 **Enter** 开战,不再次检查编队;沿用原队伍。
- **快捷键未生效时立即改用鼠标点按钮**,不反复尝试(用户补充)。
- **地图 ↑/↓/→ 或 W/S/D**:移至下个节点后直接回车进入;**←/A**:取消节点选择;**Q/E**:地图左右平移。
- 战斗 **方向键/WASD** 移动视角,**滚轮/Q/E** 缩放,**Tab** 显示拼点箭头。
- **F1** 打开操作指南;**Esc** 随界面关闭弹窗、取消、返回或退出。完整表见 [快捷键速查](skills/limbus-mirror-speedrun/references/shortcuts.md)。
## Jev 接入(用户授权)
- 已实测 `jev-1.13-free` 决策接口返回 HTTP 200,耗时约 1.3–1.5 秒;端点为 `https://opencode.ai/zen/v1/systemone`。
- 客户端:[jev_decision_client.mjs](../scripts/jev_decision_client.mjs)。凭据由环境变量或未跟踪的本地配置提供,上传源码与反馈时排除凭据和配置文件。
- 用户更新(2026-10-02):固定场景、路线与常规动作均交给 Jev;仅在它返回 `requires_analysis` 或具体接口故障时由主助手排查。执行器只执行已核对的候选动作,不运行模型任意代码。
- 最新战斗指令:开战后仅 P+回车循环到结算,不逐批请求 Jev。批次末只识别是否已结束,战斗特写没有 OCR 文字也继续;结算后交回 Jev。
## 本局实测与待验证
2026-10-02 已看到第五层“探索完成”;点击领取后由用户完成回车确认,随后观察到主界面。此局包含人工纠正,不能记成全自动速通成功。商店加载保护、层末苦难选择和完整自动领取流程已修改并做回归检查,下一局仍需确认实际效果;12 分钟目标尚未复现。
## 2026-10-02 第二局实测(用户接管,未通关)
- 本局计时从 14:19:55.538 接管开始,到 17:33:45 记录用户接管,共 3 小时 13 分 49 秒。包含开局配置、接口等待、修复和全部操作停顿;这是交接前耗时,不是通关用时。
- 入层三级饰品被执行器误当额外观测拒绝,未取得标准负载电池;这是执行错误,不能作为后续默认流程。
- 三、四层所有苦难均增加敌方体力,无法完全遵守“不加血量”;本局选了不加防御等级的组合。拒绝层末奖励会随机附加苦难,不能用它规避负面。
- 2 号线被第四层选用,第五层观测列表显示无法选择。用户明确纠正:**第一至第四层禁止选择二号线,只留到第五层**;本局第五层刷新用尽后观测并选择“时间杀人时间”。
- Jev 遇 HTTP 429,临时使用现有规则的确定性执行器;不能记为 Jev 全程决策成功。
- 本轮修复包括:饰品伤害文字误判战斗、选项中的判定成功误判结果、事件后续推进、加载 OCR 容错、奖励双卡位置、商店技能列定位及服务器错误弹窗优先重试。47 项仓库回归检查通过;本局第五层头目纯 P 团灭一次,死亡重试画面未被战斗循环识别为结束,此处仍需修复。测试通过不能代表整局通关。
- 用户允许最后头目手动拼点/治疗 E.G.O 后,又明确接管。自动执行器已停止。随后用户报告已完成镜牢并领取奖励,记为用户接管后完成,不能记录为自动通关;实际领取时刻未知,交接前耗时不等于总通关用时。
## 2026-10-02 机制核对与电池修复
- 开局三级三选一是“全面的可能性”的奖励,与额外观测分开。**必须选标准负载电池并确认**,不得拒绝;领取后一次核对库存,不每场重复查看。核心符咒、电池、鸡胸不出售、不合成。
- 日志确认第二局 14:34:59 执行了“拒绝饰品”;决策提示漏写电池且通用按钮开放了拒绝。这是执行错误,不是用户没有配置。
- 本地及仓库执行器已补必选电池规则、按卡名选取及确认候选;未知三选一不暴露拒绝,只有明确额外观测才允许拒绝。新增三选一选择/确认、未知卡名禁止拒绝、额外观测及事件结果不误判等回归检查,当前共 **51 项通过**。尚未重新实机验证电池领取,也没有恢复用户接管的游戏。
- 2 号线固定事件、事件、商店、玫瑰标牌,共 4 节点;仍按用户要求只留第五层。拒绝层末奖励不能规避随机苦难。符咒 ++ 的低伤害门槛与斩击补层数是必需强化原因。
- 其余鸡胸当前触发限制、最后商店恢复、替代头目与版本差异见 [机制参考](skills/limbus-mirror-speedrun/references/mechanics.md)。速度判断属于流程推断,未实测为更短整局用时。
## 第二至第四层选包优先级(初步,未逐包计时)
- 第二层缺鸡胸时优先地狱鸡;地狱鸡只在第二层出现,不在三四层反复寻找。已有鸡胸或当前没出现时,从现有候选比较纯 P 可通过性、战斗与头目耗时,不为无关奖励运营。
- 第三、四层核心齐全且长度相同时,初步优先考察 Addicting Lust(因而无人哭泣/长腿精灵)和 Degraded Gloom(悲泣蟾蜍/无头鱼)。两者没有实测固定先后,仅作为机制筛选候选组。
- 压抑的暴怒、空转的怠惰作为次选比较,不能因为上局打过就自动列首选。多波、阶段复杂、未验证纯 P 可通过的头目降低优先级;四节点长线包不自动优于普通包。
- 旧笔记中的 Bearable 尚未对应当前正式卡包名称,暂停作为第三层固定首选。当前 Wiki 卡包总表与旧赛季表存在楼层/头目差异,以当前难度的可用卡包及游戏详情为准。完整条件表见 [楼层规划](skills/limbus-mirror-speedrun/references/rupture-route.md)。
- 第一层仍选带符纸的卡包;第一至第四层禁止二号线,第五层按用户要求优先二号线。以上暂定排序不修改游戏或启动执行器。
## 来源
- B 站 UP 绅士丶蚂蚱:[破裂黎明纯 P 周回](https://www.bilibili.com/video/BV1exaV6yELm/)。楼层规划采用其换技能优先策略。
- 原作者 Cabric:[黎明黑兽五层攻略](https://www.youtube.com/watch?v=h5wFVUd2X2c)。卡包、配队与机制补充来自原攻略。
- [边狱公司 Wiki:探索事件](https://limbuscompany.huijiwiki.com/wiki/%E6%8E%A2%E7%B4%A2%E4%BA%8B%E4%BB%B6)。事件结果于 2026-10-01 核对,速通排序为针对当前纯 P 流程的判断。
@@ -0,0 +1,50 @@
---
name: limbus-mirror-speedrun
description: 继续或重开边狱公司(Limbus Company)的镜像迷宫/镜牢,按破裂黎明与黑兽纯 P 攻略追求整局通关速度;处理开局配置、卡包、事件、必要强化、技能替换与战斗快捷键。用于用户要求代打镜牢或优化此速通流程时,不用于一般配队讨论或主线事件。
---
# 镜牢破裂纯 P 速通
目标是尽快完成用户授权的一局镜牢。接着当前画面推进;只有用户明确要求重开时才放弃当前局。用户后续纠正覆盖本 skill 的默认配置。
## 读取与续局
- 执行前读取 [破裂黎明配置与楼层规划](references/rupture-route.md)。沿用用户配好的队伍、难度、出战顺序,不为了通用攻略改动配置。
- 开局三级饰品三选一必须选**标准负载电池**并确认领取;额外观测是另一界面,不能把三选一拒绝。研究机制、判断替代卡包或恢复时,按需读 [机制与版本核对](references/mechanics.md)。
- 遇事件时在 [事件速查](references/event-choices.md) 搜索事件名称或饰品名,只读相关条目。减少额外战斗、判定和分支,保留核心饰品与能节约后续战斗时间的即时恢复。
- 续局先取得当前游戏画面,识别楼层、界面及关键强化是否完成;不要把旧截图、坐标或笔记中的局面当成当前状态。
- 未覆盖的事件查原 Wiki 的对应条目一次,按当前选项文字核对。编号只是辅助,同名复刻/折射事件可能不同。
## 快捷操作
当前用户已安装并授权 `limbus` MCP。优先使用其后台截图、OCR、按键、点击与长按拖拽,不切换前台焦点或移动系统鼠标。先检查任务状态;同一时刻只运行一个执行器,AALC 完整任务运行期间不要叠加手动输入。MCP 无法使用时再读取 `computer-use` skill,使用其允许的原生接口。
- **战斗:P → Return(回车)**,重复至结算。用户明确允许战斗批量操作,无需逐回合截图或分析拼点。先确认已进入战斗,再执行有界短批次,让动画完成,批次末检查结算;避免循环跨入奖励、事件或商店界面。
- 用户更新(2026-10-02):进入关卡后的编队界面也直接按回车开战,保留原队伍,不再次检查或确认编队人员。
- **事件判定先点击 SKIP 跳过对话**,跳完再选择事件选项、罪人或进行判定;SKIP 可用时不提前处理判定。其他对话也优先 SKIP,可用回车加快。确认/继续按钮明确且回车适用时用快捷键;事件和奖励按选项文字选择。
- 用户补充:SKIP 后连续回车推进到罪人选择界面;判定结果出现后快速连按回车结束事件。固定推进无需逐按钮调用模型,到分支选择时再决策。
- 快捷键发送后未生效,立即按新画面用鼠标点对应按钮;不反复尝试同一快捷键消耗时间。
- 层末选足奖励后连续回车确认并进入下一层;商店完成必要操作后回车离开。不增加额外观察或询问。取得快感尽量安排在第四层前,并在商店强化至 ++;饰品观测允许选雷枝,随后在商店强化,详见楼层规划。
- 最终结算点击“领取”后,继续按回车确认;未生效再点击确认按钮。看到“探索完成”后仍需领取并确认,不能只停在结算页。
- 游戏快捷键以用户提供的操作指南为准,读 [快捷键速查](references/shortcuts.md) 再使用地图导航。方向键或 W/S/D 选择节点,**选中后直接按回车进入,无需再次确认**,将选方向+回车合成一个动作;空格在战斗中是暂停/继续,不放进 P+回车循环。
- 用户要求快速执行:明确的连续确认、地图进入和开始战斗可合并为短批次,留出必要加载时间;不要每按一个按钮都截图。到事件、奖励、卡包等需要选择的界面再观察。界面变化不确定或快捷键失败时重新观察。
- 卡包下拉使用 MCP `drag`,保持左键按下并缓慢拖动;以当前截图核对起点、终点与选择结果。用户明确要求自行修复拖拽,不能仅因快速拖拽未被识别就交回用户。
- 有确认弹窗时仅操作弹窗控件;背景中的同名按钮仍可能被 OCR 识别,不能再次点击背景“离开”代替弹窗“确认”。
- 用户按 Esc 中止电脑操作或发出停止指令,立即停止该轮原生操作,不自动重试。
- 用户接管游戏时立即停止所有执行器输入;优化脚本或笔记不代表获准恢复游戏操作。批量动作每个按键前检查停止标记,记录接管耗时,未见最终领取完成不能记作通关。
## 速度与完成标准
用户最初指定 Jev 负责场景、路线及常规操作决策。后续指令(2026-10-03)要求保留执行模型接管:配置 Jev 模型和凭据时使用 Jev,未配置或调用失败时交给执行模型。调用方式见 [决策接入](references/jev.md)。最新战斗指令优先:一旦战斗开始,仅执行 P+回车直到结算,不再逐批请求模型;有界批次末只检查是否结算,未结算继续下一批。执行器仅暴露当前画面核对过的候选动作,不能执行模型返回的任意代码。仓库执行器为 [scripts/jev_mirror_agent.py](../../../scripts/jev_mirror_agent.py),运行目录默认是 `~/lc_mcp/jev`,可用 `LC_JEV_HOME` 覆盖;状态文件为 `jev_mirror_status.json`。
略过无关观测、采购、调队和反复比较,保留符咒 ++、快感 ++ 与关键技能替换。雷枝是用户允许的观测例外,不将此授权扩展为所有饰品的无界观测。大量理智损失可能增加纯 P 战斗回合,不能只按当前事件点击次数选择。
加载画面会保留旧库存/按钮;CONNECTING 未结束时禁止输入。场景处理先识别上层弹窗,再处理背景界面。层末多卡饰品与苦难必须选择后推进,不能混用单卡额外观测的“拒绝饰品”。识别无变化时忽略录像计时与动画数字;已经读过的卡包详情保留结论,避免重复观测。
持续到本局通关结算,或用户中止/必须手动接管的具体步骤。只有看到最终通关结算才能报告完成。研究完攻略或做完一层不算通关;不承诺复现视频的 12 分钟用时。
用户纠正流程时,在授权范围内更新相应参考文件和仓库 [速通笔记](../../mirror_dungeon_speedrun_notes.md);先读笔记,保留用户其他编辑。攻略资料核对日期:2026-10-02;执行接口说明更新于 2026-10-03。
## 文档与程序的对应范围
本 skill 和参考文件是执行助手的工作说明,文件存在不表示 Python 自动加载全部攻略。当前脚本把部分用户规则写入 `SYSTEM_RULES`、候选筛选和动作宏;楼层完整目标、事件速查与合成预算还需要进一步接入。按当前游戏文字核实强化、库存和预算,不能用文档中的期望状态代替实际持有状态。具体对应关系见 [执行流程与资料覆盖](../../execution_flow_and_guide_coverage_20261003.md)。
@@ -0,0 +1,112 @@
# 镜牢事件速查:以整局用时为原则
核对日期:2026-10-01。结果依据[边狱公司灰机 Wiki:探索事件](https://limbuscompany.huijiwiki.com/wiki/%E6%8E%A2%E7%B4%A2%E4%BA%8B%E4%BB%B6)的镜像迷宫及活动卡包总览;以下选择是针对破裂纯 P 的速通推断,并非 Wiki 对速度的实测排名。默认队伍仍能顺利纯 P 推进。
## 决策次序
1. 缺成捆的符咒、鸡胸等核心时,优先直接获取。无关免费饰品与资金/即时恢复竞争时,优先能帮助后续换技能和纯 P 的结果。
2. 核心不缺时,选无需判定、无需战斗、可立即结束的离开/恢复/资金选项。两项都立即结束时,选有实际帮助的一项。
3. 避免额外集中战斗、失败会强制战斗的判定、反复尝试及长分支。不为小奖励挑战这些路径。
4. 没有安全直出时,选成功率高且失败不会追加战斗/大幅降理智的一次判定,用界面成功率最高的合适人格。不为事件另配队或花 E.G.O. 资源。
5. 少量生命代价可换取立即结束,但低血或濒临混乱时重新判断。大量全队理智损失可能增加后续回合,不能一律视为最快。
**编号按 Wiki 总览,执行时核对当前文字和结果提示。** 同名复刻、折射与活动版本可能不同;未知条目回查 Wiki,不猜选项。不因这份参考重复观测战斗。
## 核心与佛像
| 事件/识别名 | 默认速通选择 | 原因/条件 |
| --- | --- | --- |
| 无我入定/鲜血装饰/红色坐像 | **1:侧耳倾听** | 无判定或战斗;平均理智≥0 时全体恢复 15 体力、理智,否则直接结束。2 判定,3 战斗 |
| 因而无人哭泣/成捆的符咒 | **1** | 直接取得核心符咒,不走判定或战斗分支 |
| 电击蜈蚣/标准负载电池(起始之镜) | **1** | 直接拿电池;2 判定,3 战斗 |
| 炸鸡对决(地狱鸡) | **1:鸡肉就是鸡肉喽。**,核对奖励 | 当前译名“干巴柴涩鸡胸肉”与“火热多汁琵琶腿”,旧译名为干松紧致鸡胸肉与鸡翅;3 也直接给鸡胸。2 仅鸡翅 |
| 鸡群的激情探戈(地狱鸡) | **2** | 直接拿探戈蘸酱,不为小奖励判定或赌概率 |
| 晚霞旅人/朱红蛾群 | **2** | 无判定,下场战斗前 3 回合提供体力、理智恢复。1 也是免费饰品+即时恢复,当前理智低时可选 1 |
| 简历、奇怪的机器 | 分别 **2、1** | 分别直接获得 50、100 经费 |
| 往昔的睡袋(湖之镜) | **2** | 直接全体恢复体力、理智,不判定 |
| 冠汤翼蜥、你变强了吗 | 分别 **1、2** | 直接全体恢复 10 体力、理智,避开判定或战斗 |
## 常见免费奖励和直出
免费饰品优先于有损失、战斗或额外分支的替代项;另有安全离开项且饰品无关时直接离开。
| 事件/饰品识别名 | 默认选项 | 要点 |
| --- | --- | --- |
| 输血袋 | 1;需要恢复时 2 | 免费饰品或即时恢复 |
| 绅士精灵/绿光果实 | 2 | 免费饰品,避开 1 的二级分支、3 战斗 |
| 悲泣蟾蜍/融落眼球 | 2;低理智时 1 | 1 仅平均理智<25 时恢复最低理智者;2 给饰品 |
| 灰色大衣、刺青大器晚成 | 1 | 免费饰品,替代项可能扣体力或理智 |
| 梦中的电子羊 | **当前第 2 项:你不是特别的。** | 本局游戏文字明确给免费饰品,实际已获得;不要套用 Wiki 总览编号 1 |
| 此刻的神色 | 2 | 免费饰品,1/3 可能有损失 |
| 四百朵玫瑰/卡蜜拉(镜中之镜) | 2 | 免费饰品,避免体力/理智代价 |
| 精灵提灯/仲冬夜梦魇(镜中之镜) | 2 | 免费饰品,其他分支可能战斗或有损失 |
| 凶弹射手/追忆吊坠、特别合约 | 1 | 免费饰品,不判定、不付理智代价 |
| 浸染棉花/白树棉 | 3 | 直接离开;其他项可能反复判定后战斗或直接战斗 |
| 红焰蛾/炼狱炎蝶之梦(起始之镜) | 2 | 直接离开,3 战斗 |
| 石版字符、谷底之星、蒸汽运输机/辉光变动仪 | 分别 2、3、2 | 安全直出 |
| 员工证、夜视镜、止痛片、贪婪之锤 | 2 | 安全直出,避开判定或损失分支 |
| 巫毒娃娃 | 3;需要饰品时 2 | 安全直出或免费饰品 |
| 生存的里程标、异想狩猎 | 分别 2、1 | 安全直出;另一项都是免费饰品 |
| 归乡路途 | 1→分支 1 | 免费饰品,其他路径可能大量降理智 |
| 终末日历 | 2 | 安全直出 |
| 破碎罗盘 | 4;缺经费时 1→分支 1 | 直接结束;另一条拿 50 经费,但增加分支 |
| 拉·曼却领嘉年华游行、旋转木马、折射的四百朵玫瑰 | 2 | 安全直出 |
| 循环往复的信念与承诺 | 2 | 不走多段经费赌局 |
| 舍吾皮肉/肉斩、T公司时间预付机、那一日的语音记录(诅咒事件) | 2 | 直接结束,不为无关诅咒饰品改变纯 P 流程 |
## 没有安全直出时
以下是默认方向,不代替队伍实际成功率;只快速核对当前判定一次。
| 事件 | 建议 | 避免的主要代价 |
| --- | --- | --- |
| 迷失乘客 | 1 的较低门槛单次判定 | 2 直接战斗 |
| 咖啡与纸鹤 | 2 的饰品判定 | 1 成功也有全体体力代价 |
| 轻蔑螺旋/倒错症 | 优先 2 判定 | 1 全体扣体力、理智;3 战斗 |
| 幻痛 | 优先 2,用成功率高的人格 | 1 直接全体降理智 |
| 长腿精灵 | 2 判定 | 1 直接战斗;2 失败仍扣理智 |
| 烟霾铁丝网 | 2 判定 | 失败无损失,门槛较 1 低 |
| Cyclops/失明巨人递来患者记录 | 优先 2:说上面什么都没有写 | 忧郁/怠惰优势门槛14,比1如实回答的忧郁/色欲门槛16低;仍以当前罪人成功率核对。不要仅因1在顶部就选1。[条目](https://limbuscompany.wiki.gg/wiki/Cyclops) |
| 荆棘之路 | 健康且经费足时 2 判定 | 失败失经费;其他路径失败可能全队扣体力、理智 |
| 噬梦浊流 | 默认 1 的较低门槛判定 | 3 战斗;1 失败也恢复所选人格 |
| 古代遗像、保密协议 | 分别 1、2 | 较低门槛,失败无损失 |
| 发条装置/时间不倒翁、受缚之王 | 分别 1、2 | 失败无损失;满级队伍不强求等级收益 |
| 折射的往昔的睡袋 | 优先 1 判定 | 2 全体降 20 理智 |
| 黑色账簿 | 1→分支 1 的选项 1 结束 | 避开全队降理智和额外判定 |
| 镌刻的异文 | 1 判定 | 2 失败触发战斗 |
| 满满当当的燃料罐 | 1 判定胜率明显高时 1,否则与 2 的 50% 战斗概率比较 | 两项均可能战斗,不存在保证无战斗的出口 |
## 活动卡包快速出口
无关奖励不判定;核心缺失、急需恢复时按画面例外处理。
| 卡包/事件 | 速通处理 |
| --- | --- |
| 紫罗兰的正午:培训与机械装置、安保部 | 选 1/2 中相关的免费奖励,避开 3 判定;安保部 3 失败战斗 |
| 紫罗兰的正午:恢复体力、恢复理智值或支付经费 | 1 直接恢复并给 80 经费 |
| 20区的奇迹:诺姆、床 | 2 离开 |
| 肉斩骨断:生锈的刀柄、红色流苏、木质酒杯 | 2 离开;陈旧的刀柄版本为 1 离开,勿混用 |
| 时间杀人时间:T公司税金征收、圣愚的据点、时间杀人现场 | 2 离开 |
| 时间杀人时间:T公司的街道 | 3 离开 |
| 时间杀人时间:T公司征收员 | 1 判定,其他项战斗 |
| 时间杀人时间复刻:圣愚 | 2 离开;已有前置饰品且 3 可直接拿有用奖励时可选 3 |
| WARP:罐装冰淇淋、E型次元短剑 | 分别 3、1 离开 |
| WARP:生物发电型电池、义体关节伺服电机 | 2 免费奖励,省去判定 |
| WARP复刻:休息时发现的硬血武器、有用的装备、卖东西的乘客 | 健康时 2 离开;需要恢复且不挤占关键预算时才付钱 |
| 由子弹画下的句点:锯齿讲台、事务所 | 2 离开 |
| LCB体检:我们就是样本、尝尝看、仔细地观察周围 | 健康时分别 1、2、1;最后一项重伤时可选 2,成败都恢复全体体力 |
| LCB体检:同意调查 | 健康时 2;需要恢复时 1,成败都恢复全体体力 |
| LCB体检复刻:红焰蛾出逃、精灵提灯出逃 | 2 离开,避免失败战斗 |
| 深夜清扫:卯足、忠义锁链、似曾相识的音响 | 2 离开 |
| 憎恶与绝望:憎恶皇后收容单元、脑叶公司仓库 | 2 免费奖励;仓库同时给 50 经费 |
| 切磋琢春:处罚黑兽-酉、奇怪的红布 | 2 离开,不为无关奖励判定 |
| 善意的巡礼:伊比利亚人与阿戈尔人、过去的辉煌荣光、恐鱼食物 | 1 离开 |
| 善意的巡礼:灯塔守卫者与大静谧的故事、与海嗣激战正酣的审判官 | 2 离开 |
| 琥珀色的黄昏:惩戒鸟、1.76兆赫 | 3 离开;已有前置饰品且 1 直接拿有用奖励时可选 1 |
| 琥珀色的黄昏:爱娜温、蜂后 | 2 离开;歌唱机为 3 离开 |
| 绞丝结线:回收环指作品的LCE组员们、野兽派环指画廊、寂静的中指走廊 | 分别 3、2、2 离开 |
| 经验记忆:金笠的过去 1、3 | 1 离开;过去 2 可选 1 免费奖励 |
本文为速通摘要,不覆盖主线探索。Wiki 结果是依据;版本变化或文字不符时回查对应事件,不能套用到同名活动变体。
归因:[边狱公司中文 Wiki 社区「探索事件」](https://limbuscompany.huijiwiki.com/wiki/%E6%8E%A2%E7%B4%A2%E4%BA%8B%E4%BB%B6)。对结果做了节选、概括,并添加速通判断;相关 Wiki 改编内容按 [CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/) 署名及相同方式共享。
@@ -0,0 +1,24 @@
# Jev 场景与路线决策
2026-10-01 用户授权通过其 OpenCode API 接入 Jev,目标为加快镜牢推进。
- 官方接口:`https://opencode.ai/zen/v1/systemone`;用户给的 Go 模型列表中没有 Jev,不把 Go chat/completions 当作 Jev 接口。
- 历史实测 `jev-1.13-free` 返回 HTTP 200,结构为 `answers.action.choice`,当时请求耗时约 1.3–1.5 秒。这不代表当前接口已连接,也不是整局速度保证。
- 当前 Python 执行路径为仓库 [jev_mirror_agent.py](../../../../scripts/jev_mirror_agent.py),通过 [decision_router.py](../../../../scripts/decision_router.py) 选择 Jev 或执行模型,并返回候选 ID、概率及耗时;Jev 请求由 [jev_client.py](../../../../scripts/jev_client.py) 发出(支持 `baseUrl`、`transport: curl`)。仓库另有独立的 `scripts/jev_decision_client.mjs`,Python 主循环不调用它。
- 密钥从 `options.apiKey`、`OPENCODE_API_KEY` 或用户已有本机配置注入;不把密钥复制到脚本、笔记、skill 或日志,也不打印配置全文。重启后若没有凭据,不能假装已接通。
- 只发送精简游戏状态和选项文字,避免整段聊天、其他窗口、完整桌面截图等无关内容。
- 先按用户规则排除不合适的选项,再将候选交给模型。当前界面和用户新指令优先;不把模型置信度当作游戏事实。
- 用户更新(2026-10-02):固定场景、路线及所有常规动作均由 Jev 从候选中选择;主助手仅在 `requires_analysis` 或具体接口故障后介入。战斗动作可包含有界 P→回车短批次。API 短暂错误可重试一次,持续失败交回主助手修复。
- 后续战斗指令覆盖逐批决策:战斗开始后仅 P+回车循环直至结算;有界批次末检查结束标志,战斗中不再调用 Jev 或分析拼点。结算后恢复 Jev 决策。
- 执行器通过 limbus MCP 操作;Windows 单实例互斥避免输入交叠。运行目录默认 `~/lc_mcp/jev`,可用 `LC_JEV_HOME` 覆盖;状态为 `jev_mirror_status.json`,动作日志为 `jev_mirror_log.jsonl`。确认弹窗候选使用当前截图坐标并排除背景按钮。商店没有出战角色技能替换时,每店最多刷新 4 次。
## 已落实的执行边界(2026-10-02)
- 二号线从第一至第四层可执行卡包中移除;第五层只允许它,未出现先使用剩余刷新,归零后再观测。OCR 无法确定卡名时交回分析,不把三号线或五号线当作二号线。
- 层末选择数达到要求后,一次发送三个回车;事件结果用短批次回车。同一画面仍未推进时,点击本候选绑定的确认控件,避免命中背景按钮。
- 判定优先 OCR 明确的极高/非常高,其次高;没有清晰文字才按金黄色标识选。没有结果文字的事件选项不能当免费奖励;明确触发战斗的选项排除,选择前读取事件速查。
- 雷枝观测领取后记为待强化,商店打开强化面板;快感取得后记为待 ++。主助手付款并确认实际库存后清除对应待办标记;雷枝预算不足可记录延后,不能把预览当完成。快感尽量在第二、三层处理。
- 2026-10-03 后续指令与实现:未指定 Jev 模型、缺少凭据或 Jev 请求失败时交给执行模型。嵌入运行可提供 `executor_decider(request)` 回调;独立脚本发布 `requires_decision` 和 `decision_request.json`,由调用方读取、重新核对页面并处理,再续跑同一局。固定候选回退需显式设置 `decisionEngine=fixed` 或 `LC_FIXED_FALLBACK=1`。回退和接管均不记为 Jev 成功决策。
- 用户接管时逐键检查停止标记。日志新增 OCR 毫秒、动作毫秒、动作结束时间;未执行完的批次不伪造完整按键数。优化代码期间保持停止状态。
依据:[OpenCode Zen:Jev](https://opencode.ai/docs/zen/#jev)。
@@ -0,0 +1,32 @@
# 影响整局速度的机制
核对日期:2026-10-02。以下区分 Wiki 机制、用户指定流程和本局观察。以当前赛季“名与蛛之镜”及游戏文字为准;旧镜牢、剧情迷宫、折射版本不能直接套用。不因阅读此文件恢复已被用户接管的游戏。
## 开局与破裂核心
- **Wiki 机制**:“全面的可能性”基础等级提供入场关键词三级饰品选择;这一步不同于额外饰品观测。[名与蛛之镜](https://limbuscompany.huijiwiki.com/wiki/名与蛛之镜)
- **用户指定**:恩惠 1、3、10 不强化;荆棘套索、荧光灯;拒绝额外观测;三级三选一选标准负载电池。不能把“拒绝额外观测”扩展到三级三选一。
- **电池**:技能命中附加 3 破裂强度,嫉妒技能改为 5。少电池就少了一项强度来源,不能假定与完整攻略效果相同。[当前饰品数据](https://limbuscompany.wiki.gg/wiki/Module:EgoGift/data)
- **符咒 ++**:伤害门槛从技能造成至少 12 体力伤害降为至少 1;附加 3 强度,斩击改为 5 强度及 1 层数。因此本流程二层强化是必需操作,不是无关运营。商店付费后核对实际 ++;效果预览不等于强化。[强化表](https://limbuscompany.wiki.gg/wiki/List_of_E.G.O_Gifts/Enhance)
- **鸡胸**:当前镜牢版本以技能施加破裂时追加 3 层数,每回合至多触发 3 次;不要套用剧情版本或旧版本的数值。[镜牢饰品表](https://limbuscompany.wiki.gg/wiki/List_of_E.G.O_Gifts)
- **快感**:普通四级破裂合成池,不是特定材料配方必出。基础效果回合开始给全敌方/部位 3 强度、3 层数;回合结束按强度乘层数造成暴食伤害,基础层数计算上限为 5。顺路获取,不为它反复合成;普通/特殊商店配方见路线文件。[当前饰品数据](https://limbuscompany.wiki.gg/wiki/Module:EgoGift/data)
## 卡包与苦难
- **2 号线布局**:固定事件 → 事件 → 商店 → 玫瑰标牌头目,共 4 节点;困难模式可出现在 4–10 层。节点少是速度优势,不能据此认为所有长线头目都容易。[卡包说明](https://limbuscompany.wiki.gg/wiki/Line_2_Theme_Pack)
- **用户指定**:第一至第四层禁止选 2 号线,只留到第五层。第五层优先它;刷新次数为零才允许卡包观测。上局四层用过后五层显示“无法选择”,这是本局观察,不能再重复无效观测。
- **苦难累计**:拒绝层末饰品仍随机附加苦难;困难模式需要两项,少选也会随机补足。拒绝并不能避开加血或加防御。[名与蛛之镜](https://limbuscompany.huijiwiki.com/wiki/名与蛛之镜)
- **用户指定**:核心饰品优先,其他避免敌方体力上限与防御等级。防御技能威力不是防御等级。所有候选都违反要求时说明冲突,不能把无法满足写成已满足;上局优先避开防御等级只是一局的处理。
- **替代卡包的速度判断**:合并考虑节点数、额外战斗和头目机制。时间杀人魔初始大量时间会提高攻防,且有阶段转换;第二阶段打破部位仍可能把行动移到别的部位。上局缺电池且苦难叠加时纯 P 团灭,不能将“时间杀人时间”当作已验证的快速替代。[头目数据](https://limbuscompany.wiki.gg/wiki/The_Time_Ripper/Enemy)
## 最后商店与重试
- **商店资料**:100 经费可用于单人恢复 50% 体力、45 理智,或全队恢复 20% 体力、15 理智;也有复活选项。1→2/2→3/1→3 技能替换报价分别为 45/75/120。实际购买以当前界面为准。[镜牢商店](https://wikiwiki.jp/lcbwiki/鏡ダンジョン)
- **速通推断**:明显低血、低理智时,最后商店一次有用恢复可能比团灭重试省时;这不是每店必买的新规则。不假定能回到已经离开的商店。
- **E.G.O.**:有浮士德不代表装备了治疗 E.G.O.;手动处理先看实际装备、资源和效果。普通战斗仍执行用户的 P+回车;上一局头目手动授权仅适用于那次尝试。[E.G.O. 使用机制](https://limbuscompany.huijiwiki.com/wiki/E.G.O)
- **结束识别**:全体死亡/重试界面也是战斗结束,不能继续 P+回车,也不能自动接受死亡或放弃本局。此项来自上局执行缺陷;2026-10-03 主脚本与 `battle_batch.py` 已共用 `game_scenes.py` 的死亡/重试识别,并通过离线回归,新的整局实机验证仍待完成。
- **计时**:包含配置、模型等待、加载、修复、失败和所有停顿。用户接管后只记交接前耗时;未取得最终通关奖励不能记为自动成功。
## 资料入口
灰机 [首页](https://limbuscompany.huijiwiki.com/wiki/首页) → [镜像迷宫](https://limbuscompany.huijiwiki.com/wiki/镜像迷宫) → 当前赛季;事件按 [探索事件](https://limbuscompany.huijiwiki.com/wiki/探索事件) 查询。本站正文请求本次受到访问限制,使用其搜索索引并交叉核对其他 Wiki;不把未读取到的首页正文当作已读完。
@@ -0,0 +1,105 @@
# 破裂黎明/黑兽:用户配置与楼层规划
这是此用户的速通默认配置,记录于 2026-10-01。用户的新指示与当前游戏界面优先。
## 开局
1. 星之恩惠:**起始之星、星际旅行、全面的可能性**。用户最初称编号 1、3、10;按名称核对,避免版本排序变化。
2. **保持基础等级,不强化恩惠**,不点单项或全部强化。
3. 破裂起始 E.G.O. 饰品:**荆棘套索、荧光灯**。
4. 额外 E.G.O. 饰品观测:一般拒绝;用户新例外允许选择破裂体系的**雷枝**,取得后在后续商店强化。
5. 入层三级饰品:**标准负载电池**,用户简称“电池”。
三级饰品三选一来自“全面的可能性”,**不属于额外观测,必须选电池并确认**。三选一不能默认拒绝;识别不清先读清卡名,不点击拒绝跳过。领取后的库存应能看到电池;这是开局必要核对,不再每场重复查看。符咒、电池、鸡胸均保留,不用于出售或合成。
不强化的是开局恩惠;**二层成捆的符咒强化到 ++ 仍然需要做**。
**饰品必须到商店才能强化**(用户确认)。地图上的 E.G.O. 饰品窗口用于查看持有与强化效果,不是强化入口;其 +/++ 是效果预览,不能当成已购买强化。二层遇商店时优先完成符咒 ++,确认经费变化与实际强化标识。
商店强化面板可直接选 ++;本局实测一次支付 150 经费即完成,无需分两次购买。以当前报价为准。鸡胸当前译名为“干巴柴涩鸡胸肉”,Wiki 旧译名“干松紧致鸡胸肉”;鸡腿当前为“火热多汁琵琶腿”。
## 沿用队伍
用户已配置好队伍。曾确认的出战顺序:黎明辛克莱、鸿园君主鸿璐、黑兽希斯克利夫、黑兽奥提斯、黎明格里高尔、鸿园流浪武者良秀、黎明浮士德。此顺序用于识别原配置,不要求重新配置。沿用当前用户设置;不要因替补等级警告额外升级或换人。
用户再次确认按上述顺序选择。**黎明辛克莱是“黎明事务所收尾人”;“黎明事务所代表”是格里高尔,不能误选成第一位。** 浮士德也有“收尾人”标题,需结合罪人标识和肖像确认。不要凭“黎明”二字或卡片位置识别人。
## 楼层推进
**符纸=成捆的符咒**:Ⅰ级破裂饰品,黑色底板上有两张折叠符纸,红色符文、黄色纸边。按名称和图标核对卡包通关奖励。
| 楼层 | 优先完成 | 顺路再做 |
| --- | --- | --- |
| 1F | 选通关奖励含成捆的符咒的卡包并取得;商店按技能表替换 | 无关饰品略过 |
| 2F | 成捆的符咒 ++;优先 Hell's Chicken 获取干松紧致鸡胸肉,维持破裂层数;换技能 | 非核心材料足够时合成快感并强化 ++ |
| 3F | 菲辛改为 1→3;按下面的条件优先级选卡包;尽量完成快感合成与 ++ | 处理已取得雷枝的强化 |
| 4F | 推进、换技能 | 补做快感 ++ 和缺失的相关饰品 |
| 5F | 优先换技能并通关 | 顺路高级饰品;不专门做斩击四级 |
用户补充(2026-10-02):第五层优先“2号线”卡包;卡包刷新次数为零时允许使用卡包观测。层末应先选择苦难再直接推进,不能误当额外观测而默认拒绝饰品。
用户明确纠正:**第一至第四层禁止选择 2 号线,2 号线专门留给第五层。** 用户随后称第五层“必选”二号线。上局提前选用后,观测列表标为“无法选择”。第五层刷新用尽后仍没有它,可进入观测列表核对;若仍不可选,报告具体原因,不擅自换其他卡包,不反复无效刷新或观测。
资源冲突时优先关键技能,同时保留符咒 ++ 的预算与优先级。路线减少战斗节点和绕路,不为额外小奖励扩展运营。
### 第二至第四层卡包优先级(2026-10-02 初步判断)
这是针对当前破裂黎明/黑兽纯 P 队伍的条件排序,尚无同条件逐卡包计时,不能称为 Wiki 公认榜或实测速度榜。先核对当前难度与楼层可出现的卡包;第三、四层不沿用普通二层的卡包候选。
| 条件 | 优先级 |
| --- | --- |
| 2F 缺鸡胸 | 地狱鸡优先于普通无关奖励包;事件走炸鸡对决直接给鸡胸的选项。卡包只有二层出现,错过不在三四层继续刷新寻找 |
| 2F 已有鸡胸/地狱鸡没出现 | 从现有可用卡包选头目适合纯 P、路线较短者;不为地狱鸡无界刷新,不擅自增加额外观测 |
| 3–4F 核心齐全、候选长度相同 | 初步优先考察 Addicting Lust(头目池:因而无人哭泣、长腿精灵)、Degraded Gloom(悲泣蟾蜍、无头鱼)等;这是机制筛选的候选组,不代表两者已经测出固定先后 |
| 3–4F 有缺失核心 | 仅当当前通关奖励明确能补缺且头目可纯 P 时提高优先级;卡包提高破裂出现概率不等于必给快感,不为概率或合成材料绕路 |
| 3–4F 次选 | 压抑的暴怒(皮肤先知、悲泣铜牛)、空转的怠惰(噬梦浊流、漂泊狐狸)不能仅因上局选过就列为首选;与其他候选比较实际头目和路线 |
| 最低优先/不作默认 | 未核对的多波头目、阶段转换复杂或已出现纯 P 失败的卡包;时间杀人时间不作已验证的快速替代 |
同档选择顺序:纯 P 可通过性 → 预计战斗次数/波次与头目回合 → 确定获得的即时收益。奖励无关时不再展开运营;不要给尚未打通的四节点长线包自动最高优先级。名义节点数通常不决定生成地图中的必打战斗数,进入地图后仍选可达事件和商店。
旧笔记“Bearable”未能对应到当前卡包正式名称,暂不作为第三层固定首选。保留原攻略待核对线索,不猜译名。以上当前头目池、出现楼层和长度依据 [卡包总表](https://limbuscompany.wiki.gg/wiki/List_of_Floor_Themes);地狱鸡机制依据 [专页](https://limbuscompany.wiki.gg/wiki/Hell%27s_Chicken_Theme_Pack)。
## 层末饰品与苦难
必需饰品(例如成捆的符咒)优先保留。**非必需选项避开增加敌方体力上限、提高防御等级的苦难**,按卡片实际描述判断;防御技能/守备技能威力与防御等级不是同一项。不要为了少点一下留空导致随机苦难。
已验证的一层例子:成捆的符咒+物理屏蔽力场;后者苦难为守备技能最终威力 +1,符合用户“不加血量、不加防御等级”的选择。巫毒娃娃的防御等级 +2 和马蹄铁饰物的防御等级 +1 均不选作非必需奖励。
## 快感与特殊商店合成
用户补充(2026-10-02):取得快感后必须在商店强化到二级(++),支付并核对实际“快感++”后继续;不能只停留在效果预览。
最新顺序:**快感尽量在第四层前完成合成与 ++,优先第二、三层商店。** 先看现有非核心材料和该店产物预览;不等到第四层才第一次考虑。预算保留符咒 ++、快感强化和关键技能替换;材料不够或未命中时继续,不无界合成,也不把“尽量”解释为必须重开。第四层仅作补做机会。
雷枝:饰品观测出现破裂体系雷枝时允许领取;取得后在后续商店强化,保留它,不作快感合成材料。用户未指定雷枝必须升到 ++,按当次实际报价和预算处理;不把这个例外扩展为无关饰品采购。开局三级三选一仍优先标准负载电池。强化完成后核对实际持有状态一次,离开不再反复检查。
用户提醒(2026-10-02):合成前先识别普通商店或特殊商店,并核对界面产物预览。快感是普通合成池的四级破裂饰品,指定破裂但不保证命中快感;材料词条不限,保留符咒++、电池、鸡胸等核心。
材料点数为Ⅰ3/Ⅱ6/Ⅲ10/Ⅳ15。普通商店四级需≥25点,常用332,重合431或422;特殊商店四级只需≥22点,可用322、331,重合421。特殊商店的411只有21点,不能出四级。特殊商店最多5个槽,2222也达到四级。具体材料按现有非核心库存选择,不固定牺牲核心。
2/3/4–5材料指定词条概率为60%/90%/99%;每次花5星芒祈愿可提高到90%/99%/99.99%。词条成功不等于指定饰品必出。核对来源:[名与蛛之镜](https://limbuscompany.huijiwiki.com/wiki/名与蛛之镜)。
## 技能替换
箭头表示用左侧技能换成右侧技能;“菲辛”指黎明事务所辛克莱。
| 人格 | 1–2F | 3–5F |
| --- | --- | --- |
| 黎明辛克莱(菲辛) | 1→2 | 1→3 |
| 黑兽奥提斯 | 2→3 | 2→3 |
| 其他出战人格 | 1→3 | 1→3 |
符合表的替换通常直接完成,避免反复比较。
用户补充(2026-10-02):商店没有出战角色可替换技能时允许刷新,**每个商店至多 4 次**;有可替换角色则按表执行,达到刷新上限后继续推进。
商店刷新时 CONNECTING 会保留旧库存画面;加载结束前禁止再次刷新、购买或离开。新库存有未购买的出战角色技能替换时,必须按表完成替换后再离开。
“特殊商店”同样必须执行强化和换技能,不能只按标题精确匹配“商店”。2026-10-02 实测漏识特殊商店会跳过符咒 ++ 和已出现的技能替换;执行器已补充该识别。二层及以后,符咒实际强化状态未确认前不能提供离开动作。
## 来源与适用范围
- 用户明确纠正了恩惠、起始饰品、拒绝观测、电池与快捷键;这些优先于视频泛用建议。
- [绅士丶蚂蚱:破裂黎明纯 P 周回](https://www.bilibili.com/video/BV1exaV6yELm/):换技能优先的楼层策略。
- [Cabric:黎明黑兽五层攻略](https://www.youtube.com/watch?v=h5wFVUd2X2c):卡包与机制补充。
- 困难镜牢与视频条件尚未全部核对;以游戏画面修正,不直接套用视频用时。
@@ -0,0 +1,36 @@
# 巴士快捷键
来源:用户于 2026-10-01 提供的三张游戏内 UI 操作指南截图及后续明确纠正。
| 场景 | 功能 | 按键 |
| --- | --- | --- |
| 通用 | 弹窗确认 | Enter 或 Space |
| 故事 | 跳过对话 | Enter 或 Space |
| 提取 | 跳过动画 | Enter 或 Space |
| 选项事件 | 加载下一段文本 | Enter 或 Space |
| 战斗 | 暂停/继续 | **Space** |
| 战斗 | 开始战斗/开始行动 | **Enter** |
| 战斗 | 胜率/伤害按键 | **P** |
| 通用 | 关闭弹窗、取消/返回原菜单、退出游戏 | Esc(随当前界面而变) |
| 战斗 | 移动视角 | ↑/←/↓/→ 或 W/A/S/D |
| 镜像迷宫地图 | 移动至下个节点 | ↑/↓/→ 或 W/S/D |
| 镜像迷宫地图 | 取消节点选择 | ← 或 A |
| 镜像迷宫地图 | 确认进入关卡/商店(用户补充) | **Enter** |
| 战斗 | 显示拼点箭头 | Tab |
| 通用 | 打开 UI 操作指南 | F1 |
| 战斗 | 放大/缩小 | 鼠标滚轮或 Q/E |
| 镜像迷宫地图 | 画面左右移动 | Q/E |
## 速通用法
- 战斗先 P 再 Enter,按用户要求批量循环;**不要混入 Space**,它会暂停战斗。
- 对话用 SKIP 或 Enter,Space 也是可用替代;这些文本快捷键不代表可以自动选对事件答案。
- 地图方向键优先用于当前画面中已有、可达且符合路线的目标。用户更新(2026-10-02):方向选中后直接按 Enter 进入,不再次观察或确认;执行器合并选方向+回车。
- 地图的 A/左箭头是取消节点,不能当成向左前进;Q/E 只平移画面。
- 用户已确认:**选中关卡或商店后,按 Enter 进入**,不用再寻找“进入”按钮。奖励或商店内其他动作仍按当前界面确认,不能扩展成所有操作都盲按 Enter。
- 进入镜牢的确认弹窗直接按 **Enter**,不先找按钮;这是用户再次明确的快捷操作。
- 离开商店时直接按 **Enter** 快速退出,不再额外检查或询问;未生效才点击确认按钮。
- 每层选完奖励后直接连续 **Enter** 确认并进入下一层,不再额外检查或询问;未生效才点击按钮。
- **快捷键优先;一次发送后确认未生效,就用鼠标点击对应按钮**,不要反复按键等待。用户已明确授权此回退方式。
- 最终结算:点击“领取”后按 **Enter** 确认奖励;未生效再点击确认按钮,返回主界面后结束。
- 原生控制工具可能把用户物理按 Esc 视为中止。这与游戏内 Esc 导航不同;检测到操作中止时按上级要求停止,不自动重试。
+4
View File
@@ -0,0 +1,4 @@
# -*- coding: utf-8 -*-
"""lc-mcp: 以 AALC (AhabAssistantLimbusCompany) 为底座的 Limbus Company MCP server。"""
VERSION = '0.7.0'
+289
View File
@@ -0,0 +1,289 @@
# -*- coding: utf-8 -*-
"""AALC 引擎: 截图/OCR/模板匹配/输入全部走 AALC 的 module.automation。
只能在 Windows 的交互桌面会话里运行(找窗口句柄、后台截图、PostMessage 都依赖它)。
AALC 代码按相对路径读 assets/ 和 config.yaml, 所以 bootstrap() 会 chdir 到 AALC 目录。
"""
import glob
import os
import sys
import time
from .engine import Engine
REPO = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
DEFAULT_AALC_DIR = os.path.join(REPO, 'vendor', 'aalc')
_booted = None
def aalc_dir():
return os.path.abspath(os.environ.get('AALC_DIR') or DEFAULT_AALC_DIR)
def bootstrap():
"""进程内初始化 AALC (幂等)。必须在 import 任何 AALC 模块之前调用。"""
global _booted
if _booted:
return _booted
d = aalc_dir()
if not os.path.isfile(os.path.join(d, 'main.py')):
raise RuntimeError('AALC 目录无效: %s (git submodule update --init, 或设置 AALC_DIR)' % d)
os.chdir(d)
if d not in sys.path:
sys.path.insert(0, d)
# 与 AALC main.py 相同的 DPI 设置, 否则截图/点击坐标在缩放下错位
from ctypes import c_void_p, windll
try:
windll.user32.SetProcessDpiAwarenessContext(c_void_p(-4))
except (AttributeError, OSError):
try:
windll.shcore.SetProcessDpiAwareness(2)
except (AttributeError, OSError):
windll.user32.SetProcessDPIAware()
from module.logger.my_log import Logger
Logger()
_booted = d
# 实验: 编队列表滑动补丁, 仅在 LCP_TEAM_SCROLL_PATCH=1 时安装 (见 aalc_input_patch)
from . import aalc_input_patch
aalc_input_patch.install()
return d
def prune(directory, pattern, keep):
files = sorted(glob.glob(os.path.join(directory, pattern)), key=os.path.getmtime)
for p in files[:-keep] if keep > 0 else []:
try:
os.remove(p)
except OSError:
pass
class AalcEngine(Engine):
_templates = None # 模板相对路径集合; assets 运行中不变, 只扫描一次磁盘
_template_size = None # 当前 AALC 模板缓存对应的缩放尺寸
def __init__(self, shot_dir, keep_shots=30):
self.shot_dir = os.path.abspath(shot_dir)
os.makedirs(self.shot_dir, exist_ok=True)
self.keep_shots = keep_shots
root = bootstrap()
from module.automation import auto
from module.automation.input_handlers.input import key_list
from module.automation.screenshot import ScreenShot
from module.config import cfg
from module.game_and_screen import screen
from module.ocr import ocr
from utils.path_manager import path_manager
path_manager.initialize_paths()
self.auto, self.cfg, self.screen, self.ocr_engine = auto, cfg, screen, ocr
self.ScreenShot = ScreenShot
self.key_names = sorted(key_list)
self.images_root = os.path.join(root, 'assets', 'images')
# ---- 看 ----
def _grab(self, gray):
if not self.cfg.simulator and not self.screen.handle.hwnd:
raise RuntimeError('未找到游戏窗口 %r: 先启动游戏(run_task 会自动启动)' % self.cfg.game_title_name)
# 不用 auto.take_screenshot: 它连续失败 60 秒会直接 taskkill 游戏
with self.auto._screenshot_lock:
img = self.ScreenShot.take_screenshot(gray)
if img is None:
raise RuntimeError('AALC 截图失败(窗口最小化/被遮挡? 见 AALC logs)')
self.auto.screenshot = img # find_image_element 读这个
return img
def _save(self, img):
stamp = time.strftime('%Y%m%d_%H%M%S') + '_%03d' % (int(time.time() * 1000) % 1000)
path = os.path.join(self.shot_dir, 'shot_%s.png' % stamp)
# 每次 get_state 都存图: 1080p 下默认压缩级别 6 约 0.66s, 级别 1 约 0.19s, 文件只大 ~17%
img.save(path, compress_level=1)
prune(self.shot_dir, 'shot_*.png', self.keep_shots)
return {'path': path.replace('\\', '/'), 'w': img.width, 'h': img.height}
def screenshot(self):
return self._save(self._grab(gray=False))
def ocr(self):
img = self._grab(gray=False)
shot = self._save(img)
res = self.ocr_engine.run(img)
items = []
boxes = res.boxes if res.boxes is not None else []
scores = res.scores if res.scores is not None else [1.0] * len(boxes)
for box, text, score in zip(boxes, res.txts or (), scores):
xs = [p[0] for p in box]
ys = [p[1] for p in box]
x0, y0 = int(min(xs)), int(min(ys))
items.append({'text': text, 'x': x0, 'y': y0,
'w': int(max(xs)) - x0, 'h': int(max(ys)) - y0,
'score': round(float(score), 3)})
return shot, items
def list_images(self, prefix=''):
if self._templates is None:
names = set()
for theme in ('dark', 'default'):
for lang in ('zh_cn', 'en', 'share'):
base = os.path.join(self.images_root, theme, lang)
for p in glob.glob(os.path.join(base, '**', '*.png'), recursive=True):
names.add(os.path.relpath(p, base).replace('\\', '/'))
self._templates = frozenset(names)
return sorted(n for n in self._templates if n.startswith(prefix))
def find_image(self, name, threshold=0.8, model='normal'):
if name not in self.list_images(name):
raise ValueError('没有模板图 %r (用 list_images 查)' % name)
img = self._grab(gray=True)
# 模板按 2560x1440 制作。配置中的目标窗口尺寸不一定等于
# 当前客户区;临时按实际 16:9 画面缩放,不调整窗口或保存配置。
old_size = self.cfg.set_win_size
# 保留亚像素比例:例如 1278 宽对应 718.875 高,取整会改变
# 缩放采样,使小图标的匹配置信度明显下降。
match_size = max(1, min(img.height, img.width * 9 / 16))
# AALC 的模板缓存按加载时的 set_win_size 缩放, 键里不含尺寸; 尺寸变了才清空。
# 本进程只有这里用模板, 缓存可以一直保持当前客户区的比例
# (clear_img_cache 每次都会全量 gc, 不能每次调用都清)。
if match_size != self._template_size:
self.auto.clear_img_cache()
self._template_size = match_size
changed = match_size != old_size
try:
if changed:
self.cfg.unsaved_set_value('set_win_size', match_size)
pos = self.auto.find_image_element(name, threshold, model=model)
finally:
if changed:
self.cfg.unsaved_set_value('set_win_size', old_size)
return (int(pos[0]), int(pos[1])) if pos else None
# ---- 动手 (AALC 输入后端,由 config.yaml 决定后台消息/前台输入) ----
def _focus_game(self):
handle = self.screen.handle
try:
handle.setForeground()
except Exception:
pass # Windows 可拒绝后台服务直接切换前台;下面通过输入线程重试。
if handle.isActive:
return
import win32api
import win32gui
import win32process
current = win32api.GetCurrentThreadId()
foreground = win32gui.GetForegroundWindow()
if not foreground:
return
threads = {win32process.GetWindowThreadProcessId(foreground)[0],
win32process.GetWindowThreadProcessId(handle.hwnd)[0]} - {current}
attached = []
try:
for target in sorted(threads):
win32process.AttachThreadInput(current, target, True)
attached.append(target)
win32gui.BringWindowToTop(handle.hwnd)
win32gui.SetActiveWindow(handle.hwnd)
win32gui.SetFocus(handle.hwnd)
handle.setForeground()
finally:
for target in reversed(attached):
win32process.AttachThreadInput(current, target, False)
def _prepare_input(self):
# 前台后端将输入发给系统当前窗口;服务启动后不一定仍是游戏。
# 先确认焦点,获取失败时停止,避免把点击或按键发送到其他应用。
if not self.cfg.simulator and self.cfg.win_input_type == 'foreground':
handle = self.screen.handle
if not handle.hwnd or handle.isMinimized:
raise RuntimeError('前台输入需要可见的游戏窗口')
if not handle.isActive:
self._focus_game()
time.sleep(0.15)
if not handle.isActive:
raise RuntimeError('无法激活游戏窗口,未发送输入')
def click(self, x, y, times=1):
self._prepare_input()
if not self.cfg.simulator and self.cfg.win_input_type == 'background':
handler = self.auto.input_handler
self.auto.wait_pause()
for _ in range(int(times)):
handler.set_mouse_pos(int(x), int(y))
handler.set_active()
handler.mouse_down(int(x), int(y))
try:
time.sleep(0.12)
finally:
handler.mouse_up(int(x), int(y))
# Let Unity consume the release before another target is selected.
time.sleep(0.12)
elif not self.cfg.simulator and self.cfg.win_input_type == 'foreground':
import pyautogui
px, py = self.auto.input_handler.pos_offset(int(x), int(y))
pyautogui.moveTo(px, py)
# Give Unity a frame to update the pointer target before pressing.
time.sleep(0.12)
for _ in range(int(times)):
pyautogui.mouseDown(px, py)
try:
# Slow Unity frames can miss a shorter foreground press.
# Keep this below the game's long-press detail threshold.
time.sleep(0.35)
finally:
pyautogui.mouseUp(px, py)
time.sleep(0.12)
else:
self.auto.mouse_click(int(x), int(y), times=int(times))
def keypress(self, key):
k = str(key).lower()
if k not in self.key_names:
raise ValueError('AALC 不支持按键 %r, 可用: %s' % (key, ' '.join(self.key_names)))
self._prepare_input()
if not self.cfg.simulator and self.cfg.win_input_type == 'background':
# Unity 可能在同一帧收到 down/up,导致快捷键被吞掉。
handler = self.auto.input_handler
self.auto.wait_pause()
handler.set_active()
handler.key_down(k)
try:
time.sleep(0.12)
finally:
handler.key_up(k)
elif not self.cfg.simulator and self.cfg.win_input_type == 'foreground':
import pyautogui
pyautogui.keyDown(k)
try:
time.sleep(0.12)
finally:
pyautogui.keyUp(k)
else:
self.auto.key_press(k)
def drag(self, from_x, from_y, to_x, to_y, duration=1.0):
img = self._grab(gray=False)
for x, y in ((from_x, from_y), (to_x, to_y)):
if not (0 <= x < img.width and 0 <= y < img.height):
raise ValueError('拖动坐标超出游戏客户区 %sx%s' % (img.width, img.height))
self._prepare_input()
if not self.cfg.simulator and self.cfg.win_input_type == 'foreground':
import pyautogui
start = self.auto.input_handler.pos_offset(int(from_x), int(from_y))
end = self.auto.input_handler.pos_offset(int(to_x), int(to_y))
pyautogui.moveTo(*start)
time.sleep(0.12)
pyautogui.mouseDown(*start)
try:
if start == end:
time.sleep(float(duration))
else:
pyautogui.moveTo(*end, duration=float(duration))
time.sleep(0.12)
finally:
pyautogui.mouseUp(*end)
return
self.auto.mouse_drag(int(from_x), int(from_y), drag_time=float(duration),
dx=int(to_x) - int(from_x), dy=int(to_y) - int(from_y))
def type_text(self, text):
self._prepare_input()
self.auto.input_text(str(text))
+100
View File
@@ -0,0 +1,100 @@
# -*- coding: utf-8 -*-
"""编队列表滑动补丁 (实验, 默认关闭; LCP_TEAM_SCROLL_PATCH=1 启用)。
AALC 基类注释说 ``mouse_swipe_for_team_scroll`` 可由适配器覆盖"以规避队伍拖拽判定",
上游只有 MuMu 覆盖了它, Windows 前台/后台沿用普通列表手势。是否因此误触发队伍拖拽
尚无实机证据 (2026-10-03 的记录未在编队界面复测), 所以这里只做最小改动来验证:
- 几何与行程完全沿用 AALC 的 ``build_windows_scroll_swipe_plan``,
不改变 AALC 为 Windows 标定的翻页距离;
- 参照 MuMu, 脱离段后保持 0.1s 让游戏先认定为滚动, 松手前停稳 0.5s;
- 分段移动用显式等待驱动, 不经过适配器的 duration 参数
(BackgroundInput 在 duration < 0.01s 时步数为 0, 不发任何移动事件),
前台关闭 pyautogui 每次调用后默认的 0.1s 停顿。
"""
import os
import time
ENV_FLAG = 'LCP_TEAM_SCROLL_PATCH'
ESCAPE_HOLD_SECONDS = 0.1 # MUMU_TEAM_SCROLL_ESCAPE_HOLD_DURATION
SETTLE_SECONDS = 0.5 # MUMU_TEAM_SCROLL_SETTLE_DURATION
STEP_SECONDS = 0.01 # 与 AALC _mouse_move_to 的步长一致
def _plan(x, y, dx, dy, duration):
from module.automation.input_handlers.scroll_swipe import build_windows_scroll_swipe_plan
plan, settle = build_windows_scroll_swipe_plan(x, y, dx, dy, duration)
return plan, max(settle, SETTLE_SECONDS) if len(plan) > 1 else 0
def run_plan(plan, settle, press, move, release, sleep=None):
"""按计划拖动: 每段按耗时均匀插值, 每个插值点之间显式等待。
plan 元素为 (终点, 到达该点前的耗时); 第一段之后(脱离段)保持一小会儿。"""
sleep = sleep or time.sleep
position = plan[0][0]
press(position)
try:
for index, (point, duration) in enumerate(plan[1:]):
steps = max(1, round(duration / STEP_SECONDS))
for k in range(1, steps + 1):
ratio = k / steps
move((position[0] + (point[0] - position[0]) * ratio,
position[1] + (point[1] - position[1]) * ratio))
if duration > 0:
sleep(duration / steps)
position = point
if index == 0 and len(plan) > 2:
sleep(ESCAPE_HOLD_SECONDS)
if settle:
sleep(settle)
finally:
release(position)
def _foreground_team_scroll(self, x, y, duration=0.3, dx=0, dy=0, move_back=True):
import pyautogui
restore = self.get_mouse_position() if move_back else None
plan, settle = _plan(x, y, dx, dy, duration)
def screen(point):
return tuple(int(round(v)) for v in self.pos_offset(*point))
def press(point):
pyautogui.moveTo(*screen(point), _pause=False)
pyautogui.mouseDown(_pause=False)
run_plan(plan, settle, press,
lambda point: pyautogui.moveTo(*screen(point), _pause=False),
lambda point: pyautogui.mouseUp(*screen(point), _pause=False))
if restore:
self.mouse_move(restore)
def _background_team_scroll(self, x, y, duration=0.3, dx=0, dy=0, move_back=True):
restore = self.get_mouse_position() if move_back else None
plan, settle = _plan(x, y, dx, dy, duration)
def press(point):
self.set_mouse_pos(*point)
self.set_active()
self.mouse_down(*point)
run_plan(plan, settle, press,
lambda point: self.set_mouse_pos(*point),
lambda point: self.mouse_up(*point))
if restore:
self.mouse_move(restore)
def install(force=False):
"""给 Windows 前台/后台适配器装上编队滑动 (幂等)。未设 LCP_TEAM_SCROLL_PATCH=1 时不做任何事。"""
if not force and os.environ.get(ENV_FLAG) != '1':
return []
from module.automation.input_handlers import input as input_module
patched = []
for name, impl in (('Input', _foreground_team_scroll), ('BackgroundInput', _background_team_scroll)):
cls = getattr(input_module, name, None)
if cls is not None and cls.__dict__.get('mouse_swipe_for_team_scroll') is not impl:
cls.mouse_swipe_for_team_scroll = impl
patched.append(name)
return patched
+116
View File
@@ -0,0 +1,116 @@
# -*- coding: utf-8 -*-
"""子进程入口: 跑 AALC 现成的任务流程。
用法: python -m lc_mcp.aalc_task <task> [json_params]
python -m lc_mcp.aalc_task --restore <file> 写回被强杀任务临时覆盖的配置
放在子进程里跑, 停止 = 杀进程树; 不会像 QThread.terminate 那样留下被占用的锁。
"""
import json
import os
import sys
from .aalc_engine import bootstrap
# 任务 -> {参数名: AALC 配置项}; 参数只在本次运行内生效
TASKS = {
'all': {}, # 完全按 config.yaml 里勾选的任务跑, 等价于 AALC 界面点"开始"
'daily': {'exp': 'set_EXP_count', 'thread': 'set_thread_count'},
'reward': {},
'enkephalin': {'times': 'set_lunacy_to_enkephalin'},
'mirror': {'count': 'set_mirror_count'},
}
RESTORE_ENV = 'LCP_RESTORE_FILE'
def apply_overrides(cfg, task, params, restore_path=None):
"""临时覆盖本次运行的次数, 返回原值。
AALC 运行中会整份保存配置(如镜牢后 rotate_team_queue), 覆盖值会被写进 config.yaml。
所以先把原值落盘: 进程被 stop_task 强杀、finally 来不及执行时, TaskRunner 据此写回。
"""
originals = {TASKS[task][name]: cfg.get_value(TASKS[task][name]) for name in params}
if originals and restore_path:
tmp = restore_path + '.tmp'
with open(tmp, 'w', encoding='utf-8') as f:
json.dump(originals, f, ensure_ascii=False)
os.replace(tmp, restore_path)
for name, value in params.items():
cfg.unsaved_set_value(TASKS[task][name], int(value))
return originals
def restore(cfg, originals, restore_path=None):
for key, value in originals.items():
cfg.set_value(key, value)
if originals:
cfg.flush()
if restore_path and os.path.exists(restore_path):
os.remove(restore_path)
def restore_file(path, cfg=None):
with open(path, encoding='utf-8') as f:
originals = json.load(f)
if cfg is None:
bootstrap()
from module.config import cfg
restore(cfg, originals, path)
def run(task, params):
bootstrap()
from module.automation import auto
from module.config import cfg
from tasks.base import script_task_scheme as scheme
from tasks.base.retry_monitor import retry_monitor
from tasks.battle import battle
from utils.path_manager import path_manager
restore_path = os.environ.get(RESTORE_ENV)
originals = apply_overrides(cfg, task, params, restore_path)
try:
if task == 'all':
scheme.script_task()
return
# 与 script_task() 相同的前置步骤
scheme.init_game()
path_manager.initialize_paths()
auto.clear_img_cache()
retry_monitor.start()
get_reward = None
if auto.click_element('battle/turn_assets.png', take_screenshot=True):
print('[lc_mcp] 检测到正在战斗, 先打完', flush=True)
get_reward = battle.fight()
{
'daily': scheme.Daily_task_wrapper(get_reward=get_reward),
'reward': scheme.to_get_reward,
'enkephalin': scheme.Buy_enkephalin,
'mirror': scheme.Mirror_task,
}[task]()
finally:
retry_monitor.stop()
restore(cfg, originals, restore_path)
def main(argv):
if len(argv) == 3 and argv[1] == '--restore':
restore_file(argv[2])
print('[lc_mcp] restored config from %s' % argv[2], flush=True)
return 0
if len(argv) < 2 or argv[1] not in TASKS:
print('usage: python -m lc_mcp.aalc_task <%s> [json]' % '|'.join(TASKS), file=sys.stderr)
return 2
task = argv[1]
params = json.loads(argv[2]) if len(argv) > 2 else {}
unknown = set(params) - set(TASKS[task])
if unknown:
print('unknown params for %s: %s' % (task, ', '.join(sorted(unknown))), file=sys.stderr)
return 2
print('[lc_mcp] task %s start %s' % (task, json.dumps(params)), flush=True)
run(task, params)
print('[lc_mcp] task %s done' % task, flush=True)
return 0
if __name__ == '__main__':
sys.exit(main(sys.argv))
+88
View File
@@ -0,0 +1,88 @@
# -*- coding: utf-8 -*-
"""stdio <-> 常驻服务 的中继。MCP 客户端(经 ssh)启动的是这个, 只用标准库。
ssh win python C:/path/lc-mcp/lc_mcp/bridge.py
为什么不直接 ssh 跑 server: SSH 会话在 session 0, 看不到游戏窗口、也发不了输入。
服务没起来时, 对每个请求回明确的错误, 而不是让客户端干等。
"""
import json
import os
import socket
import sys
import threading
HOME = os.path.join(os.path.expanduser('~'), 'lc_mcp')
TOKEN_FILE = os.path.join(HOME, 'token')
PORT = int(os.environ.get('LCP_PORT', '8765'))
def connect(port=PORT, token_file=TOKEN_FILE):
with open(token_file, encoding='ascii') as f:
token = f.read().strip()
sock = socket.create_connection(('127.0.0.1', port), timeout=5)
sock.settimeout(None)
sock.sendall(('AUTH %s\n' % token).encode('ascii'))
rfile = sock.makefile('rb')
if rfile.readline().strip() != b'OK':
raise ConnectionError('token 被拒绝 (%s 与服务端不一致?)' % token_file)
return sock, rfile
def relay(sock, rfile, stdin, stdout):
def up():
try:
for line in iter(stdin.readline, b''):
sock.sendall(line)
finally:
try:
sock.shutdown(socket.SHUT_WR)
except OSError:
pass
threading.Thread(target=up, daemon=True).start()
for line in iter(rfile.readline, b''):
stdout.write(line)
stdout.flush()
def answer_offline(reason, stdin, stdout):
"""服务不可达: 仍完成握手, 但每个工具调用都返回原因。"""
for raw in iter(stdin.readline, b''):
try:
msg = json.loads(raw)
except ValueError:
continue
if not isinstance(msg, dict) or msg.get('id') is None:
continue
if msg.get('method') == 'initialize':
resp = {'protocolVersion': '2024-11-05', 'capabilities': {'tools': {}},
'serverInfo': {'name': 'lc-mcp (offline)', 'version': '0'}}
out = {'jsonrpc': '2.0', 'id': msg['id'], 'result': resp}
elif msg.get('method') == 'tools/list':
out = {'jsonrpc': '2.0', 'id': msg['id'], 'result': {'tools': []}}
else:
out = {'jsonrpc': '2.0', 'id': msg['id'], 'error': {'code': -32000, 'message': reason}}
stdout.write((json.dumps(out, ensure_ascii=False) + '\n').encode('utf-8'))
stdout.flush()
def main():
# The protocol is bytes, but Chinese diagnostics still use stderr text.
# Windows may otherwise encode errors as cp936 for a UTF-8 MCP client.
if hasattr(sys.stderr, 'reconfigure'):
sys.stderr.reconfigure(encoding='utf-8')
stdin, stdout = sys.stdin.buffer, sys.stdout.buffer
try:
sock, rfile = connect()
except (OSError, ConnectionError) as e:
reason = ('lc-mcp 服务未运行或不可达 (%s)。在 Windows 桌面会话里启动: '
'scripts/install_logon_task.ps1 或 python -m lc_mcp.server' % e)
sys.stderr.write(reason + '\n')
answer_offline(reason, stdin, stdout)
return 1
relay(sock, rfile, stdin, stdout)
return 0
if __name__ == '__main__':
sys.exit(main())
+62
View File
@@ -0,0 +1,62 @@
# -*- coding: utf-8 -*-
"""引擎接口 + 平台无关的文字匹配。
引擎 = "看屏幕 + 动手" 的最小集合, 坐标一律是游戏窗口客户区截图里的像素坐标。
实现: AalcEngine(Windows, 调 AALC) / FakeEngine(测试)。
"""
import re
_WS = re.compile(r'\s+')
def norm(s):
"""匹配用归一化: 去全部空白 + 小写 (OCR 常把 "Hong Lu" 识别成 "HongLu" 或反之)。"""
return _WS.sub('', str(s)).lower()
def find_hits(text, items):
"""在 OCR items 里找包含 text 的项, 返回中心点列表。完全相等的排前面。"""
key = norm(text)
if not key:
return []
exact, partial = [], []
for it in items:
t = norm(it['text'])
if key not in t:
continue
hit = {'text': it['text'], 'x': it['x'] + it['w'] // 2, 'y': it['y'] + it['h'] // 2}
(exact if t == key else partial).append(hit)
return exact + partial
class Engine:
"""所有方法失败时抛异常, 由协议层转成 isError 结果。"""
def screenshot(self):
"""截图并落盘。返回 {'path': str, 'w': int, 'h': int}。"""
raise NotImplementedError
def ocr(self):
"""截图 + OCR。返回 (shot, items); items = [{text, x, y, w, h, score}]。"""
raise NotImplementedError
def find_image(self, name, threshold=0.8, model='normal'):
"""在当前画面找 AALC 模板图 (如 'battle/turn_assets.png')。返回 (x, y) 或 None。"""
raise NotImplementedError
def list_images(self, prefix=''):
"""列出可用模板图的相对路径。"""
raise NotImplementedError
def click(self, x, y, times=1):
raise NotImplementedError
def keypress(self, key):
raise NotImplementedError
def drag(self, from_x, from_y, to_x, to_y, duration=1.0):
"""保持左键按下,以指定秒数移动到终点后松开。"""
raise NotImplementedError
def type_text(self, text):
raise NotImplementedError
+40
View File
@@ -0,0 +1,40 @@
# -*- coding: utf-8 -*-
"""测试用引擎: 屏幕内容由测试脚本预设, 记录所有输入动作。"""
from .engine import Engine
class FakeEngine(Engine):
def __init__(self, frames=None, images=None):
# frames: 每次 ocr() 依次返回的 items 列表; 用完后停在最后一帧
self.frames = list(frames or [[]])
self.images = dict(images or {}) # name -> (x, y)
self.actions = []
self.shots = 0
def screenshot(self):
self.shots += 1
return {'path': 'fake/shot_%d.png' % self.shots, 'w': 1920, 'h': 1080}
def ocr(self):
shot = self.screenshot()
items = self.frames.pop(0) if len(self.frames) > 1 else self.frames[0]
return shot, [dict(it, score=it.get('score', 0.99)) for it in items]
def find_image(self, name, threshold=0.8, model='normal'):
return self.images.get(name)
def list_images(self, prefix=''):
return sorted(n for n in self.images if n.startswith(prefix))
def click(self, x, y, times=1):
self.actions.append(('click', int(x), int(y), int(times)))
def keypress(self, key):
self.actions.append(('key', key))
def drag(self, from_x, from_y, to_x, to_y, duration=1.0):
self.actions.append(('drag', from_x, from_y, to_x, to_y, duration))
def type_text(self, text):
self.actions.append(('type', text))
+243
View File
@@ -0,0 +1,243 @@
# -*- coding: utf-8 -*-
"""MCP (JSON-RPC 2.0) 处理: 与传输方式无关, handle(msg) -> 响应 dict 或 None(通知)。"""
import json
import math
import threading
import time
from . import VERSION
from .aalc_task import TASKS
from .engine import find_hits
MAX_WAIT = 300.0
WAIT_INTERVAL = 1.0
INPUT_TOOLS = {'click', 'click_text', 'click_image', 'keypress', 'type_text', 'drag'}
TASK_TOOLS = {'run_task', 'task_status', 'stop_task'}
def _obj(props=None, required=()):
s = {'type': 'object', 'properties': props or {}}
if required:
s['required'] = list(required)
return s
_STR = {'type': 'string'}
_NUM = {'type': 'number'}
_TIMEOUT = {'type': 'number', 'default': 30, 'description': '秒, 上限 300'}
_IMG = {'name': {'type': 'string', 'description': 'AALC 模板图相对路径, 如 battle/turn_assets.png'},
'threshold': {'type': 'number', 'default': 0.8},
'model': {'type': 'string', 'enum': ['clam', 'normal', 'aggressive'], 'default': 'normal',
'description': 'clam=只在模板原位置找, normal=扩大范围, aggressive=全屏'}}
TOOLS = [
{'name': 'get_state', 'description': '截图 + OCR, 返回游戏窗口内全部文字(含坐标/置信度)。决策前先调这个, 不要猜坐标',
'inputSchema': _obj()},
{'name': 'click_text', 'description': '按文字点击: OCR 定位后点中心。子串匹配、忽略空格, 完全相同的优先; index 选第几个命中',
'inputSchema': _obj({'text': _STR, 'index': {'type': 'number', 'default': 0}}, ['text'])},
{'name': 'wait_for_text', 'description': '轮询 OCR 直到文字出现', 'inputSchema': _obj({'text': _STR, 'timeout': _TIMEOUT}, ['text'])},
{'name': 'wait_for_text_gone', 'description': '轮询 OCR 直到文字消失', 'inputSchema': _obj({'text': _STR, 'timeout': _TIMEOUT}, ['text'])},
{'name': 'find_image', 'description': '用 AALC 模板图在当前画面里找图标/按钮(比 OCR 稳, 适合没有文字的按钮)',
'inputSchema': _obj(_IMG, ['name'])},
{'name': 'click_image', 'description': '找到 AALC 模板图并点击它', 'inputSchema': _obj(_IMG, ['name'])},
{'name': 'list_images', 'description': '列出 AALC 模板图(按前缀过滤, 如 mirror/ battle/ home/)',
'inputSchema': _obj({'prefix': {'type': 'string', 'default': ''}})},
{'name': 'screenshot', 'description': '截游戏窗口, 返回 PNG 路径和尺寸', 'inputSchema': _obj()},
{'name': 'click', 'description': '按窗口截图像素坐标点击(优先用 click_text / click_image)',
'inputSchema': _obj({'x': _NUM, 'y': _NUM, 'times': {'type': 'number', 'default': 1}}, ['x', 'y'])},
{'name': 'keypress', 'description': '按一次键: a-z 0-9 enter esc space tab shift ctrl alt up down left right',
'inputSchema': _obj({'key': _STR}, ['key'])},
{'name': 'drag', 'description': '在游戏客户区保持左键按下并缓慢拖动,适用于卡包下拉;duration 是移动秒数,0.1–10,默认 1。先 get_state 核对坐标',
'inputSchema': _obj({'from_x': _NUM, 'from_y': _NUM, 'to_x': _NUM, 'to_y': _NUM,
'duration': {'type': 'number', 'default': 1.0, 'minimum': 0.1, 'maximum': 10}},
['from_x', 'from_y', 'to_x', 'to_y'])},
{'name': 'type_text', 'description': '向游戏窗口输入文本', 'inputSchema': _obj({'text': _STR}, ['text'])},
{'name': 'run_task', 'description': (
'后台运行 AALC 现成的完整任务流程(会自动启动游戏、处理战斗/掉线重试)。立即返回, 用 task_status 看进度。'
'all=按 AALC config.yaml 勾选的全部任务; daily=经验本+纽本(exp/thread 次数); reward=领奖励; '
'enkephalin=狂气换体力(times); mirror=镜牢(count 次数)。任务运行期间禁止手动点击类工具'),
'inputSchema': _obj({'task': {'type': 'string', 'enum': sorted(TASKS)},
'exp': _NUM, 'thread': _NUM, 'times': _NUM, 'count': _NUM}, ['task'])},
{'name': 'task_status', 'description': '查看任务状态(idle/running/succeeded/failed/stopped)和日志尾部',
'inputSchema': _obj({'lines': {'type': 'number', 'default': 30}})},
{'name': 'stop_task', 'description': '强制停止当前任务(杀掉任务进程)', 'inputSchema': _obj()},
]
class Server:
def __init__(self, engine, tasks, engine_error=None):
self.engine = engine
self.engine_error = engine_error
self.tasks = tasks
# 游戏只有一个: 所有工具调用串行, 防止两个客户端同时点
self.lock = threading.Lock()
# ---- JSON-RPC ----
def handle(self, msg):
if not isinstance(msg, dict):
return _error(None, -32600, 'request must be a JSON object')
method, mid = msg.get('method'), msg.get('id')
valid_id = (mid is None or isinstance(mid, str) or
isinstance(mid, (int, float)) and not isinstance(mid, bool) and
(not isinstance(mid, float) or math.isfinite(mid)))
if msg.get('jsonrpc') != '2.0' or not isinstance(method, str) or not method or not valid_id:
return _error(mid if valid_id else None, -32600, 'invalid JSON-RPC request')
notification = 'id' not in msg
params = msg.get('params', {})
if not isinstance(params, dict):
return None if notification else _error(mid, -32602, 'params must be an object')
# Notifications never produce responses or trigger request-only tools.
if notification:
return None
if method == 'initialize':
return _ok(mid, {'protocolVersion': '2024-11-05',
'capabilities': {'tools': {'listChanged': False}},
'serverInfo': {'name': 'lc-mcp', 'version': VERSION}})
if method == 'ping':
return _ok(mid, {})
if method == 'tools/list':
return _ok(mid, {'tools': TOOLS})
if method == 'tools/call':
name, arguments = params.get('name'), params.get('arguments', {})
if not isinstance(name, str) or not name.strip() or not isinstance(arguments, dict):
return _error(mid, -32602, 'tools/call requires a name and object arguments')
result = self.call_tool(name, arguments)
return _ok(mid, {'content': [{'type': 'text', 'text': json.dumps(result, ensure_ascii=False)}],
'isError': not result.get('ok', False)})
return _error(mid, -32601, 'method not found: %s' % method)
def call_tool(self, name, args):
try:
if name in TASK_TOOLS: # 查任务/停任务不等待正在执行的游戏工具
return self._task_tool(name, args)
with self.lock:
return self._call(name, args)
except (KeyError, TypeError, ValueError) as e:
return {'ok': False, 'error': 'bad arguments: %s: %s' % (type(e).__name__, e)}
except Exception as e:
return {'ok': False, 'error': '%s: %s' % (type(e).__name__, e)}
# ---- 工具 ----
def _task_tool(self, name, a):
if name == 'run_task':
task = a['task']
if task not in TASKS:
raise ValueError('unknown task %r' % task)
params = {k: int(a[k]) for k in TASKS[task] if a.get(k) is not None}
# Starting must not race a click that has already checked running().
# Reject promptly when busy instead of waiting behind a long OCR poll.
if not self.lock.acquire(blocking=False):
return {'ok': False, 'error': 'MCP 工具正在执行,完成后再启动 AALC 任务'}
try:
return self.tasks.start(task, params)
finally:
self.lock.release()
if name == 'task_status':
return self.tasks.status(a.get('lines', 30))
return self.tasks.stop()
def _call(self, name, a):
if not any(t['name'] == name for t in TOOLS):
return {'ok': False, 'error': 'unknown tool %s' % name}
if self.engine is None:
return {'ok': False, 'error': 'AALC 引擎不可用: %s' % self.engine_error}
if name in INPUT_TOOLS and self.tasks.running():
return {'ok': False, 'error': 'AALC 任务 %s 正在运行, 手动输入会打乱它; 先 stop_task' % self.tasks.info['task']}
e = self.engine
if name == 'screenshot':
return dict(e.screenshot(), ok=True)
if name == 'get_state':
shot, items = e.ocr()
return {'ok': True, 'screen': shot, 'items': items}
if name == 'click_text':
text = _text(a)
shot, items = e.ocr()
hits = find_hits(text, items)
if not hits:
return {'ok': False, 'error': 'text not found: %s' % text, 'screen': shot, 'items': items}
idx = int(a.get('index', 0))
if not 0 <= idx < len(hits):
return {'ok': False, 'error': 'index %d out of range (%d hits)' % (idx, len(hits)), 'hits': hits[:10]}
h = hits[idx]
e.click(h['x'], h['y'])
return {'ok': True, 'clicked': h, 'other_hits': len(hits) - 1}
if name in ('wait_for_text', 'wait_for_text_gone'):
return self._wait(_text(a), float(a.get('timeout', 30)), name == 'wait_for_text')
if name in ('find_image', 'click_image'):
pos = e.find_image(a['name'], float(a.get('threshold', 0.8)), a.get('model', 'normal'))
if pos is None:
return {'ok': name == 'find_image', 'found': False, 'name': a['name']}
if name == 'click_image':
e.click(*pos)
return {'ok': True, 'found': True, 'name': a['name'], 'x': pos[0], 'y': pos[1]}
if name == 'list_images':
imgs = e.list_images(a.get('prefix', ''))
return {'ok': True, 'count': len(imgs), 'images': imgs[:300], 'truncated': len(imgs) > 300}
if name == 'click':
e.click(int(a['x']), int(a['y']), max(1, int(a.get('times', 1))))
return {'ok': True, 'clicked': [int(a['x']), int(a['y'])]}
if name == 'keypress':
e.keypress(str(a['key']))
return {'ok': True, 'key': str(a['key'])}
if name == 'drag':
duration = float(a.get('duration', 1.0))
if not math.isfinite(duration) or not 0.1 <= duration <= 10:
raise ValueError('duration must be between 0.1 and 10 seconds')
points = [int(a[k]) for k in ('from_x', 'from_y', 'to_x', 'to_y')]
e.drag(*points, duration=duration)
return {'ok': True, 'from': points[:2], 'to': points[2:], 'duration': duration}
if name == 'type_text':
e.type_text(str(a['text']))
return {'ok': True, 'typed': str(a['text'])}
return {'ok': False, 'error': 'unknown tool %s' % name}
def _wait(self, text, timeout, want_present):
deadline = time.monotonic() + max(0.0, min(timeout, MAX_WAIT))
items, last_err = [], None
while True:
try:
shot, items = self.engine.ocr()
hits = find_hits(text, items)
if bool(hits) == want_present:
return {'ok': True, 'present': want_present, 'hits': hits[:5], 'screen': shot}
except Exception as ex:
last_err = '%s: %s' % (type(ex).__name__, ex)
if time.monotonic() + WAIT_INTERVAL > deadline:
break
time.sleep(WAIT_INTERVAL)
r = {'ok': False, 'error': 'timeout waiting %r (want present=%s)' % (text, want_present),
'last_items': items[:15]}
if last_err:
r['last_error'] = last_err
return r
def _text(a):
text = str(a.get('text', ''))
if not text.strip():
raise ValueError('text must be non-empty')
return text
def _ok(mid, result):
return {'jsonrpc': '2.0', 'id': mid, 'result': result}
def _error(mid, code, message):
return {'jsonrpc': '2.0', 'id': mid, 'error': {'code': code, 'message': message}}
def parse_line(line):
"""一行 -> (msg, error_response)。空行返回 (None, None)。"""
line = line.strip()
if not line:
return None, None
try:
msg = json.loads(line)
if msg is None:
return None, _error(None, -32600, 'request must be a JSON object')
return msg, None
except ValueError as e:
return None, _error(None, -32700, 'parse error: %s' % e)
+168
View File
@@ -0,0 +1,168 @@
# -*- coding: utf-8 -*-
"""lc-mcp 常驻服务: 跑在 Windows 交互桌面会话里(登录时由计划任务启动)。
python -m lc_mcp.server 监听 127.0.0.1:PORT, MCP 客户端经 bridge.py 连入
python -m lc_mcp.server --stdio 直接走 stdio (本机、且本进程就在桌面会话时用)
--fake 用 FakeEngine (开发/测试, 不需要 Windows/AALC)
TCP 协议: 首行 "AUTH <token>", 服务端回 "OK"; 之后逐行 JSON-RPC。
token 存在 ~/lc_mcp/token (用户目录默认只有本人可读), 防止同机其他用户/进程连进来操作游戏。
"""
import argparse
import hmac
import os
import secrets
import socketserver
import sys
import threading
from .protocol import Server, parse_line
from .tasks import TaskRunner
HOME = os.path.join(os.path.expanduser('~'), 'lc_mcp')
TOKEN_FILE = os.path.join(HOME, 'token')
DEFAULT_PORT = int(os.environ.get('LCP_PORT', '8765'))
def log(msg):
sys.stderr.write('[lc_mcp] %s\n' % msg)
sys.stderr.flush()
def load_token(create=False):
try:
with open(TOKEN_FILE, encoding='ascii') as f:
tok = f.read().strip()
if tok:
return tok
except OSError:
if not create:
raise
os.makedirs(HOME, exist_ok=True)
tok = secrets.token_hex(24)
fd = os.open(TOKEN_FILE, os.O_WRONLY | os.O_CREAT | os.O_TRUNC, 0o600)
with os.fdopen(fd, 'w', encoding='ascii') as f:
f.write(tok)
return tok
def build_server(fake=False):
os.makedirs(HOME, exist_ok=True)
tasks = TaskRunner(os.path.join(HOME, 'runs'))
if fake:
from .fake_engine import FakeEngine
return Server(FakeEngine(), tasks)
try:
from .aalc_engine import AalcEngine
return Server(AalcEngine(os.path.join(HOME, 'shots'), int(os.environ.get('LCP_KEEP_SHOTS', '30'))), tasks)
except Exception as e:
# 引擎起不来也继续服务: run_task 仍可用, 其他工具返回原因
log('AALC engine init failed: %r' % e)
return Server(None, tasks, engine_error='%s: %s' % (type(e).__name__, e))
def serve_lines(server, readline, write):
"""逐行处理直到 EOF。坏行回 parse error 后继续, 不退出。"""
import json
while True:
line = readline()
if not line:
return
msg, err = parse_line(line)
resp = err if err else (server.handle(msg) if msg is not None else None)
if resp is not None:
write(json.dumps(resp, ensure_ascii=False) + '\n')
def run_stdio(server, out=None):
out = sys.stdout if out is None else out
sys.stdout = sys.stderr # AALC 或第三方库的 print 不能混进协议流
def write(s):
out.write(s)
out.flush()
serve_lines(server, sys.stdin.readline, write)
class _Handler(socketserver.StreamRequestHandler):
def handle(self):
try:
self._handle_session()
except (ConnectionResetError, BrokenPipeError):
# MCP 客户端关闭/重载时可能直接断开 TCP,不是服务故障。
return
def _handle_session(self):
rfile, wfile = self.rfile, self.wfile
# 按字节比较: compare_digest 对含非 ASCII 字符的 str 会抛 TypeError
first = rfile.readline(256).strip()
if not (first.startswith(b'AUTH ') and hmac.compare_digest(first[5:], self.server.token.encode('ascii'))):
wfile.write(b'DENIED\n')
log('rejected connection from %s' % (self.client_address,))
return
wfile.write(b'OK\n')
wfile.flush()
wlock = threading.Lock()
def write(s):
with wlock:
wfile.write(s.encode('utf-8'))
wfile.flush()
serve_lines(self.server.mcp, lambda: rfile.readline().decode('utf-8', 'replace'), write)
class TCPServer(socketserver.ThreadingTCPServer):
daemon_threads = True
allow_reuse_address = False # Windows 上 SO_REUSEADDR 允许端口劫持
def make_tcp(mcp, host, port, token):
srv = TCPServer((host, port), _Handler)
srv.mcp, srv.token = mcp, token
return srv
def main(argv=None):
ap = argparse.ArgumentParser(prog='lc_mcp.server')
ap.add_argument('--stdio', action='store_true')
ap.add_argument('--fake', action='store_true')
ap.add_argument('--host', default='127.0.0.1')
ap.add_argument('--port', type=int, default=DEFAULT_PORT)
args = ap.parse_args(argv)
# pythonw.exe 没有标准流;登录任务仍需要可写的日志流。
_configure_streams()
protocol_out = None
if args.stdio:
if sys.stdin is None:
raise RuntimeError('--stdio requires python.exe, not pythonw.exe')
for stream in (sys.stdin, sys.stdout, sys.stderr):
if hasattr(stream, 'reconfigure'):
stream.reconfigure(encoding='utf-8')
protocol_out = sys.stdout
# AALC 导入期间也会输出,不能等引擎初始化后才隔离 stdout。
sys.stdout = sys.stderr
mcp = build_server(fake=args.fake)
if args.stdio:
return run_stdio(mcp, protocol_out)
if args.host not in ('127.0.0.1', '::1', 'localhost'):
log('WARNING: 监听 %s 会把游戏控制权暴露到网络上, 建议走 SSH 隧道' % args.host)
srv = make_tcp(mcp, args.host, args.port, load_token(create=True))
log('listening on %s:%d (token: %s)' % (args.host, args.port, TOKEN_FILE))
srv.serve_forever()
def _configure_streams():
if sys.stdout is not None and sys.stderr is not None:
return None
os.makedirs(HOME, exist_ok=True)
stream = open(os.path.join(HOME, 'server.log'), 'a', encoding='utf-8', buffering=1)
if sys.stderr is None:
sys.stderr = stream
if sys.stdout is None:
sys.stdout = stream
return stream
if __name__ == '__main__':
main()
+171
View File
@@ -0,0 +1,171 @@
# -*- coding: utf-8 -*-
"""长任务管理: 同一时刻最多一个 AALC 任务子进程。"""
import glob
import json
import os
import signal
import subprocess
import sys
import threading
import time
from .aalc_task import RESTORE_ENV
REPO = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
IS_WIN = sys.platform.startswith('win')
RESTORE_SUFFIX = '.restore.json'
def default_argv(task, params):
return [sys.executable, '-m', 'lc_mcp.aalc_task', task, json.dumps(params)]
def default_restore_argv(path):
return [sys.executable, '-m', 'lc_mcp.aalc_task', '--restore', path]
def tail(path, n):
try:
with open(path, 'rb') as f:
f.seek(0, os.SEEK_END)
f.seek(max(0, f.tell() - 64 * 1024))
lines = f.read().decode('utf-8', 'replace').splitlines()
return lines[-n:]
except OSError:
return []
ERROR_MARKERS = ('[ERROR]', 'Traceback (most recent call last)')
ERROR_SCAN_LINES = 400
def log_errors(path, limit=3):
"""挑出日志尾部的报错行。
AALC 的每日流程在单次战斗失败后会继续跑完并正常退出(exit 0), 只看退出码
会把"超出最大尝试次数,未能进入战斗"这类失败当成成功, 所以状态里额外附上
日志里的报错行。
"""
hits = [line for line in tail(path, ERROR_SCAN_LINES)
if any(marker in line for marker in ERROR_MARKERS)]
return hits[-limit:]
class TaskRunner:
def __init__(self, run_dir, argv_factory=default_argv, keep_logs=20, restore_argv=default_restore_argv):
self.run_dir = os.path.abspath(run_dir)
os.makedirs(self.run_dir, exist_ok=True)
self.argv_factory = argv_factory
self.restore_argv = restore_argv
self.keep_logs = keep_logs
self._lock = threading.Lock()
self.proc = None
self.info = None
def running(self):
return self.proc is not None and self.proc.poll() is None
def _env(self):
return dict(os.environ, PYTHONPATH=REPO + os.pathsep + os.environ.get('PYTHONPATH', ''),
PYTHONIOENCODING='utf-8', PYTHONUNBUFFERED='1')
def _pending_restores(self):
"""被强杀/崩溃的任务留下的原值文件(不含正在运行的任务自己的)。新的在前:
有多份时最后写回的是最早一份, 也就是真正的原值。"""
current = self.info.get('restore') if self.info and self.running() else None
return [p for p in sorted(glob.glob(os.path.join(self.run_dir, '*' + RESTORE_SUFFIX)), reverse=True)
if p != current]
def _restore_leftovers(self):
"""把遗留的原值写回 config.yaml。成功返回 None, 否则返回原因。"""
for path in self._pending_restores():
name = os.path.basename(path)
try:
r = subprocess.run(self.restore_argv(path), cwd=REPO, env=self._env(),
stdin=subprocess.DEVNULL, capture_output=True, timeout=120)
except (OSError, subprocess.TimeoutExpired) as e:
return 'config restore from %s failed: %s' % (name, e)
if r.returncode != 0 or os.path.exists(path):
out = (r.stdout + r.stderr).decode('utf-8', 'replace').strip().splitlines()[-3:]
return 'config restore from %s failed (exit %s): %s' % (name, r.returncode, ' | '.join(out))
return None
def start(self, task, params):
with self._lock:
if self.running():
return {'ok': False, 'error': '已有任务在跑: %s (先 stop_task)' % self.info['task']}
err = self._restore_leftovers()
if err:
# 否则新任务会把残留的覆盖值当成原值记下, 真正的原值就丢了
return {'ok': False, 'error': err + '; 写回 config.yaml 之前不启动新任务'}
stamp = time.strftime('%Y%m%d_%H%M%S')
base = os.path.join(self.run_dir, 'task_%s_%s' % (stamp, task))
env = self._env()
env[RESTORE_ENV] = base + RESTORE_SUFFIX
kw = {'creationflags': subprocess.CREATE_NEW_PROCESS_GROUP} if IS_WIN else {'start_new_session': True}
with open(base + '.log', 'wb') as logf:
self.proc = subprocess.Popen(self.argv_factory(task, params), cwd=REPO, env=env,
stdin=subprocess.DEVNULL, stdout=logf, stderr=subprocess.STDOUT, **kw)
self.info = {'task': task, 'params': params, 'log': (base + '.log').replace('\\', '/'),
'restore': env[RESTORE_ENV], 'started': time.time(), 'stopped_by_user': False}
self._prune()
return {'ok': True, 'task': task, 'pid': self.proc.pid, 'log': self.info['log']}
def status(self, lines=30):
with self._lock:
if self.info is None:
r = {'ok': True, 'state': 'idle'}
else:
code = self.proc.poll()
if code is None:
state = 'running'
else:
self.info.setdefault('ended', time.time())
state = 'stopped' if self.info['stopped_by_user'] else 'succeeded' if code == 0 else 'failed'
r = {'ok': True, 'state': state, 'task': self.info['task'], 'params': self.info['params'],
'elapsed_s': int((self.info.get('ended') or time.time()) - self.info['started']),
'log': self.info['log'], 'log_tail': tail(self.info['log'], max(1, min(int(lines), 200)))}
if code is not None:
r['exit_code'] = code
errors = log_errors(self.info['log'])
if errors:
r['errors'] = errors
pending = self._pending_restores()
if pending:
r['pending_restore'] = [os.path.basename(p) for p in pending]
return r
def stop(self):
with self._lock:
if self.running():
self.info['stopped_by_user'] = True
pid = self.proc.pid
if IS_WIN:
subprocess.run(['taskkill', '/PID', str(pid), '/T', '/F'], capture_output=True)
else:
try:
os.killpg(pid, signal.SIGKILL)
except ProcessLookupError:
pass
try:
self.proc.wait(timeout=10)
except subprocess.TimeoutExpired:
return {'ok': False, 'error': '进程 %d 10 秒内没退出' % pid}
self.info['ended'] = time.time()
r = {'ok': True, 'state': 'stopped', 'task': self.info['task']}
else:
r = {'ok': True, 'state': 'idle', 'note': '没有在跑的任务'}
# 强杀时任务的 finally 不会执行, 由这里把临时覆盖的次数写回
err = self._restore_leftovers()
if err:
r.update(ok=False, error=err)
return r
def _prune(self):
logs = sorted(glob.glob(os.path.join(self.run_dir, 'task_*.log')), key=os.path.getmtime)
for p in logs[:-self.keep_logs]:
try:
os.remove(p)
except OSError:
pass
-1
View File
@@ -1 +0,0 @@
probe
+128
View File
@@ -0,0 +1,128 @@
#!/usr/bin/env python3
"""Summarize recorded MCP actions without starting the game or importing AALC.
Only records containing an action object contribute to action/latency statistics.
These records do not prove that the game accepted an input. Missing timings
remain missing: older logs cannot separate observation and execution.
Positive jev_ms values are recorded request latencies, not proof of a successful
decision or an exhaustive account of all API attempts.
"""
import argparse
from collections import Counter
from datetime import datetime
import hashlib
import json
import math
from pathlib import Path
import statistics
def latency_summary(records, field):
values = []
invalid = 0
for record in records:
if field not in record:
continue
value = record[field]
if isinstance(value, bool) or not isinstance(value, (int, float)) or not math.isfinite(value) or value < 0:
invalid += 1
continue
values.append(value)
positive = sorted(value for value in values if value > 0)
return {
'present_records': len(values),
'missing_records': sum(field not in record for record in records),
'invalid_records': invalid,
'zero_records': sum(value == 0 for value in values),
'positive_records': len(positive),
'sum_ms': round(sum(values), 3) if values else None,
'positive_median_ms': statistics.median(positive) if positive else None,
'positive_p95_nearest_rank_ms': positive[math.ceil(len(positive) * .95) - 1] if positive else None,
'positive_max_ms': positive[-1] if positive else None,
}
def summarize(path):
path = Path(path)
raw = path.read_bytes()
records = []
for line_number, line in enumerate(raw.decode('utf-8-sig').splitlines(), 1):
if not line.strip():
continue
value = json.loads(line)
if not isinstance(value, dict):
raise ValueError(f'{path}:{line_number}: expected a JSON object')
records.append(value)
actions = [row for row in records if isinstance(row.get('action'), dict)]
tools = Counter(str(row['action'].get('tool', 'unknown')) for row in actions)
states = Counter(str(row.get('state', 'missing')) for row in records)
battle_pairs = []
for row in actions:
if row['action'].get('tool') != 'battle':
continue
result = row.get('result')
value = result.get('pairs') if isinstance(result, dict) else None
if isinstance(value, int) and not isinstance(value, bool) and value >= 0:
battle_pairs.append(value)
# Split aware/naive timestamps rather than silently invent a timezone.
timestamp_groups = {'naive_local': [], 'aware': []}
bad_timestamps = 0
for row in actions:
stamp = row.get('at')
if not isinstance(stamp, str):
bad_timestamps += 1
continue
try:
parsed = datetime.fromisoformat(stamp.replace('Z', '+00:00'))
except ValueError:
bad_timestamps += 1
continue
group = 'aware' if parsed.utcoffset() is not None else 'naive_local'
timestamp_groups[group].append(parsed)
spans = {}
for name, stamps in timestamp_groups.items():
if not stamps:
continue
ordered = sorted(stamps)
spans[name] = {
'records': len(ordered),
'first': ordered[0].isoformat(),
'last': ordered[-1].isoformat(),
'span_seconds': (ordered[-1] - ordered[0]).total_seconds(),
}
return {
'source': path.as_posix(),
'sha256': hashlib.sha256(raw).hexdigest(),
'records': len(records),
'action_records': len(actions),
'tool_counts': dict(sorted(tools.items())),
'state_counts': dict(sorted(states.items())),
'recorded_latency_ms': {field: latency_summary(actions, field) for field in ('jev_ms', 'ocr_ms', 'action_ms')},
'battle_pair_attempts': {
'reported_batches': len(battle_pairs),
'unreported_batches': tools.get('battle', 0) - len(battle_pairs),
'sum': sum(battle_pairs) if battle_pairs else None,
},
'action_timestamp_spans': spans,
'missing_or_invalid_action_timestamps': bad_timestamps,
}
def main():
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument('logs', nargs='+', type=Path, help='JSONL action logs')
parser.add_argument('--output', type=Path, help='Save the summary as JSON; otherwise print it')
args = parser.parse_args()
try:
report = {'schema_version': 1, 'logs': [summarize(path) for path in args.logs]}
except (OSError, ValueError) as error:
parser.error(str(error))
payload = json.dumps(report, ensure_ascii=False, indent=2) + '\n'
if args.output:
args.output.write_text(payload, encoding='utf-8')
else:
print(payload, end='')
if __name__ == '__main__':
main()
+67
View File
@@ -0,0 +1,67 @@
"""Bounded Win Rate batches through MCP, with a fresh UI check per turn."""
import argparse
import json
import math
import os
import time
from pathlib import Path
from mcp_session import Session, SessionCancelled, SessionTimeout
from game_scenes import battle_is_terminal, battle_is_visible
STOP_FILE = Path(os.environ.get('LC_JEV_HOME', str(Path.home() / 'lc_mcp' / 'jev'))) / 'JEV_STOP'
def is_terminal(state):
return battle_is_terminal(state)
def main():
parser = argparse.ArgumentParser()
parser.add_argument('--seconds', type=float, default=40)
parser.add_argument('--battle-confirmed', action='store_true')
args = parser.parse_args()
if not math.isfinite(args.seconds) or args.seconds <= 0:
parser.error('--seconds must be finite and positive')
deadline = time.monotonic() + min(50, max(1, args.seconds))
pairs = 0
state = {}
def cancelled():
return STOP_FILE.exists() or time.monotonic() >= deadline
try:
if cancelled():
raise SessionCancelled('Battle batch stopped before connecting')
with Session(cancelled=cancelled, raise_on_error=False) as client:
state = client.call('get_state')
active = args.battle_confirmed or battle_is_visible(state)
while not cancelled():
# Cinematics hide the HUD; explicit scene boundaries end combat.
if not state.get('ok') or not active or is_terminal(state):
break
# P cycles between Win Rate and Damage in current game versions.
# Only start a turn when its explicit Win Rate control is visible.
items = state.get('items', [])
labels = [item['text'].replace(' ', '').lower() for item in items]
target = next((item['text'] for item, label in zip(items, labels)
if label in ('win', 'winrate', '胜率')), None)
# OCR 常把回合数连在一起(如 'WAVE 1' -> 'wave1'), 用包含匹配
if target and any(m in label for label in labels for m in ('turn', 'wave', '回合', '波次')):
selected = client.call('click_text', {'text': target})
if selected.get('ok'):
time.sleep(.5)
if cancelled():
raise SessionCancelled('Battle batch stopped between Win Rate and Enter')
client.call('keypress', {'key': 'enter'})
pairs += 1
time.sleep(min(2.5, max(0, deadline - time.monotonic())))
if cancelled():
break
state = client.call('get_state')
result = {'pairs': pairs, 'state': state, 'stopped': cancelled()}
except (SessionCancelled, SessionTimeout) as error:
result = {'pairs': pairs, 'state': state, 'stopped': True,
'error': str(error), 'outcome_unknown': error.outcome_unknown}
print(json.dumps(result, ensure_ascii=False))
if __name__ == '__main__':
main()
+132
View File
@@ -0,0 +1,132 @@
"""Select a decision provider without giving providers control of game input.
An embedding controller can supply executor_decider(request) for its active
model. Standalone scripts publish DecisionRequired for their caller to handle;
they cannot invoke the caller's model themselves.
"""
from dataclasses import dataclass
import json
import math
import time
import urllib.error
import uuid
class DecisionRequired(RuntimeError):
def __init__(self, request):
super().__init__('The execution model must choose a candidate')
self.request = request
@dataclass
class Decision:
choice: str
engine: str
latency_ms: int
jev_ms: int = 0
confidence: float | None = None
probabilities: dict | None = None
model: str | None = None
fallback_reason: str | None = None
failed_jev_ms: int | None = None
def _answer(answer, options):
if isinstance(answer, str):
answer = {'choice': answer, 'latency_ms': 0}
elif isinstance(answer, tuple) and len(answer) == 2:
answer = {'choice': answer[0], 'latency_ms': answer[1]}
if not isinstance(answer, dict) or not isinstance(answer.get('choice'), str) or answer['choice'] not in options:
raise ValueError('Decision provider returned an unsupported candidate')
latency = answer.get('latency_ms', 0)
if isinstance(latency, bool) or not isinstance(latency, (int, float)) or not math.isfinite(latency) or latency < 0:
raise ValueError('Decision latency must be a finite non-negative number')
confidence = answer.get('confidence')
if confidence is not None and (isinstance(confidence, bool) or not isinstance(confidence, (int, float))
or not math.isfinite(confidence) or not 0 <= confidence <= 1):
raise ValueError('Decision confidence must be between 0 and 1')
probabilities = answer.get('probabilities')
if probabilities is not None:
if not isinstance(probabilities, dict) or set(probabilities) != set(options):
raise ValueError('Decision probabilities must describe the supplied candidates')
if any(isinstance(p, bool) or not isinstance(p, (int, float)) or not math.isfinite(p) or not 0 <= p <= 1
for p in probabilities.values()) or not math.isclose(sum(probabilities.values()), 1, abs_tol=.01):
raise ValueError('Decision probabilities must form a probability distribution')
return answer['choice'], round(latency), confidence, probabilities, answer.get('model')
class DecisionRouter:
def __init__(self, config, jev_decider, executor_decider=None, fixed_decider=None,
rules='', force_fixed=False):
self.config = dict(config)
self.mode = 'fixed' if force_fixed else self.config.get('decisionEngine', 'auto')
if self.mode not in ('auto', 'jev', 'executor', 'fixed'):
raise ValueError('decisionEngine must be auto, jev, executor or fixed')
self.jev_decider = jev_decider
self.executor_decider = executor_decider
self.fixed_decider = fixed_decider
self.rules = rules
def choose(self, state, options, recent=(), run_id=None):
if not options:
raise ValueError('Decision requires at least one candidate')
if self.mode == 'fixed':
if self.fixed_decider is None:
raise ValueError('Fixed decision provider is not configured')
choice, latency, confidence, probabilities, model = _answer(self.fixed_decider(options), options)
return Decision(choice, 'fixed', latency, confidence=confidence, probabilities=probabilities, model=model)
reason = 'configured_executor'
model = self.config.get('model')
configured_model = isinstance(model, str) and bool(model.strip())
if self.mode in ('auto', 'jev'):
if not configured_model:
reason = 'no_jev_model'
elif not self.config.get('apiKey'):
reason = 'missing_jev_credentials'
else:
started = time.monotonic()
try:
answer = self.jev_decider(self.config, state, options, recent)
choice, latency, confidence, probabilities, returned_model = _answer(answer, options)
return Decision(choice, 'jev', latency, jev_ms=latency, confidence=confidence,
probabilities=probabilities, model=returned_model or model)
except urllib.error.HTTPError as error:
reason = 'jev_http_%d' % error.code
except (OSError, TimeoutError, ValueError) as error:
reason = 'jev_unavailable_%s' % type(error).__name__
failed_jev_ms = round((time.monotonic() - started) * 1000)
else:
configured_model = False
request = {
'schema_version': 1,
'request_id': uuid.uuid4().hex,
'run_id': run_id,
'reason': reason,
'requested_engine': 'executor',
'page_state': state,
'candidates': options,
'rules': self.rules,
'recent': list(recent)[-4:],
'execution_contract': {
'response': {'request_id': '<same request_id>', 'choice': '<candidate ID>'},
'requires_fresh_observation_before_external_input': True,
'note': 'The caller handles this decision. No game input is sent while handing off.',
},
}
if self.mode in ('auto', 'jev') and configured_model and self.config.get('apiKey'):
request['failed_jev_ms'] = failed_jev_ms
# The request contains observations and candidates, never provider config
# or credentials. Detach it so the callback cannot alter executable actions.
request = json.loads(json.dumps(request, ensure_ascii=False))
if self.executor_decider is None:
raise DecisionRequired(request)
started = time.monotonic()
expected_request_id = request['request_id']
answer = self.executor_decider(request)
if isinstance(answer, dict) and answer.get('request_id') != expected_request_id:
raise ValueError('Execution-model response belongs to a different decision request')
choice, _, confidence, probabilities, returned_model = _answer(answer, options)
latency = round((time.monotonic() - started) * 1000)
return Decision(choice, 'executor', latency, confidence=confidence, probabilities=probabilities,
model=returned_model, fallback_reason=reason, failed_jev_ms=request.get('failed_jev_ms'))
+139
View File
@@ -0,0 +1,139 @@
"""Export whitelisted game feedback without credentials or unrelated files."""
import argparse
import hashlib
import json
import re
import zipfile
from datetime import datetime, timezone
from pathlib import Path
SECRET_FIELD = re.compile(r'^(api_?key|authorization|token|password|secret|credential)$', re.I)
SECRET_VALUE = re.compile(r'(?:oc_sk_[A-Za-z0-9_-]+|sk-[A-Za-z0-9_-]{12,}|Bearer\s+[A-Za-z0-9_.-]+)', re.I)
def main():
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument('--source-root', type=Path, required=True)
parser.add_argument('--runtime-root', type=Path, required=True)
parser.add_argument('--skill-root', type=Path, required=True)
parser.add_argument('--output', type=Path, required=True)
args = parser.parse_args()
output = args.output.resolve()
output.mkdir(parents=True, exist_ok=True)
roots = ((args.source_root.resolve(), '{source_root}'),
(args.runtime_root.resolve(), '{runtime_root}'),
(args.skill_root.resolve(), '{skill_root}'),
(Path.home(), '{user_home}'))
redactions = 0
def clean_text(value):
nonlocal redactions
value, count = SECRET_VALUE.subn('[REDACTED]', value)
redactions += count
for root, label in roots:
value = value.replace(str(root), label).replace(root.as_posix(), label)
return value
def clean(value):
nonlocal redactions
if isinstance(value, dict):
result = {}
for key, item in value.items():
if SECRET_FIELD.fullmatch(key):
result[key] = '[REDACTED]'
redactions += 1
else:
result[key] = clean(item)
return result
if isinstance(value, list):
return [clean(item) for item in value]
return clean_text(value) if isinstance(value, str) else value
exported = []
def record(relative, source, raw, data, kind):
target = output / relative
target.parent.mkdir(parents=True, exist_ok=True)
target.write_bytes(data)
exported.append({'path': relative, 'source': clean_text(str(source)), 'kind': kind,
'source_sha256': hashlib.sha256(raw).hexdigest(),
'export_sha256': hashlib.sha256(data).hexdigest(), 'bytes': len(data)})
counts = {}
skipped_partial = {}
# Never include config files, Codex session transcripts, or auth tokens.
for name in ('agent_log.jsonl', 'lc_agent_log.jsonl', 'jev_mirror_log.jsonl',
'agent_smoke.jsonl', 'lc_agent_smoke.jsonl'):
source = args.source_root / name
if not source.exists():
continue
raw = source.read_bytes()
rows = []
skipped = 0
for line in raw.decode('utf-8-sig', 'replace').splitlines():
if not line.strip():
continue
try:
rows.append(clean(json.loads(line)))
except json.JSONDecodeError:
skipped += 1
data = ''.join(json.dumps(row, ensure_ascii=False) + '\n' for row in rows).encode('utf-8')
record('logs/' + name, source, raw, data, 'sanitized_jsonl')
counts[name] = len(rows)
if skipped:
skipped_partial[name] = skipped
for name in ('jev_mirror_status.json', 'jev_shop_context.json'):
source = args.source_root / name
if source.exists():
raw = source.read_bytes()
data = json.dumps(clean(json.loads(raw.decode('utf-8-sig'))), ensure_ascii=False, indent=2).encode('utf-8')
record('logs/' + name, source, raw, data, 'sanitized_snapshot')
sources = [(args.runtime_root / 'server.log', 'logs/server.txt')]
sources.extend((p, 'logs/runs/' + p.stem + '.txt') for p in sorted((args.runtime_root / 'runs').glob('*')) if p.is_file())
sources.extend((args.source_root / name, 'source_snapshots/' + name)
for name in ('lc_agent.py', 'jev_mirror_agent.py', 'jev_decision_client.mjs',
'test_jev_mirror_agent.py', 'mirror_dungeon_speedrun_notes.md'))
sources.extend((p, 'skill/' + p.relative_to(args.skill_root).as_posix())
for p in sorted(args.skill_root.rglob('*.md')))
for source, relative in sources:
if source.exists():
raw = source.read_bytes()
cleaned = clean_text(raw.decode('utf-8-sig', 'replace'))
if source.suffix == '.py':
cleaned = cleaned.rstrip() + '\n'
record(relative, source, raw, cleaned.encode('utf-8'), 'sanitized_text')
captures = []
archive = output / 'game-captures.zip'
with zipfile.ZipFile(archive, 'w', compression=zipfile.ZIP_DEFLATED, compresslevel=1) as bundle:
for label, folder in (('legacy_game', args.source_root / 'shots'),
('mcp_game', args.runtime_root / 'shots'),
('model_game', args.source_root / 'lc_shots'),
('fixtures', args.source_root / 'fixtures')):
for source in sorted(folder.glob('*')):
if not source.is_file() or source.suffix.lower() not in ('.png', '.jpg', '.jpeg'):
continue
try:
raw = source.read_bytes()
except FileNotFoundError:
continue # live screenshots can rotate during export
name = label + '/' + source.name
bundle.writestr(name, raw)
captures.append({'path': name, 'bytes': len(raw), 'sha256': hashlib.sha256(raw).hexdigest()})
(output / 'capture_manifest.json').write_text(json.dumps(captures, ensure_ascii=False, indent=2), encoding='utf-8')
manifest = {'snapshot_at_utc': datetime.now(timezone.utc).isoformat(),
'log_record_counts': counts, 'partial_lines_skipped': skipped_partial,
'redaction_count': redactions, 'files': exported, 'capture_count': len(captures),
'capture_archive_bytes': archive.stat().st_size,
'capture_archive_sha256': hashlib.sha256(archive.read_bytes()).hexdigest(),
'excluded': ['API/MCP credentials', 'all local configs', 'Codex session transcripts',
'unrelated asset extraction files', 'virtual environments'],
'limitations': ['MCP retains only 30 recent captures; deleted frames cannot be reconstructed.',
'Live session still running; snapshot is not proof of dungeon completion.']}
(output / 'manifest.json').write_text(json.dumps(manifest, ensure_ascii=False, indent=2), encoding='utf-8')
print(json.dumps({k:manifest[k] for k in ('snapshot_at_utc', 'log_record_counts', 'capture_count',
'capture_archive_bytes', 'redaction_count')}, ensure_ascii=False))
if __name__ == '__main__':
main()
+28
View File
@@ -0,0 +1,28 @@
"""Shared battle boundaries for all MCP controllers."""
def normalized_texts(state):
return [item['text'].replace(' ', '') for item in state.get('items', [])]
def death_retry_screen(texts):
combined = '\n'.join(texts)
return ('全体罪人' in combined and '死亡' in combined
or '当前剩余人员' in combined and '重试关卡' in combined)
def battle_is_terminal(state):
texts = normalized_texts(state)
markers = ('正在探', '获得E.G.O饰品', '选择E.G.O饰品', '饰品观测',
'开始战斗', '主题卡包', '应该让谁', '选择一位罪人', '进行判定',
'选择遭遇战奖励卡', '选项事件', '选择苦难', '选项', '结果',
'探索完成', '探索结束', '驾驶席', '服务器发生错误', '重试关卡')
return death_retry_screen(texts) or any(
text.upper() in ('VICTORY', 'DEFEAT') or any(marker in text for marker in markers)
for text in texts)
def battle_is_visible(state):
texts = normalized_texts(state)
return (any(marker in '\n'.join(texts).upper() for marker in ('WAVE', 'TURN', 'DURANTE'))
or any(text in ('胜率', '伤害') for text in texts))
+38
View File
@@ -0,0 +1,38 @@
# 注册登录时启动的 lc-mcp 常驻服务 (交互会话, 能看到游戏窗口)。
# 用法 (在要跑游戏的那个账号下, 普通 PowerShell 即可):
# powershell -ExecutionPolicy Bypass -File scripts\install_logon_task.ps1
# 可选: -Python <python.exe 路径> 默认用 vendor\aalc\.venv (uv sync 生成)
# -Elevated 游戏以管理员运行时才需要(UIPI 会挡住低权限进程的输入)
# -Uninstall
param(
[string]$Python = "",
[switch]$Elevated,
[switch]$Uninstall
)
$ErrorActionPreference = "Stop"
$TaskName = "LcMCPServer"
$Repo = Split-Path -Parent $PSScriptRoot
if ($Uninstall) {
Unregister-ScheduledTask -TaskName $TaskName -Confirm:$false -ErrorAction SilentlyContinue
Write-Output "removed $TaskName"
exit 0
}
if (-not $Python) { $Python = Join-Path $Repo "vendor\aalc\.venv\Scripts\pythonw.exe" }
if (-not (Test-Path $Python)) {
throw "找不到 Python: $Python`n先在 vendor\aalc 里执行 uv sync, 或用 -Python 指定 AALC 依赖齐全的解释器"
}
$user = "$env:USERDOMAIN\$env:USERNAME"
$action = New-ScheduledTaskAction -Execute $Python -Argument "-m lc_mcp.server" -WorkingDirectory $Repo
$trigger = New-ScheduledTaskTrigger -AtLogOn -User $user
$level = if ($Elevated) { "Highest" } else { "Limited" }
$principal = New-ScheduledTaskPrincipal -UserId $user -LogonType Interactive -RunLevel $level
$settings = New-ScheduledTaskSettingsSet -AllowStartIfOnBatteries -DontStopIfGoingOnBatteries `
-ExecutionTimeLimit ([TimeSpan]::Zero) -RestartCount 3 -RestartInterval (New-TimeSpan -Minutes 1) `
-MultipleInstances IgnoreNew
Register-ScheduledTask -TaskName $TaskName -Action $action -Trigger $trigger -Principal $principal `
-Settings $settings -Force | Out-Null
Start-ScheduledTask -TaskName $TaskName
Write-Output "registered + started $TaskName ($level) -> $Python -m lc_mcp.server"
+111
View File
@@ -0,0 +1,111 @@
"""Jev choice API shared by scene agents; credentials never enter curl argv."""
import argparse
import json
import os
import subprocess
import time
import urllib.error
import urllib.request
import uuid
from pathlib import Path
DEFAULT_BASE_URL = 'https://opencode.ai/zen/v1'
def _post(cfg, body):
url = cfg.get('baseUrl', DEFAULT_BASE_URL).rstrip('/') + '/systemone'
headers = {
'Authorization': 'Bearer ' + cfg['apiKey'],
'Content-Type': 'application/json',
'User-Agent': 'lc-mcp/0.1',
'x-opencode-session': cfg.setdefault('sessionId', str(uuid.uuid4())),
}
payload = json.dumps(body, ensure_ascii=False)
timeout = float(cfg.get('timeoutSeconds', 7))
transport = cfg.get('transport', 'urllib')
if transport == 'urllib':
request = urllib.request.Request(url, data=payload.encode('utf-8'),
headers=headers, method='POST')
with urllib.request.urlopen(request, timeout=timeout) as response:
return json.load(response)
if transport != 'curl':
raise ValueError('Unsupported Jev transport')
if any('\r' in value or '\n' in value for value in headers.values()):
raise ValueError('Jev headers must be single-line values')
config = '\n'.join('header = ' + json.dumps(key + ': ' + value)
for key, value in headers.items()) + '\n'
result = subprocess.run(
['curl.exe' if os.name == 'nt' else 'curl', '-sS', '--config', '-',
'--connect-timeout', str(min(timeout, 10)), '--max-time', str(timeout),
'--data-raw', payload, '--write-out', '\n%{http_code}', url],
input=config, capture_output=True, text=True, encoding='utf-8',
timeout=timeout + 2,
)
if result.returncode:
# Curl diagnostics may contain request details; expose only its exit code.
raise OSError('Jev transport failed (curl exit %d)' % result.returncode)
content, separator, status = result.stdout.rpartition('\n')
if not separator or not status.isdigit():
raise ValueError('Invalid Jev HTTP response')
code = int(status)
if not 200 <= code < 300:
raise urllib.error.HTTPError(url, code, 'Jev HTTP %d' % code, {}, None)
return json.loads(content)
def request_answer(cfg, state, criteria, instructions):
"""返回 {'choice', 'latency_ms', 'confidence', 'probabilities', 'model'}; 候选之外的结果会被拒绝。"""
if not cfg.get('apiKey'):
raise ValueError('Jev API key is required')
if not criteria:
raise ValueError('Jev requires permitted choices')
model = cfg.get('model', 'jev-1.13-free')
body = {
'model': model,
'state': state,
'questions': {'action': {'type': 'choice', 'instructions': instructions,
'criteria': criteria}},
}
started = time.monotonic()
for attempt in range(2):
try:
result = _post(cfg, body)
break
except urllib.error.HTTPError as error:
if error.code in (401, 403, 429) or attempt:
raise
time.sleep(.3)
except (OSError, TimeoutError):
if attempt:
raise
time.sleep(.3)
answer = result.get('answers', {}).get('action', {})
choice = answer.get('choice')
if answer.get('type') != 'choice' or choice not in criteria:
raise ValueError('Jev returned an unsupported candidate')
return {'choice': choice, 'latency_ms': round((time.monotonic() - started) * 1000),
'confidence': answer.get('confidence'), 'probabilities': answer.get('probabilities'),
'model': result.get('model') or model}
def request_decision(cfg, state, criteria, instructions):
answer = request_answer(cfg, state, criteria, instructions)
return answer['choice'], answer['latency_ms']
def main():
parser = argparse.ArgumentParser(description='Choose from an observed game scene; sends no game input.')
parser.add_argument('config', type=Path)
parser.add_argument('observation', type=Path)
args = parser.parse_args()
cfg = json.loads(args.config.read_text(encoding='utf-8-sig'))
cfg['apiKey'] = os.environ.get('OPENCODE_API_KEY') or cfg.get('apiKey')
observation = json.loads(args.observation.read_text(encoding='utf-8-sig'))
choice, latency = request_decision(cfg, observation['state'], observation['criteria'],
observation['instructions'])
print(json.dumps({'choice': choice, 'jev_ms': latency}, ensure_ascii=False))
if __name__ == '__main__':
main()
+7
View File
@@ -0,0 +1,7 @@
{
"decisionEngine": "jev",
"model": "jev-1.13-free",
"baseUrl": "https://opencode.ai/zen/v1",
"transport": "urllib",
"timeoutSeconds": 7
}
+39
View File
@@ -0,0 +1,39 @@
// Only send a concise game-state description and explicit permitted choices.
// Credentials are supplied in memory or OPENCODE_API_KEY, never stored here.
export async function decide(state, criteria, options = {}) {
const apiKey = options.apiKey ?? process.env.OPENCODE_API_KEY;
if (!apiKey) throw new Error('OPENCODE_API_KEY is required');
if (typeof state !== 'string' || !state.trim()) throw new Error('State text is required');
if (!criteria || Object.keys(criteria).length < 2) throw new Error('At least two choices are required');
const started = performance.now();
const response = await fetch('https://opencode.ai/zen/v1/systemone', {
method: 'POST',
redirect: 'error',
headers: { Authorization: `Bearer ${apiKey}`, 'Content-Type': 'application/json' },
signal: AbortSignal.timeout(options.timeoutMs ?? 7000),
body: JSON.stringify({
model: options.model ?? 'jev-1.13-free',
state,
questions: {
action: {
type: 'choice',
instructions: 'Choose the action that respects the stated user rules and completes the Limbus Company Mirror Dungeon fastest. Use only the supplied choices.',
criteria,
},
},
}),
});
if (!response.ok) throw new Error(`Jev HTTP ${response.status}`);
const body = await response.json();
const answer = body.answers?.action;
if (answer?.type !== 'choice' || !Object.hasOwn(criteria, answer.choice)) {
throw new Error('Jev returned an unsupported choice');
}
return {
choice: answer.choice,
confidence: answer.confidence,
probabilities: answer.probabilities,
latencyMs: Math.round(performance.now() - started),
model: body.model,
};
}
+924
View File
@@ -0,0 +1,924 @@
"""Validated scene actions for Jev decisions and fixed speedrun macros."""
import argparse
import functools
import json
import os
import re
import time
from pathlib import Path
from mcp_session import Session as Bridge, SessionCancelled, SessionTimeout
from game_scenes import battle_is_terminal, battle_is_visible, death_retry_screen
from run_state import prepare_run, save_json, record_claim, claim_is_current, complete_run
from decision_router import DecisionRouter, DecisionRequired
from jev_client import request_answer
REPO_ROOT = Path(__file__).resolve().parents[1]
MIRROR_ASSETS = REPO_ROOT / 'vendor' / 'aalc' / 'assets' / 'images' / 'default' / 'share' / 'mirror'
RUNTIME_HOME = Path(os.environ.get('LC_JEV_HOME', str(Path.home() / 'lc_mcp' / 'jev')))
STOP_FILE = RUNTIME_HOME / 'JEV_STOP'
SYSTEM_RULES = (
'你负责识别固定场景、路线和所有下一步决策。目标是最快完成当前一局镜牢。'
'只能选择所给候选;不要反复点击未生效的按钮。战斗选 battle 宏,P+回车,不用空格。'
'刚选路线、回车开战或上一动作是战斗时,特写或加载没有OCR文字很正常;选短等或战斗宏,不仅因OCR为空要求分析。'
'遇到事件判定先点SKIP跳过对话,跳完后再选择事件选项、罪人或进行判定;剧情同样优先SKIP。'
'事件当前有“选择后获得”且无需判定、无需战斗的选项时直接选择它,不反复滚动;避开写着战斗胜利后的选项。'
'确定确认/进入/开始战斗直接执行。地图优先可达事件和商店,减少战斗。'
'选好路线直接回车进入,关卡编队界面也直接回车开战;保留原编队,不再检查人员。'
'保留当前编队。开局三级饰品三选一必须选择标准负载电池,再确认领取;不能当成额外观测拒绝。'
'成捆的符咒++、标准负载电池和鸡胸为核心,保留不可出售或合成;仅略过单独的额外观测。其他苦难避开敌方体力上限和防御等级。'
'3层起辛克莱1换3,黑兽奥提斯2换3,其他出战1换3。只在商店强化饰品。'
'快感尽量在2、3层商店合成,并当场强化至二级++;4层仅补做。观测允许领取破裂体系雷枝,之后到商店强化,保留核心和技能预算。'
'商店没有出战角色可替换技能时允许刷新,当前商店最多4次;有可替换角色先按技能表替换。'
'第一至第四层禁止选择2号线卡包,第五层必选2号线;刷新次数为零时允许使用卡包观测。层末选完奖励连续回车进入下一层。离开商店也用回车;未生效再点当前按钮。'
'卡包信息不清先点对应放大镜查看;核心饰品齐全时按通关速度选择现有卡包,不为可选饰品反复刷新。'
'信息不足、重复操作仍无效、苦难无法明确核对,或你判断需要主助手分析时选 requires_analysis。'
)
def text_items(state):
return state.get('items') or []
_SCREEN_CACHE = {}
def screen_image(path, mode):
"""按模式解码当前截图并缓存: 一帧里多次判色/裁剪只解码一次整张 PNG (1080p 约 75ms/次)。
键含修改时间和大小, 同路径写入新内容时不会命中旧图。"""
from PIL import Image
st = os.stat(path)
key = (str(path), st.st_mtime_ns, st.st_size, mode)
image = _SCREEN_CACHE.get(key)
if image is None:
if len(_SCREEN_CACHE) >= 4:
_SCREEN_CACHE.clear()
with Image.open(path) as source:
image = source.convert(mode)
_SCREEN_CACHE[key] = image
return image
def button_enabled(state, item):
try:
import numpy as np
x, y, w, h = (int(item[k]) for k in ('x', 'y', 'w', 'h'))
crop = np.array(screen_image(state['screen']['path'], 'L').crop((x, y, x + w, y + h)))
return float(np.quantile(crop, 0.9)) > 85
except (OSError, KeyError, ImportError):
return False
@functools.lru_cache(maxsize=64)
def _map_template(kind, name, scale):
"""地图识别模板, 按截图比例缩放; 窗口尺寸不变时每帧复用, 不再重复读盘和计算特征点。
返回的数组是共享缓存, 调用方不能原地修改。"""
import cv2
import numpy as np
from PIL import Image
path = MIRROR_ASSETS / name
if kind == 'bus':
with Image.open(path) as image:
gray = cv2.cvtColor(np.array(image.convert('RGB')), cv2.COLOR_RGB2GRAY)
return cv2.resize(gray, None, fx=scale, fy=scale, interpolation=cv2.INTER_AREA)
if kind == 'arrow':
# 等价于 cv2.imread(path, 0); imread 在 Windows 上打不开含中文的路径
gray = cv2.imdecode(np.fromfile(str(path), dtype=np.uint8), cv2.IMREAD_GRAYSCALE)
return cv2.resize(gray, None, fx=scale, fy=scale, interpolation=cv2.INTER_AREA)
# 节点图标: ORB 描述子只取决于模板和参数
with Image.open(path) as image:
gray = cv2.resize(np.array(image.convert('L')), None, fx=2*scale, fy=2*scale)
return cv2.ORB_create(nfeatures=1000, scaleFactor=1.2, edgeThreshold=10).detectAndCompute(gray, None)[1]
def map_candidates(state):
"""Only observe reachable nodes; Jev chooses their route."""
import cv2
import numpy as np
rgb = np.array(screen_image(state['screen']['path'], 'RGB'))
gray = cv2.cvtColor(rgb, cv2.COLOR_RGB2GRAY)
scale = min(rgb.shape[0] / 1440, rgb.shape[1] / 2560)
bus = _map_template('bus', 'mybus_default_distance.png', scale)
_, confidence, _, location = cv2.minMaxLoc(cv2.matchTemplate(gray, bus, cv2.TM_CCOEFF_NORMED))
if confidence < 0.88:
return {}
bx, by = location[0] + bus.shape[1] // 2, location[1] + bus.shape[0] // 2
result = {}
orb = cv2.ORB_create(nfeatures=1000, scaleFactor=1.2, edgeThreshold=10)
for key, dy, direction in (('w', -400, '上方'), ('d', 50, '正前方'), ('s', 450, '下方')):
x, y = int(bx + 500 * scale), int(by + dy * scale)
if not (0 < x < rgb.shape[1] and 0 < y < rgb.shape[0]*.82):
continue
radius = int(125 * scale)
# Event and shop nodes remain purple even when reachable. Their
# connecting arrow, rather than node color, indicates availability.
ax, ay = int(bx + 250*scale), int(by + dy*scale/2)
arrow_roi = gray[max(0,ay-radius):min(gray.shape[0],ay+radius),
max(0,ax-radius):min(gray.shape[1],ax+radius)]
arrow_name = {'w':'up','d':'mid','s':'down'}[key]
template = _map_template('arrow', 'road_in_mir/%s.png' % arrow_name, scale)
arrow_reachable = False
if arrow_roi.shape[0] >= template.shape[0] and arrow_roi.shape[1] >= template.shape[1]:
_, arrow_score, _, arrow_pos = cv2.minMaxLoc(cv2.matchTemplate(arrow_roi, template, cv2.TM_CCOEFF_NORMED))
sample = arrow_roi[arrow_pos[1]:arrow_pos[1]+template.shape[0],
arrow_pos[0]:arrow_pos[0]+template.shape[1]]
arrow_reachable = arrow_score > .85 and float(np.quantile(sample,.9)) > 90
roi = rgb[max(0,y-radius):min(rgb.shape[0],y+radius), max(0,x-radius):min(rgb.shape[1],x+radius)]
hsv = cv2.cvtColor(roi, cv2.COLOR_RGB2HSV)
red = ((hsv[:,:,0] < 12) | (hsv[:,:,0] > 168)) & (hsv[:,:,1] > 150) & (hsv[:,:,2] > 150)
green = (hsv[:,:,0] > 27) & (hsv[:,:,0] < 85) & (hsv[:,:,1] > 110) & (hsv[:,:,2] > 150)
white = (hsv[:,:,1] < 100) & (hsv[:,:,2] > 175)
cyan = (hsv[:,:,0] >= 80) & (hsv[:,:,0] <= 110) & (hsv[:,:,1] > 110) & (hsv[:,:,2] > 150)
colored = int((red | green | cyan).sum()) >= 80
if not colored and int(white.sum()) < 80 and not arrow_reachable:
continue
target = cv2.resize(cv2.cvtColor(roi, cv2.COLOR_RGB2GRAY), None, fx=2, fy=2)
_, target_desc = orb.detectAndCompute(target, None)
scores = []
if target_desc is not None:
for name, label in (('shop','商店'),('event','事件'),('battle','普通战斗'),
('risky_encounter','精英战斗'),('focused_encounter','集中战斗')):
desc = _map_template('icon', 'road_in_mir/%s.png' % name, scale)
if desc is not None:
matches = cv2.BFMatcher(cv2.NORM_HAMMING).knnMatch(desc, target_desc, k=2)
score = sum(len(pair) == 2 and pair[0].distance < 0.7*pair[1].distance for pair in matches)
scores.append((score, label))
score, label = max(scores, default=(0, '类型未识别'))
if not colored and score < 8 and not arrow_reachable:
continue
if score < 8:
label = '类型未识别'
result['route_' + key] = {
'description': '%s有高亮可达节点:%s,图标匹配数%d,中心(%d,%d)。按方向键选中后直接回车进入,无需二次确认。' % (direction,label,score,x,y),
'action': {'tool': 'route', 'args': {'key': key}},
}
return result
def candidates(state, previous_battle=False, refresh_used=0):
items = text_items(state)
texts = [item['text'].replace(' ', '') for item in items]
combined = '\n'.join(texts)
width = state.get('screen', {}).get('w', 1920)
height = state.get('screen', {}).get('h', 1080)
options = {'requires_analysis': {
'description': '你判断信息不足或需要主助手分析:暂停并返回当前游戏截图和问题。',
'action': {'tool': 'requires_analysis', 'args': {}},
}, 'wait': {
'description': '短暂等待0.7秒后重新读取画面;CONNECTING或界面动画尚未完成时用,不发送输入。',
'action': {'tool': 'wait', 'args': {'seconds': 0.7}},
}}
# Refresh requests leave the previous stock visible until networking ends.
# Never buy, refresh again, or leave based on that stale inventory.
if any(re.search(r'CON+ECTING|LOADING', t.upper()) for t in texts):
return options
if state.get('claim_requested'):
# After claiming, never let the generic Enter action start another run.
if ('探索状态' in texts and '进入' in texts and '探索中' not in texts
or '驾驶席' in texts and '罪人' in texts):
options['run_complete'] = {'description': '奖励领取后已返回大厅,结束本局。',
'action': {'tool': 'run_complete', 'args': {}}}
else:
confirm = next((i for i in items if i['text'].replace(' ', '') in ('确认','继续')
and button_enabled(state, i)), None)
if confirm:
options['modal_confirm'] = {'description': '确认最终领取弹窗。',
'action': {'tool': 'click', 'args': {'x': confirm['x']+confirm['w']//2,
'y': confirm['y']+confirm['h']//2}}}
return options
if death_retry_screen(texts):
return options
if '服务器发生错误' in combined:
retry = next((i for i in items if i['text'].replace(' ', '') == '重试'), None)
if retry:
options['retry_network'] = {'description': '重试当前游戏服务器错误弹窗,不操作背景商店。',
'action': {'tool': 'click', 'args': {'x': retry['x']+retry['w']//2, 'y': retry['y']+retry['h']//2}}}
return options
if '探索完成' in texts:
claim = next((i for i in items if i['text'].replace(' ', '') == '领取'
and button_enabled(state,i)), None)
if claim:
options['claim_final'] = {
'description':'最终探索完成:点击领取并按回车确认奖励。',
'action':{'tool':'claim_final','args':{'x':claim['x']+claim['w']//2,
'y':claim['y']+claim['h']//2}},
}
return options
gift_headers = sum(t == '获得E.G.O饰品' for t in texts)
if gift_headers == 1 and '拒绝饰品' in texts and '选择' in texts:
core = any(name in combined for name in ('成捆的符咒','标准负载电池','干巴柴涩鸡胸肉','干松紧致鸡胸肉','快感','雷枝'))
if core and '雷枝' not in combined:
return options
if not core:
target = next(i for i in items if i['text'].replace(' ','') == '拒绝饰品')
options['decline_extra_observation'] = {'description': '拒绝单张无关额外饰品。',
'action': {'tool':'click','args':{'x':target['x']+target['w']//2,'y':target['y']+target['h']//2}}}
return options
if any(t in ('判定成功', '判定失败', '结果') for t in texts):
continuation = next((i for i in items if i['text'].replace(' ', '') in ('继续', '开始战斗')
and button_enabled(state,i)), None)
options['event_finish'] = {
'description': '判定结果已出现,快速连按回车结束事件并返回地图。',
'action': {'tool':'advance_dialog','args':{'presses':5}},
}
if continuation:
options['event_finish']['fallback_action']={'tool':'click','args':{
'x':continuation['x']+continuation['w']//2,'y':continuation['y']+continuation['h']//2}}
return options
for index, item in enumerate(items):
if item['text'].replace(' ', '').upper() == 'SKIP' and button_enabled(state, item):
options['skip_dialog'] = {
'description': '先点击SKIP跳过当前对话,再读取事件选项或判定;当前不选择罪人或进行判定。',
'action': {'tool': 'click', 'args': {'x': item['x'] + item['w']//2,
'y': item['y'] + item['h']//2}},
}
return options
if any('REC' in t.upper() for t in texts) and '选项' not in texts and not any(t in combined for t in ('选择一位罪人', '进行判定', '判定成功', '判定失败', '结果')):
options['event_advance'] = {'description':'事件选项已经确定,按回车快速推进后续文本。', 'action':{'tool':'advance_dialog','args':{'presses':5}}}
return options
if '应该让谁' in combined and '选择一位罪人' not in combined and '进行判定' not in combined:
options['event_advance'] = {
'description': '对话已经跳过,按回车继续到选择罪人的判定界面。',
'action': {'tool': 'advance_dialog', 'args': {}},
}
return options
for index, item in enumerate(items):
if item['text'].replace(' ', '').lstrip('×xX') == '关闭':
options['close_%d' % index] = {
'description': '关闭当前饰品查看/强化窗口,返回商店继续换技能;电池不是当前必要强化目标。',
'action': {'tool': 'keypress', 'args': {'key': 'esc'}},
}
if '迷宫进度' in texts:
for index, item in enumerate(items):
if item['text'].replace(' ', '') == '继续':
options['resume_game'] = {
'description': '关闭迷宫进度菜单并继续当前商店操作。',
'action': {'tool': 'click', 'args': {'x': item['x']+item['w']//2,
'y': item['y']+item['h']//2}},
}
return options
if any('是否消耗' in t and '技能替换' in t for t in texts):
header = next((t for t in texts if '替换' in t and '技能' in t and '是否' not in t), '')
skills = sorted([i for i in items if re.fullmatch(r'SKILL\s*[123]', i['text'])
and height*.28 < i['y'] < height*.5], key=lambda i: i['x'])
target = ('SKILL2', 'SKILL3') if '奥提斯' in header else (
('SKILL1', 'SKILL2') if '辛克莱' in header and state.get('floor', 3) < 3 else ('SKILL1', 'SKILL3'))
if tuple(i['text'].replace(' ', '') for i in skills) == target:
for item in items:
if item['text'] == '购买':
options['buy_swap'] = {
'description': '已核对本层所需技能替换 %s→%s,点击购买完成。' % target,
'action': {'tool': 'click', 'args': {'x': item['x']+item['w']//2,
'y': item['y']+item['h']//2}},
}
return options
if any('当前持有技能' in t for t in texts):
header = next((t for t in texts if '替换' in t and '技能' in t), '')
target = ('SKILL2', 'SKILL3') if '奥提斯' in header else (
('SKILL1', 'SKILL2') if '辛克莱' in header and state.get('floor', 3) < 3 else ('SKILL1', 'SKILL3'))
target_selected = False
for number, fraction in enumerate((0.244, 0.499, 0.752), 1):
cx = round(width*fraction)
skill_texts = [i for i in items if 'SKILL' in i['text'].upper()
and abs(i['x']+i['w']/2 - (cx + width*.075)) < width*.05
and height*.3 < i['y'] < height*.7]
skill_texts.sort(key=lambda i: i['y'])
if len(skill_texts) == 2:
if tuple(i['text'].upper().replace(' ', '') for i in skill_texts) != target:
continue
detail = skill_texts[0]['text'] + ' → ' + skill_texts[1]['text']
options['skill_swap_%d' % number] = {
'description': header + ':第%d项 %s;按楼层技能表选这一项。' % (number, detail),
'action': {'tool': 'click', 'args': {'x': cx, 'y': round(height*.45)}},
}
try:
import cv2
import numpy as np
border = np.array(screen_image(state['screen']['path'], 'RGB').crop(
(int(cx-width*.12), int(height*.31), int(cx-width*.107), int(height*.69))))
hsv = cv2.cvtColor(border, cv2.COLOR_RGB2HSV)
target_selected = float(((hsv[:,:,0] > 8) & (hsv[:,:,0] < 35) &
(hsv[:,:,1] > 200) & (hsv[:,:,2] > 220)).mean()) > .18
except (KeyError, OSError, ImportError):
pass
for item in items:
if target_selected and item['text'].replace(' ', '') == '确认' and button_enabled(state, item):
options['confirm_swap'] = {
'description': '确认已经选中的技能替换,支付本项费用。未选项目时应先点技能替换项。',
'action': {'tool': 'click', 'args': {'x': item['x'] + item['w']//2,
'y': item['y'] + item['h']//2}},
}
return options
if any('获得E.G.O饰品!' in t or '获得E.G.O饰品!' in t for t in texts):
item=next((i for i in items if i['text'].replace(' ','')=='确认' and width*.4 < i['x']+i['w']/2 < width*.6),None)
if item:
options['modal_confirm']={'description':'按回车快速确认当前获得饰品弹窗。','action':{'tool':'keypress','args':{'key':'enter'}}}
options['modal_confirm']['fallback_action']={'tool':'click','args':{'x':item['x']+item['w']//2,'y':item['y']+item['h']//2}}
return options
if '追加的苦难' in combined and '获得E.G.O' in combined:
for number, fraction in enumerate((.188, .395, .60, .813), 1):
cx = round(width*fraction)
details = ';'.join(i['text'] for i in items
if abs(i['x']+i['w']/2-cx) < width*.102
and height*.22 < i['y'] < height*.77)
if details:
options['hardship_%d' % number] = {
'description': '层末第%d张饰品与苦难:%s。必需饰品优先;其他避开体力上限和防御等级。' % (number,details),
'action': {'tool':'click', 'args':{'x':cx, 'y':round(height*.43)}},
}
for item in items:
count=re.search(r'(\d+)\s*/\s*(\d+)',item['text'])
if ('选择' in item['text'] and count and int(count[2])>0
and int(count[1])>=int(count[2]) and button_enabled(state,item)):
options['hardship_confirm'] = {
'description':'选择数量足够后确认层末饰品和苦难,直接前进。',
'action':{'tool':'advance_dialog','args':{'presses':3}},
'fallback_action':{'tool':'click','args':{'x':item['x']+item['w']//2,'y':item['y']+item['h']//2}},
}
return options
# Nested confirmation/detail windows override the reward/pack behind them.
modal_question = ('确认' in texts and any('取消' in t for t in texts)
and any('吗?' in t or '吗?' in t or '要离开商店吗' in t for t in texts))
pack_detail = '出现头目' in combined and '详细内容' in combined
if modal_question or pack_detail:
buttons = [i for i in items if i['text'].replace(' ', '') == '确认'
and button_enabled(state, i)]
if buttons:
item = min(buttons, key=lambda i: i['y'])
options['modal_confirm'] = {
'description': '确认当前最上层弹窗;不操作背景奖励卡或卡包。',
'action': ({'tool': 'keypress', 'args': {'key': 'enter'}}
if any('要离开商店吗' in t for t in texts) else
{'tool': 'click', 'args': {'x': item['x'] + item['w']//2,
'y': item['y'] + item['h']//2}}),
}
return options
if any('选择遭遇战奖励卡' in t for t in texts):
for index,item in enumerate(items):
if height*.48 < item['y'] < height*.65 and any(t in item['text'] for t in ('经费', '资源', '体力', '理智')):
options['reward_card_anchor_%d'%index]={'description':'当前奖励卡:'+item['text'], 'action':{'tool':'click','args':{'x':item['x']+item['w']//2,'y':round(item['y']-height*.15)}}}
for number, fraction in enumerate((0.355, 0.514, 0.674), 1):
cx = round(width*fraction)
detail = ';'.join(i['text'] for i in items
if abs(i['x']+i['w']/2-cx) < width*.07 and height*.48 < i['y'] < height*.65)
if detail:
options['reward_card_%d' % number] = {
'description': '遭遇战奖励卡第%d张:%s。优先减少额外操作,略过无关饰品。' % (number, detail),
'action': {'tool': 'click', 'args': {'x': cx, 'y': round(height*.43)}},
}
if not any('0/1' in t for t in texts):
for index, item in enumerate(items):
if item['text'].replace(' ', '') == '确认' and button_enabled(state, item):
options['confirm_reward'] = {
'description': '奖励卡已选中,确认领取。',
'action': {'tool': 'keypress', 'args': {'key': 'enter'}},
}
return options
# A confirmation dialog blocks the controls underneath it. Keep its
# observed coordinates instead of re-running an ambiguous text search.
confirmations = [(index, item) for index, item in enumerate(items)
if item['text'].replace(' ', '') == '确认']
modal = confirmations and (any('取消' in t for t in texts) or
any('吗?' in t or '吗?' in t for t in texts))
if modal:
for index, item in confirmations:
if button_enabled(state, item):
options['confirm_%d' % index] = {
'description': '当前确认弹窗的“确认”按钮;确认本次操作,背景控件被弹窗遮挡。',
'action': {'tool': 'click', 'args': {'x': item['x'] + item['w'] // 2,
'y': item['y'] + item['h'] // 2}},
}
return options
# The blessing's tier-III Battery choice stays mandatory. Thunderbranch
# is allowed in separate observations, not as a replacement for Battery.
gift_selection = (any(re.match(r'^(?:选择|可选择)(?:E\.?G\.?O\.?)?饰品', t, re.I) for t in texts)
or '饰品观测' in combined or '拒绝饰品' in texts)
if gift_selection:
battery = next((i for i in items if re.search(r'(标准负载|标准负荷|Standard-duty).*?(电池|Battery)', i['text'], re.I)), None)
thunder = next((i for i in items if re.fullmatch(r'雷枝(?:\+{1,2})?|Thunderbranch(?:\+{1,2})?', i['text'].replace(' ',''), re.I)), None)
unselected = any(re.search(r'(?:选择|可选).*?0/\d', t) for t in texts)
confirm = next((i for i in items if i['text'].replace(' ', '') in ('确认', '选择')
and button_enabled(state, i)), None)
if battery:
if confirm and not unselected:
options['confirm_startup_battery'] = {
'description': '电池选项已可确认,领取开局必需的标准负载电池。',
'action': {'tool': 'click', 'args': {'x': confirm['x']+confirm['w']//2,
'y': confirm['y']+confirm['h']//2}},
}
else:
options['select_startup_battery'] = {
'description': '选择开局必需饰品标准负载电池;此三选一界面不可拒绝。',
'action': {'tool': 'click', 'args': {'x': battery['x']+battery['w']//2,
'y': battery['y']+battery['h']//2}},
}
elif thunder and (gift_headers == 1 or state.get('battery_obtained')
or any(re.search(r'(额外|追加).*观测', t) for t in texts)):
if confirm and not unselected:
options['confirm_thunderbranch'] = {'description':'确认领取用户允许的雷枝,之后在商店强化。',
'action':{'tool':'keypress','args':{'key':'enter'}},
'fallback_action':{'tool':'click','args':{'x':confirm['x']+confirm['w']//2,'y':confirm['y']+confirm['h']//2}}}
else:
options['select_thunderbranch'] = {'description':'选择破裂体系雷枝;这是用户允许的观测例外。',
'action':{'tool':'click','args':{'x':thunder['x']+thunder['w']//2,'y':thunder['y']+thunder['h']//2}}}
# Unrecognized choices need analysis; never silently skip a required gift.
# A separately labelled extra observation may still be declined.
elif any(re.search(r'(额外|追加).*观测', t) for t in texts):
refuse = next((i for i in items if i['text'].replace(' ', '') == '拒绝饰品'
and button_enabled(state, i)), None)
if refuse:
options['decline_extra_observation'] = {
'description': '拒绝明确标注的额外观测,不影响开局三级饰品选择。',
'action': {'tool': 'click', 'args': {'x': refuse['x']+refuse['w']//2,
'y': refuse['y']+refuse['h']//2}},
}
return options
if any('选择' in t and '层主题卡包' in t for t in texts):
# This screen has five clipped bags; title OCR anchors each visible bag.
for number, fraction in enumerate((0.17, 0.335, 0.5, 0.665, 0.83), 1):
cx = round(width * fraction)
titles = [i['text'] for i in items if abs(i['x'] + i['w']/2 - cx) < width*.06
and height*.60 < i['y'] < height*.68]
label = '/'.join(titles) or '标题OCR暂未识别'
line_two = bool(re.search(r'(?:2|二)号线|LINE\s*2\b', label, re.I))
floor = state.get('floor', 1)
if floor < 5 and line_two:
continue
if floor == 5 and not line_two:
continue
options['pack_inspect_%d' % number] = {
'description': '查看第%d个卡包“%s”的放大镜详情,核对怪物和通关奖励。' % (number, label),
'action': {'tool': 'click', 'args': {'x': round(cx + width*.042), 'y': round(height*.303)}},
}
if titles:
options['pack_drag_%d' % number] = {
'description': '选择第%d个卡包“%s”:长按卡包中部并缓慢向下拖到底。' % (number, label),
'action': {'tool': 'drag', 'args': {'from_x': cx, 'from_y': round(height*.45),
'to_x': cx, 'to_y': round(height*.91), 'duration': 1.8}},
}
if state.get('floor', 1) == 5:
required = next((k for k in options if k.startswith('pack_drag_')), None)
if required:
options['required_pack'] = options[required]
return {k:v for k,v in options.items() if k in ('wait','requires_analysis','required_pack')}
refresh = next((i for i in items if '刷新' in i['text'] and button_enabled(state, i)), None)
zero = any(re.search(r'0/3', t) for t in texts)
if refresh and not zero:
options['pack_refresh'] = {'description':'第五层二号线尚未出现,使用剩余卡包刷新。',
'action':{'tool':'click','args':{'x':refresh['x']+refresh['w']//2,'y':refresh['y']+refresh['h']//2}}}
return options
in_shop = any(t in ('商店','特殊商店') for t in texts) and '刷新' in texts
party = ('辛克莱', '鸿璐', '希斯克利夫', '奥提斯', '格里高尔', '良秀', '浮士德')
swaps = [(index, item) for index, item in enumerate(items)
if '替换' in item['text'] and any(name in item['text'] for name in party)
and not any('已购买' in sold['text']
and abs(sold['x']+sold['w']/2-item['x']-item['w']/2) < width*.07
and 0 < item['y']-sold['y'] < height*.25 for sold in items)]
if in_shop and state.get('floor', 1) >= 2 and not state.get('symbol_upgraded', False):
return options
if in_shop:
pending = 'thrill' if state.get('thrill_pending') else 'thunderbranch' if state.get('thunderbranch_pending') else None
if pending:
name='快感++' if pending=='thrill' else '雷枝'
options['requires_analysis']['description']='离开商店前需在强化面板处理%s,付款后核对实际库存;保留符咒++及关键技能预算。' % name
item=next((i for i in items if i['text'].replace(' ','')=='强化饰品' and button_enabled(state,i)),None)
if item:
options['prepare_'+pending]={'description':'打开商店强化面板,处理'+name+'。',
'action':{'tool':'click','args':{'x':item['x']+item['w']//2,'y':item['y']+item['h']//2}}}
return options
for index, item in swaps:
options['swap_%d' % index] = {
'description': '商店出战角色技能替换入口:' + item['text'] + ';打开后核对技能表。',
'action': {'tool': 'click', 'args': {'x': item['x'] + item['w']//2,
'y': max(0, item['y'] - round(height*.095))}},
}
if not swaps and refresh_used < 4:
for index, item in enumerate(items):
if item['text'].replace(' ', '') == '刷新' and button_enabled(state, item):
options['shop_refresh'] = {
'description': '没有出战角色可替换技能,刷新商店;本店已刷新%d/4次。' % refresh_used,
'action': {'tool': 'click', 'args': {'x': item['x'] + item['w'] // 2,
'y': item['y'] + item['h'] // 2}},
}
end_screen = battle_is_terminal(state)
battle = battle_is_visible(state)
if not end_screen and (battle or previous_battle):
options['battle'] = {'description': '仍处于战斗或特写:执行短批次 P→回车,两次后检查结算,不分析拼点。',
'action': {'tool': 'battle', 'args': {'rounds': 2}}}
known_buttons = ('确认', '继续', '进入', '开始战斗', 'SKIP', '进行判定',
'离开', '下一层', '前往下一层', '领取奖励', '结束探索', 'TOUCHTOSTART', '选择')
for index, item in enumerate(items):
label = item['text'].replace(' ', '')
if in_shop and (swaps or 'shop_refresh' in options) and label == '离开':
continue
if label in known_buttons and button_enabled(state, item):
options['button_%d' % index] = {
'description': '当前可见且非灰色按钮:%s;点击 OCR 中心。' % label,
# 直接点已核对过的这一项: 重新按文字搜索要多一次截图+OCR, 还可能命中背景里的同名按钮
'action': ({'tool': 'keypress', 'args': {'key': 'enter'}} if label in ('进入', '开始战斗')
else {'tool': 'click', 'args': {'x': item['x'] + item['w']//2,
'y': item['y'] + item['h']//2}}),
}
if (not battle and not in_shop and state.get('screen', {}).get('path')
and Path(state['screen']['path']).is_file()
and not any(t in combined for t in ('确认', '继续', '获得E.G.O', 'SKIP', '选项'))):
options.update(map_candidates(state))
if any(t in combined for t in ('应该让谁', '选择一位罪人')):
for index, item in enumerate(items):
if item['text'] in ('极高', '高') and item['y'] > height * 0.8 and item['w'] < width * 0.07:
options['sinner_%d' % index] = {
'description': '选择预计成功率%s的罪人卡,卡中心x=%d。' % (item['text'], item['x'] + item['w'] // 2),
'action': {'tool': 'click', 'args': {'x': item['x'] + item['w'] // 2,
'y': min(height - 35, item['y'] + int(height * 0.06))}},
}
if '选择一位罪人' in combined:
try:
import cv2
import numpy as np
rgb = np.array(screen_image(state['screen']['path'], 'RGB'))
for number in range(12):
cx = round(width*(.061 + number*.0542))
crop = rgb[round(height*.841):round(height*.878), max(0,cx-round(width*.026)):cx+round(width*.026)]
hsv = cv2.cvtColor(crop, cv2.COLOR_RGB2HSV)
gold = (hsv[:,:,0] > 18) & (hsv[:,:,0] < 36) & (hsv[:,:,1] > 160) & (hsv[:,:,2] > 180)
if int(gold.sum()) > 100:
options['sinner_card_%d' % number] = {
'description': '第%d张罪人卡的成功率标识为金黄色(高/极高),选择此卡。' % (number+1),
'action': {'tool': 'click', 'args': {'x': cx, 'y': round(height*.915)}},
}
except (OSError, KeyError, ImportError):
pass
if '选项' in texts:
if not any('选择后' in t and '获得' in t and '判定' not in t for t in texts):
options['event_scroll'] = {
'description': '向下拖动事件选项列表的滚动条,查看是否还有无需判定、无需战斗的直接离开选项。',
'action': {'tool': 'drag', 'args': {'from_x': round(width*.945), 'from_y': round(height*.255),
'to_x': round(width*.945), 'to_y': round(height*.68), 'duration': .8}},
}
for index, item in enumerate(items):
if item['x'] > width * 0.52 and height * 0.23 < item['y'] < height * 0.75 and item['h'] > height * 0.025 and item.get('score', 0) > 0.93:
if not any(t in item['text'] for t in ('判定', '获得', '成功', '全体', '战斗胜利')):
outcome = ';'.join(i['text'] for i in items if i['x'] > width*.52
and item['y']+item['h'] < i['y'] < item['y']+height*.085)
options['event_%d' % index] = {'description': '当前事件选项:' + item['text'] + ';结果:' + outcome,
'action': {'tool': 'click_text', 'args': {'text': item['text']}}}
return options
def decide(cfg, state, options, recent):
description = ('目标:按用户已配置的队伍和速通规则推进当前镜牢。当前楼层:%s\n当前游戏 OCR(坐标仅供辨识):\n' % state.get('floor', '尚未识别') +
'\n'.join('%s @%d,%d' % (i['text'], i['x'], i['y']) for i in text_items(state)
if not i['text'].upper().startswith('STEAM')) +
'\n截图视觉与可用控件观察(不是预先做出的决定):\n' +
'\n'.join(val['description'] for key,val in options.items() if key != 'requires_analysis') +
'\n最近动作和执行结果:' + json.dumps(recent[-4:], ensure_ascii=False))
return request_answer(cfg, description,
{key: val['description'] for key, val in options.items()}, SYSTEM_RULES)
def fixed_fallback(options):
for key in ('run_complete','required_pack','pack_refresh','select_startup_battery','confirm_startup_battery','select_thunderbranch','confirm_thunderbranch','prepare_thrill','prepare_thunderbranch','decline_extra_observation','retry_network','buy_swap','confirm_swap','confirm_reward','hardship_confirm','modal_confirm','claim_final','close_progress'):
if key in options:
return key
judge=next((k for k in options if k.startswith('button_') and '进行判定' in options[k]['description']),None)
if judge:
return judge
for prefix in ('skill_swap_', 'swap_'):
keys=[k for k in options if k.startswith(prefix)]
if keys:
return keys[0]
sinners=[k for k in options if k.startswith('sinner_') and not k.startswith('sinner_card_')]
if sinners:
return min(sinners,key=lambda k: 0 if any(t in options[k]['description'] for t in ('极高','非常高')) else 1)
cards=[k for k in options if k.startswith('sinner_card_')]
if cards:
return cards[0]
if 'shop_refresh' in options:
return 'shop_refresh'
routes=[k for k in options if k.startswith('route_')]
if routes:
return min(routes,key=lambda k: 0 if '商店' in options[k]['description'] else 1 if '事件' in options[k]['description'] else 3 if '精英' in options[k]['description'] or '集中' in options[k]['description'] else 2)
events=[k for k in options if k.startswith('event_') and k!='event_scroll']
safe=[k for k in events if any(t in options[k]['description'] for t in ('离开','继续走','无视','不理','走开')) and '战斗胜利' not in options[k]['description']]
if safe:
return safe[0]
combat = ('战斗胜利', '进入战斗', '触发遭遇战', '开始战斗')
direct=[k for k in events if '结果:' in options[k]['description']
and options[k]['description'].split('结果:',1)[1].strip()
and not any(t in options[k]['description'] for t in ('判定',)+combat)]
if direct:
return direct[0]
if len(events)==1 and '判定' in options[events[0]]['description'] and not any(t in options[events[0]]['description'] for t in combat):
return events[0]
if 'event_scroll' in options:
return 'event_scroll'
rewards=[k for k in options if k.startswith('reward_card_')]
if rewards:
return min(rewards,key=lambda k: 0 if '经费' in options[k]['description'] else 1)
buttons=[k for k in options if k.startswith('button_')]
if len(buttons)==1:
return buttons[0]
for text in ('确认','继续','进入','开始战斗','离开'):
match=next((k for k in buttons if text in options[k]['description']),None)
if match:
return match
return 'requires_analysis'
def execute(bridge, action, deadline=None):
def call(tool, args=None):
if STOP_FILE.exists() or deadline is not None and time.monotonic() >= deadline:
return {'ok':False,'stopped':True}
return bridge.call(tool, args)
if action['tool'] == 'claim_final':
result = call('click', action['args'])
if not result.get('ok'):
return result
time.sleep(.4)
return call('keypress', {'key':'enter'})
if action['tool'] == 'advance_dialog':
for _ in range(min(5, action.get('args', {}).get('presses', 2))):
result = call('keypress', {'key': 'enter'})
if not result.get('ok'):
return result
time.sleep(.2)
return result
if action['tool'] == 'route':
result = call('keypress', {'key': action['args']['key']})
if not result.get('ok'):
return result
time.sleep(0.35)
result = call('keypress', {'key': 'enter'})
if not result.get('ok'):
return result
time.sleep(0.7)
return call('keypress', {'key': 'enter'})
if action['tool'] == 'wait':
time.sleep(0.7)
return {'ok': True, 'waited': 0.7}
if action['tool'] == 'battle':
battle_deadline = min(deadline if deadline is not None else float('inf'), time.monotonic() + 45)
pairs = 0
while time.monotonic() < battle_deadline and not STOP_FILE.exists():
for _ in range(2):
for key in ('p', 'enter'):
result = call('keypress', {'key': key})
if not result.get('ok'):
result['pairs'] = pairs
return result
pairs += 1
time.sleep(0.8)
state = call('get_state')
if not state.get('ok'):
return state
if battle_is_terminal(state):
return {'ok': True, 'pairs': pairs, 'terminal': True, 'screen': state.get('screen')}
stopped = STOP_FILE.exists() or deadline is not None and time.monotonic() >= deadline
return {'ok': not stopped, 'stopped': stopped, 'pairs': pairs, 'terminal': False}
return call(action['tool'], action.get('args'))
def acquire_single_instance():
"""Windows 命名互斥量, 防止另一个终端重复启动同一个游戏的执行器。
返回释放函数; 已有实例在跑(或创建失败)时返回 None。"""
import ctypes
# use_last_error: 直接调 GetLastError 可能读到 ctypes 自身调用留下的值
kernel = ctypes.WinDLL('kernel32', use_last_error=True)
kernel.CreateMutexW.restype = ctypes.c_void_p
kernel.CreateMutexW.argtypes = [ctypes.c_void_p, ctypes.c_int, ctypes.c_wchar_p]
kernel.CloseHandle.argtypes = [ctypes.c_void_p]
lease = kernel.CreateMutexW(None, False, 'Local\\LimbusMirrorJevController')
if not lease:
return None
if ctypes.get_last_error() == 183: # ERROR_ALREADY_EXISTS
kernel.CloseHandle(lease)
return None
return lambda: kernel.CloseHandle(lease)
def main(executor_decider=None):
parser = argparse.ArgumentParser()
parser.add_argument('config', nargs='?', help='Optional Jev JSON config; omit for execution-model handoff')
parser.add_argument('--decision-engine', choices=('auto', 'jev', 'executor', 'fixed'))
parser.add_argument('--steps', type=int, default=250)
parser.add_argument('--seconds', type=int, default=1200)
mode = parser.add_mutually_exclusive_group()
mode.add_argument('--new-run', action='store_true', help='Start fresh state for a new dungeon')
mode.add_argument('--resume', action='store_true', help='Require an unfinished run with matching state')
args = parser.parse_args()
if args.steps <= 0 or args.seconds <= 0:
parser.error('--steps and --seconds must be positive')
release = acquire_single_instance()
if release is None:
print(json.dumps({'state':'already_running'}), flush=True)
return
log = RUNTIME_HOME / 'jev_mirror_log.jsonl'
status = RUNTIME_HOME / 'jev_mirror_status.json'
deadline = time.monotonic() + args.seconds
bridge = None
run = None
recent = []
repeats = {}
context_path = RUNTIME_HOME / 'jev_shop_context.json'
stable_since = time.monotonic()
last_fingerprint = None
unknown_since = None
try:
RUNTIME_HOME.mkdir(parents=True, exist_ok=True)
cfg = json.loads(Path(args.config).read_text(encoding='utf-8-sig')) if args.config else {}
cfg['apiKey'] = os.environ.get('OPENCODE_API_KEY') or cfg.get('apiKey')
if args.decision_engine:
cfg['decisionEngine'] = args.decision_engine
router = DecisionRouter(cfg, decide, executor_decider=executor_decider,
fixed_decider=fixed_fallback, rules=SYSTEM_RULES,
force_fixed=os.environ.get('LC_FIXED_FALLBACK') == '1')
if STOP_FILE.exists():
save_json(status, {'state': 'stopped', 'reason': 'stop_requested'})
return
run, context = prepare_run(RUNTIME_HOME, args.new_run, args.resume)
previous_battle = context.get('battle_context', False)
# 工具失败按 {'ok': False} 返回: 截图暂不可用、按钮已消失等情况观察后继续, 而不是整局退出
bridge = Bridge(cancelled=lambda: STOP_FILE.exists() or time.monotonic() >= deadline,
raise_on_error=False)
for step in range(args.steps):
if STOP_FILE.exists() or time.monotonic() > deadline:
run['status'] = 'stopped'
save_json(RUNTIME_HOME / 'mirror_current_run.json', run)
save_json(status, {'state': 'stopped', 'step': step, 'run_id': run['run_id']})
return
observation_started = time.monotonic()
state = bridge.call('get_state')
observation_ms = round((time.monotonic()-observation_started)*1000)
if not state.get('ok'):
state = {'ok': False, 'items': [{'text': 'MCP 截图暂不可用;游戏窗口可能正在重建。' + str(state.get('error','')),
'x':0,'y':0,'w':0,'h':0,'score':1.0}]}
fingerprint = tuple(item['text'] for item in text_items(state)
if item.get('score', 0) > 0.93 and not item['text'].replace('.', '').isdigit() and not re.fullmatch(r'[0-9:]+', item['text']))
if any('正在探' in i['text'] or '主题卡包' in i['text'] for i in text_items(state)):
context['refresh_used'] = 0
for item in text_items(state):
match = re.search(r'(?:第|选择)([1-5])层', item['text'].replace(' ', ''))
if match:
context['floor'] = int(match[1])
save_json(context_path, context)
state['floor'] = context.get('floor', 1)
state['symbol_upgraded'] = context.get('symbol_upgraded', False)
state['battery_obtained'] = context.get('battery_obtained', False)
state['thunderbranch_pending'] = context.get('thunderbranch_pending',False)
state['thrill_pending'] = context.get('thrill_obtained',False) and not context.get('thrill_upgraded',False)
state['claim_requested'] = claim_is_current(run, context)
options = candidates(state, previous_battle, context['refresh_used'])
if fingerprint != last_fingerprint:
stable_since = time.monotonic()
last_fingerprint = fingerprint
stable_seconds = round(time.monotonic() - stable_since)
if stable_seconds > 30:
recent.append({'observation':'画面已%d秒没有有效改变,请你判断是否需要主助手排查。' % stable_seconds})
for key in list(options):
action_id = json.dumps(options[key]['action'], sort_keys=True)
if ((options[key]['action'] == {'tool': 'keypress', 'args': {'key': 'enter'}}
or options[key]['action']['tool']=='advance_dialog')
and repeats.get((fingerprint, action_id), 0) >= 1):
fallback = options[key].get('fallback_action')
button = next((i for i in text_items(state)
if i['text'].replace(' ', '') in ('进入', '开始战斗', '确认', '继续')
and button_enabled(state, i)), None)
if fallback or button:
options[key]['action'] = fallback or {'tool': 'click', 'args': {
'x': button['x'] + button['w']//2, 'y': button['y'] + button['h']//2}}
options[key]['description'] += ' 回车未生效,改为点击当前按钮。'
action_id = json.dumps(options[key]['action'], sort_keys=True)
if key not in ('requires_analysis', 'wait', 'battle') and repeats.get((fingerprint, action_id), 0) >= 2:
del options[key]
if len(options) == 2:
unknown_since = unknown_since or time.monotonic()
else:
unknown_since = None
# User explicitly prescribed the complete battle loop. Only scene
# transitions return to Jev; combat does not require new decisions.
decision = None
if any(re.search(r'CON+ECTING|LOADING', i['text'].upper()) for i in text_items(state)):
choice, latency = 'wait', 0
elif len(options)==2 and time.monotonic() - unknown_since < 10:
choice, latency = 'wait', 0
elif 'event_finish' in options:
choice, latency = 'event_finish', 0
elif 'skip_dialog' in options:
choice, latency = 'skip_dialog', 0
elif 'event_advance' in options:
choice, latency = 'event_advance', 0
elif 'battle' in options:
choice, latency = 'battle', 0
else:
try:
decision = router.choose(state, options, recent, run['run_id'])
choice, latency = decision.choice, decision.jev_ms
except DecisionRequired as required:
record = {'state': 'requires_decision', 'step': step, 'run_id': run['run_id'],
'decision_engine': 'executor', 'decision_request': required.request,
'ocr_ms': observation_ms, 'screen': state.get('screen'),
'at': time.strftime('%Y-%m-%dT%H:%M:%S')}
if 'failed_jev_ms' in required.request:
record['failed_jev_ms'] = required.request['failed_jev_ms']
run['status'] = 'requires_decision'
save_json(RUNTIME_HOME / 'mirror_current_run.json', run)
save_json(RUNTIME_HOME / 'decision_request.json', required.request)
save_json(status, record)
with log.open('a', encoding='utf-8') as output:
output.write(json.dumps(record, ensure_ascii=False) + '\n')
print(json.dumps(record, ensure_ascii=False), flush=True)
return
action = options[choice]['action']
record = {'step': step, 'run_id': run['run_id'], 'choice': choice, 'action': action, 'jev_ms': latency,
'ocr_ms':observation_ms,'screen': state.get('screen'), 'at': time.strftime('%Y-%m-%dT%H:%M:%S')}
record['decision_engine'] = decision.engine if decision else 'rules'
if decision:
record.update(decision_ms=decision.latency_ms + (decision.failed_jev_ms or 0), confidence=decision.confidence,
probabilities=decision.probabilities, model=decision.model)
if decision.failed_jev_ms is not None:
record['failed_jev_ms'] = decision.failed_jev_ms
if decision.fallback_reason:
record['decision_fallback_reason'] = decision.fallback_reason
if choice == 'run_complete':
complete_run(RUNTIME_HOME, run, context, state.get('screen'))
record['state'] = 'completed'
save_json(status, record)
with log.open('a', encoding='utf-8') as output:
output.write(json.dumps(record, ensure_ascii=False) + '\n')
print(json.dumps(record, ensure_ascii=False), flush=True)
return
if choice == 'requires_analysis':
record.update(state='requires_analysis', items=text_items(state))
run['status'] = 'requires_analysis'
save_json(RUNTIME_HOME / 'mirror_current_run.json', run)
save_json(status, record)
with log.open('a', encoding='utf-8') as output:
output.write(json.dumps(record, ensure_ascii=False) + '\n')
print(json.dumps(record, ensure_ascii=False), flush=True)
return
action_id = json.dumps(action, sort_keys=True)
repeats[(fingerprint, action_id)] = repeats.get((fingerprint, action_id), 0) + 1
action_started = time.monotonic()
result = execute(bridge, action, deadline=deadline)
record['action_ms'] = round((time.monotonic()-action_started)*1000)
record['finished_at'] = time.strftime('%Y-%m-%dT%H:%M:%S')
if result.get('stopped'):
record.update(result=result,state='stopped',battle_context=previous_battle)
with log.open('a',encoding='utf-8') as output:
output.write(json.dumps(record,ensure_ascii=False)+'\n')
run['status'] = 'stopped'
save_json(RUNTIME_HOME / 'mirror_current_run.json', run)
save_json(status, record)
return
if choice == 'claim_final' and result.get('ok'):
record_claim(RUNTIME_HOME, run, context, state.get('screen'))
if choice in ('confirm_startup_battery','confirm_thunderbranch') and result.get('ok'):
context['battery_obtained' if choice == 'confirm_startup_battery' else 'thunderbranch_pending'] = True
save_json(context_path, context)
if choice=='modal_confirm' and result.get('ok') and any(i['text'].replace(' ','')=='快感' for i in text_items(state)) and any('获得E.G.O' in i['text'].replace(' ','') for i in text_items(state)):
context['thrill_obtained']=True
save_json(context_path, context)
if choice == 'shop_refresh' and result.get('ok'):
context['refresh_used'] += 1
save_json(context_path, context)
started_battle = choice.startswith('button_') and bool(result.get('ok')) and any(
i['text'].replace(' ', '') == '开始战斗' for i in text_items(state))
previous_battle = ((action['tool'] == 'battle' and not result.get('terminal')) or started_battle
or (previous_battle and action['tool'] == 'wait'))
context['battle_context'] = previous_battle
save_json(context_path, context)
record.update(result=result, state='running', battle_context=previous_battle)
with log.open('a', encoding='utf-8') as output:
output.write(json.dumps(record, ensure_ascii=False) + '\n')
save_json(status, record)
recent.append({'action': action, 'ok': result.get('ok'), 'unchanged_attempt': repeats[(fingerprint, action_id)]})
print(json.dumps({k:v for k,v in record.items() if k != 'items'}, ensure_ascii=False), flush=True)
time.sleep(0.35)
run['status'] = 'stopped'
save_json(RUNTIME_HOME / 'mirror_current_run.json', run)
save_json(status, {'state': 'stopped', 'reason': 'step_limit', 'run_id': run['run_id']})
except Exception as error:
state = 'stopped' if isinstance(error, SessionCancelled) else 'requires_analysis'
record = {'state': state, 'error': '%s: %s' % (type(error).__name__, str(error))}
if isinstance(error, (SessionCancelled, SessionTimeout)):
record['outcome_unknown'] = error.outcome_unknown
record['pending_tool'] = getattr(error, 'tool', None)
if run is not None:
run['status'] = state
record['run_id'] = run['run_id']
save_json(RUNTIME_HOME / 'mirror_current_run.json', run)
save_json(status, record)
with log.open('a', encoding='utf-8') as output:
output.write(json.dumps(record, ensure_ascii=False) + '\n')
print(json.dumps(record, ensure_ascii=False), flush=True)
finally:
try:
if bridge is not None:
bridge.close()
finally:
release()
if __name__ == '__main__':
main()
+45
View File
@@ -0,0 +1,45 @@
"""Exercise the installed stdio bridge with an actual MCP handshake and tool call."""
import argparse
import json
import os
import subprocess
import sys
from pathlib import Path
def main():
parser = argparse.ArgumentParser()
parser.add_argument('tool', nargs='?', default='get_state')
parser.add_argument('arguments', nargs='?', default='{}')
parser.add_argument('--timeout', type=float, default=30)
args = parser.parse_args()
arguments = json.loads(args.arguments)
root = Path(__file__).resolve().parents[1]
requests = [
{'jsonrpc': '2.0', 'id': 1, 'method': 'initialize', 'params': {
'protocolVersion': '2024-11-05', 'capabilities': {},
'clientInfo': {'name': 'lc-mcp-probe', 'version': '1'}}},
{'jsonrpc': '2.0', 'method': 'notifications/initialized'},
{'jsonrpc': '2.0', 'id': 2, 'method': 'tools/list'},
{'jsonrpc': '2.0', 'id': 3, 'method': 'tools/call',
'params': {'name': args.tool, 'arguments': arguments}},
]
process = subprocess.run(
[sys.executable, '-X', 'utf8', str(root / 'lc_mcp' / 'bridge.py')],
cwd=root, env=dict(os.environ, PYTHONUTF8='1'),
input=''.join(json.dumps(r, ensure_ascii=False) + '\n' for r in requests),
capture_output=True, text=True, encoding='utf-8', timeout=args.timeout,
)
responses = [json.loads(line) for line in process.stdout.splitlines() if line.strip()]
response = next((r for r in responses if r.get('id') == 3), None)
if process.returncode or not response or 'error' in response:
print(json.dumps({'ok': False, 'response': response, 'stderr': process.stderr}, ensure_ascii=False))
return 1
result = response['result']
data = json.loads(result['content'][0]['text'])
print(json.dumps(data, ensure_ascii=False))
return 1 if result.get('isError') else 0
if __name__ == '__main__':
sys.exit(main())
+183
View File
@@ -0,0 +1,183 @@
"""Reusable client for the installed stdio MCP bridge; no direct game input."""
import json
import math
import os
import queue
import subprocess
import sys
import threading
import time
from collections import deque
from pathlib import Path
class SessionCancelled(InterruptedError):
"""The caller stopped waiting; a sent remote action may have completed."""
def __init__(self, message, outcome_unknown=False):
super().__init__(message)
self.outcome_unknown = outcome_unknown
class SessionTimeout(TimeoutError):
outcome_unknown = True
class Session:
def __init__(self, timeout=30, cancelled=None, raise_on_error=True):
self.timeout = float(timeout)
if not math.isfinite(self.timeout) or self.timeout <= 0:
raise ValueError('MCP timeout must be finite and positive')
self.cancelled = cancelled or (lambda: False)
# False: 工具失败按 {'ok': False, ...} 返回, 由调用方观察后继续; 协议层错误仍抛异常
self.raise_on_error = raise_on_error
self._closed = False
self._lock = threading.Lock()
self._responses = queue.Queue()
self._outgoing = queue.Queue()
self.stderr_tail = deque(maxlen=20)
root = Path(__file__).resolve().parents[1]
self.process = subprocess.Popen(
[sys.executable, '-X', 'utf8', str(root / 'lc_mcp' / 'bridge.py')],
cwd=root, env=dict(os.environ, PYTHONUTF8='1'),
stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE,
text=True, encoding='utf-8', bufsize=1,
)
self.sequence = 0
# Windows pipes cannot be polled with select(). Dedicated readers and
# a writer let the caller cancel even if a pipe read/write is blocked.
self._threads = [threading.Thread(target=target, daemon=True) for target in
(self._read_responses, self._write_requests, self._drain_stderr)]
for thread in self._threads:
thread.start()
try:
self.request('initialize', {
'protocolVersion': '2024-11-05', 'capabilities': {},
'clientInfo': {'name': 'lc-mcp-session', 'version': '1'},
})
self._send({'jsonrpc': '2.0', 'method': 'notifications/initialized'})
except BaseException:
self._abort()
raise
def _read_responses(self):
try:
for line in self.process.stdout:
self._responses.put(line)
except (OSError, ValueError, UnicodeError) as error:
self._responses.put(error)
finally:
self._responses.put(None)
def _write_requests(self):
try:
while True:
line = self._outgoing.get()
if line is None:
break
self.process.stdin.write(line)
self.process.stdin.flush()
except (OSError, ValueError) as error:
self._responses.put(error)
finally:
try:
self.process.stdin.close()
except (OSError, ValueError):
pass
def _drain_stderr(self):
try:
for line in self.process.stderr:
self.stderr_tail.append(line.rstrip()[-2000:])
except (OSError, ValueError, UnicodeError):
return
def _send(self, message):
if self._closed:
raise ConnectionError('MCP session is closed')
self._outgoing.put(json.dumps(message, ensure_ascii=False) + '\n')
def request(self, method, params, timeout=None):
limit = self.timeout if timeout is None else float(timeout)
if not math.isfinite(limit) or limit <= 0:
raise ValueError('MCP timeout must be finite and positive')
with self._lock:
if self.cancelled():
self._abort()
raise SessionCancelled('MCP request cancelled before sending')
self.sequence += 1
mid = self.sequence
self._send({'jsonrpc': '2.0', 'id': mid, 'method': method, 'params': params})
deadline = time.monotonic() + limit
while True:
if self.cancelled():
self._abort()
error = SessionCancelled('MCP request cancelled; remote outcome unknown', True)
error.tool = params.get('name') if isinstance(params, dict) else None
raise error
remaining = deadline - time.monotonic()
if remaining <= 0:
self._abort()
error = SessionTimeout('MCP %s timed out; remote outcome unknown; request was not retried' % method)
error.tool = params.get('name') if isinstance(params, dict) else None
raise error
try:
line = self._responses.get(timeout=min(.1, remaining))
except queue.Empty:
continue
if line is None or isinstance(line, Exception):
self._abort()
raise ConnectionError('MCP bridge closed') from (line if isinstance(line, Exception) else None)
try:
result = json.loads(line)
if not isinstance(result, dict):
raise ValueError('response must be an object')
except ValueError as error:
self._abort()
raise ConnectionError('MCP bridge returned invalid JSON-RPC') from error
if result.get('id') == mid:
if 'error' in result:
raise RuntimeError(result['error']['message'])
return result['result']
def call(self, name, arguments=None):
arguments = {} if arguments is None else arguments
timeout = self.timeout
if name in ('wait_for_text', 'wait_for_text_gone') and isinstance(arguments, dict):
try:
wait = float(arguments.get('timeout', 30))
if math.isfinite(wait):
timeout = max(timeout, min(300, max(0, wait)) + 5)
except (TypeError, ValueError):
pass # The server reports invalid tool arguments.
result = self.request('tools/call', {'name': name, 'arguments': arguments}, timeout)
data = json.loads(result['content'][0]['text'])
if result.get('isError') and self.raise_on_error:
raise RuntimeError(data)
return data
def _abort(self):
if self.process.poll() is None:
self.process.kill()
self.close()
def close(self):
if self._closed:
return
self._closed = True
self._outgoing.put(None)
try:
self.process.wait(1)
except subprocess.TimeoutExpired:
self.process.kill()
self.process.wait()
for thread in self._threads:
thread.join(1)
for stream in (self.process.stdin, self.process.stdout, self.process.stderr):
stream.close()
def __enter__(self):
return self
def __exit__(self, *args):
self.close()
+99
View File
@@ -0,0 +1,99 @@
"""Persist one mirror run without carrying completed-run state into a new run."""
import json
import os
import tempfile
import uuid
from datetime import datetime, timezone
from pathlib import Path
RESUMABLE = {'running', 'requires_analysis', 'requires_decision', 'stopped', 'user_takeover'}
def save_json(path, value):
"""Replace complete snapshots atomically so interruption cannot truncate them."""
path = Path(path)
path.parent.mkdir(parents=True, exist_ok=True)
temporary = None
try:
with tempfile.NamedTemporaryFile(mode='w', encoding='utf-8', dir=path.parent,
prefix=path.name + '.', suffix='.tmp', delete=False) as output:
temporary = Path(output.name)
json.dump(value, output, ensure_ascii=False, indent=2)
output.write('\n')
os.replace(temporary, path)
finally:
if temporary is not None and temporary.exists():
temporary.unlink()
def load_json(path):
if not path.exists():
return None
value = json.loads(path.read_text(encoding='utf-8-sig'))
if not isinstance(value, dict):
raise ValueError('%s must contain an object' % path.name)
return value
def prepare_run(home, new_run=False, resume=False):
home = Path(home)
run_path = home / 'mirror_current_run.json'
context_path = home / 'jev_shop_context.json'
# Explicit new-run also recovers from corrupt or legacy state files.
run = None if new_run else load_json(run_path)
resumable = run is not None and run.get('status') in RESUMABLE
if resume and not resumable:
raise ValueError('No unfinished run to resume; use --new-run for a new dungeon')
if resumable:
started = datetime.fromisoformat(run['start_utc'])
if started.tzinfo is None:
raise ValueError('Run start_utc must include a timezone')
context = load_json(context_path) or {}
run_id = run.get('run_id') or uuid.uuid4().hex
if context.get('run_id') not in (None, run_id):
raise ValueError('Run/context IDs differ; inspect the state or use --new-run')
if context.get('run_id') is None:
# Keep legacy floor/upgrades for an unfinished run, but an unbound
# claim or battle flag cannot establish current-run completion.
for key in ('claim_requested', 'claim_run_id', 'claim_screen', 'claim_at_utc', 'battle_context'):
context.pop(key, None)
run['legacy_context_migrated'] = True
context.setdefault('refresh_used', 0)
context.setdefault('floor', 1)
context['run_id'] = run_id
run['run_id'] = run_id
run['status'] = 'running'
else:
run_id = uuid.uuid4().hex
run = {'run_id': run_id, 'start_utc': datetime.now(timezone.utc).isoformat(),
'status': 'running', 'dungeon_completed': False, 'final_reward_claimed': False}
context = {'run_id': run_id, 'refresh_used': 0, 'floor': 1}
save_json(run_path, run)
save_json(context_path, context)
return run, context
def claim_is_current(run, context):
screen = context.get('claim_screen')
return bool(context.get('claim_requested') and context.get('run_id') == run['run_id']
and context.get('claim_run_id') == run['run_id']
and isinstance(screen, dict) and screen.get('path'))
def record_claim(home, run, context, screen):
if not screen or not screen.get('path'):
raise ValueError('Final claim requires an observed completion screenshot')
context.update(claim_requested=True, claim_run_id=run['run_id'], claim_screen=screen,
claim_at_utc=datetime.now(timezone.utc).isoformat())
save_json(Path(home) / 'jev_shop_context.json', context)
def complete_run(home, run, context, screen):
if not claim_is_current(run, context) or not screen or not screen.get('path'):
raise ValueError('Completion requires current-run claim and return-screen evidence')
now = datetime.now(timezone.utc)
run.update(status='completed', dungeon_completed=True, final_reward_claimed=True,
end_utc=now.isoformat(),
elapsed_seconds=(now-datetime.fromisoformat(run['start_utc'])).total_seconds(),
claim_evidence=context['claim_screen'], completion_evidence=screen)
save_json(Path(home) / 'mirror_current_run.json', run)
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 MiB

+220
View File
@@ -0,0 +1,220 @@
"""Controller lifecycle and battle regressions using mocked MCP only."""
import contextlib
import ctypes
import io
import json
import os
from pathlib import Path
import sys
import tempfile
import unittest
from unittest import mock
sys.path.insert(0, str(Path(__file__).resolve().parents[1] / 'scripts'))
import battle_batch
import jev_mirror_agent as agent
from mcp_session import SessionCancelled, SessionTimeout
from run_state import save_json
class BattleBatchTest(unittest.TestCase):
def setUp(self):
self.folder = tempfile.TemporaryDirectory()
self.addCleanup(self.folder.cleanup)
self.stop = Path(self.folder.name) / 'JEV_STOP'
def run_helper(self, client):
session = mock.MagicMock()
session.__enter__.return_value = client
output = io.StringIO()
with mock.patch.object(battle_batch, 'Session', return_value=session), \
mock.patch.object(battle_batch, 'STOP_FILE', self.stop), \
mock.patch.object(sys, 'argv', ['battle_batch.py', '--seconds', '1', '--battle-confirmed']), \
mock.patch.object(battle_batch.time, 'sleep'), contextlib.redirect_stdout(output):
battle_batch.main()
return json.loads(output.getvalue())
def test_terminal_screens_never_receive_more_keys(self):
for text in ('进行判定', '选择遭遇战奖励卡', '参加战斗的全体罪人已经死亡。'):
with self.subTest(text=text):
client = mock.Mock()
client.call.return_value = {'ok': True, 'items': [{'text': text}]}
result = self.run_helper(client)
self.assertEqual(result['pairs'], 0)
self.assertEqual(client.call.call_args_list, [mock.call('get_state')])
def test_stop_after_win_rate_prevents_enter(self):
client = mock.Mock()
def call(tool, args=None):
if tool == 'get_state':
return {'ok': True, 'items': [{'text': 'WAVE 1'}, {'text': 'Win Rate'}]}
self.stop.touch()
return {'ok': True}
client.call.side_effect = call
result = self.run_helper(client)
self.assertTrue(result['stopped'])
self.assertFalse(result['outcome_unknown'])
self.assertEqual(client.call.call_args_list,
[mock.call('get_state'), mock.call('click_text', {'text': 'Win Rate'})])
def test_judgement_after_one_turn_ends_without_more_input(self):
client = mock.Mock()
frames = iter([[{'text': 'WAVE 1'}, {'text': '胜率'}], [{'text': '选择一位罪人来进行判定'}]])
client.call.side_effect = lambda tool, args=None: (
{'ok': True, 'items': next(frames)} if tool == 'get_state' else {'ok': True})
result = self.run_helper(client)
self.assertEqual(result['pairs'], 1)
self.assertEqual([c.args[0] for c in client.call.call_args_list],
['get_state', 'click_text', 'keypress', 'get_state'])
def test_cinematic_without_win_rate_sends_no_input(self):
# P 会在胜率/伤害之间切换, 看不到胜率按钮(特写)时只重新观察
client = mock.Mock()
client.call.return_value = {'ok': True, 'items': [{'text': 'TURN 2'}]}
result = self.run_helper(client)
self.assertEqual(result['pairs'], 0)
self.assertTrue(all(c.args[0] == 'get_state' for c in client.call.call_args_list))
class AgentRuntimeTest(unittest.TestCase):
def setUp(self):
self.folder = tempfile.TemporaryDirectory()
self.addCleanup(self.folder.cleanup)
self.home = Path(self.folder.name)
self.config = self.home / 'config.json'
self.config.write_text('{}')
self.kernel = mock.Mock()
self.kernel.CreateMutexW.return_value = 12345
self.kernel.GetLastError.return_value = 0
def run_agent(self, bridge, extra_args=(), constructor_error=None, fixed=True, executor_decider=None):
output = io.StringIO()
environment = dict(os.environ, LC_FIXED_FALLBACK='1' if fixed else '0')
environment.pop('OPENCODE_API_KEY', None)
with mock.patch.object(agent, 'RUNTIME_HOME', self.home), \
mock.patch.object(agent, 'STOP_FILE', self.home / 'JEV_STOP'), \
mock.patch.object(agent, 'Bridge', return_value=bridge, side_effect=constructor_error) as factory, \
mock.patch.object(ctypes, 'WinDLL', return_value=self.kernel, create=True), \
mock.patch.object(ctypes, 'get_last_error', side_effect=lambda: self.kernel.GetLastError(), create=True), \
mock.patch.object(sys, 'argv', ['jev_mirror_agent.py', str(self.config), '--steps', '1', *extra_args]), \
mock.patch.dict(os.environ, environment, clear=True), \
mock.patch.object(agent.time, 'sleep'), \
mock.patch.object(agent, 'button_enabled', return_value=False), \
contextlib.redirect_stdout(output):
agent.main(executor_decider=executor_decider)
status = json.loads((self.home / 'jev_mirror_status.json').read_text(encoding='utf-8'))
return status, factory
def test_old_claim_context_does_not_complete_new_run_at_lobby(self):
save_json(self.home / 'jev_shop_context.json', {'floor': 5, 'claim_requested': True})
save_json(self.home / 'mirror_current_run.json', {
'start_utc': '2026-10-02T00:00:00+00:00', 'status': 'running',
'dungeon_completed': False, 'final_reward_claimed': False})
bridge = mock.Mock()
bridge.call.return_value = {'ok': True, 'items': [
{'text': text, 'score': 1} for text in ('探索状态', '进入', '名与蛛之镜')]}
status, _ = self.run_agent(bridge)
run = json.loads((self.home / 'mirror_current_run.json').read_text())
self.assertEqual(status['state'], 'stopped')
self.assertFalse(run['dungeon_completed'])
self.assertFalse(run['final_reward_claimed'])
bridge.close.assert_called_once()
self.assertEqual(self.kernel.CloseHandle.call_count, 1)
def test_bridge_initialization_failure_records_error_and_releases_mutex(self):
status, _ = self.run_agent(mock.Mock(), constructor_error=SessionTimeout('initialization hung'))
self.assertEqual(status['state'], 'requires_analysis')
self.assertTrue(status['outcome_unknown'])
self.assertEqual(self.kernel.CloseHandle.call_count, 1)
def test_stop_file_prevents_bridge_startup(self):
(self.home / 'JEV_STOP').touch()
status, factory = self.run_agent(mock.Mock())
self.assertEqual(status['state'], 'stopped')
factory.assert_not_called()
self.assertEqual(self.kernel.CloseHandle.call_count, 1)
def test_pending_request_cancellation_marks_run_stopped_and_logs_uncertainty(self):
bridge = mock.Mock()
bridge.call.side_effect = SessionCancelled('cancelled pending get_state', True)
status, _ = self.run_agent(bridge)
self.assertEqual(status['state'], 'stopped')
self.assertTrue(status['outcome_unknown'])
run = json.loads((self.home / 'mirror_current_run.json').read_text())
self.assertEqual(run['status'], 'stopped')
rows = (self.home / 'jev_mirror_log.jsonl').read_text().splitlines()
self.assertEqual(json.loads(rows[-1])['state'], 'stopped')
bridge.close.assert_called_once()
def test_expired_budget_prevents_execute_from_sending_any_key(self):
bridge = mock.Mock()
with mock.patch.object(agent, 'STOP_FILE') as stop:
stop.exists.return_value = False
result = agent.execute(bridge, {'tool': 'keypress', 'args': {'key': 'enter'}}, deadline=0)
self.assertTrue(result['stopped'])
bridge.call.assert_not_called()
def test_close_error_still_releases_controller_mutex(self):
bridge = mock.Mock()
bridge.call.return_value = {'ok': True, 'items': []}
bridge.close.side_effect = RuntimeError('close failed')
with self.assertRaisesRegex(RuntimeError, 'close failed'):
self.run_agent(bridge)
self.assertEqual(self.kernel.CloseHandle.call_count, 1)
def test_no_jev_config_publishes_execution_model_request_without_input(self):
bridge = mock.Mock()
bridge.call.return_value = {'ok': True, 'items': [{'text': '路线', 'score': 1}]}
options = {
'wait': {'description': 'wait', 'action': {'tool': 'wait', 'args': {'seconds': .7}}},
'requires_analysis': {'description': 'inspect', 'action': {'tool': 'requires_analysis', 'args': {}}},
'route_w': {'description': 'event above', 'action': {'tool': 'route', 'args': {'key': 'w'}}},
}
with mock.patch.object(agent, 'candidates', return_value=options), mock.patch.object(agent, 'decide') as decide:
status, _ = self.run_agent(bridge, fixed=False)
self.assertEqual(status['state'], 'requires_decision')
self.assertEqual(status['decision_request']['reason'], 'no_jev_model')
self.assertEqual(bridge.call.call_args_list, [mock.call('get_state')])
decide.assert_not_called()
bridge.close.assert_called_once()
self.assertEqual(self.kernel.CloseHandle.call_count, 1)
pending = json.loads((self.home / 'decision_request.json').read_text(encoding='utf-8'))
run = json.loads((self.home / 'mirror_current_run.json').read_text())
self.assertEqual(pending['run_id'], run['run_id'])
self.assertEqual(run['status'], 'requires_decision')
def test_pending_execution_model_decision_can_resume_same_run(self):
save_json(self.home / 'mirror_current_run.json', {
'run_id': 'pending-run', 'start_utc': '2026-10-02T00:00:00+00:00',
'status': 'requires_decision', 'dungeon_completed': False, 'final_reward_claimed': False})
save_json(self.home / 'jev_shop_context.json', {'run_id': 'pending-run', 'floor': 3})
bridge = mock.Mock()
bridge.call.return_value = {'ok': True, 'items': []}
status, _ = self.run_agent(bridge, extra_args=['--resume'])
self.assertEqual(status['state'], 'stopped')
self.assertEqual(status['run_id'], 'pending-run')
def test_embedded_execution_model_selects_and_executes_without_jev(self):
bridge = mock.Mock()
bridge.call.return_value = {'ok': True, 'items': [{'text': '路线', 'score': 1}]}
options = {
'wait': {'description': 'wait', 'action': {'tool': 'wait', 'args': {'seconds': .7}}},
'requires_analysis': {'description': 'inspect', 'action': {'tool': 'requires_analysis', 'args': {}}},
'route_w': {'description': 'event above', 'action': {'tool': 'route', 'args': {'key': 'w'}}},
}
executor = mock.Mock(side_effect=lambda request: {'request_id': request['request_id'], 'choice': 'route_w'})
with mock.patch.object(agent, 'candidates', return_value=options), mock.patch.object(agent, 'decide') as decide:
status, _ = self.run_agent(bridge, fixed=False, executor_decider=executor)
self.assertEqual(status['state'], 'stopped')
executor.assert_called_once()
decide.assert_not_called()
self.assertEqual(bridge.call.call_args_list, [mock.call('get_state'),
mock.call('keypress', {'key': 'w'}), mock.call('keypress', {'key': 'enter'}),
mock.call('keypress', {'key': 'enter'})])
rows = [json.loads(line) for line in (self.home / 'jev_mirror_log.jsonl').read_text(encoding='utf-8').splitlines()]
self.assertEqual(rows[-1]['decision_engine'], 'executor')
self.assertEqual(rows[-1]['jev_ms'], 0)
if __name__ == '__main__':
unittest.main()
+125
View File
@@ -0,0 +1,125 @@
"""Provider routing regressions; no game or network calls."""
import json
from pathlib import Path
import sys
import unittest
from unittest import mock
import urllib.error
sys.path.insert(0, str(Path(__file__).resolve().parents[1] / 'scripts'))
from decision_router import DecisionRequired, DecisionRouter
class DecisionRouterTest(unittest.TestCase):
def setUp(self):
self.options = {
'route_up': {'description': 'Reachable event', 'action': {'tool': 'route', 'args': {'key': 'w'}}},
'wait': {'description': 'Observe again', 'action': {'tool': 'wait', 'args': {'seconds': .7}}},
}
self.state = {'scene': 'map', 'items': [{'text': '事件'}]}
self.jev = mock.Mock(return_value={'choice': 'route_up', 'latency_ms': 10,
'confidence': .8, 'probabilities': {'route_up': .9, 'wait': .1}})
self.config = {'decisionEngine': 'jev', 'model': 'jev-test', 'apiKey': 'private-key'}
def router(self, config=None, **kwargs):
return DecisionRouter(self.config if config is None else config, self.jev, **kwargs)
def test_configured_jev_keeps_model_and_probabilities(self):
result = self.router().choose(self.state, self.options)
self.assertEqual((result.engine, result.choice, result.model, result.jev_ms), ('jev', 'route_up', 'jev-test', 10))
self.assertEqual(result.confidence, .8)
self.assertEqual(result.probabilities, {'route_up': .9, 'wait': .1})
def test_no_model_hands_off_without_using_a_key_from_environment(self):
with self.assertRaises(DecisionRequired) as raised:
self.router({'apiKey': 'private-key'}).choose(self.state, self.options, run_id='run-1')
self.jev.assert_not_called()
request = raised.exception.request
self.assertEqual((request['reason'], request['run_id']), ('no_jev_model', 'run-1'))
self.assertEqual(request['candidates'], self.options)
self.assertNotIn('private-key', json.dumps(request))
def test_model_without_credentials_hands_off(self):
with self.assertRaises(DecisionRequired) as raised:
self.router({'model': 'jev-test'}).choose(self.state, self.options)
self.assertEqual(raised.exception.request['reason'], 'missing_jev_credentials')
self.jev.assert_not_called()
def test_executor_mode_never_calls_jev_even_when_configured(self):
result = self.router(dict(self.config, decisionEngine='executor'), executor_decider=lambda request: 'wait').choose(self.state, self.options)
self.assertEqual((result.engine, result.choice, result.jev_ms), ('executor', 'wait', 0))
self.jev.assert_not_called()
def test_auto_uses_jev_when_model_and_key_are_both_present(self):
executor = mock.Mock()
result = self.router({'model': 'jev-test', 'apiKey': 'private-key'}, executor_decider=executor).choose(self.state, self.options)
self.assertEqual(result.engine, 'jev')
executor.assert_not_called()
def test_callback_receives_request_and_returns_matching_id(self):
def executor(request):
self.assertEqual(request['page_state']['scene'], 'map')
self.assertNotIn('apiKey', request)
return {'request_id': request['request_id'], 'choice': 'route_up', 'model': 'active-executor'}
result = self.router({}, executor_decider=executor).choose(self.state, self.options)
self.assertEqual((result.engine, result.model), ('executor', 'active-executor'))
def test_http_limit_hands_off_with_failed_attempt_timing(self):
self.jev.side_effect = urllib.error.HTTPError('https://example.invalid', 429, 'rate limit', {}, None)
with self.assertRaises(DecisionRequired) as raised:
self.router().choose(self.state, self.options)
request = raised.exception.request
self.assertEqual(request['reason'], 'jev_http_429')
self.assertGreaterEqual(request['failed_jev_ms'], 0)
self.assertNotIn('private-key', json.dumps(request))
def test_timeout_uses_available_execution_model(self):
self.jev.side_effect = TimeoutError('timed out')
result = self.router(executor_decider=lambda request: 'route_up').choose(self.state, self.options)
self.assertEqual((result.engine, result.choice), ('executor', 'route_up'))
self.assertEqual(result.fallback_reason, 'jev_unavailable_TimeoutError')
def test_jev_unknown_candidate_hands_off_instead_of_sending_input(self):
self.jev.return_value = {'choice': 'invented_click'}
result = self.router(executor_decider=lambda request: 'wait').choose(self.state, self.options)
self.assertEqual(result.fallback_reason, 'jev_unavailable_ValueError')
def test_executor_cannot_return_unlisted_action(self):
with self.assertRaisesRegex(ValueError, 'unsupported candidate'):
self.router({}, executor_decider=lambda request: 'invented_click').choose(self.state, self.options)
def test_executor_response_from_another_request_is_rejected(self):
with self.assertRaisesRegex(ValueError, 'different decision request'):
self.router({}, executor_decider=lambda request: {'request_id': 'old-request', 'choice': 'wait'}).choose(self.state, self.options)
def test_callback_cannot_change_request_id_or_executable_actions(self):
def executor(request):
request['request_id'] = 'changed'
request['candidates']['route_up']['action']['args']['key'] = 'enter'
return {'request_id': 'changed', 'choice': 'route_up'}
with self.assertRaisesRegex(ValueError, 'different decision request'):
self.router({}, executor_decider=executor).choose(self.state, self.options)
self.assertEqual(self.options['route_up']['action']['args']['key'], 'w')
def test_forced_fixed_mode_preserves_explicit_legacy_choice(self):
result = self.router(force_fixed=True, fixed_decider=lambda options: 'wait').choose(self.state, self.options)
self.assertEqual((result.engine, result.choice), ('fixed', 'wait'))
self.jev.assert_not_called()
def test_empty_candidates_and_invalid_mode_are_errors(self):
with self.assertRaisesRegex(ValueError, 'at least one candidate'):
self.router().choose(self.state, {})
with self.assertRaisesRegex(ValueError, 'decisionEngine'):
self.router({'decisionEngine': 'unknown'})
def test_non_finite_confidence_or_invalid_probabilities_hands_off(self):
for invalid in ({'confidence': float('nan')}, {'probabilities': {'route_up': 1}},
{'probabilities': {'route_up': .8, 'wait': .8}}):
with self.subTest(invalid=invalid):
self.jev.return_value = dict(choice='route_up', **invalid)
result = self.router(executor_decider=lambda request: 'wait').choose(self.state, self.options)
self.assertEqual(result.engine, 'executor')
if __name__ == '__main__':
unittest.main()
+57
View File
@@ -0,0 +1,57 @@
import io
import json
import sys
import unittest
import urllib.error
from pathlib import Path
from unittest import mock
sys.path.insert(0, str(Path(__file__).resolve().parents[1] / 'scripts'))
import jev_client as client
class JevClientTest(unittest.TestCase):
def test_configured_model_endpoint_session_and_instructions_reach_api(self):
cfg = {'apiKey': 'test-key', 'model': 'test-model',
'baseUrl': 'https://example.test/go/v1/', 'sessionId': 'session-1'}
response = io.StringIO(json.dumps({'answers': {'action': {'type': 'choice', 'choice': 'inspect'}}}))
with mock.patch.object(client.urllib.request, 'urlopen', return_value=response) as post:
choice, _ = client.request_decision(cfg, 'main story map', {'inspect': 'inspect team'}, 'story rules')
request = post.call_args.args[0]
self.assertEqual(request.full_url, 'https://example.test/go/v1/systemone')
self.assertEqual(request.get_header('X-opencode-session'), 'session-1')
self.assertEqual(request.get_header('User-agent'), 'lc-mcp/0.1')
body = json.loads(request.data)
self.assertEqual(body['model'], 'test-model')
self.assertEqual(body['questions']['action']['instructions'], 'story rules')
self.assertEqual(choice, 'inspect')
def test_curl_credentials_only_on_stdin_and_http_errors_not_retried(self):
cfg = {'apiKey': 'private-test-key', 'transport': 'curl', 'sessionId': 'session-1'}
response = mock.Mock(returncode=0, stdout='{"error":"rate limit"}\n429')
with mock.patch.object(client.subprocess, 'run', return_value=response) as run, \
mock.patch.object(client.time, 'sleep') as sleep:
with self.assertRaises(urllib.error.HTTPError) as error:
client.request_decision(cfg, 'state', {'wait': 'wait'}, 'choose')
self.assertEqual(error.exception.code, 429)
self.assertNotIn('private-test-key', ' '.join(run.call_args.args[0]))
self.assertIn('Authorization: Bearer private-test-key', run.call_args.kwargs['input'])
self.assertEqual(run.call_count, 1)
sleep.assert_not_called()
def test_choice_outside_permitted_actions_is_rejected(self):
with mock.patch.object(client, '_post', return_value={
'answers': {'action': {'type': 'choice', 'choice': 'spend_currency'}}}):
with self.assertRaisesRegex(ValueError, 'unsupported candidate'):
client.request_decision({'apiKey': 'test'}, 'state', {'wait': 'wait'}, 'choose')
def test_session_id_stays_stable_across_decisions(self):
cfg = {'apiKey': 'test'}
def response(*args, **kwargs):
return io.StringIO('{"answers":{"action":{"type":"choice","choice":"wait"}}}')
with mock.patch.object(client.urllib.request, 'urlopen', side_effect=response) as post:
client.request_decision(cfg, 'state', {'wait': 'wait'}, 'choose')
client.request_decision(cfg, 'state', {'wait': 'wait'}, 'choose')
ids = [call.args[0].get_header('X-opencode-session') for call in post.call_args_list]
self.assertTrue(ids[0])
self.assertEqual(ids[0], ids[1])
+562
View File
@@ -0,0 +1,562 @@
import json
import os
import tempfile
import sys
import unittest
from pathlib import Path
from unittest import mock
sys.path.insert(0, str(Path(__file__).resolve().parents[1] / 'scripts'))
import jev_mirror_agent as agent
import jev_client # noqa: E402 Jev 请求经由 jev_client 发出
class SceneRegressionTest(unittest.TestCase):
def setUp(self):
stop = mock.patch.object(agent, 'STOP_FILE')
self.stop = stop.start()
self.stop.exists.return_value = False
self.addCleanup(stop.stop)
def test_takeover_interrupts_between_p_and_enter(self):
self.stop.exists.side_effect = [False,False,True]
bridge = mock.Mock()
bridge.call.return_value = {'ok':True}
result = agent.execute(bridge,{'tool':'battle','args':{}})
self.assertTrue(result['stopped'])
self.assertEqual(result['pairs'],0)
self.assertEqual(bridge.call.call_args_list,[mock.call('keypress',{'key':'p'})])
def test_takeover_stops_remaining_dialog_confirmations(self):
self.stop.exists.side_effect = [False,True]
bridge = mock.Mock()
bridge.call.return_value = {'ok':True}
with mock.patch.object(agent.time,'sleep'):
result=agent.execute(bridge,{'tool':'advance_dialog','args':{'presses':5}})
self.assertTrue(result['stopped'])
self.assertEqual(bridge.call.call_count,1)
@mock.patch.object(agent,'button_enabled',return_value=True)
def test_floor_pack_rules_are_enforced_before_decision(self,_enabled):
state={'floor':4,'screen':{'w':1920,'h':1080},'items':[
{'text':t,'x':x,'y':y,'w':100,'h':40} for t,x,y in
[('选择4层主题卡包',750,153),('2号线',276,665),('3号线',909,665),('刷新1/3',1570,49)]]}
options=agent.candidates(state)
self.assertNotIn('pack_drag_1',options)
self.assertIn('pack_drag_3',options)
state['floor']=5
state['items'][0]['text']='选择5层主题卡包'
options=agent.candidates(state)
self.assertEqual(set(options),{'wait','requires_analysis','required_pack'})
self.assertEqual(agent.fixed_fallback(options),'required_pack')
state['items'][1]['text']='1号线'
options=agent.candidates(state)
self.assertIn('pack_refresh',options)
self.assertFalse(any(k.startswith('pack_drag') for k in options))
state['items'][-1]['text']='刷新0/3'
self.assertNotIn('pack_refresh',agent.candidates(state))
@mock.patch.object(agent,'button_enabled',return_value=True)
def test_thunderbranch_observation_exception_keeps_startup_battery_priority(self,_enabled):
state={'items':[{'text':t,'x':700,'y':500,'w':150,'h':40} for t in
('额外E.G.O饰品观测','可选择0/1','雷枝','拒绝饰品','确认')]}
options=agent.candidates(state)
self.assertIn('select_thunderbranch',options)
self.assertNotIn('decline_extra_observation',options)
state['items'].append({'text':'标准负载电池','x':900,'y':500,'w':150,'h':40})
options=agent.candidates(state)
self.assertIn('select_startup_battery',options)
self.assertNotIn('select_thunderbranch',options)
state['items']=state['items'][:-1]
state['items'][0]['text']='选择E.G.O饰品'
self.assertNotIn('select_thunderbranch',agent.candidates(state))
def test_ambiguous_event_is_not_assumed_free(self):
options={'event_1':{'description':'当前事件选项:拔出荧光灯;结果:'},
'event_scroll':{},'wait':{},'requires_analysis':{}}
self.assertEqual(agent.fixed_fallback(options),'event_scroll')
options['event_2']={'description':'当前事件选项:按下按钮;结果:选择后获得破裂饰品'}
self.assertEqual(agent.fixed_fallback(options),'event_2')
def test_sinner_very_high_precedes_high_and_generic_gold(self):
options={'sinner_1':{'description':'预计成功率高'},
'sinner_2':{'description':'预计成功率极高'},
'sinner_card_0':{'description':'金黄色(高/极高)'}}
self.assertEqual(agent.fixed_fallback(options),'sinner_2')
@mock.patch.object(agent,'button_enabled',return_value=True)
def test_pending_thunderbranch_cannot_leave_shop(self,_enabled):
state={'symbol_upgraded':True,'floor':3,'thunderbranch_pending':True,'items':[
{'text':t,'x':100,'y':100,'w':100,'h':40} for t in
('商店','刷新','强化饰品','离开')]}
options=agent.candidates(state,refresh_used=4)
self.assertEqual(set(options),{'wait','requires_analysis','prepare_thunderbranch'})
self.assertEqual(agent.fixed_fallback(options),'prepare_thunderbranch')
def test_jev_rate_limit_fails_without_sleep_or_second_request(self):
error=jev_client.urllib.error.HTTPError('https://example.test',429,'rate limit',{},None)
with mock.patch.object(jev_client.urllib.request,'urlopen',side_effect=error) as request, mock.patch.object(jev_client.time,'sleep') as sleep:
with self.assertRaises(jev_client.urllib.error.HTTPError):
agent.decide({'apiKey':'test','model':'jev-test'}, {'items':[]},{'wait':{'description':'wait'}},[])
self.assertEqual(request.call_count,1)
sleep.assert_not_called()
def test_jev_uses_configured_model_and_returns_probabilities_without_images(self):
response = mock.MagicMock()
response.__enter__.return_value = response
response.read.return_value = b'{"model":"jev-test","answers":{"action":{"type":"choice","choice":"wait","confidence":0.5,"probabilities":{"wait":0.75,"inspect":0.25}}}}'
state = {'screen': {'path': 'LOCAL_SCREENSHOT_ONLY.png'},
'items': [{'text': 'EVENT', 'x': 10, 'y': 20}]}
options = {'wait': {'description': 'wait'}, 'inspect': {'description': 'inspect'}}
with mock.patch.object(jev_client.urllib.request, 'urlopen', return_value=response) as request:
result = agent.decide({'apiKey': 'test', 'model': 'jev-test'}, state, options, [])
payload = agent.json.loads(request.call_args.args[0].data.decode('utf-8'))
self.assertEqual(payload['model'], 'jev-test')
self.assertIsInstance(payload['state'], str)
self.assertNotIn('LOCAL_SCREENSHOT_ONLY', payload['state'])
self.assertEqual(result['confidence'], .5)
self.assertEqual(result['probabilities'], {'wait': .75, 'inspect': .25})
def test_single_extra_gift_decline_preserves_core_and_multi_cards(self):
state = {'items': [{'text':t,'x':100,'y':100,'w':100,'h':40} for t in
('获得E.G.O饰品','石版字符','拒绝饰品','选择')]}
self.assertIn('decline_extra_observation', agent.candidates(state))
state['items'][1]['text'] = '标准负载电池'
self.assertNotIn('decline_extra_observation', agent.candidates(state))
state['items'][1]['text'] = '石版字符'
state['items'].append({'text':'获得E.G.O饰品'})
self.assertNotIn('decline_extra_observation', agent.candidates(state))
def test_special_shop_cannot_leave_before_core_upgrade(self):
state = {'floor':2, 'symbol_upgraded':False, 'items':[
{'text':t, 'x':100,'y':100,'w':100,'h':40} for t in
('特殊商店','刷新','强化饰品','替换格里高尔的技能','替换浮士德的技能','离开')]}
self.assertEqual(set(agent.candidates(state)), {'wait','requires_analysis'})
state['symbol_upgraded'] = True
options = agent.candidates(state)
self.assertTrue(any(k.startswith('swap_') for k in options))
self.assertFalse(any('离开' in v['description'] for v in options.values()))
def test_purple_shop_is_reachable_by_lit_arrow(self):
import numpy as np
from PIL import Image
assets = agent.REPO_ROOT / 'vendor' / 'aalc' / 'assets' / 'images' / 'default' / 'share' / 'mirror'
canvas = Image.new('RGB', (1920,1080))
def place(name, center, purple=False):
with Image.open(assets / name) as im:
im = im.convert('RGB').resize((round(im.width*.75),round(im.height*.75)))
if name.endswith('mid.png'):
from PIL import ImageEnhance
im = ImageEnhance.Brightness(im).enhance(1.8)
if purple:
gray = np.array(im.convert('L'), dtype=float)
im = Image.fromarray(np.stack((gray*.55,gray*.25,gray*.8),axis=2).astype('uint8'))
canvas.paste(im,(center[0]-im.width//2,center[1]-im.height//2))
place('mybus_default_distance.png',(704,396))
place('road_in_mir/mid.png',(895,430))
place('road_in_mir/shop.png',(1079,433),True)
with tempfile.TemporaryDirectory() as folder:
shot = Path(folder) / 'purple_shop.png'
canvas.save(shot)
options = agent.map_candidates({'screen': {'path': str(shot)}})
self.assertEqual(set(options), {'route_d'})
self.assertIn('商店', options['route_d']['description'])
def test_claimed_rewards_stop_at_lobby_without_entering_again(self):
state = {'claim_requested': True, 'items': [{'text': t} for t in ('探索状态','进入','名与蛛之镜')]}
options = agent.candidates(state)
self.assertEqual(set(options), {'wait','requires_analysis','run_complete'})
self.assertEqual(agent.fixed_fallback(options), 'run_complete')
state['items'].append({'text':'探索中'})
self.assertEqual(set(agent.candidates(state)), {'wait','requires_analysis'})
@mock.patch.object(agent, 'button_enabled', return_value=True)
def test_claim_confirmation_only_uses_modal(self, _enabled):
state = {'claim_requested': True, 'items': [
{'text':'确认','x':800,'y':700,'w':100,'h':40}, {'text':'进入'}]}
options = agent.candidates(state)
self.assertEqual(set(options), {'wait','requires_analysis','modal_confirm'})
self.assertEqual(options['modal_confirm']['action']['args'], {'x':850,'y':720})
def test_death_screen_stops_battle_candidates_without_accepting_deaths(self):
state = {'items': [{'text': text} for text in ('参加战斗的全体罪人已经死亡。', '重试关卡')]}
self.assertEqual(set(agent.candidates(state, previous_battle=True)), {'wait', 'requires_analysis'})
self.assertFalse(agent.death_retry_screen(['敌方死亡时增加伤害']))
@mock.patch.object(agent.time, 'sleep')
def test_battle_macro_stops_on_party_death(self, _sleep):
bridge = mock.Mock()
bridge.call.side_effect = lambda tool, args=None: ({'ok': True, 'items': [{'text': '参加战斗的全体罪人已经死亡。'}]}
if tool == 'get_state' else {'ok': True})
with mock.patch.object(agent, 'STOP_FILE') as stop:
stop.exists.return_value = False
result = agent.execute(bridge, {'tool': 'battle', 'args': {}})
self.assertTrue(result['terminal'])
self.assertEqual(result['pairs'], 2)
@mock.patch.object(agent, 'button_enabled', return_value=True)
def test_startup_three_gifts_selects_battery_and_cannot_decline(self, _enabled):
state = {'items': [{'text': text, 'x': x, 'y': y, 'w': 100, 'h': 40}
for text, x, y in [('选择E.G.O饰品', 700, 80), ('可选择0/1', 1300, 80),
('标准负载电池', 800, 480), ('拒绝饰品', 1400, 850),
('确认', 1500, 950)]]}
options = agent.candidates(state, previous_battle=True)
self.assertEqual(set(options), {'wait', 'requires_analysis', 'select_startup_battery'})
self.assertEqual(options['select_startup_battery']['action']['args'], {'x': 850, 'y': 500})
self.assertEqual(agent.fixed_fallback(options), 'select_startup_battery')
state['items'][1]['text'] = '可选择1/1'
options = agent.candidates(state)
self.assertEqual(set(options), {'wait', 'requires_analysis', 'confirm_startup_battery'})
self.assertEqual(options['confirm_startup_battery']['action']['args'], {'x': 1550, 'y': 970})
@mock.patch.object(agent, 'button_enabled', return_value=True)
def test_unrecognized_gift_choice_is_never_declined(self, _enabled):
state = {'items': [{'text': text, 'x': 100, 'y': 100, 'w': 100, 'h': 40}
for text in ('选择E.G.O饰品', '可选择0/1', '拒绝饰品', '确认')]}
self.assertEqual(set(agent.candidates(state)), {'wait', 'requires_analysis'})
state['items'] = [state['items'][2]]
self.assertEqual(set(agent.candidates(state)), {'wait', 'requires_analysis'})
@mock.patch.object(agent, 'button_enabled', return_value=True)
def test_explicit_extra_observation_can_be_declined(self, _enabled):
state = {'items': [{'text': text, 'x': 100, 'y': 100, 'w': 100, 'h': 40}
for text in ('额外E.G.O饰品观测', '拒绝饰品')]}
self.assertEqual(set(agent.candidates(state)), {'wait', 'requires_analysis', 'decline_extra_observation'})
def test_event_gift_outcome_does_not_become_startup_selection(self):
state = {'items': [{'text': '选项', 'x': 20, 'y': 20, 'w': 100, 'h': 40},
{'text': '按下闪电形状的按钮', 'x': 1200, 'y': 330, 'w': 350, 'h': 40, 'score': 1},
{'text': '选择后获得破裂饰品', 'x': 1200, 'y': 380, 'w': 350, 'h': 40, 'score': 1}]}
self.assertIn('event_1', agent.candidates(state))
def test_server_error_blocks_shop_and_retries_modal(self):
state = {'items': [
{'text': '商店'}, {'text': '刷新'}, {'text': '服务器发生错误。'},
{'text': '重试', 'x': 1069, 'y': 681, 'w': 74, 'h': 41},
{'text': '离开', 'x': 1642, 'y': 938, 'w': 116, 'h': 66}]}
options = agent.candidates(state)
self.assertEqual(set(options), {'wait', 'requires_analysis', 'retry_network'})
self.assertEqual(agent.fixed_fallback(options), 'retry_network')
self.assertEqual(options['retry_network']['action']['args'], {'x': 1106, 'y': 701})
def test_gift_damage_description_is_not_battle(self):
state = {'items': [{'text': '使用技能造成12点伤害时增加破裂强度', 'x': 400, 'y': 200, 'w': 800, 'h': 40}]}
self.assertNotIn('battle', agent.candidates(state))
def test_success_condition_in_event_option_is_not_result(self):
state = {'items': [{'text': '判定成功时获得饰品', 'x': 400, 'y': 200, 'w': 800, 'h': 40}]}
self.assertNotIn('event_finish', agent.candidates(state))
def test_loading_ocr_missing_n_blocks_input(self):
state = {'items': [{'text': 'CONECTING'}, {'text': '商店'}, {'text': '刷新'}]}
self.assertEqual(set(agent.candidates(state)), {'wait', 'requires_analysis'})
def test_fallback_judgement_precedes_reselecting_sinner(self):
options = {'sinner_card_1': {'description': '极高'},
'button_2': {'description': '进行判定'}}
self.assertEqual(agent.fixed_fallback(options), 'button_2')
def test_two_card_reward_uses_observed_anchor(self):
state = {'screen': {'w': 1920, 'h': 1080}, 'items': [
{'text': '选择遭遇战奖励卡', 'x': 800, 'y': 80, 'w': 300, 'h': 40},
{'text': '获得经费', 'x': 1120, 'y': 560, 'w': 100, 'h': 40}]}
options = agent.candidates(state)
self.assertEqual(options['reward_card_anchor_1']['action']['args'], {'x': 1170, 'y': 398})
self.assertEqual(agent.fixed_fallback(options), 'reward_card_anchor_1')
@mock.patch.object(agent.time, 'sleep')
def test_final_claim_click_is_followed_by_enter(self, _sleep):
bridge = mock.Mock()
bridge.call.return_value = {'ok': True}
agent.execute(bridge, {'tool':'claim_final','args':{'x':1292,'y':816}})
self.assertEqual(bridge.call.call_args_list,
[mock.call('click',{'x':1292,'y':816}),
mock.call('keypress',{'key':'enter'})])
@mock.patch.object(agent, 'button_enabled', return_value=True)
def test_event_dialog_skip_precedes_judgement_and_options(self, _enabled):
state = {'items': [{'text': text, 'x': 1200, 'y': 400, 'w': 120, 'h': 40, 'score': 1.0}
for text in ('SKIP', '进行判定', '选项', '侧耳倾听')]}
options = agent.candidates(state, previous_battle=True)
self.assertEqual(set(options), {'wait', 'requires_analysis', 'skip_dialog'})
self.assertEqual(options['skip_dialog']['action'],
{'tool': 'click', 'args': {'x': 1260, 'y': 420}})
def test_floor_three_sinclair_cannot_choose_first_floor_swap(self):
state = {'floor': 3, 'items': [
{'text': '当前持有技能', 'x': 900, 'y': 160, 'w': 100, 'h': 30},
{'text': '替换辛克莱的技能', 'x': 400, 'y': 180, 'w': 300, 'h': 40}]}
for x, first, second in ((543, 'SKILL1', 'SKILL2'), (1033, 'SKILL2', 'SKILL3'),
(1520, 'SKILL1', 'SKILL3')):
state['items'].extend({'text': label, 'x': x, 'y': y, 'w': 106, 'h': 42}
for label, y in ((first, 360), (second, 579)))
options = agent.candidates(state)
self.assertIn('skill_swap_3', options)
self.assertNotIn('skill_swap_1', options)
self.assertNotIn('skill_swap_2', options)
state['floor'] = 2
options = agent.candidates(state)
self.assertIn('skill_swap_1', options)
self.assertNotIn('skill_swap_3', options)
@mock.patch.object(agent, 'button_enabled', return_value=True)
def test_sold_swap_is_not_offered_again(self, _enabled):
state = {'items': [
{'text': '商店', 'x': 343, 'y': 162, 'w': 86, 'h': 50},
{'text': '刷新', 'x': 1496, 'y': 167, 'w': 54, 'h': 33},
{'text': '替换辛克莱的技能', 'x': 848, 'y': 499, 'w': 179, 'h': 28},
{'text': '已购买', 'x': 897, 'y': 326, 'w': 82, 'h': 34}]}
options = agent.candidates(state)
self.assertNotIn('swap_2', options)
self.assertIn('shop_refresh', options)
def test_real_white_event_routes_work_without_map_heading_ocr(self):
screenshot = Path(__file__).resolve().parent / 'fixtures' / 'floor4_white_events.png'
assets = agent.REPO_ROOT / 'vendor' / 'aalc' / 'assets' / 'images' / 'default' / 'share' / 'mirror'
if not assets.is_dir():
self.skipTest('AALC submodule assets unavailable')
options = agent.map_candidates({'screen': {'path': str(screenshot)}})
self.assertIn('route_w', options)
self.assertIn('route_d', options)
self.assertNotIn('route_s', options)
self.assertIn('事件', options['route_w']['description'])
options = agent.candidates({'screen':{'path':str(screenshot)},'items':[]})
self.assertIn('route_d', options)
@mock.patch.object(agent.time, 'sleep')
def test_battle_macro_continues_through_empty_ocr_and_stops_at_reward(self, _sleep):
bridge = mock.Mock()
states = iter([{'ok': True, 'items': []},
{'ok': True, 'items': [{'text': '选择遭遇战奖励卡'}]}])
bridge.call.side_effect = lambda tool, args=None: next(states) if tool == 'get_state' else {'ok': True}
with mock.patch.object(agent, 'STOP_FILE') as stop:
stop.exists.return_value = False
result = agent.execute(bridge, {'tool': 'battle', 'args': {}})
self.assertEqual(result['pairs'], 4)
self.assertTrue(result['terminal'])
keys = [call.args[1]['key'] for call in bridge.call.call_args_list if call.args[0] == 'keypress']
self.assertEqual(keys, ['p', 'enter']*4)
@mock.patch.object(agent.time, 'sleep')
def test_route_enters_without_a_second_snapshot(self, _sleep):
bridge = mock.Mock()
bridge.call.return_value = {'ok': True}
agent.execute(bridge, {'tool': 'route', 'args': {'key': 'w'}})
self.assertEqual(bridge.call.call_args_list,
[mock.call('keypress', {'key': 'w'}),
mock.call('keypress', {'key': 'enter'}),
mock.call('keypress', {'key': 'enter'})])
@mock.patch.object(agent, 'button_enabled', return_value=True)
def test_battle_entry_uses_enter_without_party_changes(self, _enabled):
state = {'items': [{'text': '开始战斗', 'x': 100, 'y': 100, 'w': 100, 'h': 40}]}
self.assertEqual(agent.candidates(state)['button_0']['action'],
{'tool': 'keypress', 'args': {'key': 'enter'}})
@mock.patch.object(agent, 'button_enabled', return_value=True)
def test_shop_refresh_is_capped_and_only_for_missing_party_swap(self, _enabled):
state = {'items': [{'text': text, 'x': 100, 'y': 100, 'w': 100, 'h': 40}
for text in ('商店', '刷新', '替换以实玛利的技能')]}
self.assertIn('shop_refresh', agent.candidates(state, refresh_used=3))
self.assertNotIn('shop_refresh', agent.candidates(state, refresh_used=4))
state['items'][-1]['text'] = '替换辛克莱的技能'
self.assertNotIn('shop_refresh', agent.candidates(state))
self.assertIn('swap_2', agent.candidates(state))
@mock.patch.object(agent, 'button_enabled', return_value=True)
def test_confirmation_blocks_background_leave(self, _enabled):
items = [{'text': text, 'x': x, 'y': y, 'w': 80, 'h': 40}
for text, x, y in [('要离开商店吗?', 700, 400),
('取消', 700, 600), ('确认', 1100, 600),
('离开', 1650, 950)]]
options = agent.candidates({'items': items}, previous_battle=True)
self.assertEqual(set(options), {'wait', 'requires_analysis', 'modal_confirm'})
self.assertEqual(options['modal_confirm']['action'],
{'tool': 'keypress', 'args': {'key': 'enter'}})
@mock.patch.object(agent, 'button_enabled', return_value=True)
def test_nested_reward_confirmation_excludes_background_cards(self, _enabled):
state = {'items': [{'text': t, 'x': x, 'y': y, 'w': 80, 'h': 40}
for t,x,y in [('选择遭遇战奖励卡',600,178), ('可选择0/1',1383,178),
('要在不选择奖励的情况下继续吗?',742,489),
('×取消',747,678),
('确认',1102,679), ('确认',1197,776)]]}
options = agent.candidates(state)
self.assertEqual(set(options), {'wait', 'requires_analysis', 'modal_confirm'})
self.assertEqual(options['modal_confirm']['action']['args']['y'], 699)
@mock.patch.object(agent, 'button_enabled', return_value=True)
def test_shop_leave_modal_without_ocr_question_mark(self, _enabled):
state = {'symbol_upgraded': True, 'items': [
{'text': t, 'x': x, 'y': y, 'w': 100, 'h': 40}
for t,x,y in [('特殊商店',307,162), ('刷新',1496,167),
('要离开商店吗',854,505), ('×取消',721,722),
('确认',1140,723), ('离开',1642,938)]]}
options = agent.candidates(state, refresh_used=4)
self.assertEqual(set(options), {'wait','requires_analysis','modal_confirm'})
self.assertEqual(options['modal_confirm']['action'], {'tool':'keypress','args':{'key':'enter'}})
@mock.patch.object(agent, 'button_enabled', return_value=True)
def test_event_result_uses_visible_continue_button(self, _enabled):
state = {'items':[{'text':t,'x':x,'y':y,'w':80,'h':40}
for t,x,y in [('结果',1088,162),('继续',1639,936),
('是在感谢我们吗?',112,707)]]}
options = agent.candidates(state)
self.assertEqual(options['event_finish']['action'],
{'tool':'advance_dialog','args':{'presses':5}})
self.assertEqual(options['event_finish']['fallback_action'],
{'tool':'click','args':{'x':1679,'y':956}})
def test_loading_offers_wait_and_never_auto_escalates(self):
state = {'items': [{'text': 'CONNECTING', 'x': 100, 'y': 10, 'w': 100, 'h': 30}]}
options = agent.candidates(state)
self.assertEqual(set(options), {'wait', 'requires_analysis'})
def test_event_fallback_does_not_treat_encounter_trigger_as_free_reward(self):
options = {'event_1': {'description': '拔出荧光灯;触发遭遇战!'},
'event_scroll': {'description': '查看其他选项'},
'wait': {}, 'requires_analysis': {}}
self.assertEqual(agent.fixed_fallback(options), 'event_scroll')
del options['event_scroll']
self.assertEqual(agent.fixed_fallback(options), 'requires_analysis')
@mock.patch.object(agent, 'button_enabled', return_value=True)
def test_event_encounter_result_clicks_start_battle(self, _enabled):
state = {'items': [{'text': t, 'x': x, 'y': y, 'w': 100, 'h': 40}
for t,x,y in [('结果',1088,162), ('开始战斗',1594,943)]]}
options=agent.candidates(state)
self.assertEqual(options['event_finish']['action'],{'tool':'advance_dialog','args':{'presses':5}})
self.assertEqual(options['event_finish']['fallback_action'],{'tool':'click','args':{'x':1644,'y':963}})
@mock.patch.object(agent,'button_enabled',return_value=True)
def test_layer_confirmation_requires_full_selection_then_batches_enter(self,_enabled):
state={'items':[{'text':t,'x':1500,'y':900,'w':200,'h':40} for t in
('追加的苦难','获得E.G.O饰品','选择1/2')]}
self.assertNotIn('hardship_confirm',agent.candidates(state))
state['items'][-1]['text']='选择2/2'
options=agent.candidates(state)
self.assertEqual(options['hardship_confirm']['action'],{'tool':'advance_dialog','args':{'presses':3}})
self.assertEqual(options['hardship_confirm']['fallback_action']['args'],{'x':1600,'y':920})
@mock.patch.object(agent, 'button_enabled', return_value=True)
def test_shop_loading_blocks_stale_stock_refresh_and_leave(self, _enabled):
state = {'items': [{'text': text, 'x': 100, 'y': 100, 'w': 100, 'h': 40}
for text in ('商店', '刷新', '替换辛克莱的技能', '离开', 'CONNECTING')]}
self.assertEqual(set(agent.candidates(state)), {'wait', 'requires_analysis'})
@mock.patch.object(agent, 'button_enabled', return_value=True)
def test_shop_cannot_leave_with_party_swap_or_remaining_refresh(self, _enabled):
state = {'items': [{'text': text, 'x': 100, 'y': 100, 'w': 100, 'h': 40}
for text in ('商店', '刷新', '替换奥提斯的技能', '离开')]}
self.assertNotIn('button_3', agent.candidates(state, refresh_used=4))
state['items'][2]['text'] = '替换李箱的技能'
self.assertNotIn('button_3', agent.candidates(state, refresh_used=3))
self.assertIn('button_3', agent.candidates(state, refresh_used=4))
def test_disabled_selection_is_not_clickable_candidate(self):
state = {'items': [{'text': '选择', 'x': 100, 'y': 10, 'w': 80, 'h': 40}]}
self.assertFalse(any(k.startswith('button_') for k in agent.candidates(state)))
@mock.patch.object(agent, 'button_enabled', return_value=True)
def test_generic_button_clicks_the_checked_item(self, _enabled):
# 重新按文字搜索会多一次截图+OCR, 且可能点到背景里同名的另一个按钮
state = {'items': [{'text': '继续', 'x': 100, 'y': 200, 'w': 80, 'h': 40}]}
self.assertEqual(agent.candidates(state)['button_0']['action'],
{'tool': 'click', 'args': {'x': 140, 'y': 220}})
def test_screenshot_decoded_once_for_repeated_checks(self):
from PIL import Image
with tempfile.TemporaryDirectory() as folder:
shot = Path(folder) / 'shot.png'
Image.new('L', (200, 100), 200).save(shot)
state = {'screen': {'path': str(shot)}}
item = {'x': 10, 'y': 10, 'w': 50, 'h': 20}
with mock.patch.object(Image, 'open', wraps=Image.open) as opened:
self.assertTrue(agent.button_enabled(state, item))
self.assertTrue(agent.button_enabled(state, dict(item, x=100)))
self.assertEqual(opened.call_count, 1)
Image.new('L', (200, 101), 0).save(shot) # 同路径的新内容不能命中旧缓存
self.assertFalse(agent.button_enabled(state, item))
def test_map_templates_are_loaded_once(self):
screenshot = Path(__file__).resolve().parent / 'fixtures' / 'floor4_white_events.png'
if not (agent.REPO_ROOT / 'vendor' / 'aalc' / 'assets').is_dir():
self.skipTest('AALC submodule assets unavailable')
state = {'screen': {'path': str(screenshot)}}
first = agent.map_candidates(state)
loads = agent._map_template.cache_info().misses
self.assertEqual(agent.map_candidates(state), first)
self.assertEqual(agent._map_template.cache_info().misses, loads)
def test_battle_cinematic_keeps_macro_available(self):
state = {'items': [{'text': '破裂+5', 'x': 100, 'y': 10, 'w': 80, 'h': 40}]}
self.assertIn('battle', agent.candidates(state, previous_battle=True))
@mock.patch.object(agent, 'button_enabled', return_value=False)
def test_in_battle_judgement_overrides_previous_battle(self, _enabled):
state = {'items': [{'text': t, 'x':100, 'y':100, 'w':100, 'h':40}
for t in ('选择一位罪人来进行判定', '判定阈值', '12')]}
self.assertNotIn('battle', agent.candidates(state, previous_battle=True))
def test_battle_macro_stops_at_judgement_before_more_inputs(self):
bridge = mock.Mock()
bridge.call.side_effect = ([{'ok': True}] * 4 + [
{'ok': True, 'items': [{'text': '选择一位罪人来进行判定'}]}])
with mock.patch.object(agent, 'STOP_FILE') as stop, mock.patch.object(agent.time, 'sleep'):
stop.exists.return_value = False
result = agent.execute(bridge, {'tool': 'battle', 'args': {}})
self.assertTrue(result['terminal'])
self.assertEqual(result['pairs'], 2)
self.assertEqual(bridge.call.call_count, 5)
def test_reward_stops_battle_candidates(self):
state = {'items': [{'text': text, 'x': 100, 'y': 10, 'w': 80, 'h': 40}
for text in ('获得E.G.O饰品', '造成更多伤害')]}
self.assertNotIn('battle', agent.candidates(state, previous_battle=True))
class MainLoopTest(unittest.TestCase):
def run_main(self, home, bridge, steps=3):
config = home / 'cfg.json'
config.write_text('{}', encoding='utf-8')
with mock.patch.object(agent, 'RUNTIME_HOME', home), \
mock.patch.object(agent, 'STOP_FILE', home / 'JEV_STOP'), \
mock.patch.object(agent, 'Bridge', return_value=bridge) as make_bridge, \
mock.patch.object(agent, 'acquire_single_instance', return_value=lambda: None), \
mock.patch.object(agent.time, 'sleep'), \
mock.patch.dict(os.environ, {'OPENCODE_API_KEY': 'test-key', 'LC_FIXED_FALLBACK': '1'}), \
mock.patch.object(sys, 'argv', ['agent', str(config), '--steps', str(steps)]):
agent.main()
return make_bridge
def test_tool_errors_are_observed_instead_of_aborting(self):
with tempfile.TemporaryDirectory() as folder:
home = Path(folder)
bridge = mock.Mock()
bridge.call.return_value = {'ok': False, 'error': '截图失败'}
make_bridge = self.run_main(home, bridge, steps=2)
make_bridge.assert_called_once()
self.assertIs(make_bridge.call_args.kwargs['raise_on_error'], False)
status = json.loads((home / 'jev_mirror_status.json').read_text())
# 没有因异常退出, 而是按“截图暂不可用”等待到步数用完
self.assertEqual((status['state'], status.get('reason')), ('stopped', 'step_limit'))
records = [json.loads(line) for line in (home / 'jev_mirror_log.jsonl').read_text().splitlines()]
self.assertEqual([r['choice'] for r in records], ['wait', 'wait'])
class SessionTest(unittest.TestCase):
def test_tool_errors_can_be_returned_instead_of_raised(self):
import mcp_session
session = mcp_session.Session.__new__(mcp_session.Session)
session.request = mock.Mock(return_value={'isError': True, 'content': [
{'type': 'text', 'text': json.dumps({'ok': False, 'error': 'text not found'})}]})
session.raise_on_error, session.timeout = False, 30
self.assertEqual(session.call('click_text', {'text': 'x'}), {'ok': False, 'error': 'text not found'})
session.raise_on_error = True
with self.assertRaises(RuntimeError):
session.call('click_text', {'text': 'x'})
if __name__ == '__main__':
unittest.main()
+671
View File
@@ -0,0 +1,671 @@
# -*- coding: utf-8 -*-
"""不需要 Windows/AALC 的测试: python -m unittest discover -s tests"""
import json
import io
import os
import socket
import subprocess
import sys
import tempfile
import threading
import time
import unittest
from unittest import mock
REPO = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
sys.path.insert(0, REPO)
from lc_mcp import server as srv_mod # noqa: E402
from lc_mcp.engine import find_hits # noqa: E402
from lc_mcp.fake_engine import FakeEngine # noqa: E402
from lc_mcp.protocol import Server, TOOLS # noqa: E402
from lc_mcp.tasks import TaskRunner # noqa: E402
START = {'text': '开始', 'x': 100, 'y': 200, 'w': 40, 'h': 20}
def call(server, tool, **args):
resp = server.handle({'jsonrpc': '2.0', 'id': 1, 'method': 'tools/call',
'params': {'name': tool, 'arguments': args}})
res = resp['result']
data = json.loads(res['content'][0]['text'])
assert res['isError'] == (not data.get('ok', False)), res
return data
def sleeper_argv(seconds):
code = 'import sys,time; print("child", sys.argv[1:], flush=True); time.sleep(%s)' % seconds
return lambda task, params: [sys.executable, '-c', code, task, json.dumps(params)]
class MatchTest(unittest.TestCase):
def test_ignores_spaces_and_case(self):
items = [{'text': 'Hong Lu', 'x': 0, 'y': 0, 'w': 10, 'h': 10}]
self.assertEqual(find_hits('honglu', items)[0]['x'], 5)
def test_exact_first(self):
items = [{'text': '开始战斗', 'x': 0, 'y': 0, 'w': 10, 'h': 10}, START]
self.assertEqual(find_hits('开始', items)[0]['text'], '开始')
def test_empty_matches_nothing(self):
self.assertEqual(find_hits(' ', [START]), [])
class ProtocolTest(unittest.TestCase):
def setUp(self):
self.tmp = tempfile.TemporaryDirectory()
self.tasks = TaskRunner(self.tmp.name, argv_factory=sleeper_argv(5))
self.engine = FakeEngine(frames=[[START]], images={'battle/turn_assets.png': (50, 60)})
self.s = Server(self.engine, self.tasks)
def tearDown(self):
self.tasks.stop()
self.tmp.cleanup()
def test_initialize_and_list(self):
r = self.s.handle({'jsonrpc': '2.0', 'id': 7, 'method': 'initialize', 'params': {}})
self.assertEqual(r['id'], 7)
names = [t['name'] for t in self.s.handle({'jsonrpc': '2.0', 'id': 8, 'method': 'tools/list'})['result']['tools']]
self.assertEqual(names, [t['name'] for t in TOOLS])
self.assertIsNone(self.s.handle({'jsonrpc': '2.0', 'method': 'notifications/initialized'}))
self.assertEqual(self.s.handle({'jsonrpc': '2.0', 'id': 9, 'method': 'nope'})['error']['code'], -32601)
def test_click_text(self):
r = call(self.s, 'click_text', text='开 始')
self.assertTrue(r['ok'])
self.assertEqual(self.engine.actions, [('click', 120, 210, 1)])
self.assertFalse(call(self.s, 'click_text', text='不存在')['ok'])
self.assertFalse(call(self.s, 'click_text', text='开始', index=3)['ok'])
self.assertFalse(call(self.s, 'click_text', text='')['ok'])
def test_bad_arguments_are_tool_errors(self):
r = call(self.s, 'click', x='abc', y=1)
self.assertIn('bad arguments', r['error'])
self.assertFalse(call(self.s, 'click')['ok'])
def test_invalid_request_shapes_do_not_escape_or_send_input(self):
for params in (['invalid'], 'invalid', 1, True, None):
response = self.s.handle({'jsonrpc': '2.0', 'id': 7, 'method': 'tools/call', 'params': params})
self.assertEqual(response['error']['code'], -32602)
for arguments in ([], 'invalid', 1, True, None):
response = self.s.handle({'jsonrpc': '2.0', 'id': 8, 'method': 'tools/call',
'params': {'name': 'click', 'arguments': arguments}})
self.assertEqual(response['error']['code'], -32602)
self.assertEqual(self.engine.actions, [])
def test_notifications_never_reply_or_perform_request_only_actions(self):
message = {'jsonrpc': '2.0', 'method': 'tools/call',
'params': {'name': 'click', 'arguments': {'x': 1, 'y': 2}}}
self.assertIsNone(self.s.handle(message))
self.assertEqual(self.engine.actions, [])
self.assertIsNotNone(self.s.handle(dict(message, id=None)))
def test_malformed_messages_allow_following_valid_request(self):
messages = ['null', '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":[1]}',
'{"jsonrpc":"2.0","id":2,"method":"ping"}']
stdin, stdout = io.StringIO('\n'.join(messages) + '\n'), io.StringIO()
srv_mod.serve_lines(self.s, stdin.readline, stdout.write)
responses = [json.loads(line) for line in stdout.getvalue().splitlines()]
self.assertEqual([r.get('error', {}).get('code') for r in responses[:2]], [-32600, -32602])
self.assertEqual(responses[2], {'jsonrpc': '2.0', 'id': 2, 'result': {}})
def test_invalid_envelope_returns_request_error(self):
for updates in ({'jsonrpc': '1.0'}, {'method': []}, {'id': True}, {'id': []}):
message = dict({'jsonrpc': '2.0', 'id': 9, 'method': 'ping'}, **updates)
self.assertEqual(self.s.handle(message)['error']['code'], -32600)
def test_task_start_cannot_race_an_input_already_in_progress(self):
entered, release = threading.Event(), threading.Event()
self.engine.click = lambda *args: (entered.set(), release.wait(3))
worker = threading.Thread(target=lambda: call(self.s, 'click', x=1, y=2))
worker.start()
try:
self.assertTrue(entered.wait(2))
started = time.monotonic()
response = call(self.s, 'run_task', task='mirror')
self.assertFalse(response['ok'])
self.assertIsNone(self.tasks.proc)
self.assertLess(time.monotonic() - started, 1)
self.assertEqual(call(self.s, 'task_status')['state'], 'idle')
self.assertTrue(call(self.s, 'stop_task')['ok'])
finally:
release.set()
worker.join(3)
def test_drag_duration_and_rejected_arguments(self):
r = call(self.s, 'drag', from_x=200, from_y=300, to_x=200, to_y=600, duration=1.5)
self.assertTrue(r['ok'])
self.assertEqual(self.engine.actions[-1], ('drag', 200, 300, 200, 600, 1.5))
action_count = len(self.engine.actions)
for duration in (-1, 0, 11, float('nan'), float('inf')):
self.assertFalse(call(self.s, 'drag', from_x=1, from_y=2,
to_x=3, to_y=4, duration=duration)['ok'])
self.assertEqual(len(self.engine.actions), action_count)
def test_images(self):
self.assertEqual(call(self.s, 'find_image', name='battle/turn_assets.png')['x'], 50)
r = call(self.s, 'find_image', name='home/x.png')
self.assertTrue(r['ok'])
self.assertFalse(r['found'])
self.assertFalse(call(self.s, 'click_image', name='home/x.png')['ok'])
call(self.s, 'click_image', name='battle/turn_assets.png')
self.assertEqual(self.engine.actions[-1], ('click', 50, 60, 1))
self.assertEqual(call(self.s, 'list_images', prefix='battle/')['count'], 1)
def test_wait_for_text(self):
self.engine.frames = [[], [], [START]]
with mock.patch('lc_mcp.protocol.WAIT_INTERVAL', 0.01):
r = call(self.s, 'wait_for_text', text='开始', timeout=2)
self.assertTrue(r['ok'])
self.engine.frames = [[START]]
r = call(self.s, 'wait_for_text_gone', text='开始', timeout=0.05)
self.assertFalse(r['ok'])
self.assertIn('timeout', r['error'])
def test_task_lifecycle_blocks_manual_input(self):
self.assertEqual(call(self.s, 'task_status')['state'], 'idle')
r = call(self.s, 'run_task', task='mirror', count=2, exp=9) # exp 不属于 mirror, 忽略
self.assertTrue(r['ok'], r)
self.assertFalse(call(self.s, 'run_task', task='daily')['ok'])
self.assertIn('stop_task', call(self.s, 'click', x=1, y=1)['error'])
self.assertIn('stop_task', call(self.s, 'drag', from_x=1, from_y=2,
to_x=3, to_y=4)['error'])
self.assertTrue(call(self.s, 'get_state')['ok']) # 只读工具仍可用
# 轮询等子进程输出, 不用固定等待 (机器负载高时 0.5s 不够)
deadline = time.time() + 10
while True:
st = call(self.s, 'task_status')
if st['log_tail'] or time.time() > deadline:
break
time.sleep(0.05)
self.assertEqual(st['state'], 'running')
self.assertEqual(st['params'], {'count': 2})
self.assertIn("child ['mirror', '{\"count\": 2}']", '\n'.join(st['log_tail']))
self.assertEqual(call(self.s, 'stop_task')['state'], 'stopped')
self.assertEqual(call(self.s, 'task_status')['state'], 'stopped')
self.assertTrue(call(self.s, 'click', x=1, y=1)['ok'])
self.assertFalse(call(self.s, 'run_task', task='bogus')['ok'])
def test_task_exit_codes(self):
self.tasks.argv_factory = lambda t, p: [sys.executable, '-c', 'import sys; sys.exit(3)']
call(self.s, 'run_task', task='reward')
self.tasks.proc.wait(5)
st = call(self.s, 'task_status')
self.assertEqual((st['state'], st['exit_code']), ('failed', 3))
def test_engine_unavailable(self):
s = Server(None, self.tasks, engine_error='no windows')
self.assertIn('no windows', call(s, 'get_state')['error'])
self.assertEqual(call(s, 'task_status')['state'], 'idle')
class AalcTaskArgsTest(unittest.TestCase):
def test_rejects_unknown_params(self):
from lc_mcp import aalc_task
self.assertEqual(aalc_task.main(['x', 'mirror', '{"exp": 1}']), 2)
self.assertEqual(aalc_task.main(['x', 'nope']), 2)
def test_originals_saved_before_override_and_restored(self):
from lc_mcp import aalc_task
class Cfg:
def __init__(self):
self.values, self.saved, self.flushes = {'set_mirror_count': 1}, {}, 0
def get_value(self, key):
return self.values[key]
def unsaved_set_value(self, key, value):
self.values[key] = value
def set_value(self, key, value):
self.values[key] = self.saved[key] = value
def flush(self):
self.flushes += 1
cfg = Cfg()
with tempfile.TemporaryDirectory() as d:
path = os.path.join(d, 'x.restore.json')
originals = aalc_task.apply_overrides(cfg, 'mirror', {'count': 5}, path)
self.assertEqual(cfg.values['set_mirror_count'], 5)
with open(path, encoding='utf-8') as f:
self.assertEqual(json.load(f), {'set_mirror_count': 1})
self.assertEqual(originals, {'set_mirror_count': 1})
# 任务进程被强杀后, TaskRunner 用 --restore 读文件写回
aalc_task.restore_file(path, cfg)
self.assertEqual((cfg.saved, cfg.flushes), ({'set_mirror_count': 1}, 1))
self.assertFalse(os.path.exists(path))
self.assertEqual(aalc_task.apply_overrides(cfg, 'reward', {}, path), {})
self.assertFalse(os.path.exists(path)) # 没有覆盖就不留恢复文件
class TaskRestoreTest(unittest.TestCase):
"""run_task 的临时次数会随 AALC 中途存盘写进 config.yaml; 强杀后必须写回原值。"""
CHILD = ('import json, os, time; p = os.environ["LCP_RESTORE_FILE"]; '
'open(p, "w").write(json.dumps({"set_mirror_count": 1})); time.sleep(30)')
def setUp(self):
self.tmp = tempfile.TemporaryDirectory()
self.marker = os.path.join(self.tmp.name, 'restored.txt')
self.runs = os.path.join(self.tmp.name, 'runs')
self.restore_code = 'import os, sys; open(sys.argv[2], "a").write(open(sys.argv[1]).read()); os.remove(sys.argv[1])'
self.runner = TaskRunner(self.runs, argv_factory=lambda t, p: [sys.executable, '-c', self.CHILD],
restore_argv=lambda path: [sys.executable, '-c', self.restore_code, path, self.marker])
def tearDown(self):
self.runner.stop()
self.tmp.cleanup()
def _wait_for_restore_file(self):
deadline = time.time() + 10
while time.time() < deadline:
if any(n.endswith('.restore.json') for n in os.listdir(self.runs)):
return
time.sleep(0.05)
self.fail('child never wrote its restore file')
def test_stop_restores_overridden_config(self):
self.assertTrue(self.runner.start('mirror', {'count': 5})['ok'])
self._wait_for_restore_file()
r = self.runner.stop()
self.assertEqual((r['ok'], r['state']), (True, 'stopped'), r)
with open(self.marker) as f:
self.assertEqual(json.load(f), {'set_mirror_count': 1})
self.assertFalse([n for n in os.listdir(self.runs) if n.endswith('.restore.json')])
def test_leftover_restored_before_next_start_or_start_refused(self):
leftover = os.path.join(self.runs, 'task_20260101_000000_mirror.restore.json')
with open(leftover, 'w') as f:
json.dump({'set_mirror_count': 2}, f)
self.runner.restore_argv = lambda path: [sys.executable, '-c', 'import sys; sys.exit(1)', path]
r = self.runner.start('mirror', {'count': 5})
self.assertFalse(r['ok'])
self.assertIn('restore', r['error'])
self.assertFalse(self.runner.running())
self.assertEqual(self.runner.status()['pending_restore'], [os.path.basename(leftover)])
self.runner.restore_argv = lambda path: [sys.executable, '-c', self.restore_code, path, self.marker]
self.assertTrue(self.runner.start('mirror', {'count': 5})['ok'])
with open(self.marker) as f:
self.assertEqual(json.load(f), {'set_mirror_count': 2})
self.assertFalse(os.path.exists(leftover))
class RuntimeTest(unittest.TestCase):
def test_foreground_drag_targets_current_client_and_releases_on_failure(self):
from lc_mcp.aalc_engine import AalcEngine
engine = AalcEngine.__new__(AalcEngine)
engine.cfg = mock.Mock(simulator=False, win_input_type='foreground')
engine.auto, engine.screen = mock.Mock(), mock.Mock()
engine._grab = mock.Mock(return_value=mock.Mock(width=1600, height=720))
engine.screen.handle.hwnd = 123
engine.screen.handle.isMinimized = False
engine.screen.handle.isActive = True
engine.auto.input_handler.pos_offset.side_effect = [(500, 500), (900, 400)]
pointer = mock.Mock()
pointer.moveTo.side_effect = [None, RuntimeError('move interrupted')]
with mock.patch.dict(sys.modules, pyautogui=pointer), mock.patch('lc_mcp.aalc_engine.time.sleep'):
with self.assertRaises(RuntimeError):
engine.drag(300, 300, 700, 200, .5)
pointer.mouseDown.assert_called_once_with(500, 500)
pointer.mouseUp.assert_called_once_with(900, 400)
engine.auto.mouse_drag.assert_not_called()
def test_foreground_input_activates_game_before_sending(self):
from lc_mcp.aalc_engine import AalcEngine
engine = AalcEngine.__new__(AalcEngine)
engine.cfg = mock.Mock(simulator=False, win_input_type='foreground')
engine.auto, engine.screen = mock.Mock(), mock.Mock()
engine.auto.input_handler.pos_offset.return_value = (580, 657)
engine.screen.handle.hwnd = 123
engine.screen.handle.isMinimized = False
engine.screen.handle.isActive = False
def activate():
engine.screen.handle.isActive = True
engine.screen.handle.setForeground.side_effect = activate
pointer = mock.Mock()
with mock.patch('lc_mcp.aalc_engine.time.sleep') as sleep, mock.patch.dict(sys.modules, pyautogui=pointer):
engine.click(100, 200)
engine.screen.handle.setForeground.assert_called_once_with()
pointer.moveTo.assert_called_once_with(580, 657)
self.assertEqual(sleep.call_args_list, [mock.call(.15), mock.call(.12), mock.call(.35), mock.call(.12)])
pointer.mouseDown.assert_called_once_with(580, 657)
pointer.mouseUp.assert_called_once_with(580, 657)
engine.auto.mouse_click.assert_not_called()
def test_foreground_focus_failure_does_not_send_input(self):
from lc_mcp.aalc_engine import AalcEngine
engine = AalcEngine.__new__(AalcEngine)
engine.cfg = mock.Mock(simulator=False, win_input_type='foreground')
engine.auto, engine.screen = mock.Mock(), mock.Mock()
engine.screen.handle.hwnd = 123
engine.screen.handle.isMinimized = False
engine.screen.handle.isActive = False
engine.key_names = ['enter']
engine._focus_game = mock.Mock()
with mock.patch('lc_mcp.aalc_engine.time.sleep'):
for action in (lambda: engine.click(100, 200),
lambda: engine.keypress('enter'),
lambda: engine.type_text('test')):
with self.assertRaises(RuntimeError):
action()
engine.auto.mouse_click.assert_not_called()
engine.auto.key_press.assert_not_called()
engine.auto.input_text.assert_not_called()
def test_foreground_input_releases_on_interruption(self):
from lc_mcp.aalc_engine import AalcEngine
engine = AalcEngine.__new__(AalcEngine)
engine.cfg = mock.Mock(simulator=False, win_input_type='foreground')
engine.auto, engine.screen = mock.Mock(), mock.Mock()
engine.screen.handle.hwnd = 123
engine.screen.handle.isMinimized = False
engine.screen.handle.isActive = True
engine.auto.input_handler.pos_offset.return_value = (580, 657)
engine.key_names = ['enter']
pointer = mock.Mock()
with mock.patch.dict(sys.modules, pyautogui=pointer), \
mock.patch('lc_mcp.aalc_engine.time.sleep', side_effect=[None, RuntimeError('interrupted')]):
with self.assertRaises(RuntimeError):
engine.click(100, 200)
with mock.patch.dict(sys.modules, pyautogui=pointer), \
mock.patch('lc_mcp.aalc_engine.time.sleep', side_effect=RuntimeError('interrupted')):
with self.assertRaises(RuntimeError):
engine.keypress('enter')
pointer.mouseUp.assert_called_once_with(580, 657)
pointer.keyUp.assert_called_once_with('enter')
def test_foreground_move_settle_failure_sends_no_button_press(self):
from lc_mcp.aalc_engine import AalcEngine
engine = AalcEngine.__new__(AalcEngine)
engine.cfg = mock.Mock(simulator=False, win_input_type='foreground')
engine.auto, engine.screen = mock.Mock(), mock.Mock()
engine.screen.handle.hwnd = 123
engine.screen.handle.isMinimized = False
engine.screen.handle.isActive = True
engine.auto.input_handler.pos_offset.return_value = (580, 657)
pointer = mock.Mock()
with mock.patch.dict(sys.modules, pyautogui=pointer), \
mock.patch('lc_mcp.aalc_engine.time.sleep', side_effect=RuntimeError('interrupted')):
with self.assertRaises(RuntimeError):
engine.click(100, 200)
pointer.mouseDown.assert_not_called()
def test_focus_retry_detaches_threads_even_on_failure(self):
from lc_mcp.aalc_engine import AalcEngine
engine = AalcEngine.__new__(AalcEngine)
engine.screen = mock.Mock()
engine.screen.handle.hwnd = 123
engine.screen.handle.isActive = False
engine.screen.handle.setForeground.side_effect = RuntimeError('focus refused')
api, gui, process = mock.Mock(), mock.Mock(), mock.Mock()
api.GetCurrentThreadId.return_value = 1
gui.GetForegroundWindow.return_value = 456
process.GetWindowThreadProcessId.side_effect = [(2, 200), (3, 300)]
with mock.patch.dict(sys.modules, win32api=api, win32gui=gui, win32process=process):
with self.assertRaises(RuntimeError):
engine._focus_game()
self.assertEqual(process.AttachThreadInput.call_args_list,
[mock.call(1, 2, True), mock.call(1, 3, True),
mock.call(1, 3, False), mock.call(1, 2, False)])
def test_background_click_holds_and_releases_without_moving_window(self):
from lc_mcp.aalc_engine import AalcEngine
engine = AalcEngine.__new__(AalcEngine)
engine.cfg = mock.Mock(simulator=False, win_input_type='background')
engine.auto, engine.screen = mock.Mock(), mock.Mock()
handler = mock.Mock(spec=['set_mouse_pos','set_active','mouse_down','mouse_up'])
engine.auto.input_handler = handler
sequence = mock.Mock()
sequence.attach_mock(handler.mouse_down, 'down')
sequence.attach_mock(handler.mouse_up, 'up')
with mock.patch('lc_mcp.aalc_engine.time.sleep') as sleep:
sequence.attach_mock(sleep, 'sleep')
engine.click(100, 200)
self.assertEqual(sequence.mock_calls, [mock.call.down(100, 200),
mock.call.sleep(.12), mock.call.up(100, 200),
mock.call.sleep(.12)])
engine.auto.mouse_click.assert_not_called()
with mock.patch('lc_mcp.aalc_engine.time.sleep', side_effect=RuntimeError('interrupted')):
with self.assertRaises(RuntimeError):
engine.click(100, 200)
self.assertEqual(handler.mouse_up.call_count, 2)
engine.screen.handle.set_window_pos.assert_not_called()
def test_background_keypress_holds_and_releases_on_error(self):
from lc_mcp.aalc_engine import AalcEngine
engine = AalcEngine.__new__(AalcEngine)
engine.key_names = ['enter']
engine.cfg = mock.Mock(simulator=False, win_input_type='background')
engine.auto = mock.Mock()
with mock.patch('lc_mcp.aalc_engine.time.sleep') as sleep:
engine.keypress('enter')
sleep.assert_called_once_with(0.12)
engine.auto.input_handler.key_down.assert_called_once_with('enter')
engine.auto.input_handler.key_up.assert_called_once_with('enter')
engine.auto.key_press.assert_not_called()
with mock.patch('lc_mcp.aalc_engine.time.sleep', side_effect=RuntimeError('interrupted')):
with self.assertRaises(RuntimeError):
engine.keypress('enter')
self.assertEqual(engine.auto.input_handler.key_up.call_count, 2)
def test_pythonw_streams_are_redirected_to_log(self):
with tempfile.TemporaryDirectory() as directory:
with mock.patch.object(srv_mod, 'HOME', directory), \
mock.patch('sys.stdout', None), mock.patch('sys.stderr', None):
stream = srv_mod._configure_streams()
try:
print('启动')
srv_mod.log('ready')
finally:
stream.close()
with open(os.path.join(directory, 'server.log'), encoding='utf-8') as f:
self.assertEqual(f.read(), '启动\n[lc_mcp] ready\n')
def test_stdio_isolates_bootstrap_output_and_uses_utf8(self):
code = '''
from lc_mcp import server
from lc_mcp.protocol import Server
from lc_mcp.fake_engine import FakeEngine
from lc_mcp.tasks import TaskRunner
import tempfile
directory = tempfile.TemporaryDirectory()
def build(fake=False):
print('bootstrap notice')
return Server(FakeEngine(frames=[[{'text':'开始', 'x':1,'y':2,'w':3,'h':4}]]), TaskRunner(directory.name))
server.build_server = build
server.main(['--stdio'])
'''
request = json.dumps({'jsonrpc': '2.0', 'id': 1, 'method': 'tools/call',
'params': {'name': 'get_state'}}, ensure_ascii=False) + '\n'
env = dict(os.environ, PYTHONUTF8='0', PYTHONIOENCODING='cp936')
p = subprocess.run([sys.executable, '-c', code], cwd=REPO, input=request.encode('utf-8'),
capture_output=True, env=env, timeout=20)
self.assertEqual(p.returncode, 0, p.stderr.decode('utf-8', 'replace'))
result = json.loads(p.stdout.decode('utf-8'))
data = json.loads(result['result']['content'][0]['text'])
self.assertEqual(data['items'][0]['text'], '开始')
self.assertIn(b'bootstrap notice', p.stderr)
def test_drag_checks_bounds_before_sending_input(self):
from lc_mcp.aalc_engine import AalcEngine
engine = AalcEngine.__new__(AalcEngine)
engine.cfg = mock.Mock(simulator=False, win_input_type='background')
engine._grab = mock.Mock(return_value=mock.Mock(width=800, height=600))
engine.auto = mock.Mock()
with self.assertRaises(ValueError):
engine.drag(100, 100, 800, 500)
engine.auto.mouse_drag.assert_not_called()
engine.drag(100, 100, 100, 500, 1.5)
engine.auto.mouse_drag.assert_called_once_with(100, 100, drag_time=1.5, dx=0, dy=400)
def test_template_scale_tracks_client_and_restores_config_on_error(self):
from lc_mcp.aalc_engine import AalcEngine
engine = AalcEngine.__new__(AalcEngine)
engine.list_images = mock.Mock(return_value=['battle/setting_assets.png'])
engine._grab = mock.Mock(return_value=mock.Mock(width=1278, height=731))
engine.cfg = mock.Mock(set_win_size=1080)
engine.cfg.unsaved_set_value.side_effect = lambda key, value: setattr(engine.cfg, key, value)
engine.auto = mock.Mock()
def match(*args, **kwargs):
self.assertEqual(engine.cfg.set_win_size, 718.875)
return (1233, 42)
engine.auto.find_image_element.side_effect = match
self.assertEqual(engine.find_image('battle/setting_assets.png'), (1233, 42))
self.assertEqual(engine.cfg.set_win_size, 1080)
self.assertEqual(engine.auto.clear_img_cache.call_count, 1)
engine.auto.find_image_element.side_effect = RuntimeError('match failed')
with self.assertRaises(RuntimeError):
engine.find_image('battle/setting_assets.png')
self.assertEqual(engine.cfg.set_win_size, 1080)
# 同一窗口尺寸复用已缩放的模板缓存 (clear_img_cache 每次都会全量 gc)
self.assertEqual(engine.auto.clear_img_cache.call_count, 1)
engine.cfg.set_value.assert_not_called()
engine.auto.find_image_element.side_effect = lambda *a, **k: (10, 10)
engine._grab.return_value = mock.Mock(width=1920, height=1080)
engine.find_image('battle/setting_assets.png')
self.assertEqual(engine.auto.clear_img_cache.call_count, 2)
def test_template_list_is_scanned_once(self):
from lc_mcp import aalc_engine
engine = aalc_engine.AalcEngine.__new__(aalc_engine.AalcEngine)
with tempfile.TemporaryDirectory() as root:
os.makedirs(os.path.join(root, 'default', 'share', 'battle'))
open(os.path.join(root, 'default', 'share', 'battle', 'turn_assets.png'), 'wb').close()
engine.images_root = root
with mock.patch.object(aalc_engine.glob, 'glob', wraps=aalc_engine.glob.glob) as scan:
self.assertEqual(engine.list_images('battle/'), ['battle/turn_assets.png'])
self.assertEqual(engine.list_images(), ['battle/turn_assets.png'])
self.assertEqual(scan.call_count, 6) # 2 主题 x 3 语言, 只扫一轮
def free_port():
with socket.socket() as s:
s.bind(('127.0.0.1', 0))
return s.getsockname()[1]
class TransportTest(unittest.TestCase):
def test_client_disconnect_is_not_a_server_error(self):
handler = srv_mod._Handler.__new__(srv_mod._Handler)
for error in (ConnectionResetError, BrokenPipeError):
handler._handle_session = mock.Mock(side_effect=error('client closed'))
handler.handle()
handler._handle_session.assert_called_once_with()
handler._handle_session = mock.Mock(side_effect=ValueError('internal bug'))
with self.assertRaises(ValueError):
handler.handle()
def setUp(self):
self.tmp = tempfile.TemporaryDirectory()
self.token_file = os.path.join(self.tmp.name, 'token')
with open(self.token_file, 'w') as f:
f.write('secret-token')
self.port = free_port()
mcp = Server(FakeEngine(frames=[[START]]), TaskRunner(self.tmp.name))
self.tcp = srv_mod.make_tcp(mcp, '127.0.0.1', self.port, 'secret-token')
threading.Thread(target=self.tcp.serve_forever, daemon=True).start()
def tearDown(self):
self.tcp.shutdown()
self.tcp.server_close()
self.tmp.cleanup()
def test_wrong_token_rejected(self):
with socket.create_connection(('127.0.0.1', self.port)) as s:
s.sendall(b'AUTH wrong\n')
self.assertEqual(s.makefile('rb').readline().strip(), b'DENIED')
def test_non_ascii_token_is_denied_not_crashed(self):
with socket.create_connection(('127.0.0.1', self.port)) as s:
s.sendall('AUTH 密码\n'.encode('utf-8'))
self.assertEqual(s.makefile('rb').readline().strip(), b'DENIED')
def test_bridge_end_to_end(self):
env = dict(os.environ, LCP_PORT=str(self.port), HOME=self.tmp.name, USERPROFILE=self.tmp.name)
os.makedirs(os.path.join(self.tmp.name, 'lc_mcp'))
os.replace(self.token_file, os.path.join(self.tmp.name, 'lc_mcp', 'token'))
lines = [
'{"jsonrpc":"2.0","id":1,"method":"initialize","params":{}}',
'',
'not json',
'{"jsonrpc":"2.0","method":"notifications/initialized"}',
'{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"click_text","arguments":{"text":"开始"}}}',
]
p = subprocess.run([sys.executable, os.path.join(REPO, 'lc_mcp', 'bridge.py')],
input='\n'.join(lines) + '\n', capture_output=True, text=True,
encoding='utf-8', env=env, timeout=20)
out = [json.loads(x) for x in p.stdout.splitlines()]
self.assertEqual([o.get('id') for o in out], [1, None, 2], p.stdout + p.stderr)
self.assertEqual(out[1]['error']['code'], -32700)
self.assertFalse(out[2]['result']['isError'])
def test_bridge_offline(self):
env = dict(os.environ, LCP_PORT=str(free_port()), HOME=self.tmp.name, USERPROFILE=self.tmp.name,
PYTHONUTF8='0', PYTHONIOENCODING='cp936')
os.makedirs(os.path.join(self.tmp.name, 'lc_mcp'))
os.replace(self.token_file, os.path.join(self.tmp.name, 'lc_mcp', 'token'))
req = ('{"jsonrpc":"2.0","id":1,"method":"initialize"}\n'
'{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"get_state"}}\n')
p = subprocess.run([sys.executable, os.path.join(REPO, 'lc_mcp', 'bridge.py')], input=req,
capture_output=True, text=True, encoding='utf-8', env=env, timeout=20)
out = [json.loads(x) for x in p.stdout.splitlines()]
self.assertIn('offline', out[0]['result']['serverInfo']['name'])
self.assertIn('未运行', out[1]['error']['message'])
self.assertEqual(p.returncode, 1)
self.assertIn('服务未运行或不可达', p.stderr)
def test_stdio_server(self):
req = ('{"jsonrpc":"2.0","id":1,"method":"ping"}\n'
'{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"get_state"}}\n')
env = dict(os.environ, HOME=self.tmp.name, USERPROFILE=self.tmp.name)
p = subprocess.run([sys.executable, '-m', 'lc_mcp.server', '--stdio', '--fake'], cwd=REPO, input=req,
capture_output=True, text=True, encoding='utf-8', env=env, timeout=20)
out = [json.loads(x) for x in p.stdout.splitlines()]
self.assertEqual(out[0]['result'], {})
state = json.loads(out[1]['result']['content'][0]['text'])
self.assertEqual((state['ok'], state['items']), (True, []))
class TaskErrorSurfaceTest(unittest.TestCase):
"""AALC 每日流程单次战斗失败后仍 exit 0; 状态里必须带出日志报错。"""
CHILD = ('import sys; '
'sys.stdout.write("[ERROR] [AALC] tasks\\\\battle\\\\battle.py:83: '
'超出最大尝试次数,未能进入战斗\\n"); '
'sys.stdout.write("[lc_mcp] task daily done\\n"); '
'sys.stdout.flush()')
def test_exit_zero_with_battle_error_is_reported(self):
with tempfile.TemporaryDirectory() as d:
runner = TaskRunner(d, argv_factory=lambda t, p: [sys.executable, '-c', self.CHILD])
self.assertTrue(runner.start('daily', {'exp': 1})['ok'])
deadline = time.time() + 15
while time.time() < deadline and runner.running():
time.sleep(0.05)
status = runner.status()
self.assertEqual((status['state'], status['exit_code']), ('succeeded', 0), status)
self.assertIn('未能进入战斗', status['errors'][-1])
def test_clean_log_has_no_errors_field(self):
with tempfile.TemporaryDirectory() as d:
runner = TaskRunner(d, argv_factory=lambda t, p: [sys.executable, '-c', 'print("[lc_mcp] ok")'])
self.assertTrue(runner.start('daily', {})['ok'])
deadline = time.time() + 15
while time.time() < deadline and runner.running():
time.sleep(0.05)
status = runner.status()
self.assertEqual(status['state'], 'succeeded')
self.assertNotIn('errors', status)
if __name__ == '__main__':
unittest.main()
+156
View File
@@ -0,0 +1,156 @@
"""Real pipe regressions with a dummy worker; never connects to a game service."""
import json
import os
from pathlib import Path
import subprocess
import sys
import tempfile
import threading
import time
import unittest
from unittest import mock
sys.path.insert(0, str(Path(__file__).resolve().parents[1] / 'scripts'))
from mcp_session import Session, SessionCancelled, SessionTimeout
WORKER = '''import json,os,sys,time
mode=os.environ['WORKER_MODE']
for line in sys.stdin:
message=json.loads(line)
with open(os.environ['WORKER_LOG'],'a',encoding='utf-8') as log:
log.write(json.dumps(message)+'\\n')
mid=message.get('id')
if mode=='initialize-failure':
sys.exit(1)
if mid is None:
continue
if message['method']=='initialize':
if mode=='stderr-burst':
sys.stderr.write('diagnostic\\n'*50000)
sys.stderr.flush()
result={}
elif mode=='silent':
continue
elif mode=='malformed':
print('invalid json',flush=True)
continue
else:
result={'content':[{'type':'text','text':json.dumps({'ok':True,'text':'中文'})}]}
print(json.dumps({'jsonrpc':'2.0','id':mid,'result':result}),flush=True)
if mode=='no-read':
time.sleep(60)
'''
class SessionTest(unittest.TestCase):
def setUp(self):
self.folder = tempfile.TemporaryDirectory()
self.addCleanup(self.folder.cleanup)
self.log = Path(self.folder.name) / 'requests.jsonl'
self.children = []
def worker(self, mode, **options):
real_popen = subprocess.Popen
def launch(*args, **kwargs):
kwargs['env'] = dict(kwargs['env'], WORKER_MODE=mode, WORKER_LOG=str(self.log))
child = real_popen([sys.executable, '-u', '-c', WORKER], **kwargs)
self.children.append(child)
return child
with mock.patch('mcp_session.subprocess.Popen', side_effect=launch):
return Session(**options)
def test_silent_response_times_out_without_retry_and_closes_child(self):
client = self.worker('silent', timeout=.5)
self.addCleanup(client.close)
started = time.monotonic()
with self.assertRaises(SessionTimeout) as caught:
client.call('click', {'x': 1, 'y': 2})
self.assertTrue(caught.exception.outcome_unknown)
self.assertEqual(caught.exception.tool, 'click')
self.assertLess(time.monotonic() - started, 3)
self.assertIsNotNone(client.process.poll())
rows = [json.loads(line) for line in self.log.read_text().splitlines()]
self.assertEqual(sum(row['method'] == 'tools/call' for row in rows), 1)
with self.assertRaises(ConnectionError):
client.call('get_state')
def test_stop_interrupts_pending_response(self):
cancelled = threading.Event()
client = self.worker('silent', timeout=5, cancelled=cancelled.is_set)
self.addCleanup(client.close)
timer = threading.Timer(.2, cancelled.set)
timer.start()
self.addCleanup(timer.cancel)
started = time.monotonic()
with self.assertRaises(SessionCancelled) as caught:
client.call('keypress', {'key': 'enter'})
self.assertTrue(caught.exception.outcome_unknown)
self.assertLess(time.monotonic() - started, 3)
self.assertIsNotNone(client.process.poll())
def test_stderr_burst_does_not_block_handshake_and_chinese_response(self):
with self.worker('stderr-burst', timeout=5) as client:
self.assertEqual(client.call('get_state')['text'], '中文')
self.assertLessEqual(len(client.stderr_tail), 20)
def test_initialization_failure_closes_every_pipe(self):
with self.assertRaises(ConnectionError):
self.worker('initialize-failure', timeout=2)
child = self.children[0]
self.assertIsNotNone(child.poll())
self.assertTrue(all(stream.closed for stream in (child.stdin, child.stdout, child.stderr)))
def test_invalid_response_closes_session(self):
client = self.worker('malformed', timeout=2)
self.addCleanup(client.close)
with self.assertRaises(ConnectionError):
client.call('get_state')
self.assertIsNotNone(client.process.poll())
def test_blocked_stdin_write_is_also_bounded(self):
client = self.worker('no-read', timeout=.5)
self.addCleanup(client.close)
started = time.monotonic()
with self.assertRaises(SessionTimeout):
client.call('type_text', {'text': 'x' * 500000})
self.assertLess(time.monotonic() - started, 3)
self.assertIsNotNone(client.process.poll())
self.assertFalse(any(thread.is_alive() for thread in client._threads))
def test_long_wait_tool_has_a_response_budget_beyond_its_polling_timeout(self):
client = Session.__new__(Session)
client.timeout = 30
client.request = mock.Mock(return_value={'content': [{'text': '{"ok":true}'}]})
client.call('wait_for_text', {'text': '开始', 'timeout': 300})
self.assertEqual(client.request.call_args.args[2], 305)
def test_session_uses_real_bridge_against_isolated_fake_server(self):
from lc_mcp.fake_engine import FakeEngine
from lc_mcp.protocol import Server
from lc_mcp.server import make_tcp
from lc_mcp.tasks import TaskRunner
home = Path(self.folder.name)
runtime = home / 'lc_mcp'
runtime.mkdir()
(runtime / 'token').write_text('test-only-token')
engine = FakeEngine()
tcp = make_tcp(Server(engine, TaskRunner(str(home / 'runs'))), '127.0.0.1', 0, 'test-only-token')
serving = threading.Thread(target=tcp.serve_forever, daemon=True)
serving.start()
try:
with mock.patch.dict(os.environ, {'LCP_PORT': str(tcp.server_address[1]),
'HOME': str(home), 'USERPROFILE': str(home)}):
with Session(timeout=5) as client:
self.assertTrue(client.call('get_state')['ok'])
self.assertTrue(client.call('drag', {'from_x': 1, 'from_y': 2,
'to_x': 3, 'to_y': 4})['ok'])
self.assertTrue(client.call('type_text', {'text': '中文'})['ok'])
self.assertEqual(engine.actions[-1], ('type', '中文'))
finally:
tcp.shutdown()
tcp.server_close()
serving.join(2)
if __name__ == '__main__':
unittest.main()
+111
View File
@@ -0,0 +1,111 @@
import json
from pathlib import Path
import sys
import tempfile
import unittest
sys.path.insert(0, str(Path(__file__).resolve().parents[1] / 'scripts'))
from run_state import prepare_run, save_json, record_claim, claim_is_current, complete_run
class RunStateTest(unittest.TestCase):
def setUp(self):
self.folder = tempfile.TemporaryDirectory()
self.addCleanup(self.folder.cleanup)
self.home = Path(self.folder.name)
self.run_path = self.home / 'mirror_current_run.json'
self.context_path = self.home / 'jev_shop_context.json'
def test_completed_run_starts_with_fresh_floor_and_no_claim_or_upgrades(self):
old_run, old_context = prepare_run(self.home)
old_run['status'] = 'completed'
old_context.update(floor=5, claim_requested=True, symbol_upgraded=True, battle_context=True)
save_json(self.run_path, old_run)
save_json(self.context_path, old_context)
run, context = prepare_run(self.home)
self.assertNotEqual(run['run_id'], old_run['run_id'])
self.assertEqual(context, {'run_id': run['run_id'], 'floor': 1, 'refresh_used': 0})
self.assertFalse(claim_is_current(run, context))
def test_resume_keeps_matching_run_and_verified_claim(self):
old_run, context = prepare_run(self.home)
context.update(floor=4, symbol_upgraded=True)
record_claim(self.home, old_run, context, {'path': 'completion.png'})
run, resumed = prepare_run(self.home, resume=True)
self.assertEqual(run['run_id'], old_run['run_id'])
self.assertEqual(run['start_utc'], old_run['start_utc'])
self.assertEqual(resumed['floor'], 4)
self.assertTrue(resumed['symbol_upgraded'])
self.assertTrue(claim_is_current(run, resumed))
def test_explicit_new_run_discards_even_unfinished_state(self):
old_run, _ = prepare_run(self.home)
run, _ = prepare_run(self.home, new_run=True)
self.assertNotEqual(run['run_id'], old_run['run_id'])
def test_resume_requires_an_unfinished_record(self):
with self.assertRaises(ValueError):
prepare_run(self.home, resume=True)
run, _ = prepare_run(self.home)
run['status'] = 'completed'
save_json(self.run_path, run)
with self.assertRaises(ValueError):
prepare_run(self.home, resume=True)
def test_orphan_context_does_not_supply_completion_to_new_run(self):
save_json(self.context_path, {'floor': 5, 'claim_requested': True})
run, context = prepare_run(self.home)
self.assertEqual(context['floor'], 1)
self.assertFalse(claim_is_current(run, context))
def test_legacy_unfinished_run_preserves_upgrades_but_discards_unbound_claim(self):
save_json(self.run_path, {'start_utc': '2026-10-02T18:13:22+08:00', 'status': 'user_takeover'})
save_json(self.context_path, {'floor': 5, 'symbol_upgraded': True,
'claim_requested': True, 'battle_context': True})
run, context = prepare_run(self.home, resume=True)
self.assertEqual(context['floor'], 5)
self.assertTrue(context['symbol_upgraded'])
self.assertNotIn('battle_context', context)
self.assertFalse(claim_is_current(run, context))
self.assertTrue(run['legacy_context_migrated'])
def test_mismatched_ids_fail_before_overwriting_the_context(self):
prepare_run(self.home)
save_json(self.context_path, {'run_id': 'another-run', 'floor': 5})
before = self.context_path.read_bytes()
with self.assertRaises(ValueError):
prepare_run(self.home)
self.assertEqual(self.context_path.read_bytes(), before)
def test_completion_requires_matching_claim_and_keeps_both_screens(self):
run, context = prepare_run(self.home)
with self.assertRaises(ValueError):
complete_run(self.home, run, context, {'path': 'home.png'})
record_claim(self.home, run, context, {'path': 'completion.png'})
context['claim_run_id'] = 'another-run'
with self.assertRaises(ValueError):
complete_run(self.home, run, context, {'path': 'home.png'})
context['claim_run_id'] = run['run_id']
complete_run(self.home, run, context, {'path': 'home.png'})
saved = json.loads(self.run_path.read_text())
self.assertTrue(saved['dungeon_completed'])
self.assertEqual(saved['claim_evidence']['path'], 'completion.png')
self.assertEqual(saved['completion_evidence']['path'], 'home.png')
def test_atomic_snapshot_retains_old_data_if_serialization_fails(self):
save_json(self.context_path, {'floor': 2})
with self.assertRaises(TypeError):
save_json(self.context_path, {'bad': {1, 2}})
self.assertEqual(json.loads(self.context_path.read_text()), {'floor': 2})
self.assertFalse(list(self.home.glob('*.tmp')))
def test_new_run_can_recover_from_corrupt_old_files(self):
self.run_path.write_text('truncated')
self.context_path.write_text('truncated')
run, context = prepare_run(self.home, new_run=True)
self.assertEqual(run['status'], 'running')
self.assertEqual(context['floor'], 1)
if __name__ == '__main__':
unittest.main()
+152
View File
@@ -0,0 +1,152 @@
# -*- coding: utf-8 -*-
"""编队滑动补丁: 几何用 AALC 真实的 scroll_swipe.py, 适配器/pyautogui 用记录调用的假对象。"""
import importlib.util
import os
import sys
import types
import unittest
from unittest import mock
REPO = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
sys.path.insert(0, REPO)
from lc_mcp import aalc_input_patch as patch # noqa: E402
SCROLL_SWIPE = os.path.join(REPO, 'vendor', 'aalc', 'module', 'automation', 'input_handlers', 'scroll_swipe.py')
def aalc_modules(input_module=None):
"""只装入 AALC 的 scroll_swipe (纯 math) 和可选的假 input 模块, 不触发 AALC 包初始化。"""
spec = importlib.util.spec_from_file_location('module.automation.input_handlers.scroll_swipe', SCROLL_SWIPE)
scroll_swipe = importlib.util.module_from_spec(spec)
spec.loader.exec_module(scroll_swipe)
mods = {name: types.ModuleType(name) for name in
('module', 'module.automation', 'module.automation.input_handlers')}
for m in mods.values():
m.__path__ = []
handlers = mods['module.automation.input_handlers']
handlers.scroll_swipe = scroll_swipe
mods['module.automation.input_handlers.scroll_swipe'] = scroll_swipe
if input_module is not None:
handlers.input = input_module
mods['module.automation.input_handlers.input'] = input_module
mods['module.automation'].input_handlers = handlers
mods['module'].automation = mods['module.automation']
return mods, scroll_swipe
class FakeBackground:
def __init__(self):
self.calls = []
def get_mouse_position(self):
return (5, 5)
def set_active(self):
self.calls.append(('active',))
def set_mouse_pos(self, x, y, **kwargs):
self.calls.append(('pos', x, y, kwargs))
def mouse_down(self, x, y):
self.calls.append(('down', x, y))
def mouse_up(self, x, y):
self.calls.append(('up', x, y))
def mouse_move(self, coordinate):
self.calls.append(('restore', coordinate))
@unittest.skipUnless(os.path.isfile(SCROLL_SWIPE), 'AALC submodule unavailable')
class TeamScrollPatchTest(unittest.TestCase):
def setUp(self):
self.mods, self.scroll_swipe = aalc_modules()
self.sleeps = []
for p in (mock.patch.dict(sys.modules, self.mods),
mock.patch.object(patch.time, 'sleep', side_effect=self.sleeps.append)):
p.start()
self.addCleanup(p.stop)
def test_background_keeps_aalc_geometry_and_actually_moves(self):
dy = -385 * 1080 / 1440 # AALC 按名称翻页的距离
adapter = FakeBackground()
patch._background_team_scroll(adapter, 500, 600, duration=0.3, dy=dy)
moves = [c for c in adapter.calls if c[0] == 'pos']
down = next(c for c in adapter.calls if c[0] == 'down')
up = next(c for c in adapter.calls if c[0] == 'up')
self.assertEqual(down[1:], (500, 600))
self.assertAlmostEqual(up[2] - down[2], dy) # 行程与 AALC 的 Windows 标定一致
self.assertGreater(len(moves), 50) # 原补丁在此为 0 个移动事件
self.assertTrue(all(not c[3] for c in moves)) # 不经过适配器的 duration 参数
plan, settle = self.scroll_swipe.build_windows_scroll_swipe_plan(500, 600, 0, dy, 0.3)
visited = {(round(c[1], 6), round(c[2], 6)) for c in moves}
for point, _ in plan:
self.assertIn((round(point[0], 6), round(point[1], 6)), visited)
self.assertIn(patch.ESCAPE_HOLD_SECONDS, self.sleeps)
self.assertEqual(self.sleeps[-1], patch.SETTLE_SECONDS)
moving = sum(d for _, d in plan)
self.assertAlmostEqual(sum(self.sleeps), moving + patch.ESCAPE_HOLD_SECONDS + patch.SETTLE_SECONDS)
self.assertEqual(adapter.calls[-1], ('restore', (5, 5)))
def test_foreground_disables_pyautogui_pause(self):
calls = []
fake = types.SimpleNamespace(
moveTo=lambda *a, **k: calls.append(('move', a, k)),
mouseDown=lambda *a, **k: calls.append(('down', a, k)),
mouseUp=lambda *a, **k: calls.append(('up', a, k)))
adapter = FakeBackground()
adapter.pos_offset = lambda x, y: (x + 100, y + 200)
with mock.patch.dict(sys.modules, {'pyautogui': fake}):
patch._foreground_team_scroll(adapter, 500, 600, duration=0.3, dy=-288, move_back=False)
self.assertTrue(all(k.get('_pause') is False for _, _, k in calls))
self.assertEqual([c[0] for c in calls].count('down'), 1)
self.assertEqual(calls[-1][:2], ('up', (600, 512))) # 终点 (500, 312) 加窗口偏移
# pyautogui 默认每次调用后停 0.1s; 关掉后总耗时只由计划决定
self.assertLess(sum(self.sleeps), 2.0)
def test_zero_distance_presses_and_releases_in_place(self):
adapter = FakeBackground()
patch._background_team_scroll(adapter, 10, 20, dy=0, move_back=False)
self.assertEqual([c[0] for c in adapter.calls], ['pos', 'active', 'down', 'up'])
self.assertEqual(self.sleeps, [])
def test_release_happens_even_if_moving_fails(self):
adapter = FakeBackground()
adapter.set_mouse_pos = mock.Mock(side_effect=[None, RuntimeError('lost window')])
with self.assertRaises(RuntimeError):
patch._background_team_scroll(adapter, 10, 20, dy=-200)
self.assertEqual(adapter.calls[-1][0], 'up')
class InstallTest(unittest.TestCase):
def test_opt_in_and_idempotent(self):
class Input:
pass
class BackgroundInput:
pass
fake_input = types.ModuleType('module.automation.input_handlers.input')
fake_input.Input, fake_input.BackgroundInput = Input, BackgroundInput
mods = {name: types.ModuleType(name) for name in
('module', 'module.automation', 'module.automation.input_handlers')}
for m in mods.values():
m.__path__ = []
mods['module.automation.input_handlers'].input = fake_input
mods['module.automation.input_handlers.input'] = fake_input
with mock.patch.dict(sys.modules, mods):
with mock.patch.dict(os.environ, {}, clear=True):
self.assertEqual(patch.install(), []) # 默认关闭
self.assertFalse(hasattr(Input, 'mouse_swipe_for_team_scroll'))
with mock.patch.dict(os.environ, {'LCP_TEAM_SCROLL_PATCH': '1'}):
self.assertEqual(patch.install(), ['Input', 'BackgroundInput'])
self.assertIs(Input.mouse_swipe_for_team_scroll, patch._foreground_team_scroll)
self.assertIs(BackgroundInput.mouse_swipe_for_team_scroll, patch._background_team_scroll)
self.assertEqual(patch.install(), []) # 幂等
if __name__ == '__main__':
unittest.main()
Vendored Submodule
+1
Submodule vendor/aalc added at 7452fad5a4