Shuo
d7785f4d5b
feat(feishu): add scan-to-create onboarding for Feishu / Lark
Add a QR-based onboarding flow to `hermes gateway setup` for Feishu / Lark.
Users scan a QR code with their phone and the platform creates a fully
configured bot application automatically — matching the existing WeChat
QR login experience.
Setup flow:
- Choose between QR scan-to-create (new app) or manual credential input (existing app)
- Connection mode selection (WebSocket / Webhook)
- DM security policy (pairing / open / allowlist / disabled)
- Group chat policy (open with @mention / disabled)
Implementation:
- Onboard functions (init/begin/poll/QR/probe) in gateway/platforms/feishu.py
- _setup_feishu() in hermes_cli/gateway.py with manual fallback
- probe_bot uses lark_oapi SDK when available, raw HTTP fallback otherwise
- qr_register() catches expected errors (network/protocol), propagates bugs
- Poll handles HTTP 4xx JSON responses and feishu/lark domain auto-detection
Tests:
- 25 tests for onboard module (registration, QR, probe, contract, negative paths)
- 16 tests for setup flow (credentials, connection mode, DM policy, group policy,
adapter integration verifying env vars produce valid FeishuAdapterSettings)
Change-Id: I720591ee84755f32dda95fbac4b26dc82cbcf823
2026-04-12 13:05:56 -07:00
..
2026-04-08 04:56:20 -07:00
2026-04-10 05:19:21 -07:00
2026-04-12 02:05:20 -07:00
2026-04-11 19:15:50 -07:00
2026-04-10 03:44:43 -07:00
2026-04-07 11:41:26 -07:00
2026-04-12 00:33:54 -07:00
2026-04-11 13:59:52 -07:00
2026-04-10 21:15:47 -07:00
2026-03-29 20:10:00 -07:00
2026-03-30 17:07:21 -07:00
2026-04-11 19:23:29 -07:00
2026-04-12 02:18:03 -07:00
2026-04-10 03:44:43 -07:00
2026-04-07 22:49:01 -07:00
2026-04-11 17:16:06 -07:00
2026-03-26 01:34:27 -07:00
2026-04-11 13:59:52 -07:00
2026-04-11 15:22:49 -07:00
2026-03-25 15:02:03 -07:00
2026-04-12 13:05:56 -07:00
2026-04-11 17:23:36 -07:00
2026-04-12 12:22:34 -07:00
2026-04-11 15:34:57 -07:00
2026-04-11 13:59:52 -07:00
2026-04-11 17:16:06 -07:00
2026-04-12 00:33:42 -07:00
2026-04-12 03:53:30 -07:00
2026-04-11 01:56:55 -07:00
2026-03-25 19:47:58 -07:00
2026-04-11 15:50:54 -07:00
2026-04-10 19:15:50 -07:00
2026-04-10 19:15:50 -07:00
2026-04-12 12:22:34 -07:00
2026-04-11 11:17:52 -07:00
2026-04-11 14:09:40 -07:00
2026-04-11 15:50:54 -07:00
2026-04-11 13:59:52 -07:00
2026-04-10 12:54:18 -07:00
2026-04-07 10:25:31 -07:00
2026-04-11 15:50:54 -07:00
2026-04-12 00:54:07 -07:00
2026-04-11 13:59:52 -07:00
2026-04-10 02:41:33 -07:00
2026-04-07 10:40:34 -07:00