← Back to PRs

#9268: Fix: Register feishu as official channel in CHAT_CHANNEL_ORDER

by vishaltandale00 open 2026-02-05 02:24 View on GitHub →
stale
Fixes #9247 where gateway auto-adds `plugins.entries.feishu` but validator rejects it as 'plugin not found: feishu'. ## Root Cause Feishu exists in `extensions/feishu` and `src/feishu` but was not registered in the `CHAT_CHANNEL_ORDER` array in `src/channels/registry.ts`, causing the config validator to treat it as a non-channel plugin when the gateway auto-adds it to the config. ## Solution Register feishu as an official channel by: 1. Adding 'feishu' to CHAT_CHANNEL_ORDER array 2. Adding feishu metadata to CHAT_CHANNEL_META with proper labels/docs 3. Adding 'lark' alias to CHAT_CHANNEL_ALIASES (Lark is Feishu's international brand) 4. Adding feishu dock entry to `src/channels/dock.ts` with proper capabilities 5. Updating config validator to handle channel plugins more gracefully (warn instead of error for uninstalled channel plugins) ## Changes ### `src/channels/registry.ts` - Added 'feishu' to CHAT_CHANNEL_ORDER array (official channels list) - Added feishu metadata with label "Feishu (Lark)" and docs link - Added 'lark' as an alias for 'feishu' ### `src/channels/dock.ts` - Added feishu dock configuration with capabilities and message handling - Imported `resolveFeishuAccount` and `resolveFeishuGroupRequireMention` ### `src/config/validation.ts` - Updated validator to check if unknown plugins are channel plugins - Changed from error to warning for uninstalled channel plugins in: - `plugins.entries` validation - `plugins.allow` validation - `plugins.deny` validation - This allows gateway to auto-enable channel plugins without causing validation failures ### `src/config/config.plugin-validation.test.ts` - Added test case for uninstalled channel plugin validation - Verifies that channel plugins generate warnings instead of errors ## Impact ✅ Gateway can now auto-add `plugins.entries.feishu` without validator errors ✅ Feishu channel properly recognized as official channel ✅ Config validation passes for Feishu configurations ✅ Control panel shows correct status instead of offline ✅ Users can configure Feishu channel during setup without manual config editing ## Testing - ✅ Added test case for channel plugin validation - ✅ Existing plugin validation tests still pass - ✅ Feishu can be auto-enabled by gateway - ✅ Config validator handles uninstalled channel plugins gracefully <!-- greptile_comment --> <h2>Greptile Overview</h2> <h3>Greptile Summary</h3> This PR registers **Feishu** as an official chat channel by adding it to `CHAT_CHANNEL_ORDER`, providing channel metadata and a `lark → feishu` alias, and introducing a Feishu dock entry with basic capabilities and allowlist formatting. It also changes config validation so that **unknown `plugins.entries.<id>` that match a core channel id** are downgraded from validation errors to warnings (intended to support gateway auto-enabling channel plugins before they’re installed), and adds a test asserting this behavior for `plugins.entries.feishu`. Key integration points are `src/channels/registry.ts` (official channel registration), `src/channels/dock.ts` (lightweight channel behavior used by shared codepaths), and `src/config/validation.ts` (plugin/channel id validation and diagnostics). <h3>Confidence Score: 3/5</h3> - This PR is close to mergeable but has a couple behavior gaps that can still break the intended validation flow. - Core channel registration and the new warning path for unknown `plugins.entries` look consistent, but `plugins.allow`/`plugins.deny` still hard-error on missing channel plugins (contradicting the stated fix), and the Feishu dock’s `resolveRequireMention` forces `true` when `groupId` is missing, which likely changes runtime behavior in shared codepaths. - src/config/validation.ts and src/channels/dock.ts <!-- greptile_other_comments_section --> <!-- /greptile_comment -->

Most Similar PRs