WideLee
235e6ecc0e
refactor(qqbot): replace hardcoded log tags with self._log_tag and adjust STT log levels
...
- Remove @staticmethod from _detect_message_type, _convert_silk_to_wav,
_convert_raw_to_wav, _convert_ffmpeg_to_wav so they can use self._log_tag
- Replace all remaining hardcoded "QQBot" log args with self._log_tag
- Downgrade STT routine flow logs (download, convert, success) from info to debug
- Keep warning level for actual failures (STT failed, ffmpeg error, empty transcript)
2026-04-17 15:31:14 -07:00
WideLee
6358501915
refactor(qqbot): split qqbot.py into package & add QR scan-to-configure onboard flow
...
- Refactor gateway/platforms/qqbot.py into gateway/platforms/qqbot/ package:
- adapter.py: core QQAdapter (unchanged logic, constants from shared module)
- constants.py: shared constants (API URLs, timeouts, message types)
- crypto.py: AES-256-GCM key generation and secret decryption
- onboard.py: QR-code scan-to-configure API (create_bind_task, poll_bind_result)
- utils.py: User-Agent builder, HTTP headers, config helpers
- __init__.py: re-exports all public symbols for backward compatibility
- Add interactive QR-code setup flow in hermes_cli/gateway.py:
- Terminal QR rendering via qrcode package (graceful fallback to URL)
- Auto-refresh on QR expiry (up to 3 times)
- AES-256-GCM encrypted credential exchange
- DM security policy selection (pairing/allowlist/open)
- Update hermes_cli/setup.py to delegate to gateway's _setup_qqbot()
- Add qrcode>=7.4 dependency to pyproject.toml and requirements.txt
2026-04-17 15:31:14 -07:00