hermes-agent/gateway/platforms/qqbot
Da7-Tech 224e59df52 fix(qqbot): resolve credentials under the active profile secret scope
The QQ adapter read QQ_APP_ID, QQ_CLIENT_SECRET, the QQ_STT_* backend
config and the QQ_ALLOW_ALL_USERS policy flag through raw os.getenv,
bypassing the active profile secret scope. In multiplex mode a secondary
profile whose secret lives in its own .env (installed as an isolated
scope, not into os.environ) would silently fall back to the
default/primary profile's value — the same cross-profile collision fixed
for the WeChat/weixin adapter in #59662.

Route these reads through a scope-aware resolver that reads the profile
scope when one is installed (secondary profiles and per-turn inbound) and
falls back to os.environ otherwise. The fallback is deliberate: the
primary/active profile is constructed without a scope and owns
os.environ, so a bare get_secret would raise UnscopedSecretError and
break its startup. Mirrors gateway.config._getenv.

Adds regression tests including active-profile-no-scope construction (the
fail-closed case), plus scope-wins-over-environ, two-profile isolation,
single-profile fallback, explicit-config precedence and STT key scoping.
2026-08-02 10:01:16 -07:00
..
__init__.py
adapter.py fix(qqbot): resolve credentials under the active profile secret scope 2026-08-02 10:01:16 -07:00
chunked_upload.py chore: prune unused imports and duplicate import redefinitions 2026-05-28 22:26:25 -07:00
constants.py
crypto.py
keyboards.py fix(approval): scope smart deny owner overrides to one operation 2026-07-13 04:31:55 -07:00
onboard.py fix(gateway): guard chained .get() against None intermediate values 2026-07-23 12:01:24 -07:00
utils.py