Compare commits
5
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e490a29ceb | ||
|
|
66418dce22 | ||
|
|
2131f89e62 | ||
|
|
030527f5de | ||
|
|
5ab5fd9508 |
@@ -12,7 +12,7 @@
|
|||||||
- Python:`D:\codex\lc-mcp\vendor\aalc\.venv\Scripts\python.exe`。
|
- Python:`D:\codex\lc-mcp\vendor\aalc\.venv\Scripts\python.exe`。
|
||||||
- 登录任务:`LcMCPServer`,普通权限,后台 `pythonw.exe` 服务,监听 `127.0.0.1:8765`。
|
- 登录任务:`LcMCPServer`,普通权限,后台 `pythonw.exe` 服务,监听 `127.0.0.1:8765`。
|
||||||
- 已向 Codex 注册 stdio MCP `limbus`,由 `lc_mcp\bridge.py` 连接常驻服务。
|
- 已向 Codex 注册 stdio MCP `limbus`,由 `lc_mcp\bridge.py` 连接常驻服务。
|
||||||
- 服务日志:`C:\Users\Dainsleif\lc_mcp\server.log`。认证凭据未写入报告。
|
- 服务日志:`%USERPROFILE%\lc_mcp\server.log`。认证凭据未写入报告。
|
||||||
|
|
||||||
## 修复
|
## 修复
|
||||||
|
|
||||||
@@ -53,7 +53,7 @@
|
|||||||
复测命令:
|
复测命令:
|
||||||
|
|
||||||
```powershell
|
```powershell
|
||||||
cd D:\codex\lc-mcp
|
cd <仓库目录>
|
||||||
$env:PYTHONUTF8='1'
|
$env:PYTHONUTF8='1'
|
||||||
& vendor\aalc\.venv\Scripts\python.exe -m unittest discover -s tests -v
|
& 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 task_status
|
||||||
|
|||||||
@@ -81,7 +81,25 @@ codex mcp add limbus --env PYTHONUTF8=1 -- D:\lc-mcp\vendor\aalc\.venv\Scripts\p
|
|||||||
| `task_status(lines)` / `stop_task` | 任务状态、日志尾部(`~/lc_mcp/runs`)、强制停止 |
|
| `task_status(lines)` / `stop_task` | 任务状态、日志尾部(`~/lc_mcp/runs`)、强制停止 |
|
||||||
|
|
||||||
任务运行期间,点击/按键类工具会被拒绝(防止打乱 AALC 的流程),只读工具仍可用。
|
任务运行期间,点击/按键类工具会被拒绝(防止打乱 AALC 的流程),只读工具仍可用。
|
||||||
`run_task` 传入的次数只对本次运行生效,结束后恢复 `config.yaml` 原值。
|
`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 的差异(不改其源码)
|
||||||
|
|
||||||
|
`lc_mcp/aalc_input_patch.py` 在 `bootstrap()` 时给 Windows 输入适配器打补丁,只补上游缺的东西:
|
||||||
|
|
||||||
|
- **编队列表滑动**:AALC 基类要求适配器覆盖 `mouse_swipe_for_team_scroll` 以"规避队伍拖拽判定",
|
||||||
|
但上游只有 MuMu 模拟器适配器覆盖了它(见 `input_handlers/__init__.py` 注释)。Windows 前台/后台适配器
|
||||||
|
仍用普通列表手势 `build_windows_scroll_swipe_plan`(escape 30px/0.01s),在游戏的编队列表里不足以脱离
|
||||||
|
"按住罪人卡"判定,滑动会被当成拖动卡片:队伍顺序被拖乱,缺人时后续还会"未能进入战斗"。
|
||||||
|
补丁按 MuMu 的参数(按 `set_win_size` 缩放 60px escape、保持 0.1s、分段走完、松手前停稳 0.5s)
|
||||||
|
在 `Input`(前台)和 `BackgroundInput`(后台)上补上等价实现;`WindowMoveInput` 没有
|
||||||
|
`set_mouse_pos`,保持原样。
|
||||||
|
|
||||||
## 环境变量
|
## 环境变量
|
||||||
|
|
||||||
@@ -93,6 +111,28 @@ codex mcp add limbus --env PYTHONUTF8=1 -- D:\lc-mcp\vendor\aalc\.venv\Scripts\p
|
|||||||
|
|
||||||
## 开发 / 测试
|
## 开发 / 测试
|
||||||
|
|
||||||
|
### 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
|
```bash
|
||||||
python -m unittest discover -s tests # 不需要 Windows/AALC (FakeEngine)
|
python -m unittest discover -s tests # 不需要 Windows/AALC (FakeEngine)
|
||||||
python -m lc_mcp.server --stdio --fake # 假引擎手动调试协议
|
python -m lc_mcp.server --stdio --fake # 假引擎手动调试协议
|
||||||
@@ -119,9 +159,13 @@ vendor\aalc\.venv\Scripts\python.exe -X utf8 scripts\jev_mirror_agent.py scripts
|
|||||||
```
|
```
|
||||||
|
|
||||||
运行数据默认写到 `~/lc_mcp/jev`,可用 `LC_JEV_HOME` 指定其他目录。创建该目录下的 `JEV_STOP` 文件即可停止;续跑前移除它。不要与 AALC 完整任务或另一个游戏执行器同时操作。
|
运行数据默认写到 `~/lc_mcp/jev`,可用 `LC_JEV_HOME` 指定其他目录。创建该目录下的 `JEV_STOP` 文件即可停止;续跑前移除它。不要与 AALC 完整任务或另一个游戏执行器同时操作。
|
||||||
|
中途续跑沿用 `jev_shop_context.json`;一局领取完成后它会归档为 `jev_shop_context.<时间>.json`,下一局从干净状态开始。
|
||||||
|
工具调用失败(截图暂不可用、按钮已消失等)会记入日志并重新观察画面,同一画面上同一动作最多尝试两次,不会因单次失败整局退出。
|
||||||
|
|
||||||
本次修复、实际失败反馈、操作日志、截图清单、修改源码快照和速通 skill 见 [2026-10-02 实测记录](docs/feedback/2026-10-02/README.md);安装与测试说明见 [INSTALL_TEST_REPORT.md](INSTALL_TEST_REPORT.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。
|
AALC 使用 AGPL-3.0。本项目会导入并运行 AALC 的代码,分发时需遵守 AGPL-3.0。
|
||||||
|
|||||||
@@ -0,0 +1,75 @@
|
|||||||
|
# 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 聊天文件或其他桌面应用截图。代码修复随本反馈分支提供,未推送到默认分支。
|
||||||
|
|
||||||
|
## 追加:内置经验本流程的编队拖拽缺陷(同分支后续提交)
|
||||||
|
|
||||||
|
原记录把"3 次经验本"当成成功,**这个结论是错的**:只有 2 次真正打完,另一次没进战斗。
|
||||||
|
|
||||||
|
- `~/lc_mcp/runs/task_20261003_105743_daily.log`:`11:05:55 [ERROR] tasks\battle\battle.py:83: 超出最大尝试次数,未能进入战斗`。任务子进程仍 exit 0,所以 `task_status` 当时报 `succeeded`——只看退出码会把这次失败算成成功。
|
||||||
|
- 同日志 `team_formation.py`:`对于配队人数OCR得到:7/5` → `6/5` → `5/5`。AALC 为了进入 5 人副本**点击移除了 TEAMS#1 的两名成员**(实测是六协会以实玛利与 G 公司格里高尔)。这是对用户预设队伍的实际改动,不是只读操作。
|
||||||
|
|
||||||
|
根因(按 submodule 约定不改 AALC 源码,从 lc-mcp 侧打补丁):
|
||||||
|
|
||||||
|
- AALC 基类要求适配器覆盖 `mouse_swipe_for_team_scroll` 以"规避队伍拖拽判定"(`module/automation/input_handlers/__init__.py` 注释),但上游只有 MuMu 模拟器适配器覆盖了它。Windows 前台(本机 `win_input_type=foreground`,日志确认 `使用前台点击模块`)与后台适配器仍用普通列表手势 `build_windows_scroll_swipe_plan`:escape 仅 30px / 0.01s,在编队列表里不足以脱离"按住罪人卡"判定,滑动被当成拖动卡片。
|
||||||
|
- 新增 `lc_mcp/aalc_input_patch.py`:按 MuMu 的参数(按 `set_win_size` 缩放 60px escape、保持 0.1s、分段走完、松手前停稳 0.5s)给 `Input`(前台)与 `BackgroundInput`(后台)补等价实现,在 `bootstrap()` 时安装;`WindowMoveInput` 没有 `set_mouse_pos`,保持原样。
|
||||||
|
- `lc_mcp/tasks.py`:退出码为 0 但日志尾部含 `[ERROR]`/异常行时,`task_status` 增加 `errors` 字段,避免只凭 `succeeded` 判断。
|
||||||
|
|
||||||
|
**验证范围**:滑动的几何与补丁安装有单元测试,101 项回归通过(见 [test-results.txt](test-results.txt),已更新为本次 101 项输出)。**真实编队界面上的滑动没有复测**——当时体力 6/120,不足以进入任何副本。下一次有体力跑经验本时应同时核对编队人数与 `errors`。
|
||||||
|
|
||||||
|
同一时段另有一项与 AALC 流程无关的养成操作:W Corp L3 堂吉诃德人格等级 35 → 37(HP 161→166、防御等级 34→36),消耗 12 张 III 级经验票,剩余 II 级经验票 19 张;升级时游戏服务器报错一次,点 Retry 后成功。
|
||||||
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 @@
|
|||||||
|
[36m[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]')[0m
|
||||||
|
[36m[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]')[0m
|
||||||
|
[33m[WARNING] 2026-10-03 09:42:26,492 [AALC] ..\..\lc_mcp\aalc_engine.py:105: 窗口句柄无效,可能窗口已关闭,重新获取, 当前句柄为 3476014[0m
|
||||||
|
[32m[INFO] 2026-10-03 09:42:26,497 [AALC] ..\..\lc_mcp\aalc_engine.py:105: 重新获取窗口句柄成功, 新句柄为 918882[0m
|
||||||
|
[36m[DEBUG] 2026-10-03 09:42:29,507 [AALC] module\ocr\ocr.py:72: OCR识别结果:('FACETHE SINSSUE THE EGO', "Clear'alfcachey", '[ACCOUNT_REDACTED]')[0m
|
||||||
|
[36m[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')[0m
|
||||||
|
[36m[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')[0m
|
||||||
|
[36m[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')[0m
|
||||||
|
[36m[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')[0m
|
||||||
|
[36m[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')[0m
|
||||||
|
[36m[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')[0m
|
||||||
|
[36m[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')[0m
|
||||||
|
[36m[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')[0m
|
||||||
|
[33m[WARNING] 2026-10-03 09:48:50,175 [RapidOCR] main.py:118: The text detection result is empty[0m
|
||||||
|
[36m[DEBUG] 2026-10-03 09:48:50,176 [AALC] module\ocr\ocr.py:72: OCR识别结果:None[0m
|
||||||
|
[36m[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')[0m
|
||||||
|
[36m[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')[0m
|
||||||
|
[36m[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')[0m
|
||||||
|
[36m[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')[0m
|
||||||
|
[36m[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')[0m
|
||||||
|
[36m[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')[0m
|
||||||
|
[36m[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')[0m
|
||||||
|
[36m[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')[0m
|
||||||
|
[36m[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')[0m
|
||||||
|
[36m[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')[0m
|
||||||
|
[36m[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')[0m
|
||||||
|
[36m[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')[0m
|
||||||
|
[36m[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')[0m
|
||||||
|
[36m[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')[0m
|
||||||
|
[36m[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')[0m
|
||||||
|
[36m[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')[0m
|
||||||
|
[36m[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')[0m
|
||||||
|
[36m[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')[0m
|
||||||
|
[36m[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')[0m
|
||||||
|
[36m[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')[0m
|
||||||
|
[36m[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')[0m
|
||||||
|
[36m[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.')[0m
|
||||||
|
[36m[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.')[0m
|
||||||
|
[36m[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!')[0m
|
||||||
|
[36m[DEBUG] 2026-10-03 09:57:55,092 [AALC] module\config\config.py:420: teams_active_queue change to: [][0m
|
||||||
|
[36m[DEBUG] 2026-10-03 09:57:55,103 [AALC] module\config\config.py:421: teams_be_select change to: [False][0m
|
||||||
|
[36m[DEBUG] 2026-10-03 09:57:55,104 [AALC] module\config\config.py:422: teams_order change to: [0][0m
|
||||||
|
[36m[DEBUG] 2026-10-03 09:57:55,104 [AALC] module\config\config.py:423: teams_be_select_num change to: 0[0m
|
||||||
|
[36m[DEBUG] 2026-10-03 09:57:55,140 [AALC] module\config\config.py:51: 配置文件已加载,版本号:DEFAULT VERSION, 配置版本: [ACCOUNT_REDACTED][0m
|
||||||
|
[32m[INFO] 2026-10-03 09:57:55,674 [RapidOCR] base.py:22: Using engine_name: onnxruntime[0m
|
||||||
|
[32m[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[0m
|
||||||
|
[32m[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[0m
|
||||||
|
[32m[INFO] 2026-10-03 09:57:55,970 [RapidOCR] base.py:22: Using engine_name: onnxruntime[0m
|
||||||
|
[32m[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[0m
|
||||||
|
[32m[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[0m
|
||||||
|
[32m[INFO] 2026-10-03 09:57:56,017 [RapidOCR] base.py:22: Using engine_name: onnxruntime[0m
|
||||||
|
[32m[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[0m
|
||||||
|
[32m[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[0m
|
||||||
|
[36m[DEBUG] 2026-10-03 09:57:56,370 [AALC] module\automation\automation.py:88: 使用前台点击模块[0m
|
||||||
|
[36m[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'][0m
|
||||||
|
[36m[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!')[0m
|
||||||
|
[36m[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!')[0m
|
||||||
|
[36m[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!')[0m
|
||||||
|
[36m[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!')[0m
|
||||||
|
[36m[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!')[0m
|
||||||
|
[36m[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!')[0m
|
||||||
|
[36m[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!')[0m
|
||||||
|
[36m[DEBUG] 2026-10-03 10:01:45,052 [AALC] module\ocr\ocr.py:72: OCR识别结果:('Screening Room', 'Technology', 'Liberation Alliance', 'Dongbaek', 'Kaff.. Kof..')[0m
|
||||||
|
[36m[DEBUG] 2026-10-03 10:03:01,378 [AALC] module\ocr\ocr.py:72: OCR识别结果:('Screening Room', 'Technology', 'Liberation Alliance', 'Dongbaek', 'Kaff.. Kof...')[0m
|
||||||
|
[36m[DEBUG] 2026-10-03 10:03:17,159 [AALC] module\ocr\ocr.py:72: OCR识别结果:('Screening Room', 'Technology', 'Liberation Alliance', 'Dongbaek', 'Kaff.. Kof..')[0m
|
||||||
|
[36m[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...')[0m
|
||||||
|
[36m[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....')[0m
|
||||||
|
[36m[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.')[0m
|
||||||
|
[36m[DEBUG] 2026-10-03 10:04:42,313 [AALC] module\ocr\ocr.py:72: OCR识别结果:('WAVE', 'MAX', 'TURN', 'Win', 'Rate', 'Damage')[0m
|
||||||
|
[36m[DEBUG] 2026-10-03 10:05:17,792 [AALC] module\ocr\ocr.py:72: OCR识别结果:('WAVE', 'MAX', 'TURN', 'Win', 'Rate', 'Damage')[0m
|
||||||
|
[36m[DEBUG] 2026-10-03 10:05:53,887 [AALC] module\ocr\ocr.py:72: OCR识别结果:('I', 'Frontal Assault', 'Body', '1353')[0m
|
||||||
|
[36m[DEBUG] 2026-10-03 10:06:29,418 [AALC] module\ocr\ocr.py:72: OCR识别结果:('WAVE', 'MAX', 'TURN', 'Win', 'Rate', 'Damage')[0m
|
||||||
|
[36m[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')[0m
|
||||||
|
[36m[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')[0m
|
||||||
|
[36m[DEBUG] 2026-10-03 10:07:17,320 [AALC] module\ocr\ocr.py:72: OCR识别结果:('+2', 'E.C.', 'Body', '1257', 'ACDAEn.Cm', '18', '5')[0m
|
||||||
|
[36m[DEBUG] 2026-10-03 10:07:19,943 [AALC] module\ocr\ocr.py:72: OCR识别结果:('Poise +3', 'Poise Count+1')[0m
|
||||||
|
[36m[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')[0m
|
||||||
|
[36m[DEBUG] 2026-10-03 10:07:25,988 [AALC] module\ocr\ocr.py:72: OCR识别结果:('103', 'ody', '1224')[0m
|
||||||
|
[36m[DEBUG] 2026-10-03 10:07:28,167 [AALC] module\ocr\ocr.py:72: OCR识别结果:None[0m
|
||||||
|
[36m[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')[0m
|
||||||
|
[36m[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')[0m
|
||||||
|
[36m[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')[0m
|
||||||
|
[36m[DEBUG] 2026-10-03 10:09:44,763 [AALC] module\ocr\ocr.py:72: OCR识别结果:('I', 'Hack', 'Body', '1190')[0m
|
||||||
|
[36m[DEBUG] 2026-10-03 10:09:47,108 [AALC] module\ocr\ocr.py:72: OCR识别结果:None[0m
|
||||||
|
[36m[DEBUG] 2026-10-03 10:09:49,298 [AALC] module\ocr\ocr.py:72: OCR识别结果:None[0m
|
||||||
|
[36m[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')[0m
|
||||||
|
[36m[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')[0m
|
||||||
|
[36m[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')[0m
|
||||||
|
[36m[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')[0m
|
||||||
|
[36m[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')[0m
|
||||||
|
[36m[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')[0m
|
||||||
|
[36m[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')[0m
|
||||||
|
[36m[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')[0m
|
||||||
|
[36m[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')[0m
|
||||||
|
[36m[DEBUG] 2026-10-03 10:20:10,036 [AALC] module\config\config.py:420: teams_active_queue change to: [][0m
|
||||||
|
[36m[DEBUG] 2026-10-03 10:20:10,049 [AALC] module\config\config.py:421: teams_be_select change to: [False][0m
|
||||||
|
[36m[DEBUG] 2026-10-03 10:20:10,051 [AALC] module\config\config.py:422: teams_order change to: [0][0m
|
||||||
|
[36m[DEBUG] 2026-10-03 10:20:10,051 [AALC] module\config\config.py:423: teams_be_select_num change to: 0[0m
|
||||||
|
[36m[DEBUG] 2026-10-03 10:20:10,094 [AALC] module\config\config.py:51: 配置文件已加载,版本号:DEFAULT VERSION, 配置版本: [ACCOUNT_REDACTED][0m
|
||||||
|
[32m[INFO] 2026-10-03 10:20:10,700 [RapidOCR] base.py:22: Using engine_name: onnxruntime[0m
|
||||||
|
[32m[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[0m
|
||||||
|
[32m[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[0m
|
||||||
|
[32m[INFO] 2026-10-03 10:20:11,018 [RapidOCR] base.py:22: Using engine_name: onnxruntime[0m
|
||||||
|
[32m[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[0m
|
||||||
|
[32m[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[0m
|
||||||
|
[32m[INFO] 2026-10-03 10:20:11,074 [RapidOCR] base.py:22: Using engine_name: onnxruntime[0m
|
||||||
|
[32m[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[0m
|
||||||
|
[32m[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[0m
|
||||||
|
[36m[DEBUG] 2026-10-03 10:20:11,442 [AALC] module\automation\automation.py:88: 使用前台点击模块[0m
|
||||||
|
[36m[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'][0m
|
||||||
|
[36m[DEBUG] 2026-10-03 10:20:37,259 [AALC] module\ocr\ocr.py:72: OCR识别结果:('WAVE', 'MAX', 'TURN', '式', 'Win', 'Rate', 'Damage', 'STAgGER-', 'STAGGER-', 'STAGGER')[0m
|
||||||
|
[36m[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')[0m
|
||||||
|
[36m[DEBUG] 2026-10-03 10:21:52,567 [AALC] module\ocr\ocr.py:72: OCR识别结果:('WAVE', 'MAX', 'TURN', 'Win', 'Rate', 'Damage', 'STAgGER', 'STAgGER', 'STAGGER')[0m
|
||||||
|
[36m[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')[0m
|
||||||
|
[36m[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')[0m
|
||||||
|
[36m[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')[0m
|
||||||
|
[36m[DEBUG] 2026-10-03 10:23:31,100 [AALC] module\ocr\ocr.py:72: OCR识别结果:('WAVE', 'MAX', 'TURN', 'Win', 'Rate', 'Damage')[0m
|
||||||
|
[36m[DEBUG] 2026-10-03 10:24:17,138 [AALC] module\ocr\ocr.py:72: OCR识别结果:('WAVE', 'MAX', 'TURN', 'Win', 'Rate', 'Damage')[0m
|
||||||
|
[36m[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')[0m
|
||||||
|
[36m[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')[0m
|
||||||
|
[36m[DEBUG] 2026-10-03 10:24:41,585 [AALC] module\ocr\ocr.py:72: OCR识别结果:('Leap', '[Heads Hit] Inflict 2Fragile', 'Charge', 'ody')[0m
|
||||||
|
[36m[DEBUG] 2026-10-03 10:24:43,950 [AALC] module\ocr\ocr.py:72: OCR识别结果:('ormal', '148', '0')[0m
|
||||||
|
[36m[DEBUG] 2026-10-03 10:24:46,456 [AALC] module\ocr\ocr.py:72: OCR识别结果:('+3', 'Hack', 'Body', '1368')[0m
|
||||||
|
[36m[DEBUG] 2026-10-03 10:24:48,713 [AALC] module\ocr\ocr.py:72: OCR识别结果:None[0m
|
||||||
|
[36m[DEBUG] 2026-10-03 10:24:51,129 [AALC] module\ocr\ocr.py:72: OCR识别结果:('2Pse+3', 'Poise Count +', '195')[0m
|
||||||
|
[36m[DEBUG] 2026-10-03 10:24:53,573 [AALC] module\ocr\ocr.py:72: OCR识别结果:('Leap',)[0m
|
||||||
|
[36m[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')[0m
|
||||||
|
[36m[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')[0m
|
||||||
|
[36m[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')[0m
|
||||||
|
[36m[DEBUG] 2026-10-03 10:26:13,861 [AALC] module\ocr\ocr.py:72: OCR识别结果:('WAVE', 'TURN', 'Win', 'Rate', 'Damage')[0m
|
||||||
|
[36m[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')[0m
|
||||||
|
[36m[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')[0m
|
||||||
|
[36m[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')[0m
|
||||||
|
[36m[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')[0m
|
||||||
|
[36m[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')[0m
|
||||||
|
[36m[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')[0m
|
||||||
|
[36m[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')[0m
|
||||||
|
[36m[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')[0m
|
||||||
|
[36m[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')[0m
|
||||||
|
[36m[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')[0m
|
||||||
|
[36m[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')[0m
|
||||||
|
[36m[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')[0m
|
||||||
|
[36m[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')[0m
|
||||||
|
[36m[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')[0m
|
||||||
|
[36m[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')[0m
|
||||||
|
[36m[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!')[0m
|
||||||
|
[36m[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!')[0m
|
||||||
|
[36m[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!')[0m
|
||||||
|
[36m[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!')[0m
|
||||||
|
[36m[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!')[0m
|
||||||
|
[36m[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!')[0m
|
||||||
|
[36m[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!')[0m
|
||||||
|
[36m[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')[0m
|
||||||
|
[36m[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')[0m
|
||||||
|
[36m[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')[0m
|
||||||
|
[36m[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!')[0m
|
||||||
|
[36m[DEBUG] 2026-10-03 10:37:01,500 [AALC] module\ocr\ocr.py:72: OCR识别结果:None[0m
|
||||||
|
[36m[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..')[0m
|
||||||
|
[36m[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')[0m
|
||||||
|
[36m[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.')[0m
|
||||||
|
[36m[DEBUG] 2026-10-03 10:38:11,152 [AALC] module\ocr\ocr.py:72: OCR识别结果:('WAVE', 'MAX', 'TURN', 'Win', 'Rate', 'Damage', '14G')[0m
|
||||||
|
[36m[DEBUG] 2026-10-03 10:38:27,060 [AALC] module\ocr\ocr.py:72: OCR识别结果:('WAVE', 'MAX', 'TURN', 'Win', 'Rate', 'Damage', '6')[0m
|
||||||
|
[36m[DEBUG] 2026-10-03 10:38:29,451 [AALC] module\ocr\ocr.py:72: OCR识别结果:('WAVE', 'MAX', 'TURN', 'Win', 'Rate', 'Damage')[0m
|
||||||
|
[36m[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')[0m
|
||||||
|
[36m[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')[0m
|
||||||
|
[36m[DEBUG] 2026-10-03 10:39:54,615 [AALC] module\ocr\ocr.py:72: OCR识别结果:('Thatwasgreatworkyoudidthere.Keepitrolling,will', 'you?', 'Dante')[0m
|
||||||
|
[36m[DEBUG] 2026-10-03 10:40:28,320 [AALC] module\ocr\ocr.py:72: OCR识别结果:('WAVE', 'MAX', 'TURN', 'Win', 'Rate', 'Damage', 'TAGGER-', 'STAGGER')[0m
|
||||||
|
[36m[DEBUG] 2026-10-03 10:40:30,101 [AALC] module\ocr\ocr.py:72: OCR识别结果:('WAVE', 'MAX', 'TURN', 'Win', 'Rate', 'Damage', 'TAGGER-', 'STAGGER')[0m
|
||||||
|
[36m[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')[0m
|
||||||
|
[36m[DEBUG] 2026-10-03 10:41:46,689 [AALC] module\ocr\ocr.py:72: OCR识别结果:(' Settings', '←Resume', 'Q Retry Stage', 'X Give Up')[0m
|
||||||
|
[36m[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')[0m
|
||||||
|
[36m[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')[0m
|
||||||
|
[36m[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')[0m
|
||||||
|
[36m[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')[0m
|
||||||
|
[36m[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')[0m
|
||||||
|
[36m[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')[0m
|
||||||
|
[36m[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')[0m
|
||||||
|
[36m[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')[0m
|
||||||
|
[36m[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]')[0m
|
||||||
|
[36m[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]')[0m
|
||||||
|
[36m[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]')[0m
|
||||||
|
[36m[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')[0m
|
||||||
|
[36m[DEBUG] 2026-10-03 10:48:24,629 [AALC] module\config\config.py:420: teams_active_queue change to: [][0m
|
||||||
|
[36m[DEBUG] 2026-10-03 10:48:24,638 [AALC] module\config\config.py:421: teams_be_select change to: [False][0m
|
||||||
|
[36m[DEBUG] 2026-10-03 10:48:24,639 [AALC] module\config\config.py:422: teams_order change to: [0][0m
|
||||||
|
[36m[DEBUG] 2026-10-03 10:48:24,641 [AALC] module\config\config.py:423: teams_be_select_num change to: 0[0m
|
||||||
|
[36m[DEBUG] 2026-10-03 10:48:24,687 [AALC] module\config\config.py:51: 配置文件已加载,版本号:DEFAULT VERSION, 配置版本: [ACCOUNT_REDACTED][0m
|
||||||
|
[32m[INFO] 2026-10-03 10:48:25,173 [RapidOCR] base.py:22: Using engine_name: onnxruntime[0m
|
||||||
|
[32m[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[0m
|
||||||
|
[32m[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[0m
|
||||||
|
[32m[INFO] 2026-10-03 10:48:25,414 [RapidOCR] base.py:22: Using engine_name: onnxruntime[0m
|
||||||
|
[32m[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[0m
|
||||||
|
[32m[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[0m
|
||||||
|
[32m[INFO] 2026-10-03 10:48:25,458 [RapidOCR] base.py:22: Using engine_name: onnxruntime[0m
|
||||||
|
[32m[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[0m
|
||||||
|
[32m[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[0m
|
||||||
|
[36m[DEBUG] 2026-10-03 10:48:25,713 [AALC] module\automation\automation.py:88: 使用前台点击模块[0m
|
||||||
|
[36m[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'][0m
|
||||||
|
[36m[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')[0m
|
||||||
|
[36m[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')[0m
|
||||||
|
[36m[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')[0m
|
||||||
|
[36m[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')[0m
|
||||||
@@ -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级,三阶同步。"}
|
||||||
@@ -0,0 +1,72 @@
|
|||||||
|
{
|
||||||
|
"exported_at_utc": "2026-10-03T02:55:31.845399+00:00",
|
||||||
|
"base_commit": "030527f5de5c83dd8ea6e53288c1c52f3b4a85bb",
|
||||||
|
"test_exit_code": 0,
|
||||||
|
"tests_passed": 101,
|
||||||
|
"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": 10061,
|
||||||
|
"sha256": "304d6a53972561e3638d16e5f76f71d738070646375f1439810c013a873d61de"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "test-results.txt",
|
||||||
|
"bytes": 14939,
|
||||||
|
"sha256": "c6e6d0fccddfd05ba67ef618fd449561543135f570357e9a2b1d2e796d8b385b"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "timeline.jsonl",
|
||||||
|
"bytes": 3103,
|
||||||
|
"sha256": "965f2195f3af3e554b89089cc4735ee3cfcc656f31065a72e7ce59027e58fc83"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"followup": {
|
||||||
|
"date": "2026-10-03",
|
||||||
|
"summary": "内置经验本流程的编队滑动补丁 + task_status errors 字段; 真实编队界面滑动未复测",
|
||||||
|
"third_exp_run_battle_error": true,
|
||||||
|
"teams_1_members_removed_by_aalc": 2
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,113 @@
|
|||||||
|
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
|
||||||
|
{"step": 0, "choice": "run_complete", "action": {"tool": "run_complete", "args": {}}, "jev_ms": 0, "ocr_ms": 0, "screen": null, "at": "2026-10-03T11:25:38", "state": "completed"}
|
||||||
|
test_completed_run_archives_context_for_next_run (test_jev_mirror_agent.MainLoopTest.test_completed_run_archives_context_for_next_run) ... ok
|
||||||
|
{"step": 0, "choice": "wait", "action": {"tool": "wait", "args": {"seconds": 0.7}}, "jev_ms": 0, "ocr_ms": 0, "screen": null, "at": "2026-10-03T11:25:38", "action_ms": 0, "finished_at": "2026-10-03T11:25:38", "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-03T11:25:38", "action_ms": 0, "finished_at": "2026-10-03T11:25:38", "result": {"ok": true, "waited": 0.7}, "state": "running", "battle_context": false}
|
||||||
|
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_clean_log_has_no_errors_field (test_lc_mcp.TaskErrorSurfaceTest.test_clean_log_has_no_errors_field) ... ok
|
||||||
|
test_exit_zero_with_battle_error_is_reported (test_lc_mcp.TaskErrorSurfaceTest.test_exit_zero_with_battle_error_is_reported) ... 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_downward_swipe_shifts_start_into_visible_rows (test_lc_mcp.TeamScrollPatchTest.test_downward_swipe_shifts_start_into_visible_rows) ... ok
|
||||||
|
test_escape_leg_has_requested_length (test_lc_mcp.TeamScrollPatchTest.test_escape_leg_has_requested_length) ... ok
|
||||||
|
test_install_patches_team_scroll_on_windows_adapters (test_lc_mcp.TeamScrollPatchTest.test_install_patches_team_scroll_on_windows_adapters) ... ok
|
||||||
|
test_upward_swipe_escapes_first_then_travels_nominal_delta (test_lc_mcp.TeamScrollPatchTest.test_upward_swipe_escapes_first_then_travels_nominal_delta) ... ok
|
||||||
|
test_zero_distance_is_noop (test_lc_mcp.TeamScrollPatchTest.test_zero_distance_is_noop) ... 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', 51723)
|
||||||
|
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', 51726)
|
||||||
|
ok
|
||||||
|
|
||||||
|
----------------------------------------------------------------------
|
||||||
|
Ran 101 tests in 8.912s
|
||||||
|
|
||||||
|
OK
|
||||||
@@ -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"}
|
||||||
@@ -115,7 +115,7 @@
|
|||||||
- **炸鸡对决选第一项**,直接获得鸡胸与鸡翅;第三项也给鸡胸,第二项仅鸡翅。
|
- **炸鸡对决选第一项**,直接获得鸡胸与鸡翅;第三项也给鸡胸,第二项仅鸡翅。
|
||||||
- 当前游戏译名:鸡胸为**干巴柴涩鸡胸肉**,鸡腿为**火热多汁琵琶腿**。
|
- 当前游戏译名:鸡胸为**干巴柴涩鸡胸肉**,鸡腿为**火热多汁琵琶腿**。
|
||||||
- 商店符咒强化可直接选 **++**,本局一次支付 **150 经费**完成;以当前报价为准。
|
- 商店符咒强化可直接选 **++**,本局一次支付 **150 经费**完成;以当前报价为准。
|
||||||
- 可复用 skill:[$limbus-mirror-speedrun](C:/Users/Dainsleif/.codex/skills/limbus-mirror-speedrun/SKILL.md)。[事件速查表](C:/Users/Dainsleif/.codex/skills/limbus-mirror-speedrun/references/event-choices.md)按名称查询,以当前选项文字核对编号。
|
- 可复用 skill:[$limbus-mirror-speedrun](skills/limbus-mirror-speedrun/SKILL.md)。[事件速查表](skills/limbus-mirror-speedrun/references/event-choices.md)按名称查询,以当前选项文字核对编号。
|
||||||
|
|
||||||
## 游戏内快捷键(用户操作指南截图)
|
## 游戏内快捷键(用户操作指南截图)
|
||||||
|
|
||||||
@@ -127,12 +127,12 @@
|
|||||||
- **快捷键未生效时立即改用鼠标点按钮**,不反复尝试(用户补充)。
|
- **快捷键未生效时立即改用鼠标点按钮**,不反复尝试(用户补充)。
|
||||||
- **地图 ↑/↓/→ 或 W/S/D**:移至下个节点后直接回车进入;**←/A**:取消节点选择;**Q/E**:地图左右平移。
|
- **地图 ↑/↓/→ 或 W/S/D**:移至下个节点后直接回车进入;**←/A**:取消节点选择;**Q/E**:地图左右平移。
|
||||||
- 战斗 **方向键/WASD** 移动视角,**滚轮/Q/E** 缩放,**Tab** 显示拼点箭头。
|
- 战斗 **方向键/WASD** 移动视角,**滚轮/Q/E** 缩放,**Tab** 显示拼点箭头。
|
||||||
- **F1** 打开操作指南;**Esc** 随界面关闭弹窗、取消、返回或退出。完整表见 [快捷键速查](C:/Users/Dainsleif/.codex/skills/limbus-mirror-speedrun/references/shortcuts.md)。
|
- **F1** 打开操作指南;**Esc** 随界面关闭弹窗、取消、返回或退出。完整表见 [快捷键速查](skills/limbus-mirror-speedrun/references/shortcuts.md)。
|
||||||
|
|
||||||
## Jev 接入(用户授权)
|
## Jev 接入(用户授权)
|
||||||
|
|
||||||
- 已实测 `jev-1.13-free` 决策接口返回 HTTP 200,耗时约 1.3–1.5 秒;端点为 `https://opencode.ai/zen/v1/systemone`。
|
- 已实测 `jev-1.13-free` 决策接口返回 HTTP 200,耗时约 1.3–1.5 秒;端点为 `https://opencode.ai/zen/v1/systemone`。
|
||||||
- 客户端:[jev_decision_client.mjs](D:/codex/limbus_tools/jev_decision_client.mjs)。凭据由环境变量或未跟踪的本地配置提供,上传源码与反馈时排除凭据和配置文件。
|
- 客户端:[jev_decision_client.mjs](../scripts/jev_decision_client.mjs)。凭据由环境变量或未跟踪的本地配置提供,上传源码与反馈时排除凭据和配置文件。
|
||||||
- 用户更新(2026-10-02):固定场景、路线与常规动作均交给 Jev;仅在它返回 `requires_analysis` 或具体接口故障时由主助手排查。执行器只执行已核对的候选动作,不运行模型任意代码。
|
- 用户更新(2026-10-02):固定场景、路线与常规动作均交给 Jev;仅在它返回 `requires_analysis` 或具体接口故障时由主助手排查。执行器只执行已核对的候选动作,不运行模型任意代码。
|
||||||
- 最新战斗指令:开战后仅 P+回车循环到结算,不逐批请求 Jev。批次末只识别是否已结束,战斗特写没有 OCR 文字也继续;结算后交回 Jev。
|
- 最新战斗指令:开战后仅 P+回车循环到结算,不逐批请求 Jev。批次末只识别是否已结束,战斗特写没有 OCR 文字也继续;结算后交回 Jev。
|
||||||
|
|
||||||
@@ -156,14 +156,14 @@
|
|||||||
- 日志确认第二局 14:34:59 执行了“拒绝饰品”;决策提示漏写电池且通用按钮开放了拒绝。这是执行错误,不是用户没有配置。
|
- 日志确认第二局 14:34:59 执行了“拒绝饰品”;决策提示漏写电池且通用按钮开放了拒绝。这是执行错误,不是用户没有配置。
|
||||||
- 本地及仓库执行器已补必选电池规则、按卡名选取及确认候选;未知三选一不暴露拒绝,只有明确额外观测才允许拒绝。新增三选一选择/确认、未知卡名禁止拒绝、额外观测及事件结果不误判等回归检查,当前共 **51 项通过**。尚未重新实机验证电池领取,也没有恢复用户接管的游戏。
|
- 本地及仓库执行器已补必选电池规则、按卡名选取及确认候选;未知三选一不暴露拒绝,只有明确额外观测才允许拒绝。新增三选一选择/确认、未知卡名禁止拒绝、额外观测及事件结果不误判等回归检查,当前共 **51 项通过**。尚未重新实机验证电池领取,也没有恢复用户接管的游戏。
|
||||||
- 2 号线固定事件、事件、商店、玫瑰标牌,共 4 节点;仍按用户要求只留第五层。拒绝层末奖励不能规避随机苦难。符咒 ++ 的低伤害门槛与斩击补层数是必需强化原因。
|
- 2 号线固定事件、事件、商店、玫瑰标牌,共 4 节点;仍按用户要求只留第五层。拒绝层末奖励不能规避随机苦难。符咒 ++ 的低伤害门槛与斩击补层数是必需强化原因。
|
||||||
- 其余鸡胸当前触发限制、最后商店恢复、替代头目与版本差异见 [机制参考](C:/Users/Dainsleif/.codex/skills/limbus-mirror-speedrun/references/mechanics.md)。速度判断属于流程推断,未实测为更短整局用时。
|
- 其余鸡胸当前触发限制、最后商店恢复、替代头目与版本差异见 [机制参考](skills/limbus-mirror-speedrun/references/mechanics.md)。速度判断属于流程推断,未实测为更短整局用时。
|
||||||
|
|
||||||
## 第二至第四层选包优先级(初步,未逐包计时)
|
## 第二至第四层选包优先级(初步,未逐包计时)
|
||||||
|
|
||||||
- 第二层缺鸡胸时优先地狱鸡;地狱鸡只在第二层出现,不在三四层反复寻找。已有鸡胸或当前没出现时,从现有候选比较纯 P 可通过性、战斗与头目耗时,不为无关奖励运营。
|
- 第二层缺鸡胸时优先地狱鸡;地狱鸡只在第二层出现,不在三四层反复寻找。已有鸡胸或当前没出现时,从现有候选比较纯 P 可通过性、战斗与头目耗时,不为无关奖励运营。
|
||||||
- 第三、四层核心齐全且长度相同时,初步优先考察 Addicting Lust(因而无人哭泣/长腿精灵)和 Degraded Gloom(悲泣蟾蜍/无头鱼)。两者没有实测固定先后,仅作为机制筛选候选组。
|
- 第三、四层核心齐全且长度相同时,初步优先考察 Addicting Lust(因而无人哭泣/长腿精灵)和 Degraded Gloom(悲泣蟾蜍/无头鱼)。两者没有实测固定先后,仅作为机制筛选候选组。
|
||||||
- 压抑的暴怒、空转的怠惰作为次选比较,不能因为上局打过就自动列首选。多波、阶段复杂、未验证纯 P 可通过的头目降低优先级;四节点长线包不自动优于普通包。
|
- 压抑的暴怒、空转的怠惰作为次选比较,不能因为上局打过就自动列首选。多波、阶段复杂、未验证纯 P 可通过的头目降低优先级;四节点长线包不自动优于普通包。
|
||||||
- 旧笔记中的 Bearable 尚未对应当前正式卡包名称,暂停作为第三层固定首选。当前 Wiki 卡包总表与旧赛季表存在楼层/头目差异,以当前难度的可用卡包及游戏详情为准。完整条件表见 [楼层规划](C:/Users/Dainsleif/.codex/skills/limbus-mirror-speedrun/references/rupture-route.md)。
|
- 旧笔记中的 Bearable 尚未对应当前正式卡包名称,暂停作为第三层固定首选。当前 Wiki 卡包总表与旧赛季表存在楼层/头目差异,以当前难度的可用卡包及游戏详情为准。完整条件表见 [楼层规划](skills/limbus-mirror-speedrun/references/rupture-route.md)。
|
||||||
- 第一层仍选带符纸的卡包;第一至第四层禁止二号线,第五层按用户要求优先二号线。以上暂定排序不修改游戏或启动执行器。
|
- 第一层仍选带符纸的卡包;第一至第四层禁止二号线,第五层按用户要求优先二号线。以上暂定排序不修改游戏或启动执行器。
|
||||||
|
|
||||||
## 来源
|
## 来源
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ description: 继续或重开边狱公司(Limbus Company)的镜像迷宫/
|
|||||||
|
|
||||||
## 速度与完成标准
|
## 速度与完成标准
|
||||||
|
|
||||||
用户已明确指定 Jev 负责固定场景、路线及常规操作决策。调用方式见 [Jev 接入](references/jev.md)。主助手只在 Jev 返回 `requires_analysis` 或出现具体接口故障时分析、修复,然后交回 Jev。最新战斗指令优先:一旦战斗开始,仅执行 P+回车直到结算,不再逐批请求模型;有界批次末只检查是否结算,未结算继续下一批。执行器仅暴露当前画面核对过的候选动作,不能执行模型返回的任意代码。当前执行器为 `D:/codex/limbus_tools/jev_mirror_agent.py`,状态与问题保存在同目录的 `jev_mirror_status.json`。
|
用户已明确指定 Jev 负责固定场景、路线及常规操作决策。调用方式见 [Jev 接入](references/jev.md)。主助手只在 Jev 返回 `requires_analysis` 或出现具体接口故障时分析、修复,然后交回 Jev。最新战斗指令优先:一旦战斗开始,仅执行 P+回车直到结算,不再逐批请求模型;有界批次末只检查是否结算,未结算继续下一批。执行器仅暴露当前画面核对过的候选动作,不能执行模型返回的任意代码。当前执行器为 lc-mcp 仓库的 `scripts/jev_mirror_agent.py`,状态与问题保存在运行目录(默认 `~/lc_mcp/jev`,可用 `LC_JEV_HOME` 指定)的 `jev_mirror_status.json`。
|
||||||
|
|
||||||
略过无关观测、采购、调队和反复比较,保留符咒 ++、快感 ++ 与关键技能替换。雷枝是用户允许的观测例外,不将此授权扩展为所有饰品的无界观测。大量理智损失可能增加纯 P 战斗回合,不能只按当前事件点击次数选择。
|
略过无关观测、采购、调队和反复比较,保留符咒 ++、快感 ++ 与关键技能替换。雷枝是用户允许的观测例外,不将此授权扩展为所有饰品的无界观测。大量理智损失可能增加纯 P 战斗回合,不能只按当前事件点击次数选择。
|
||||||
|
|
||||||
@@ -43,4 +43,4 @@ description: 继续或重开边狱公司(Limbus Company)的镜像迷宫/
|
|||||||
|
|
||||||
持续到本局通关结算,或用户中止/必须手动接管的具体步骤。只有看到最终通关结算才能报告完成。研究完攻略或做完一层不算通关;不承诺复现视频的 12 分钟用时。
|
持续到本局通关结算,或用户中止/必须手动接管的具体步骤。只有看到最终通关结算才能报告完成。研究完攻略或做完一层不算通关;不承诺复现视频的 12 分钟用时。
|
||||||
|
|
||||||
用户纠正流程时,在授权范围内更新相应参考文件和现有 [速通笔记](D:/codex/limbus_tools/mirror_dungeon_speedrun_notes.md);先读笔记,保留用户其他编辑。资料核对日期:2026-10-02。
|
用户纠正流程时,在授权范围内更新相应参考文件和现有速通笔记(lc-mcp 仓库 `docs/mirror_dungeon_speedrun_notes.md`);先读笔记,保留用户其他编辑。资料核对日期:2026-10-02。
|
||||||
|
|||||||
@@ -4,13 +4,13 @@
|
|||||||
|
|
||||||
- 官方接口:`https://opencode.ai/zen/v1/systemone`;用户给的 Go 模型列表中没有 Jev,不把 Go chat/completions 当作 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 秒。这不是整局速度保证。
|
- 已实测 `jev-1.13-free` 返回 HTTP 200,结构为 `answers.action.choice`,当前请求耗时约 1.3–1.5 秒。这不是整局速度保证。
|
||||||
- 现有客户端:`D:/codex/limbus_tools/jev_decision_client.mjs`,导出的 `decide(state, criteria, options)` 返回有限选项编号、概率和请求耗时。
|
- 现有客户端:lc-mcp 仓库的 `scripts/jev_decision_client.mjs`,导出的 `decide(state, criteria, options)` 返回有限选项编号、概率和请求耗时。
|
||||||
- 密钥从 `options.apiKey`、`OPENCODE_API_KEY` 或用户已有本机配置注入;不把密钥复制到脚本、笔记、skill 或日志,也不打印配置全文。重启后若没有凭据,不能假装已接通。
|
- 密钥从 `options.apiKey`、`OPENCODE_API_KEY` 或用户已有本机配置注入;不把密钥复制到脚本、笔记、skill 或日志,也不打印配置全文。重启后若没有凭据,不能假装已接通。
|
||||||
- 只发送精简游戏状态和选项文字,避免整段聊天、其他窗口、完整桌面截图等无关内容。
|
- 只发送精简游戏状态和选项文字,避免整段聊天、其他窗口、完整桌面截图等无关内容。
|
||||||
- 先按用户规则排除不合适的选项,再将候选交给模型。当前界面和用户新指令优先;不把模型置信度当作游戏事实。
|
- 先按用户规则排除不合适的选项,再将候选交给模型。当前界面和用户新指令优先;不把模型置信度当作游戏事实。
|
||||||
- 用户更新(2026-10-02):固定场景、路线及所有常规动作均由 Jev 从候选中选择;主助手仅在 `requires_analysis` 或具体接口故障后介入。战斗动作可包含有界 P→回车短批次。API 短暂错误可重试一次,持续失败交回主助手修复。
|
- 用户更新(2026-10-02):固定场景、路线及所有常规动作均由 Jev 从候选中选择;主助手仅在 `requires_analysis` 或具体接口故障后介入。战斗动作可包含有界 P→回车短批次。API 短暂错误可重试一次,持续失败交回主助手修复。
|
||||||
- 后续战斗指令覆盖逐批决策:战斗开始后仅 P+回车循环直至结算;有界批次末检查结束标志,战斗中不再调用 Jev 或分析拼点。结算后恢复 Jev 决策。
|
- 后续战斗指令覆盖逐批决策:战斗开始后仅 P+回车循环直至结算;有界批次末检查结束标志,战斗中不再调用 Jev 或分析拼点。结算后恢复 Jev 决策。
|
||||||
- 执行器 `D:/codex/limbus_tools/jev_mirror_agent.py` 通过 limbus MCP 操作;Windows 单实例互斥避免输入交叠。状态为 `jev_mirror_status.json`,动作日志为 `jev_mirror_log.jsonl`。确认弹窗候选使用当前截图坐标并排除背景按钮。商店没有出战角色技能替换时,每店最多刷新 4 次。
|
- 执行器 lc-mcp 仓库的 `scripts/jev_mirror_agent.py` 通过 limbus MCP 操作;Windows 单实例互斥避免输入交叠。状态为 `jev_mirror_status.json`,动作日志为 `jev_mirror_log.jsonl`。确认弹窗候选使用当前截图坐标并排除背景按钮。商店没有出战角色技能替换时,每店最多刷新 4 次。
|
||||||
|
|
||||||
## 已落实的执行边界(2026-10-02)
|
## 已落实的执行边界(2026-10-02)
|
||||||
|
|
||||||
|
|||||||
+103
-4
@@ -43,6 +43,10 @@ def bootstrap():
|
|||||||
from module.logger.my_log import Logger
|
from module.logger.my_log import Logger
|
||||||
Logger()
|
Logger()
|
||||||
_booted = d
|
_booted = d
|
||||||
|
# 编队列表滑动: Windows 输入适配器缺队伍拖拽规避, 上游只有模拟器适配器有。
|
||||||
|
# 在导入 AALC 之后立即打补丁, 服务的 MCP 输入与 run_task 子进程都会生效。
|
||||||
|
from . import aalc_input_patch
|
||||||
|
aalc_input_patch.install()
|
||||||
return d
|
return d
|
||||||
|
|
||||||
|
|
||||||
@@ -57,6 +61,9 @@ def prune(directory, pattern, keep):
|
|||||||
|
|
||||||
class AalcEngine(Engine):
|
class AalcEngine(Engine):
|
||||||
|
|
||||||
|
_templates = None # 模板相对路径集合; assets 运行中不变, 只扫描一次磁盘
|
||||||
|
_template_size = None # 当前 AALC 模板缓存对应的缩放尺寸
|
||||||
|
|
||||||
def __init__(self, shot_dir, keep_shots=30):
|
def __init__(self, shot_dir, keep_shots=30):
|
||||||
self.shot_dir = os.path.abspath(shot_dir)
|
self.shot_dir = os.path.abspath(shot_dir)
|
||||||
os.makedirs(self.shot_dir, exist_ok=True)
|
os.makedirs(self.shot_dir, exist_ok=True)
|
||||||
@@ -90,7 +97,8 @@ class AalcEngine(Engine):
|
|||||||
def _save(self, img):
|
def _save(self, img):
|
||||||
stamp = time.strftime('%Y%m%d_%H%M%S') + '_%03d' % (int(time.time() * 1000) % 1000)
|
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)
|
path = os.path.join(self.shot_dir, 'shot_%s.png' % stamp)
|
||||||
img.save(path)
|
# 每次 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)
|
prune(self.shot_dir, 'shot_*.png', self.keep_shots)
|
||||||
return {'path': path.replace('\\', '/'), 'w': img.width, 'h': img.height}
|
return {'path': path.replace('\\', '/'), 'w': img.width, 'h': img.height}
|
||||||
|
|
||||||
@@ -114,13 +122,15 @@ class AalcEngine(Engine):
|
|||||||
return shot, items
|
return shot, items
|
||||||
|
|
||||||
def list_images(self, prefix=''):
|
def list_images(self, prefix=''):
|
||||||
|
if self._templates is None:
|
||||||
names = set()
|
names = set()
|
||||||
for theme in ('dark', 'default'):
|
for theme in ('dark', 'default'):
|
||||||
for lang in ('zh_cn', 'en', 'share'):
|
for lang in ('zh_cn', 'en', 'share'):
|
||||||
base = os.path.join(self.images_root, theme, lang)
|
base = os.path.join(self.images_root, theme, lang)
|
||||||
for p in glob.glob(os.path.join(base, '**', '*.png'), recursive=True):
|
for p in glob.glob(os.path.join(base, '**', '*.png'), recursive=True):
|
||||||
names.add(os.path.relpath(p, base).replace('\\', '/'))
|
names.add(os.path.relpath(p, base).replace('\\', '/'))
|
||||||
return sorted(n for n in names if n.startswith(prefix))
|
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'):
|
def find_image(self, name, threshold=0.8, model='normal'):
|
||||||
if name not in self.list_images(name):
|
if name not in self.list_images(name):
|
||||||
@@ -132,20 +142,68 @@ class AalcEngine(Engine):
|
|||||||
# 保留亚像素比例:例如 1278 宽对应 718.875 高,取整会改变
|
# 保留亚像素比例:例如 1278 宽对应 718.875 高,取整会改变
|
||||||
# 缩放采样,使小图标的匹配置信度明显下降。
|
# 缩放采样,使小图标的匹配置信度明显下降。
|
||||||
match_size = max(1, min(img.height, img.width * 9 / 16))
|
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
|
changed = match_size != old_size
|
||||||
try:
|
try:
|
||||||
if changed:
|
if changed:
|
||||||
self.auto.clear_img_cache()
|
|
||||||
self.cfg.unsaved_set_value('set_win_size', match_size)
|
self.cfg.unsaved_set_value('set_win_size', match_size)
|
||||||
pos = self.auto.find_image_element(name, threshold, model=model)
|
pos = self.auto.find_image_element(name, threshold, model=model)
|
||||||
finally:
|
finally:
|
||||||
if changed:
|
if changed:
|
||||||
self.cfg.unsaved_set_value('set_win_size', old_size)
|
self.cfg.unsaved_set_value('set_win_size', old_size)
|
||||||
self.auto.clear_img_cache()
|
|
||||||
return (int(pos[0]), int(pos[1])) if pos else None
|
return (int(pos[0]), int(pos[1])) if pos else None
|
||||||
|
|
||||||
# ---- 动手 (AALC 输入后端,由 config.yaml 决定后台消息/前台输入) ----
|
# ---- 动手 (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):
|
def click(self, x, y, times=1):
|
||||||
|
self._prepare_input()
|
||||||
if not self.cfg.simulator and self.cfg.win_input_type == 'background':
|
if not self.cfg.simulator and self.cfg.win_input_type == 'background':
|
||||||
handler = self.auto.input_handler
|
handler = self.auto.input_handler
|
||||||
self.auto.wait_pause()
|
self.auto.wait_pause()
|
||||||
@@ -159,6 +217,21 @@ class AalcEngine(Engine):
|
|||||||
handler.mouse_up(int(x), int(y))
|
handler.mouse_up(int(x), int(y))
|
||||||
# Let Unity consume the release before another target is selected.
|
# Let Unity consume the release before another target is selected.
|
||||||
time.sleep(0.12)
|
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:
|
else:
|
||||||
self.auto.mouse_click(int(x), int(y), times=int(times))
|
self.auto.mouse_click(int(x), int(y), times=int(times))
|
||||||
|
|
||||||
@@ -166,6 +239,7 @@ class AalcEngine(Engine):
|
|||||||
k = str(key).lower()
|
k = str(key).lower()
|
||||||
if k not in self.key_names:
|
if k not in self.key_names:
|
||||||
raise ValueError('AALC 不支持按键 %r, 可用: %s' % (key, ' '.join(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':
|
if not self.cfg.simulator and self.cfg.win_input_type == 'background':
|
||||||
# Unity 可能在同一帧收到 down/up,导致快捷键被吞掉。
|
# Unity 可能在同一帧收到 down/up,导致快捷键被吞掉。
|
||||||
handler = self.auto.input_handler
|
handler = self.auto.input_handler
|
||||||
@@ -176,6 +250,13 @@ class AalcEngine(Engine):
|
|||||||
time.sleep(0.12)
|
time.sleep(0.12)
|
||||||
finally:
|
finally:
|
||||||
handler.key_up(k)
|
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:
|
else:
|
||||||
self.auto.key_press(k)
|
self.auto.key_press(k)
|
||||||
|
|
||||||
@@ -184,8 +265,26 @@ class AalcEngine(Engine):
|
|||||||
for x, y in ((from_x, from_y), (to_x, to_y)):
|
for x, y in ((from_x, from_y), (to_x, to_y)):
|
||||||
if not (0 <= x < img.width and 0 <= y < img.height):
|
if not (0 <= x < img.width and 0 <= y < img.height):
|
||||||
raise ValueError('拖动坐标超出游戏客户区 %sx%s' % (img.width, 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),
|
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))
|
dx=int(to_x) - int(from_x), dy=int(to_y) - int(from_y))
|
||||||
|
|
||||||
def type_text(self, text):
|
def type_text(self, text):
|
||||||
|
self._prepare_input()
|
||||||
self.auto.input_text(str(text))
|
self.auto.input_text(str(text))
|
||||||
|
|||||||
@@ -0,0 +1,151 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
"""编队列表滑动补丁: 给 Windows 输入适配器补上队伍拖拽规避。
|
||||||
|
|
||||||
|
AALC 基类注释说明 ``mouse_swipe_for_team_scroll`` 需要适配器覆盖以"规避队伍
|
||||||
|
拖拽判定", 但上游只有 MuMu 模拟器适配器覆盖了它; Windows 的前台(Input)与后台
|
||||||
|
(BackgroundInput)适配器仍在用普通列表滚动手势 ``build_windows_scroll_swipe_plan``:
|
||||||
|
按下后只 escape 30px / 0.01s。在游戏的编队列表里这不足以脱离"按住罪人卡"的
|
||||||
|
判定, 滑动会被当成拖动卡片 —— 队伍顺序被拖乱, 编队人数不足时还会让后续的
|
||||||
|
"进入战斗"失败(battle.py 报"未能进入战斗")。
|
||||||
|
|
||||||
|
这里按 MuMu 的参数(按 set_win_size 缩放的 60px escape、保持 0.1s、分段走完、
|
||||||
|
松手前停稳 0.5s)在 Windows 适配器上补一份等价实现, 不改 AALC 源码。
|
||||||
|
"""
|
||||||
|
|
||||||
|
import time
|
||||||
|
from math import hypot
|
||||||
|
|
||||||
|
# 与 MuMu 覆盖实现保持一致的量级
|
||||||
|
ESCAPE_AT_1080P = 60
|
||||||
|
ESCAPE_HOLD_SECONDS = 0.1
|
||||||
|
SETTLE_SECONDS = 0.5
|
||||||
|
POINT_SPACING_AT_1080P = 8
|
||||||
|
MIN_SEGMENT_DURATION = 0.05
|
||||||
|
|
||||||
|
|
||||||
|
def team_scroll_plan(x, y, dx, dy, duration, escape_distance):
|
||||||
|
"""编队列表滑动的几何路径(纯函数, 便于单测)。
|
||||||
|
|
||||||
|
返回 ``(start, escape, end, duration)``; ``distance == 0`` 时返回 None。
|
||||||
|
向下滑动(dy > 0)时把起点沿反向偏移 escape, 终点沿正向多走 escape,
|
||||||
|
这样手指/指针能落在可见行内, 同时保持总位移不变。
|
||||||
|
"""
|
||||||
|
distance = hypot(dx, dy)
|
||||||
|
if distance == 0:
|
||||||
|
return None
|
||||||
|
unit_x, unit_y = dx / distance, dy / distance
|
||||||
|
if dy > 0:
|
||||||
|
start = (x - unit_x * escape_distance, y - unit_y * escape_distance)
|
||||||
|
else:
|
||||||
|
start = (float(x), float(y))
|
||||||
|
end = (start[0] + dx + unit_x * escape_distance,
|
||||||
|
start[1] + dy + unit_y * escape_distance)
|
||||||
|
escape = (start[0] + unit_x * escape_distance,
|
||||||
|
start[1] + unit_y * escape_distance)
|
||||||
|
return start, escape, end, max(0.0, float(duration))
|
||||||
|
|
||||||
|
|
||||||
|
def _scaled_escape():
|
||||||
|
from module.config import cfg
|
||||||
|
return ESCAPE_AT_1080P * cfg.set_win_size / 1080
|
||||||
|
|
||||||
|
|
||||||
|
def _segment_steps(escape_point, end):
|
||||||
|
"""把 escape 之后的剩余位移切成小段, 返回 (段数, 位移x, 位移y)。"""
|
||||||
|
from module.config import cfg
|
||||||
|
|
||||||
|
move_x = end[0] - escape_point[0]
|
||||||
|
move_y = end[1] - escape_point[1]
|
||||||
|
distance = hypot(move_x, move_y)
|
||||||
|
if distance == 0:
|
||||||
|
return 0, 0.0, 0.0
|
||||||
|
spacing = POINT_SPACING_AT_1080P * cfg.set_win_size / 1080
|
||||||
|
steps = max(int(distance / max(spacing, 1.0)), 1)
|
||||||
|
return steps, move_x, move_y
|
||||||
|
|
||||||
|
|
||||||
|
def _foreground_team_scroll(self, x, y, duration=0.3, dx=0, dy=0, move_back=True):
|
||||||
|
"""前台输入(pyautogui)下的编队列表滑动。"""
|
||||||
|
import pyautogui
|
||||||
|
|
||||||
|
plan = team_scroll_plan(x, y, dx, dy, duration, _scaled_escape())
|
||||||
|
if plan is None:
|
||||||
|
return
|
||||||
|
start, escape, end, total_duration = plan
|
||||||
|
restore = self.get_mouse_position() if move_back else None
|
||||||
|
|
||||||
|
sx, sy = self.pos_offset(*start)
|
||||||
|
ex, ey = self.pos_offset(*escape)
|
||||||
|
fx, fy = self.pos_offset(*end)
|
||||||
|
|
||||||
|
pyautogui.moveTo(sx, sy)
|
||||||
|
pyautogui.mouseDown(sx, sy)
|
||||||
|
try:
|
||||||
|
pyautogui.moveTo(ex, ey, duration=MIN_SEGMENT_DURATION)
|
||||||
|
# 让游戏渲染一帧, 确认这是滚动而不是按住卡片。
|
||||||
|
time.sleep(ESCAPE_HOLD_SECONDS)
|
||||||
|
steps, move_x, move_y = _segment_steps(escape, end)
|
||||||
|
if steps:
|
||||||
|
step_duration = max(total_duration, MIN_SEGMENT_DURATION) / steps
|
||||||
|
for index in range(1, steps + 1):
|
||||||
|
ratio = index / steps
|
||||||
|
pyautogui.moveTo(ex + move_x * ratio, ey + move_y * ratio,
|
||||||
|
duration=step_duration)
|
||||||
|
time.sleep(SETTLE_SECONDS)
|
||||||
|
finally:
|
||||||
|
pyautogui.mouseUp(fx, fy)
|
||||||
|
|
||||||
|
if restore:
|
||||||
|
self.mouse_move(restore)
|
||||||
|
|
||||||
|
|
||||||
|
def _adapter_team_scroll(self, x, y, duration=0.3, dx=0, dy=0, move_back=True):
|
||||||
|
"""后台/其它 Windows 适配器下的编队列表滑动(走适配器自身的原语)。"""
|
||||||
|
plan = team_scroll_plan(x, y, dx, dy, duration, _scaled_escape())
|
||||||
|
if plan is None:
|
||||||
|
return
|
||||||
|
start, escape, end, total_duration = plan
|
||||||
|
restore = self.get_mouse_position() if move_back else None
|
||||||
|
|
||||||
|
self.set_active()
|
||||||
|
self.set_mouse_pos(*start)
|
||||||
|
self.mouse_down(*start)
|
||||||
|
try:
|
||||||
|
self.set_mouse_pos(*escape, duration=MIN_SEGMENT_DURATION)
|
||||||
|
time.sleep(ESCAPE_HOLD_SECONDS)
|
||||||
|
steps, move_x, move_y = _segment_steps(escape, end)
|
||||||
|
if steps:
|
||||||
|
step_duration = max(total_duration, MIN_SEGMENT_DURATION) / steps
|
||||||
|
for index in range(1, steps + 1):
|
||||||
|
ratio = index / steps
|
||||||
|
self.set_mouse_pos(escape[0] + move_x * ratio,
|
||||||
|
escape[1] + move_y * ratio,
|
||||||
|
duration=step_duration)
|
||||||
|
time.sleep(SETTLE_SECONDS)
|
||||||
|
finally:
|
||||||
|
self.mouse_up(*end)
|
||||||
|
|
||||||
|
if restore:
|
||||||
|
self.mouse_move(restore)
|
||||||
|
|
||||||
|
|
||||||
|
def install():
|
||||||
|
"""给 AALC 的 Windows 输入适配器装上队伍安全滑动。幂等。"""
|
||||||
|
from module.automation.input_handlers import input as input_module
|
||||||
|
|
||||||
|
patched = []
|
||||||
|
cls = getattr(input_module, 'Input', None)
|
||||||
|
if cls is not None and getattr(cls, 'mouse_swipe_for_team_scroll', None) \
|
||||||
|
is not _foreground_team_scroll:
|
||||||
|
cls.mouse_swipe_for_team_scroll = _foreground_team_scroll
|
||||||
|
patched.append('Input')
|
||||||
|
|
||||||
|
for name in ('BackgroundInput', 'WindowMoveInput'):
|
||||||
|
cls = getattr(input_module, name, None)
|
||||||
|
if cls is None or not hasattr(cls, 'set_mouse_pos'):
|
||||||
|
continue
|
||||||
|
if getattr(cls, 'mouse_swipe_for_team_scroll', None) is _adapter_team_scroll:
|
||||||
|
continue
|
||||||
|
cls.mouse_swipe_for_team_scroll = _adapter_team_scroll
|
||||||
|
patched.append(name)
|
||||||
|
return patched
|
||||||
+45
-10
@@ -2,9 +2,11 @@
|
|||||||
"""子进程入口: 跑 AALC 现成的任务流程。
|
"""子进程入口: 跑 AALC 现成的任务流程。
|
||||||
|
|
||||||
用法: python -m lc_mcp.aalc_task <task> [json_params]
|
用法: python -m lc_mcp.aalc_task <task> [json_params]
|
||||||
|
python -m lc_mcp.aalc_task --restore <file> 写回被强杀任务临时覆盖的配置
|
||||||
放在子进程里跑, 停止 = 杀进程树; 不会像 QThread.terminate 那样留下被占用的锁。
|
放在子进程里跑, 停止 = 杀进程树; 不会像 QThread.terminate 那样留下被占用的锁。
|
||||||
"""
|
"""
|
||||||
import json
|
import json
|
||||||
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
from .aalc_engine import bootstrap
|
from .aalc_engine import bootstrap
|
||||||
@@ -17,6 +19,42 @@ TASKS = {
|
|||||||
'enkephalin': {'times': 'set_lunacy_to_enkephalin'},
|
'enkephalin': {'times': 'set_lunacy_to_enkephalin'},
|
||||||
'mirror': {'count': 'set_mirror_count'},
|
'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):
|
def run(task, params):
|
||||||
@@ -28,11 +66,8 @@ def run(task, params):
|
|||||||
from tasks.battle import battle
|
from tasks.battle import battle
|
||||||
from utils.path_manager import path_manager
|
from utils.path_manager import path_manager
|
||||||
|
|
||||||
originals = {}
|
restore_path = os.environ.get(RESTORE_ENV)
|
||||||
for name, value in params.items():
|
originals = apply_overrides(cfg, task, params, restore_path)
|
||||||
key = TASKS[task][name]
|
|
||||||
originals[key] = cfg.get_value(key)
|
|
||||||
cfg.unsaved_set_value(key, int(value))
|
|
||||||
try:
|
try:
|
||||||
if task == 'all':
|
if task == 'all':
|
||||||
scheme.script_task()
|
scheme.script_task()
|
||||||
@@ -54,14 +89,14 @@ def run(task, params):
|
|||||||
}[task]()
|
}[task]()
|
||||||
finally:
|
finally:
|
||||||
retry_monitor.stop()
|
retry_monitor.stop()
|
||||||
# AALC 运行中会自行保存配置(换队伍队列等), 把临时覆盖的次数写回原值
|
restore(cfg, originals, restore_path)
|
||||||
for key, value in originals.items():
|
|
||||||
cfg.set_value(key, value)
|
|
||||||
if originals:
|
|
||||||
cfg.flush()
|
|
||||||
|
|
||||||
|
|
||||||
def main(argv):
|
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:
|
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)
|
print('usage: python -m lc_mcp.aalc_task <%s> [json]' % '|'.join(TASKS), file=sys.stderr)
|
||||||
return 2
|
return 2
|
||||||
|
|||||||
+3
-2
@@ -95,8 +95,9 @@ class _Handler(socketserver.StreamRequestHandler):
|
|||||||
|
|
||||||
def _handle_session(self):
|
def _handle_session(self):
|
||||||
rfile, wfile = self.rfile, self.wfile
|
rfile, wfile = self.rfile, self.wfile
|
||||||
first = rfile.readline(256).decode('utf-8', 'replace').strip()
|
# 按字节比较: compare_digest 对含非 ASCII 字符的 str 会抛 TypeError
|
||||||
if not (first.startswith('AUTH ') and hmac.compare_digest(first[5:], self.server.token)):
|
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')
|
wfile.write(b'DENIED\n')
|
||||||
log('rejected connection from %s' % (self.client_address,))
|
log('rejected connection from %s' % (self.client_address,))
|
||||||
return
|
return
|
||||||
|
|||||||
+79
-15
@@ -9,14 +9,21 @@ import sys
|
|||||||
import threading
|
import threading
|
||||||
import time
|
import time
|
||||||
|
|
||||||
|
from .aalc_task import RESTORE_ENV
|
||||||
|
|
||||||
REPO = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
REPO = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||||
IS_WIN = sys.platform.startswith('win')
|
IS_WIN = sys.platform.startswith('win')
|
||||||
|
RESTORE_SUFFIX = '.restore.json'
|
||||||
|
|
||||||
|
|
||||||
def default_argv(task, params):
|
def default_argv(task, params):
|
||||||
return [sys.executable, '-m', 'lc_mcp.aalc_task', task, json.dumps(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):
|
def tail(path, n):
|
||||||
try:
|
try:
|
||||||
with open(path, 'rb') as f:
|
with open(path, 'rb') as f:
|
||||||
@@ -28,12 +35,29 @@ def tail(path, n):
|
|||||||
return []
|
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:
|
class TaskRunner:
|
||||||
|
|
||||||
def __init__(self, run_dir, argv_factory=default_argv, keep_logs=20):
|
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)
|
self.run_dir = os.path.abspath(run_dir)
|
||||||
os.makedirs(self.run_dir, exist_ok=True)
|
os.makedirs(self.run_dir, exist_ok=True)
|
||||||
self.argv_factory = argv_factory
|
self.argv_factory = argv_factory
|
||||||
|
self.restore_argv = restore_argv
|
||||||
self.keep_logs = keep_logs
|
self.keep_logs = keep_logs
|
||||||
self._lock = threading.Lock()
|
self._lock = threading.Lock()
|
||||||
self.proc = None
|
self.proc = None
|
||||||
@@ -42,46 +66,79 @@ class TaskRunner:
|
|||||||
def running(self):
|
def running(self):
|
||||||
return self.proc is not None and self.proc.poll() is None
|
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):
|
def start(self, task, params):
|
||||||
with self._lock:
|
with self._lock:
|
||||||
if self.running():
|
if self.running():
|
||||||
return {'ok': False, 'error': '已有任务在跑: %s (先 stop_task)' % self.info['task']}
|
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')
|
stamp = time.strftime('%Y%m%d_%H%M%S')
|
||||||
log_path = os.path.join(self.run_dir, 'task_%s_%s.log' % (stamp, task))
|
base = os.path.join(self.run_dir, 'task_%s_%s' % (stamp, task))
|
||||||
env = dict(os.environ, PYTHONPATH=REPO + os.pathsep + os.environ.get('PYTHONPATH', ''),
|
env = self._env()
|
||||||
PYTHONIOENCODING='utf-8', PYTHONUNBUFFERED='1')
|
env[RESTORE_ENV] = base + RESTORE_SUFFIX
|
||||||
kw = {'creationflags': subprocess.CREATE_NEW_PROCESS_GROUP} if IS_WIN else {'start_new_session': True}
|
kw = {'creationflags': subprocess.CREATE_NEW_PROCESS_GROUP} if IS_WIN else {'start_new_session': True}
|
||||||
with open(log_path, 'wb') as logf:
|
with open(base + '.log', 'wb') as logf:
|
||||||
self.proc = subprocess.Popen(self.argv_factory(task, params), cwd=REPO, env=env,
|
self.proc = subprocess.Popen(self.argv_factory(task, params), cwd=REPO, env=env,
|
||||||
stdin=subprocess.DEVNULL, stdout=logf, stderr=subprocess.STDOUT, **kw)
|
stdin=subprocess.DEVNULL, stdout=logf, stderr=subprocess.STDOUT, **kw)
|
||||||
self.info = {'task': task, 'params': params, 'log': log_path.replace('\\', '/'),
|
self.info = {'task': task, 'params': params, 'log': (base + '.log').replace('\\', '/'),
|
||||||
'started': time.time(), 'stopped_by_user': False}
|
'restore': env[RESTORE_ENV], 'started': time.time(), 'stopped_by_user': False}
|
||||||
self._prune()
|
self._prune()
|
||||||
return {'ok': True, 'task': task, 'pid': self.proc.pid, 'log': self.info['log']}
|
return {'ok': True, 'task': task, 'pid': self.proc.pid, 'log': self.info['log']}
|
||||||
|
|
||||||
def status(self, lines=30):
|
def status(self, lines=30):
|
||||||
with self._lock:
|
with self._lock:
|
||||||
if self.info is None:
|
if self.info is None:
|
||||||
return {'ok': True, 'state': 'idle'}
|
r = {'ok': True, 'state': 'idle'}
|
||||||
|
else:
|
||||||
code = self.proc.poll()
|
code = self.proc.poll()
|
||||||
if code is None:
|
if code is None:
|
||||||
state = 'running'
|
state = 'running'
|
||||||
elif self.info['stopped_by_user']:
|
|
||||||
state = 'stopped'
|
|
||||||
else:
|
else:
|
||||||
state = 'succeeded' if code == 0 else 'failed'
|
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'],
|
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']),
|
'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)))}
|
'log': self.info['log'], 'log_tail': tail(self.info['log'], max(1, min(int(lines), 200)))}
|
||||||
if code is not None:
|
if code is not None:
|
||||||
r['exit_code'] = code
|
r['exit_code'] = code
|
||||||
self.info.setdefault('ended', time.time())
|
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
|
return r
|
||||||
|
|
||||||
def stop(self):
|
def stop(self):
|
||||||
with self._lock:
|
with self._lock:
|
||||||
if not self.running():
|
if self.running():
|
||||||
return {'ok': True, 'state': 'idle', 'note': '没有在跑的任务'}
|
|
||||||
self.info['stopped_by_user'] = True
|
self.info['stopped_by_user'] = True
|
||||||
pid = self.proc.pid
|
pid = self.proc.pid
|
||||||
if IS_WIN:
|
if IS_WIN:
|
||||||
@@ -96,7 +153,14 @@ class TaskRunner:
|
|||||||
except subprocess.TimeoutExpired:
|
except subprocess.TimeoutExpired:
|
||||||
return {'ok': False, 'error': '进程 %d 10 秒内没退出' % pid}
|
return {'ok': False, 'error': '进程 %d 10 秒内没退出' % pid}
|
||||||
self.info['ended'] = time.time()
|
self.info['ended'] = time.time()
|
||||||
return {'ok': True, 'state': 'stopped', 'task': self.info['task']}
|
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):
|
def _prune(self):
|
||||||
logs = sorted(glob.glob(os.path.join(self.run_dir, 'task_*.log')), key=os.path.getmtime)
|
logs = sorted(glob.glob(os.path.join(self.run_dir, 'task_*.log')), key=os.path.getmtime)
|
||||||
|
|||||||
+14
-6
@@ -1,4 +1,4 @@
|
|||||||
"""Bounded P/Enter batches through MCP; stop when the battle UI disappears."""
|
"""Bounded Win Rate batches through MCP, with a fresh UI check per turn."""
|
||||||
import argparse
|
import argparse
|
||||||
import json
|
import json
|
||||||
import time
|
import time
|
||||||
@@ -20,7 +20,7 @@ def main():
|
|||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
deadline = time.monotonic() + min(50, max(1, args.seconds))
|
deadline = time.monotonic() + min(50, max(1, args.seconds))
|
||||||
pairs = 0
|
pairs = 0
|
||||||
with Session() as client:
|
with Session(raise_on_error=False) as client:
|
||||||
state = client.call('get_state')
|
state = client.call('get_state')
|
||||||
texts = ' '.join(item['text'] for item in state.get('items', []))
|
texts = ' '.join(item['text'] for item in state.get('items', []))
|
||||||
active = args.battle_confirmed or any(marker in texts.upper() for marker in ('WAVE', 'TURN', 'DURANTE', '胜率', '伤害'))
|
active = args.battle_confirmed or any(marker in texts.upper() for marker in ('WAVE', 'TURN', 'DURANTE', '胜率', '伤害'))
|
||||||
@@ -28,12 +28,20 @@ def main():
|
|||||||
# 战斗特写会隐藏 HUD;只有明确的结算/地图/选项信号才退出。
|
# 战斗特写会隐藏 HUD;只有明确的结算/地图/选项信号才退出。
|
||||||
if not active or is_terminal(state):
|
if not active or is_terminal(state):
|
||||||
break
|
break
|
||||||
# 短批次,批次末只检查界面是否仍为战斗,不分析拼点。
|
# P cycles between Win Rate and Damage in current game versions.
|
||||||
for _ in range(2):
|
# Only start a turn when its explicit Win Rate control is visible.
|
||||||
client.call('keypress', {'key': 'p'})
|
labels = [item['text'].replace(' ', '').lower()
|
||||||
|
for item in state.get('items', [])]
|
||||||
|
target = next((item['text'] for item in state.get('items', [])
|
||||||
|
if item['text'].replace(' ', '').lower()
|
||||||
|
in ('win', 'winrate', '胜率')), None)
|
||||||
|
if target and any(label in ('turn', 'wave', '回合', '波次') for label in labels):
|
||||||
|
selected = client.call('click_text', {'text': target})
|
||||||
|
if selected.get('ok'):
|
||||||
|
time.sleep(.5)
|
||||||
client.call('keypress', {'key': 'enter'})
|
client.call('keypress', {'key': 'enter'})
|
||||||
pairs += 1
|
pairs += 1
|
||||||
time.sleep(1.5)
|
time.sleep(2.5)
|
||||||
state = client.call('get_state')
|
state = client.call('get_state')
|
||||||
print(json.dumps({'pairs': pairs, 'state': state}, ensure_ascii=False))
|
print(json.dumps({'pairs': pairs, 'state': state}, ensure_ascii=False))
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,102 @@
|
|||||||
|
"""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_decision(cfg, state, criteria, instructions):
|
||||||
|
if not cfg.get('apiKey'):
|
||||||
|
raise ValueError('Jev API key is required')
|
||||||
|
if not criteria:
|
||||||
|
raise ValueError('Jev requires permitted choices')
|
||||||
|
body = {
|
||||||
|
'model': cfg.get('model', 'jev-1.13-free'),
|
||||||
|
'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, round((time.monotonic() - started) * 1000)
|
||||||
|
|
||||||
|
|
||||||
|
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()
|
||||||
@@ -1,4 +1,7 @@
|
|||||||
{
|
{
|
||||||
"decisionEngine": "jev",
|
"decisionEngine": "jev",
|
||||||
"model": "jev-1.13-free"
|
"model": "jev-1.13-free",
|
||||||
|
"baseUrl": "https://opencode.ai/zen/v1",
|
||||||
|
"transport": "urllib",
|
||||||
|
"timeoutSeconds": 7
|
||||||
}
|
}
|
||||||
|
|||||||
+92
-70
@@ -1,19 +1,19 @@
|
|||||||
"""Validated scene actions for Jev decisions and fixed speedrun macros."""
|
"""Validated scene actions for Jev decisions and fixed speedrun macros."""
|
||||||
import argparse
|
import argparse
|
||||||
|
import functools
|
||||||
import json
|
import json
|
||||||
import math
|
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
import subprocess
|
|
||||||
import sys
|
|
||||||
import time
|
import time
|
||||||
import urllib.error
|
import urllib.error
|
||||||
import urllib.request
|
import urllib.request
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
from mcp_session import Session as Bridge
|
from mcp_session import Session as Bridge
|
||||||
|
from jev_client import request_decision
|
||||||
|
|
||||||
REPO_ROOT = Path(__file__).resolve().parents[1]
|
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')))
|
RUNTIME_HOME = Path(os.environ.get('LC_JEV_HOME', str(Path.home() / 'lc_mcp' / 'jev')))
|
||||||
STOP_FILE = RUNTIME_HOME / 'JEV_STOP'
|
STOP_FILE = RUNTIME_HOME / 'JEV_STOP'
|
||||||
|
|
||||||
@@ -46,31 +46,65 @@ def death_retry_screen(texts):
|
|||||||
or '当前剩余人员' in combined and '重试关卡' in combined)
|
or '当前剩余人员' in combined and '重试关卡' in combined)
|
||||||
|
|
||||||
|
|
||||||
|
_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):
|
def button_enabled(state, item):
|
||||||
try:
|
try:
|
||||||
from PIL import Image
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
x, y, w, h = (int(item[k]) for k in ('x', 'y', 'w', 'h'))
|
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(screen_image(state['screen']['path'], 'L').crop((x, y, x + w, y + h)))
|
||||||
crop = np.array(image.convert('L').crop((x, y, x + w, y + h)))
|
|
||||||
return float(np.quantile(crop, 0.9)) > 85
|
return float(np.quantile(crop, 0.9)) > 85
|
||||||
except (OSError, KeyError, ImportError):
|
except (OSError, KeyError, ImportError):
|
||||||
return False
|
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):
|
def map_candidates(state):
|
||||||
"""Only observe reachable nodes; Jev chooses their route."""
|
"""Only observe reachable nodes; Jev chooses their route."""
|
||||||
import cv2
|
import cv2
|
||||||
import numpy as np
|
import numpy as np
|
||||||
from PIL import Image
|
rgb = np.array(screen_image(state['screen']['path'], 'RGB'))
|
||||||
assets = REPO_ROOT / '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)
|
gray = cv2.cvtColor(rgb, cv2.COLOR_RGB2GRAY)
|
||||||
scale = min(rgb.shape[0] / 1440, rgb.shape[1] / 2560)
|
scale = min(rgb.shape[0] / 1440, rgb.shape[1] / 2560)
|
||||||
with Image.open(assets / 'mybus_default_distance.png') as image:
|
bus = _map_template('bus', 'mybus_default_distance.png', scale)
|
||||||
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))
|
_, confidence, _, location = cv2.minMaxLoc(cv2.matchTemplate(gray, bus, cv2.TM_CCOEFF_NORMED))
|
||||||
if confidence < 0.88:
|
if confidence < 0.88:
|
||||||
return {}
|
return {}
|
||||||
@@ -88,8 +122,7 @@ def map_candidates(state):
|
|||||||
arrow_roi = gray[max(0,ay-radius):min(gray.shape[0],ay+radius),
|
arrow_roi = gray[max(0,ay-radius):min(gray.shape[0],ay+radius),
|
||||||
max(0,ax-radius):min(gray.shape[1],ax+radius)]
|
max(0,ax-radius):min(gray.shape[1],ax+radius)]
|
||||||
arrow_name = {'w':'up','d':'mid','s':'down'}[key]
|
arrow_name = {'w':'up','d':'mid','s':'down'}[key]
|
||||||
template = cv2.imread(str(assets / 'road_in_mir' / (arrow_name+'.png')), 0)
|
template = _map_template('arrow', 'road_in_mir/%s.png' % arrow_name, scale)
|
||||||
template = cv2.resize(template, None, fx=scale, fy=scale, interpolation=cv2.INTER_AREA)
|
|
||||||
arrow_reachable = False
|
arrow_reachable = False
|
||||||
if arrow_roi.shape[0] >= template.shape[0] and arrow_roi.shape[1] >= template.shape[1]:
|
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))
|
_, arrow_score, _, arrow_pos = cv2.minMaxLoc(cv2.matchTemplate(arrow_roi, template, cv2.TM_CCOEFF_NORMED))
|
||||||
@@ -111,10 +144,7 @@ def map_candidates(state):
|
|||||||
if target_desc is not None:
|
if target_desc is not None:
|
||||||
for name, label in (('shop','商店'),('event','事件'),('battle','普通战斗'),
|
for name, label in (('shop','商店'),('event','事件'),('battle','普通战斗'),
|
||||||
('risky_encounter','精英战斗'),('focused_encounter','集中战斗')):
|
('risky_encounter','精英战斗'),('focused_encounter','集中战斗')):
|
||||||
with Image.open(assets / 'road_in_mir' / (name + '.png')) as image:
|
desc = _map_template('icon', 'road_in_mir/%s.png' % name, scale)
|
||||||
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:
|
if desc is not None:
|
||||||
matches = cv2.BFMatcher(cv2.NORM_HAMMING).knnMatch(desc, target_desc, k=2)
|
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)
|
score = sum(len(pair) == 2 and pair[0].distance < 0.7*pair[1].distance for pair in matches)
|
||||||
@@ -270,10 +300,8 @@ def candidates(state, previous_battle=False, refresh_used=0):
|
|||||||
try:
|
try:
|
||||||
import cv2
|
import cv2
|
||||||
import numpy as np
|
import numpy as np
|
||||||
from PIL import Image
|
border = np.array(screen_image(state['screen']['path'], 'RGB').crop(
|
||||||
with Image.open(state['screen']['path']) as image:
|
(int(cx-width*.12), int(height*.31), int(cx-width*.107), int(height*.69))))
|
||||||
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)
|
hsv = cv2.cvtColor(border, cv2.COLOR_RGB2HSV)
|
||||||
target_selected = float(((hsv[:,:,0] > 8) & (hsv[:,:,0] < 35) &
|
target_selected = float(((hsv[:,:,0] > 8) & (hsv[:,:,0] < 35) &
|
||||||
(hsv[:,:,1] > 200) & (hsv[:,:,2] > 220)).mean()) > .18
|
(hsv[:,:,1] > 200) & (hsv[:,:,2] > 220)).mean()) > .18
|
||||||
@@ -493,8 +521,10 @@ def candidates(state, previous_battle=False, refresh_used=0):
|
|||||||
if label in known_buttons and button_enabled(state, item):
|
if label in known_buttons and button_enabled(state, item):
|
||||||
options['button_%d' % index] = {
|
options['button_%d' % index] = {
|
||||||
'description': '当前可见且非灰色按钮:%s;点击 OCR 中心。' % label,
|
'description': '当前可见且非灰色按钮:%s;点击 OCR 中心。' % label,
|
||||||
|
# 直接点已核对过的这一项: 重新按文字搜索要多一次截图+OCR, 还可能命中背景里的同名按钮
|
||||||
'action': ({'tool': 'keypress', 'args': {'key': 'enter'}} if label in ('进入', '开始战斗')
|
'action': ({'tool': 'keypress', 'args': {'key': 'enter'}} if label in ('进入', '开始战斗')
|
||||||
else {'tool': 'click_text', 'args': {'text': item['text']}}),
|
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')
|
if (not battle and not in_shop and state.get('screen', {}).get('path')
|
||||||
and Path(state['screen']['path']).is_file()
|
and Path(state['screen']['path']).is_file()
|
||||||
@@ -512,9 +542,7 @@ def candidates(state, previous_battle=False, refresh_used=0):
|
|||||||
try:
|
try:
|
||||||
import cv2
|
import cv2
|
||||||
import numpy as np
|
import numpy as np
|
||||||
from PIL import Image
|
rgb = np.array(screen_image(state['screen']['path'], 'RGB'))
|
||||||
with Image.open(state['screen']['path']) as image:
|
|
||||||
rgb = np.array(image.convert('RGB'))
|
|
||||||
for number in range(12):
|
for number in range(12):
|
||||||
cx = round(width*(.061 + number*.0542))
|
cx = round(width*(.061 + number*.0542))
|
||||||
crop = rgb[round(height*.841):round(height*.878), max(0,cx-round(width*.026)):cx+round(width*.026)]
|
crop = rgb[round(height*.841):round(height*.878), max(0,cx-round(width*.026)):cx+round(width*.026)]
|
||||||
@@ -545,39 +573,14 @@ def candidates(state, previous_battle=False, refresh_used=0):
|
|||||||
|
|
||||||
|
|
||||||
def decide(cfg, state, options, recent):
|
def decide(cfg, state, options, recent):
|
||||||
body = {'model': 'jev-1.13-free',
|
description = ('目标:按用户已配置的队伍和速通规则推进当前镜牢。当前楼层:%s\n当前游戏 OCR(坐标仅供辨识):\n' % state.get('floor', '尚未识别') +
|
||||||
'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)
|
'\n'.join('%s @%d,%d' % (i['text'], i['x'], i['y']) for i in text_items(state)
|
||||||
if not i['text'].upper().startswith('STEAM')) +
|
if not i['text'].upper().startswith('STEAM')) +
|
||||||
'\n截图视觉与可用控件观察(不是预先做出的决定):\n' +
|
'\n截图视觉与可用控件观察(不是预先做出的决定):\n' +
|
||||||
'\n'.join(val['description'] for key,val in options.items() if key != 'requires_analysis') +
|
'\n'.join(val['description'] for key,val in options.items() if key != 'requires_analysis') +
|
||||||
'\n最近动作和执行结果:' + json.dumps(recent[-4:], ensure_ascii=False),
|
'\n最近动作和执行结果:' + json.dumps(recent[-4:], ensure_ascii=False))
|
||||||
'questions': {'action': {'type': 'choice', 'instructions': SYSTEM_RULES,
|
return request_decision(cfg, description,
|
||||||
'criteria': {key: val['description'] for key, val in options.items()}}}}
|
{key: val['description'] for key, val in options.items()}, SYSTEM_RULES)
|
||||||
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 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 options:
|
|
||||||
raise ValueError('Jev returned an unsupported candidate')
|
|
||||||
return choice, round((time.monotonic() - start) * 1000)
|
|
||||||
|
|
||||||
|
|
||||||
def fixed_fallback(options):
|
def fixed_fallback(options):
|
||||||
@@ -685,32 +688,50 @@ def execute(bridge, action):
|
|||||||
return call(action['tool'], action.get('args'))
|
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 archive_context(context_path):
|
||||||
|
"""一局结束后归档本局状态。claim_requested 等标记若留给下一局, 新局一启动就会被判定为已完成。"""
|
||||||
|
if context_path.exists():
|
||||||
|
context_path.replace(context_path.with_name('jev_shop_context.%s.json' % time.strftime('%Y%m%d_%H%M%S')))
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
parser = argparse.ArgumentParser()
|
parser = argparse.ArgumentParser()
|
||||||
parser.add_argument('config')
|
parser.add_argument('config')
|
||||||
parser.add_argument('--steps', type=int, default=250)
|
parser.add_argument('--steps', type=int, default=250)
|
||||||
parser.add_argument('--seconds', type=int, default=1200)
|
parser.add_argument('--seconds', type=int, default=1200)
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
# 防止另一个终端重复启动同一个游戏的执行器。
|
release = acquire_single_instance()
|
||||||
import ctypes
|
if release is None:
|
||||||
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)
|
print(json.dumps({'state':'already_running'}), flush=True)
|
||||||
if lease:
|
|
||||||
kernel.CloseHandle(ctypes.c_void_p(lease))
|
|
||||||
return
|
return
|
||||||
cfg = json.loads(Path(args.config).read_text(encoding='utf-8'))
|
cfg = json.loads(Path(args.config).read_text(encoding='utf-8'))
|
||||||
cfg['apiKey'] = os.environ.get('OPENCODE_API_KEY') or cfg.get('apiKey')
|
cfg['apiKey'] = os.environ.get('OPENCODE_API_KEY') or cfg.get('apiKey')
|
||||||
if not cfg['apiKey']:
|
if not cfg['apiKey']:
|
||||||
kernel.CloseHandle(ctypes.c_void_p(lease))
|
release()
|
||||||
raise RuntimeError('Set OPENCODE_API_KEY or use an untracked local config with apiKey')
|
raise RuntimeError('Set OPENCODE_API_KEY or use an untracked local config with apiKey')
|
||||||
RUNTIME_HOME.mkdir(parents=True, exist_ok=True)
|
RUNTIME_HOME.mkdir(parents=True, exist_ok=True)
|
||||||
log = RUNTIME_HOME / 'jev_mirror_log.jsonl'
|
log = RUNTIME_HOME / 'jev_mirror_log.jsonl'
|
||||||
status = RUNTIME_HOME / 'jev_mirror_status.json'
|
status = RUNTIME_HOME / 'jev_mirror_status.json'
|
||||||
bridge = Bridge()
|
# 工具失败按 {'ok': False} 返回: 截图暂不可用、按钮已消失等情况观察后继续, 而不是整局退出
|
||||||
|
bridge = Bridge(raise_on_error=False)
|
||||||
deadline = time.monotonic() + args.seconds
|
deadline = time.monotonic() + args.seconds
|
||||||
recent = []
|
recent = []
|
||||||
repeats = {}
|
repeats = {}
|
||||||
@@ -821,6 +842,7 @@ def main():
|
|||||||
end_utc=now.isoformat(), elapsed_seconds=(now-datetime.fromisoformat(run['start_utc'])).total_seconds(),
|
end_utc=now.isoformat(), elapsed_seconds=(now-datetime.fromisoformat(run['start_utc'])).total_seconds(),
|
||||||
completion_evidence=state.get('screen'))
|
completion_evidence=state.get('screen'))
|
||||||
run_path.write_text(json.dumps(run, ensure_ascii=False, indent=2), encoding='utf-8')
|
run_path.write_text(json.dumps(run, ensure_ascii=False, indent=2), encoding='utf-8')
|
||||||
|
archive_context(context_path)
|
||||||
print(json.dumps(record, ensure_ascii=False), flush=True)
|
print(json.dumps(record, ensure_ascii=False), flush=True)
|
||||||
return
|
return
|
||||||
if choice == 'requires_analysis':
|
if choice == 'requires_analysis':
|
||||||
@@ -849,10 +871,10 @@ def main():
|
|||||||
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)):
|
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
|
context['thrill_obtained']=True
|
||||||
context_path.write_text(json.dumps(context),encoding='utf-8')
|
context_path.write_text(json.dumps(context),encoding='utf-8')
|
||||||
if choice == 'shop_refresh':
|
if choice == 'shop_refresh' and result.get('ok'):
|
||||||
context['refresh_used'] += 1
|
context['refresh_used'] += 1
|
||||||
context_path.write_text(json.dumps(context), encoding='utf-8')
|
context_path.write_text(json.dumps(context), encoding='utf-8')
|
||||||
started_battle = choice.startswith('button_') and any(
|
started_battle = choice.startswith('button_') and bool(result.get('ok')) and any(
|
||||||
i['text'].replace(' ', '') == '开始战斗' for i in text_items(state))
|
i['text'].replace(' ', '') == '开始战斗' for i in text_items(state))
|
||||||
previous_battle = ((action['tool'] == 'battle' and not result.get('terminal')) or started_battle
|
previous_battle = ((action['tool'] == 'battle' and not result.get('terminal')) or started_battle
|
||||||
or (previous_battle and action['tool'] == 'wait'))
|
or (previous_battle and action['tool'] == 'wait'))
|
||||||
@@ -869,7 +891,7 @@ def main():
|
|||||||
print(json.dumps(record, ensure_ascii=False), flush=True)
|
print(json.dumps(record, ensure_ascii=False), flush=True)
|
||||||
finally:
|
finally:
|
||||||
bridge.close()
|
bridge.close()
|
||||||
kernel.CloseHandle(ctypes.c_void_p(lease))
|
release()
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
|||||||
@@ -7,7 +7,9 @@ from pathlib import Path
|
|||||||
|
|
||||||
|
|
||||||
class Session:
|
class Session:
|
||||||
def __init__(self):
|
def __init__(self, raise_on_error=True):
|
||||||
|
# False: 工具失败按 {'ok': False, ...} 返回, 由调用方观察后继续; 协议层错误仍抛异常
|
||||||
|
self.raise_on_error = raise_on_error
|
||||||
root = Path(__file__).resolve().parents[1]
|
root = Path(__file__).resolve().parents[1]
|
||||||
self.process = subprocess.Popen(
|
self.process = subprocess.Popen(
|
||||||
[sys.executable, '-X', 'utf8', str(root / 'lc_mcp' / 'bridge.py')],
|
[sys.executable, '-X', 'utf8', str(root / 'lc_mcp' / 'bridge.py')],
|
||||||
@@ -42,7 +44,7 @@ class Session:
|
|||||||
def call(self, name, arguments=None):
|
def call(self, name, arguments=None):
|
||||||
result = self.request('tools/call', {'name': name, 'arguments': arguments or {}})
|
result = self.request('tools/call', {'name': name, 'arguments': arguments or {}})
|
||||||
data = json.loads(result['content'][0]['text'])
|
data = json.loads(result['content'][0]['text'])
|
||||||
if result.get('isError'):
|
if result.get('isError') and self.raise_on_error:
|
||||||
raise RuntimeError(data)
|
raise RuntimeError(data)
|
||||||
return data
|
return data
|
||||||
|
|
||||||
|
|||||||
@@ -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])
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
import json
|
||||||
|
import os
|
||||||
import tempfile
|
import tempfile
|
||||||
import sys
|
import sys
|
||||||
import unittest
|
import unittest
|
||||||
@@ -435,7 +437,38 @@ class SceneRegressionTest(unittest.TestCase):
|
|||||||
|
|
||||||
def test_disabled_selection_is_not_clickable_candidate(self):
|
def test_disabled_selection_is_not_clickable_candidate(self):
|
||||||
state = {'items': [{'text': '选择', 'x': 100, 'y': 10, 'w': 80, 'h': 40}]}
|
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()))
|
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):
|
def test_battle_cinematic_keeps_macro_available(self):
|
||||||
state = {'items': [{'text': '破裂+5', 'x': 100, 'y': 10, 'w': 80, 'h': 40}]}
|
state = {'items': [{'text': '破裂+5', 'x': 100, 'y': 10, 'w': 80, 'h': 40}]}
|
||||||
@@ -464,5 +497,60 @@ class SceneRegressionTest(unittest.TestCase):
|
|||||||
self.assertNotIn('battle', agent.candidates(state, previous_battle=True))
|
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_completed_run_archives_context_for_next_run(self):
|
||||||
|
with tempfile.TemporaryDirectory() as folder:
|
||||||
|
home = Path(folder)
|
||||||
|
(home / 'jev_shop_context.json').write_text(json.dumps(
|
||||||
|
{'refresh_used': 0, 'floor': 5, 'claim_requested': True, 'battery_obtained': True}))
|
||||||
|
bridge = mock.Mock()
|
||||||
|
bridge.call.return_value = {'ok': True, 'items': [
|
||||||
|
{'text': t, 'x': 0, 'y': 0, 'w': 1, 'h': 1, 'score': 1.0} for t in ('探索状态', '进入')]}
|
||||||
|
self.run_main(home, bridge)
|
||||||
|
self.assertEqual(json.loads((home / 'jev_mirror_status.json').read_text())['state'], 'completed')
|
||||||
|
# 否则下一局一启动就因 claim_requested 被判定为“已完成”
|
||||||
|
self.assertFalse((home / 'jev_shop_context.json').exists())
|
||||||
|
self.assertEqual(len(list(home.glob('jev_shop_context.*.json'))), 1)
|
||||||
|
|
||||||
|
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_with(raise_on_error=False)
|
||||||
|
status = json.loads((home / 'jev_mirror_status.json').read_text())
|
||||||
|
self.assertNotIn('error', status) # 没有因异常退出, 而是按“截图暂不可用”继续等待
|
||||||
|
self.assertEqual(status['choice'], '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 = False
|
||||||
|
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__':
|
if __name__ == '__main__':
|
||||||
unittest.main()
|
unittest.main()
|
||||||
|
|||||||
+334
-2
@@ -15,6 +15,7 @@ REPO = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
|||||||
sys.path.insert(0, REPO)
|
sys.path.insert(0, REPO)
|
||||||
|
|
||||||
from lc_mcp import server as srv_mod # noqa: E402
|
from lc_mcp import server as srv_mod # noqa: E402
|
||||||
|
from lc_mcp import aalc_input_patch # noqa: E402
|
||||||
from lc_mcp.engine import find_hits # noqa: E402
|
from lc_mcp.engine import find_hits # noqa: E402
|
||||||
from lc_mcp.fake_engine import FakeEngine # noqa: E402
|
from lc_mcp.fake_engine import FakeEngine # noqa: E402
|
||||||
from lc_mcp.protocol import Server, TOOLS # noqa: E402
|
from lc_mcp.protocol import Server, TOOLS # noqa: E402
|
||||||
@@ -153,9 +154,212 @@ class AalcTaskArgsTest(unittest.TestCase):
|
|||||||
self.assertEqual(aalc_task.main(['x', 'mirror', '{"exp": 1}']), 2)
|
self.assertEqual(aalc_task.main(['x', 'mirror', '{"exp": 1}']), 2)
|
||||||
self.assertEqual(aalc_task.main(['x', 'nope']), 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):
|
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):
|
def test_background_click_holds_and_releases_without_moving_window(self):
|
||||||
from lc_mcp.aalc_engine import AalcEngine
|
from lc_mcp.aalc_engine import AalcEngine
|
||||||
engine = AalcEngine.__new__(AalcEngine)
|
engine = AalcEngine.__new__(AalcEngine)
|
||||||
@@ -237,6 +441,7 @@ server.main(['--stdio'])
|
|||||||
def test_drag_checks_bounds_before_sending_input(self):
|
def test_drag_checks_bounds_before_sending_input(self):
|
||||||
from lc_mcp.aalc_engine import AalcEngine
|
from lc_mcp.aalc_engine import AalcEngine
|
||||||
engine = AalcEngine.__new__(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._grab = mock.Mock(return_value=mock.Mock(width=800, height=600))
|
||||||
engine.auto = mock.Mock()
|
engine.auto = mock.Mock()
|
||||||
with self.assertRaises(ValueError):
|
with self.assertRaises(ValueError):
|
||||||
@@ -261,13 +466,30 @@ server.main(['--stdio'])
|
|||||||
engine.auto.find_image_element.side_effect = match
|
engine.auto.find_image_element.side_effect = match
|
||||||
self.assertEqual(engine.find_image('battle/setting_assets.png'), (1233, 42))
|
self.assertEqual(engine.find_image('battle/setting_assets.png'), (1233, 42))
|
||||||
self.assertEqual(engine.cfg.set_win_size, 1080)
|
self.assertEqual(engine.cfg.set_win_size, 1080)
|
||||||
self.assertEqual(engine.auto.clear_img_cache.call_count, 2)
|
self.assertEqual(engine.auto.clear_img_cache.call_count, 1)
|
||||||
engine.auto.find_image_element.side_effect = RuntimeError('match failed')
|
engine.auto.find_image_element.side_effect = RuntimeError('match failed')
|
||||||
with self.assertRaises(RuntimeError):
|
with self.assertRaises(RuntimeError):
|
||||||
engine.find_image('battle/setting_assets.png')
|
engine.find_image('battle/setting_assets.png')
|
||||||
self.assertEqual(engine.cfg.set_win_size, 1080)
|
self.assertEqual(engine.cfg.set_win_size, 1080)
|
||||||
self.assertEqual(engine.auto.clear_img_cache.call_count, 4)
|
# 同一窗口尺寸复用已缩放的模板缓存 (clear_img_cache 每次都会全量 gc)
|
||||||
|
self.assertEqual(engine.auto.clear_img_cache.call_count, 1)
|
||||||
engine.cfg.set_value.assert_not_called()
|
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():
|
def free_port():
|
||||||
@@ -308,6 +530,11 @@ class TransportTest(unittest.TestCase):
|
|||||||
s.sendall(b'AUTH wrong\n')
|
s.sendall(b'AUTH wrong\n')
|
||||||
self.assertEqual(s.makefile('rb').readline().strip(), b'DENIED')
|
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):
|
def test_bridge_end_to_end(self):
|
||||||
env = dict(os.environ, LCP_PORT=str(self.port), HOME=self.tmp.name, USERPROFILE=self.tmp.name)
|
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.makedirs(os.path.join(self.tmp.name, 'lc_mcp'))
|
||||||
@@ -354,5 +581,110 @@ class TransportTest(unittest.TestCase):
|
|||||||
self.assertEqual((state['ok'], state['items']), (True, []))
|
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)
|
||||||
|
|
||||||
|
|
||||||
|
class TeamScrollPatchTest(unittest.TestCase):
|
||||||
|
"""编队列表滑动: Windows 适配器缺少队伍拖拽规避, 补丁的几何必须是
|
||||||
|
"先 escape 脱离按住判定, 再按名义位移走完"。
|
||||||
|
"""
|
||||||
|
|
||||||
|
def test_zero_distance_is_noop(self):
|
||||||
|
self.assertIsNone(aalc_input_patch.team_scroll_plan(10, 20, 0, 0, 0.3, 60))
|
||||||
|
|
||||||
|
def test_upward_swipe_escapes_first_then_travels_nominal_delta(self):
|
||||||
|
start, escape, end, duration = aalc_input_patch.team_scroll_plan(100, 200, 0, -200, 0.4, 60)
|
||||||
|
self.assertEqual(start, (100.0, 200.0))
|
||||||
|
self.assertEqual(escape, (100.0, 140.0))
|
||||||
|
self.assertEqual(end, (100.0, -60.0))
|
||||||
|
self.assertAlmostEqual(end[1] - escape[1], -200.0)
|
||||||
|
self.assertEqual(duration, 0.4)
|
||||||
|
|
||||||
|
def test_downward_swipe_shifts_start_into_visible_rows(self):
|
||||||
|
start, escape, end, _ = aalc_input_patch.team_scroll_plan(100, 200, 0, 200, 0.4, 60)
|
||||||
|
self.assertEqual(start, (100.0, 140.0))
|
||||||
|
self.assertEqual(escape, (100.0, 200.0))
|
||||||
|
self.assertEqual(end, (100.0, 400.0))
|
||||||
|
self.assertAlmostEqual(end[1] - escape[1], 200.0)
|
||||||
|
|
||||||
|
def test_escape_leg_has_requested_length(self):
|
||||||
|
start, escape, end, _ = aalc_input_patch.team_scroll_plan(0, 0, 300, -400, 0.5, 50)
|
||||||
|
leg = (escape[0] - start[0], escape[1] - start[1])
|
||||||
|
self.assertAlmostEqual((leg[0] ** 2 + leg[1] ** 2) ** 0.5, 50.0)
|
||||||
|
self.assertAlmostEqual(end[0] - escape[0], 300.0)
|
||||||
|
self.assertAlmostEqual(end[1] - escape[1], -400.0)
|
||||||
|
|
||||||
|
def test_install_patches_team_scroll_on_windows_adapters(self):
|
||||||
|
import types
|
||||||
|
|
||||||
|
class FakeInput:
|
||||||
|
def mouse_swipe_for_team_scroll(self, *args, **kwargs):
|
||||||
|
raise AssertionError('未打补丁')
|
||||||
|
|
||||||
|
class FakeBackground:
|
||||||
|
def set_mouse_pos(self, *args, **kwargs):
|
||||||
|
pass
|
||||||
|
|
||||||
|
def mouse_swipe_for_team_scroll(self, *args, **kwargs):
|
||||||
|
raise AssertionError('未打补丁')
|
||||||
|
|
||||||
|
class FakeWindowMove:
|
||||||
|
"""没有 set_mouse_pos 的适配器保持原样。"""
|
||||||
|
|
||||||
|
def mouse_swipe_for_team_scroll(self, *args, **kwargs):
|
||||||
|
raise AssertionError('未打补丁')
|
||||||
|
|
||||||
|
leaf = types.ModuleType('module.automation.input_handlers.input')
|
||||||
|
leaf.Input = FakeInput
|
||||||
|
leaf.BackgroundInput = FakeBackground
|
||||||
|
leaf.WindowMoveInput = FakeWindowMove
|
||||||
|
parents = {}
|
||||||
|
for name in ('module', 'module.automation', 'module.automation.input_handlers'):
|
||||||
|
parents[name] = types.ModuleType(name)
|
||||||
|
parents[name].__path__ = []
|
||||||
|
parents['module.automation.input_handlers'].input = leaf
|
||||||
|
parents['module.automation'].input_handlers = parents['module.automation.input_handlers']
|
||||||
|
parents['module'].automation = parents['module.automation']
|
||||||
|
|
||||||
|
with mock.patch.dict(sys.modules, parents):
|
||||||
|
patched = aalc_input_patch.install()
|
||||||
|
self.assertEqual(patched, ['Input', 'BackgroundInput'])
|
||||||
|
self.assertIs(FakeInput.mouse_swipe_for_team_scroll,
|
||||||
|
aalc_input_patch._foreground_team_scroll)
|
||||||
|
self.assertIs(FakeBackground.mouse_swipe_for_team_scroll,
|
||||||
|
aalc_input_patch._adapter_team_scroll)
|
||||||
|
# 幂等: 再装一次不再重复补
|
||||||
|
self.assertEqual(aalc_input_patch.install(), [])
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
unittest.main()
|
unittest.main()
|
||||||
|
|||||||
Reference in New Issue
Block a user