feat(ok-nte): ok-nte专项支持启动前强制切换登录账号,并允许通过启动器唤醒异环 - #522
Merged
AthenaHibou merged 12 commits intoSep 2, 2026
Conversation
- 游戏启动改由 MAS 拉起 NTELauncher 启动器并 OCR 点击「开始游戏」(替代直启 HTGame.exe 避免卡界面),兼容启动器「更新」流程、旧客户端路径与三区服启动器; 游戏结束改为按 HTGame.exe 进程名清理 - 新增「运行前强制切换账号」(依赖游戏配置启用),游戏启动后按用户手机号后 4 位匹配登录面板掩码账号完成切换,交互与失败诊断留痕对齐 OK-WW 强制切号 - 修复 OK-NTE AutoProxy 缺失 Notify 导入导致任务异常通知静默失效的问题
There was a problem hiding this comment.
Sorry @AthenaHibou, you've used your own review budget of 250,000 diff characters for the last 7 days.
You can request another review in 4 days and 2 hours by commenting @sourcery-ai review. Upgrade to get a review now.
审查者指南本 PR 将 OK-NTE 的 MAS 接管启动链路改为启动器驱动,新增基于 Windows OCR/UI 自动化的手机号后四位账号切换,并通过配置兼容、前端引导、动态等待、实时日志和失败截图覆盖更新频繁及长启动场景。 OK-NTE 启动器启动与账号切换时序图sequenceDiagram
participant MAS as MAS
participant Launcher as NTELauncher
participant Game as HTGame.exe
participant OCR as OCR_UI_Automation
participant User as UserConfig
participant OKNTE as OK-NTE
MAS->>MAS: _resolve_launcher_path()
MAS->>Launcher: open_process(launcher_path)
MAS->>Launcher: async_start_game_via_launcher()
loop Until actionable state
OCR->>Launcher: _read_texts()
alt Launcher upgrade
OCR-->>MAS: 立即体验 / 更新已完成
MAS->>Launcher: Click upgrade or confirm restart
else Game update in progress
OCR-->>MAS: Download status
MAS->>MAS: Wait for progress or detect stall
else Start game available
MAS->>Launcher: Click 开始游戏
end
end
Launcher->>Game: Start client
MAS->>Game: _find_game_hwnd()
MAS->>OCR: _wait_for_actionable_state()
OCR-->>MAS: Title or login panel ready
alt AccountSwitch enabled and phone configured
User-->>MAS: account_id
MAS->>OCR: async_switch_account(account_id)
OCR->>Game: Open login panel
OCR->>Game: Select account by phone suffix
OCR->>Game: Click 登录
OCR-->>MAS: Login panel disappears
MAS->>OKNTE: set_oknte()
else Disabled or no phone configured
MAS->>OKNTE: set_oknte()
end
文件级变更
提示与命令与 Sourcery 交互
自定义你的使用体验访问你的控制面板:
获取帮助Original review guide in EnglishReviewer's Guide本 PR 将 OK-NTE 的 MAS 接管启动链路改为启动器驱动,新增基于 Windows OCR/UI 自动化的手机号后四位账号切换,并通过配置兼容、前端引导、动态等待、实时日志和失败截图覆盖更新频繁及长启动场景。 Sequence diagram for OK-NTE launcher startup and account switchingsequenceDiagram
participant MAS as MAS
participant Launcher as NTELauncher
participant Game as HTGame.exe
participant OCR as OCR_UI_Automation
participant User as UserConfig
participant OKNTE as OK-NTE
MAS->>MAS: _resolve_launcher_path()
MAS->>Launcher: open_process(launcher_path)
MAS->>Launcher: async_start_game_via_launcher()
loop Until actionable state
OCR->>Launcher: _read_texts()
alt Launcher upgrade
OCR-->>MAS: 立即体验 / 更新已完成
MAS->>Launcher: Click upgrade or confirm restart
else Game update in progress
OCR-->>MAS: Download status
MAS->>MAS: Wait for progress or detect stall
else Start game available
MAS->>Launcher: Click 开始游戏
end
end
Launcher->>Game: Start client
MAS->>Game: _find_game_hwnd()
MAS->>OCR: _wait_for_actionable_state()
OCR-->>MAS: Title or login panel ready
alt AccountSwitch enabled and phone configured
User-->>MAS: account_id
MAS->>OCR: async_switch_account(account_id)
OCR->>Game: Open login panel
OCR->>Game: Select account by phone suffix
OCR->>Game: Click 登录
OCR-->>MAS: Login panel disappears
MAS->>OKNTE: set_oknte()
else Disabled or no phone configured
MAS->>OKNTE: set_oknte()
end
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
# Conflicts: # frontend/electron/main.ts # res/version.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
功能说明
本 PR 为 OK-NTE 专项新增两项由 MAS 接管的能力,覆盖异环更新频繁、启动链路长带来的全部自动化场景:
测试示例
Sourcery 摘要
支持 OK-NTE 通过其启动器启动,并可在运行任务前选择性切换账号,同时增强启动过程的容错能力和诊断功能。
新功能:
问题修复:
增强功能:
维护:
Original summary in English
Sourcery 总结
支持基于 OK-NTE 启动器的启动,以及可选的任务前账号切换,并提供更可靠的自动化、诊断和问题报告功能。
新功能:
错误修复:
改进:
杂项:
Original summary in English
Summary by Sourcery
通过 OK-NTE 启动器接管游戏启动流程,并在任务执行前提供可选的登录账号切换能力。
New Features:
Bug Fixes:
Enhancements:
Chores:
Original summary in English
Summary by Sourcery
通过 OK-NTE 启动器接管游戏启动流程,并在任务执行前提供可选的登录账号切换能力。
New Features:
Bug Fixes:
Enhancements:
Chores: