← Back to Pull requests

qqbot: QQ Bot platform moves here from hermes-agent core (history kept) #110

Open
unknown opened this pull request with 515 lines diff across 6 files
View on GitHub
unknown unknown commented on Nov 24, 2026 12:13 UTC
Author

What this does, in plain words

QQ Bot (Tencent QQ's official Bot API v2, as a Hermes messaging platform) moves out of Hermes core and into this repo as the qqbot plugin. It is a Hermes Labs plugin: built by Nous Research, not supported, and likely not maintained going forward; community fixes are welcome here.

People who use QQ Bot today do nothing: the core removal PR adds a migration that installs this plugin once, from the catalog, for every profile that ran QQ Bot. Same QQ_ / QQBOT_ env vars (legacy QQ_HOME_CHANNEL included), same platforms.qqbot config, same QQBOT_HOME_CHANNEL. New users install it with hermes plugins install qqbot.

Slate (merge order)

1. Core removal + migration: NousResearch/hermes-agent#159640
2. This PR (plugin, history kept)
3. Catalog entry (data only, hold until this merges and it is re-pinned): NousResearch/hermes-agent#159641

Commits

  • b9480ed import: every path QQ Bot lived at in hermes-agent (gateway/platforms/qq.py, gateway/platforms/qqbot.py, gateway/platforms/qqbot/, plugins/platforms/qqbot/, its 8 test files) rewritten into qqbot/ with git filter-repo, 157 commits, authorship kept; byte-identical to core at 39ca68b38f9.

  • 99678f2 packaging (one commit): manifest name: qqbot + homepage, pyproject.toml deps (aiohttp, httpx, qrcode bounded at core's pins; pilk optional silk extra), Platform("qqbot") resolved at call time, the env bridge as env_enablement_fn (core's import-time EnvCred row needs an enum member), every plugins.platforms.qqbot. import plugin-local, private core imports replaced, an inert guard on cores that still bundle QQ Bot, ported tests + conftest, README with a Disclosure section, root README row.

  • 8ab64db card art (assets/qqbot.jpg).
  • The entry carries what core kept in tables keyed on Platform.QQBOT, so behaviour does not silently disappear on a core without QQ Bot: own_policy_env=("", "") (an open dm_policy/group_policy in platforms.qqbot without QQ_ALLOW_ALL_USERS still refuses startup), allowlist_suppresses_pairing with QQ_ALLOWED_USERS / QQ_GROUP_ALLOWED_USERS, and allow_update_command=True (/update from QQ). Each has a test that fails with the field removed.

    Verification

    | Check | Core with QQ Bot removed (core PR head f11752fd086) | Core main |
    |---|---|---|
    | Plugin suite | 116 passed, 0 skipped, 0 failed | 110 passed, 6 skipped (registry tests; plugin inert, core serves) |
    | hermes plugins validate qqbot | passed | passed |
    | tools.plugin_guard.scan_plugin | — | safe on main and on v0.23.4 |
    | ruff | clean | — |

    The suite was run against a git archive of the core removal branch, where plugins/platforms/qqbot and Platform.QQBOT are gone, so core's bundled gateway_env.py fallbacks cannot hide a field this plugin forgot. Env-bridge parity: through the real plugin loader, the same .env gives identical platforms.qqbot extras and home channel (incl. legacy QQ_HOME_CHANNEL name/thread id and its deprecation warning) on both trees.

    Live migration (real gateway run --force, fake homes, catalog fixture pinned to this branch at 8ab64db6ee8, QQ endpoints behind a closed loopback proxy): the core PR body has the full table. In short, the first start installs this plugin once with the Labs notice and this plugin's adapter attempts the token fetch in the same start; a second start does not re-clone; a fresh home gets nothing; a multiplexed secondary profile with creds only in its own .env gets the plugin installed into that profile and connects there.

    Validate on hermes-agent main

    Expected green here: QQ Bot registers no tools, so there is no built-in tool-name collision (unlike Yuanbao's yb_). On main the plugin is inert (logs one INFO line) until the core removal lands.

    Not covered

  • The real QQ backend: every connect goes to a closed loopback port, refused once the adapter exists.

  • Scan-to-configure onboarding (needs a real QQ account and phone); its unit tests run.

  • SILK voice decoding with pilk installed (optional extra, not in the CI venv).
  • Diff: 515 lines (+386 / -129) across 6 files Reviewer: unsupportedpastels Review duration: 501m
    All Vouch review confidence checks passed
    Residual risk 0.25 = Change Risk (0.48) × (1 − Review Confidence (0.47)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.48 · 515 lines diff across 6 files
    0.48
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.02 · 1 substantive comment(s)
    0.02
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    46%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.374
    Shallow Review Depth shallow_review_depth
    0.344
    Real PR Conversation Timeline
    1 comments
    "Review active on #110"
    general weight: 0.35
    Assignees
    Unassigned
    Labels
    risk: low confidence: 46.7% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 47.7% (MEDIUM) · Higher = larger blast radius
    47.7%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 46.7% · Lower = rushed or shallow review
    46.7%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 25.4% · Safe to merge
    25.4%