Skip to main content

Pallas-Bot 官方扩展:NapCat/SnowLuma 协议端管理、牛牛重新上号与分片转发。

Project description

Pallas-Bot

pallas-plugin-protocol

Pallas-Bot 4.0 官方扩展:协议端管理(NapCat / SnowLuma)与 牛牛重新上号(含分片 worker 转发)。

本包绑定三个 NoneBot 插件:

模块 插件 角色
pallas_plugin_protocol 协议端管理 hub / unified
pallas_plugin_relogin_bot 重新上号、创建牛牛 hub / unified
pallas_plugin_relogin_forward 分片 worker 口令转发 worker

安装

需已安装 Pallas-Bot ≥ 4.0

推荐直接在控制台插件商店安装,或在本体项目中执行:

uv run pallas ext install pallas-plugin-protocol

也可单独安装本包:

uv pip install pallas-plugin-protocol

未安装时 Web 控制台仍可打开;协议端 / 实例 页会提示安装本扩展。

开发联调:clone 本仓库后 uv pip install -e .

多进程分片

  • hub 加载 protocol + relogin_bot;worker 加载 relogin_forward。
  • 各牛牛账号的 ws_url 指向所属 worker 端口;共享 data/
  • run_sharded_bot.sh start 会同步注册表与协议端配置。

详见:多进程分片

功能说明

协议端管理

多账号 NapCat / SnowLuma:创建牛牛、启停实例、日志与 OneBot 反向 WebSocket。与 Web 控制台共用浏览器登录。

入口 说明
/protocol/console/ 协议端管理页(维护者向)
Web 控制台 侧边栏可跳转协议端

典型流程:登录控制台 → 创建实例 → 配置反向 WS → 启动。Docker 下注意 PALLAS_PROTOCOL_DOCKER_ONEBOT_HOST

常用配置(WebUI 插件 → pallas_protocol):

说明
pallas_protocol_enabled 是否加载协议端
pallas_protocol_webui_enabled 是否挂载协议端 Web
pallas_protocol_instances_root 实例根目录
pallas_protocol_program_dir NapCat 程序目录

完整键:src/pallas_plugin_protocol/config.py

重新上号(relogin_bot)

口令 场景 说明
牛牛重新上号 [QQ] 私聊 号主重启本账号协议端
创建牛牛 … 私聊 超管新建实例
命令 ID 默认等级
relogin.relogin bot_moderator
relogin.create superuser

排障

现象 处理
账号无法启动 查实例日志、程序目录
Bot 不回复 确认反向 WS 连上 hub/worker 端口
无二维码 查协议端日志与 data/ 下二维码文件
Docker WS 连不上 见文档站 FAQ · 协议端反向 WebSocket

文档

说明 链接
协议端管理 文档站 · pallas_protocol
重新上号 文档站 · relogin_bot
插件开发入门 develop/plugin/getting-started

源码

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_protocol-4.0.4.tar.gz (555.4 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_protocol-4.0.4-py3-none-any.whl (530.2 kB view details)

Uploaded Python 3

File details

Details for the file pallas_plugin_protocol-4.0.4.tar.gz.

File metadata

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

File hashes

Hashes for pallas_plugin_protocol-4.0.4.tar.gz
Algorithm Hash digest
SHA256 5e8b60f28771cbf64ccb4948d58e5d667a8f9eb4fc0663b4cf9fb32748044dfb
MD5 c4e1c49cd519510d098855e45798ea17
BLAKE2b-256 ba620c93c9ae037d73670344b27693c8dd21b519895337000205440af8505215

See more details on using hashes here.

Provenance

The following attestation bundles were made for pallas_plugin_protocol-4.0.4.tar.gz:

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

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_protocol-4.0.4-py3-none-any.whl.

File metadata

File hashes

Hashes for pallas_plugin_protocol-4.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 7d44d411411a42540ad165700e0b55a8e85fd68e78f69acc0eb2b550dbcb1df2
MD5 91b678a6780c835837a4359c3d9d4efb
BLAKE2b-256 996e93842f907ae5293a60a7aa91ddc773a6bbbd727a335e33a9c1c7563a293a

See more details on using hashes here.

Provenance

The following attestation bundles were made for pallas_plugin_protocol-4.0.4-py3-none-any.whl:

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

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