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-10 03:45:36 -07:00
2026-04-12 02:26:28 -07:00
2026-04-11 23:22:34 -07:00
2026-04-10 03:20:05 -07:00
2026-04-11 13:59:52 -07:00
2026-04-07 17:28:37 -07:00
2026-03-14 14:27:20 +03:00
2026-04-12 13:05:56 -07:00
2026-04-12 12:22:34 -07:00
2026-04-11 00:43:27 -07:00
2026-03-24 07:30:25 -07:00
2026-04-08 23:54:15 -07:00
2026-04-12 12:44:49 -07:00
2026-04-12 00:33:54 -07:00
2026-04-12 00:36:22 -07:00
2025-10-01 23:29:25 +00:00
2026-04-09 13:17:06 -07:00
2026-03-17 02:53:33 -07:00
2026-03-13 23:59:12 -07:00
2026-04-10 13:06:02 -07:00
2026-04-07 17:59:42 -07:00
2026-04-09 11:27:41 -07:00
2026-04-12 03:53:30 -07:00
2026-03-15 21:59:53 -07:00
2026-04-10 05:53:10 -07:00
2026-04-11 17:23:36 -07:00
2026-04-09 02:41:56 -07:00
2026-04-02 15:33:51 -07:00
2026-04-11 23:12:11 -07:00
2026-03-29 15:47:19 -07:00
2026-03-24 08:19:23 -07:00
2026-04-07 17:59:42 -07:00
2026-03-20 15:41:06 -04:00
2026-04-05 23:31:29 -07:00
2026-04-07 22:23:28 -07:00
2026-03-30 17:34:43 -07:00
2026-04-10 21:15:59 -07:00
2026-04-08 00:41:36 -07:00
2026-03-19 15:16:35 +01:00
2026-04-10 13:37:45 -07:00
2026-04-10 03:44:43 -07:00
2026-02-26 13:54:20 +03:00
2026-03-09 23:27:19 -07:00
2026-03-30 13:16:16 -07:00
2026-03-30 20:36:56 -07:00
2026-03-30 13:28:10 +09:00