Metadata-Version: 2.4
Name: auto-mas-maafw-runner
Version: 0.2.0
Summary: MFW runner block for AUTO-MAS: worker, timeouts, loop guard, failure screenshots and log redaction
Author: AUTO-MAS Team
License-Expression: AGPL-3.0-or-later
Project-URL: Changelog, https://github.com/AUTO-MAS-Project/AUTO-MAS-MaaFW/blob/main/packages/auto-mas-maafw-runner/CHANGELOG.md
Project-URL: Documentation, https://github.com/AUTO-MAS-Project/AUTO-MAS-MaaFW/blob/main/packages/auto-mas-maafw-runner/README.md
Project-URL: Homepage, https://auto-mas.top
Project-URL: Repository, https://github.com/AUTO-MAS-Project/AUTO-MAS-MaaFW
Project-URL: Issues, https://github.com/AUTO-MAS-Project/AUTO-MAS-MaaFW/issues
Keywords: auto-mas-plugin,auto-mas-id:maafw_runner
Requires-Python: <3.13,>=3.12
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: auto-mas-core<6,>=5.9.0b1
Requires-Dist: auto-mas-maafw-interface<0.3,>=0.2.0
Requires-Dist: auto-mas-maafw-native<0.3,>=0.2.0
Requires-Dist: auto-mas-maafw-agent-env<0.3,>=0.2.0
Dynamic: license-file

<!-- auto-mas:i18n
{"display_name_i18n":{"zh_CN":"MFW 运行","en":"MFW Runner","ja":"MFW ランナー"},"description_i18n":{"zh_CN":"把一份 MFW 运行计划跑完：worker、超时与打转保护、失败截图、日志打码。","en":"Runs an MFW run plan to completion: worker process, timeout and loop guards, failure screenshots and log redaction.","ja":"MFW の実行計画を最後まで実行します：worker、タイムアウトとループ検出、失敗時のスクリーンショット、ログのマスキング。"},"tags_i18n":{"zh_CN":["MaaFramework","运行积木"],"en":["MaaFramework","Runner block"],"ja":["MaaFramework","実行ブロック"]}}
-->

# AUTO-MAS MaaFW Runner

MFW 插件族的运行积木（插件标识 `maafw_runner`，服务 `maafw.runner.v1`）。通用 MFW、M9A、MSS 三个专项都靠它跑计划：借运行环境、起 worker 子进程、收事件、落日志，默认带整轮与单任务时限、原地打转检测、失败截图和日志打码；另有运行前设置、设备配置、桌面游戏启停、结果判定与记账、文案。

本包由宿主 `app/task/MaaFW` 的执行侧拆出（拆分依据：「MFW 插件包拆分与契约」§1、§7.2），代码只换了导入：

- `maafw_runner.core`：worker 子进程也会导入的部分（`core/runner/*`、`core/worker_protocol.py`），不导入宿主与 SDK。
- `maafw_runner.host`：只在宿主进程里跑的部分。宿主能力在函数体内经 `auto_mas_core` 取。

## 0.1.0 的状态

- 服务只实现 `call("version")`。三个专项仍直接导入 `maafw_runner.host.*`、`maafw_runner.core.*`，0.2 起逐条改成服务。
- worker 以 `python -m maafw_runner.core.runner.worker` 启动，`PYTHONPATH` 为 binding 目录加上本包、`maafw_agent_env`、`maafw_interface`、`maafw_native` 四个包各自的父目录（`maafw_runner.host.worker_paths`）。
- 依赖 `auto-mas-maafw-agent-env`（插件依赖 `maafw.agent_env.v1`）和两块库 `auto-mas-maafw-interface`、`auto-mas-maafw-native`。

## 开发

本地联调时把本目录联接到联调宿主树的 `plugins\maafw_runner`。单元测试不随仓库提交。
