Skip to main content

Pallas-Bot 官方扩展:QQ 远控 MAA 与分片 hub 入口。

Project description

Pallas-Bot

pallas-plugin-maa

Pallas-Bot 4.0 官方扩展:MAA 远控(含 worker 插件 pallas_plugin_maa 与分片 hub 入口 pallas_plugin_maa_hub)。

安装

需已安装 Pallas-Bot ≥ 4.0

# 在本体项目中
uv sync --extra plugins-maa

# 或单独安装本包
uv pip install pallas-plugin-maa

开发联调:clone 本仓库后 uv pip install -e .pyproject.toml 可配置本体 path 依赖)。

多进程分片

Pallas-Bot 支持单进程,也支持 hub + 多个 worker 的多进程部署。启用分片时:

  • hub 与每个 worker 须安装相同版本的本扩展包
  • 各进程共享同一路径的 data/(注册表、协调状态、WebUI 落盘等);
  • MAA 任务队列与路由状态走 Redis 协调层;对外 HTTP 基址通常配置在 hub

本插件通过本体 plugin_coord 与启动时的 register_maa_coord() 接入协调层;hub 角色加载 pallas_plugin_maa_hub 转发 MAA HTTP。

详见:多进程分片 · 架构说明

功能说明

MAA 远程控制协议getTask / reportStatus + QQ 绑定、口令排队、结果回传。

用户命令

类型 口令示例
绑定 牛牛绑定MAA牛牛MAA状态牛牛切换MAA设备牛牛MAA设备名牛牛清空MAA队列
任务 牛牛长草牛牛作战牛牛公招牛牛基建牛牛截图牛牛停止
高级 牛牛MAA任务 <type> [params]

上手:配置 maa_public_base_url → MAA 填帮助页 URL(用户标识符 = QQ)→ 私聊绑定设备 → 群聊发口令。完整表见 牛牛帮助 → MAA 远控

多台设备

口令 说明
牛牛MAA状态 列表与当前选用
牛牛切换MAA设备 改远控目标
牛牛MAA设备名 设置别名

命令权限

命令 ID 默认等级
maa.bind everyone
maa.control everyone
maa.status everyone

配置

一般只需 maa_public_base_url(WebUI 服务网关 / 连通性 亦可编辑)。

默认 说明
maa_public_base_url 对外 HTTP 基址
maa_attach_screenshot true 指令后附加截图
maa_combat_auto_prepare true 作战前自动排队关卡设置

完整键见本仓库 config.py。改 maa_get_task_path 等会重挂路由并清帮助缓存。

排障

现象 处理
未检测到轮询 MAA 端点不可达或 URL 错误;分片须 hub 配置 maa_public_base_url 且各 worker 共用 data/
状态有待拉取、MAA 无任务 分片时队列走 Redis pallas:coord:maa_pending:*;须 hub 能访问各 worker 端口并保证 Redis 可用
下发后无任务 未绑定或用户标识符非 QQ;查 牛牛MAA状态
队列有、MAA 无 设备 id 与「当前选用」不一致;可清空队列重试
截图失败 调大反代 client_max_body_size

维护者说明

任务分类

分类 type 示例 MAA 行为
顺序任务 LinkStartCaptureImageSettings-* 按队列顺序执行
立即任务 CaptureImageNowStopTaskHeartBeat 可插队

唤醒与子项

  • LinkStart(牛牛长草):含唤醒 + 按勾选跑子模块
  • LinkStart-WakeUp:仅唤醒
  • 其它 LinkStart-*:不含唤醒;游戏需已在主界面
  • 牛牛作战当前临时下发 LinkStartCOMBAT_COMMAND_TASK_TYPE),上游修复后改回 LinkStart-Combat

作战与关卡

  • 牛牛设置关卡:最多 4 候选,仅下发 Settings-Stage1
  • maa_combat_auto_prepare:作战前可自动排队已保存主关卡

多 Bot 同群

群内远控口令与 牛牛MAA状态 等命令经 claim_group_handler("maa", …),同一条群消息仅一只牛响应。私聊绑定/切换设备不受影响。

代码索引

逻辑 位置
口令 → type tasks.py
HTTP http_api.pyhttp_routes.py
队列/绑定 store.py

文档

说明 链接
MAA 远控 · 用户文档 文档站 · maa
插件开发入门 develop/plugin/getting-started
多进程分片 architecture/bot-process-sharding

源码

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pallas_plugin_maa-4.0.2.tar.gz (91.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pallas_plugin_maa-4.0.2-py3-none-any.whl (50.9 kB view details)

Uploaded Python 3

File details

Details for the file pallas_plugin_maa-4.0.2.tar.gz.

File metadata

  • Download URL: pallas_plugin_maa-4.0.2.tar.gz
  • Upload date:
  • Size: 91.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pallas_plugin_maa-4.0.2.tar.gz
Algorithm Hash digest
SHA256 4df4347a3120b347c4d288bdad72877ad8e12a6bd1cf5ad85919dd8e54f231ef
MD5 ed39457271b1216962f8d7e546f31ec6
BLAKE2b-256 4dd2bb3e54651dea13baf021dba267ec34f3cb3cacd1fe9674c0c9f71bcdc4a9

See more details on using hashes here.

Provenance

The following attestation bundles were made for pallas_plugin_maa-4.0.2.tar.gz:

Publisher: publish-pypi.yml on TogetsuDo/pallas-plugin-maa

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pallas_plugin_maa-4.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for pallas_plugin_maa-4.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ff86999f15c8a4bad1bb2025a1b6d142fd0de4baa4c34b5a7b62bd15dfc14de7
MD5 ba121d72bae68364979d79c0d491fa5d
BLAKE2b-256 5c337396ed7c20efefc772e2c25b6e097e80e6b3791d60eb9145c7453b72841e

See more details on using hashes here.

Provenance

The following attestation bundles were made for pallas_plugin_maa-4.0.2-py3-none-any.whl:

Publisher: publish-pypi.yml on TogetsuDo/pallas-plugin-maa

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page