Repository navigation
Conversation
Contributor
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Open
Contributor
|
看到这套实现了,Windows 侧我不再重复做(#6702 已关:C# 宿主 + Python 控制器,不符合「agent 只用 Go/C++」这条)。 我这边是 Linux(无桌面服务器)那一路,实测数据在手上:
想在维护者提的「启动器抽象」下认领 Linux 那条腿。契约提案放在 #6483 了: 想先和你确认三点(提案里都写了):
如果方向可以,我按你的目录和命名来写 Linux 启动器,不另起一套。 |
yuhuan-zhen
added a commit
to yuhuan-zhen/MaaEnd
that referenced
this pull request
Oct 23, 2026
从 MaaEnd#6746(agent/cpp-algo/cloud-webview)移植两块页面侧逻辑,语言约束内 (本文件只是被 Linux launcher 复用的 JS 字符串与 Python 胶水,不进 agent)。 1) page_js.py —— 两段 JS,逐字对齐上游 - PAGE_STATE_JS(← kPageState):一次求值返回 page/account/video_ready/ start_target/session_busy_confirm_target/document_epoch 等,决策留给调用方 - INPUT_POLICY_JS(← kInputPolicy):禁 webgl2 的 getContext(否则站点画质增强 把 <video> 换成 OffscreenCanvas,取帧和键盘门控失效)、keydown 补 mouseenter、 中键防自动滚屏、相对移动锚点改写、废 window.focus 与 requestPointerLock、 记录启动资源失败 2) page_state.py —— prepare() 把页面推到 video_ready:ended / startup_error / login(用户操作不计时)/ session_busy(点知道了)/ landing(点开始游戏)/ queue / starting / stream 八个分支 3) cdp_controller.py —— connect() 里安装策略(addScriptToEvaluateOnNewDocument + 当前文档立即执行);新增 page_state() / prepare_page() / relative_move() 4) run_daily_linux.py —— 启动优先走状态机,失败回退 pipeline 启动链; 新增 --no-state-machine 测试: - web/linux/tests/page_state.test.mjs 17 例(假 DOM,从 py 里正则抽 JS) - web/linux/tests/input_policy.test.mjs 13 例 - web/linux/tests/test_page_state.py 6 例(prepare 的分支与点击) - tests/fake_cloud_page.html 假云页面,配合 e2e 脚本跑真浏览器 验证:node --test 30/30;unittest 6/6;ruff All checks passed; 真浏览器(Edge headless + canvas.captureStream 假视频)端到端: landing → 点击开始 → stream + video_ready + signed_in; webgl2 被禁 / 2d 可用 / focus 空函数 / movementX/Y = 17,-9 全部成立。
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.
为 Windows 增加实验性的云终末地网页版控制器,复用现有 PC 任务流程。用户在官网自行选择扫码、手机号、密码或验证码登录;同一预任务检查登录状态、启动游戏并等待视频就绪,任务队列结束后由配套 GUI 关闭对应宿主窗口。
实现包括:
关联:#6483 。测试素材:MaaEnd/MaaEndTestset#20 (子模块仍使用上游地址,已确认可从上游拉取对应 PR 提交)。
验证:
4ce7d7b6,正式候选pnpm test1759 jobs、pnpm check通过;已有 3 项 ADB 缺图跳过单独保留,未将其计为通过。当前保持 Draft:
Win32-CloudWeb名称及项目宿主路径的专属约定,尚未纳入本 PR。未提交桌面其它窗口截图、浏览器登录目录或账号数据。