From cc3aa7667599596695583ceed294db726db5c894 Mon Sep 17 00:00:00 2001 From: Teknium <127238744+teknium1@users.noreply.github.com> Date: Fri, 17 Apr 2026 13:31:53 -0700 Subject: [PATCH] build(deps): add qrcode to dingtalk + feishu extras (parity with messaging) (#11627) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #4b1567f4 (anthhub) added qrcode to the messaging extra for Weixin's QR login. The same package is needed by: * hermes_cli/dingtalk_auth.py — QR device-flow auth shipped in #11574 * gateway/platforms/feishu.py:3962 — Feishu QR login These extras are independent of [messaging] (users can install hermes-agent[dingtalk] or hermes-agent[feishu] without [messaging]), so the dep needs to be declared on each. Pin matches anthhub's choice (>=7.0,<8) for consistency. The all extra inherits from all three, so it picks up qrcode transitively. Adds parallel tests to tests/test_project_metadata.py — same shape as test_messaging_extra_includes_qrcode_for_weixin_setup. Refs #9431. --- pyproject.toml | 4 ++-- tests/test_project_metadata.py | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 1ec813920..0cac0b6b7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -76,8 +76,8 @@ termux = [ "hermes-agent[honcho]", "hermes-agent[acp]", ] -dingtalk = ["dingtalk-stream>=0.1.0,<1"] -feishu = ["lark-oapi>=1.5.3,<2"] +dingtalk = ["dingtalk-stream>=0.1.0,<1", "qrcode>=7.0,<8"] +feishu = ["lark-oapi>=1.5.3,<2", "qrcode>=7.0,<8"] web = ["fastapi>=0.104.0,<1", "uvicorn[standard]>=0.24.0,<1"] rl = [ "atroposlib @ git+https://github.com/NousResearch/atropos.git@c20c85256e5a45ad31edf8b7276e9c5ee1995a30", diff --git a/tests/test_project_metadata.py b/tests/test_project_metadata.py index e45b15725..27a1002b5 100644 --- a/tests/test_project_metadata.py +++ b/tests/test_project_metadata.py @@ -34,3 +34,21 @@ def test_messaging_extra_includes_qrcode_for_weixin_setup(): messaging_extra = optional_dependencies["messaging"] assert any(dep.startswith("qrcode") for dep in messaging_extra) + + +def test_dingtalk_extra_includes_qrcode_for_qr_auth(): + """DingTalk's QR-code device-flow auth (hermes_cli/dingtalk_auth.py) + needs the qrcode package.""" + optional_dependencies = _load_optional_dependencies() + + dingtalk_extra = optional_dependencies["dingtalk"] + assert any(dep.startswith("qrcode") for dep in dingtalk_extra) + + +def test_feishu_extra_includes_qrcode_for_qr_login(): + """Feishu's QR login flow (gateway/platforms/feishu.py) needs the + qrcode package.""" + optional_dependencies = _load_optional_dependencies() + + feishu_extra = optional_dependencies["feishu"] + assert any(dep.startswith("qrcode") for dep in feishu_extra)