fix(plugin): registry loading for configure onboard#17229
Closed
soimy wants to merge 2 commits intoopenclaw:mainfrom
Closed
fix(plugin): registry loading for configure onboard#17229soimy wants to merge 2 commits intoopenclaw:mainfrom
soimy wants to merge 2 commits intoopenclaw:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes a bug where external channel plugins (like DingTalk) were not appearing in interactive menus for openclaw configure --section channels and openclaw onboard commands. The fix ensures the plugin registry is loaded before these commands display their channel selection menus by adding them to the PLUGIN_REQUIRED_COMMANDS whitelist.
Changes:
- Extended
PLUGIN_REQUIRED_COMMANDSconstant to include'configure'and'onboard'commands - This ensures external channel plugins are loaded and visible in interactive configuration flows
Author
|
CI Error seems to be pre-existed, not related to this PR's file change. |
bfc1ccb to
f92900f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
External channel plugins (like DingTalk) were not appearing in interactive menus for
openclaw configure --section channelsandopenclaw onboard, even though the plugins were properly loaded and configured.Root Cause
The
PLUGIN_REQUIRED_COMMANDSwhitelist in src/cli/program/preaction.ts only included'message','channels', and'directory'. This controlled which commands triggeredensurePluginRegistryLoaded()in the preAction hook.Without plugin registry initialization, channel selection menus fell back to core-only channels, excluding external plugins from being visible to users during interactive configuration.
Solution
Add
'configure'and'onboard'toPLUGIN_REQUIRED_COMMANDSto ensure the plugin registry is loaded before these commands display their interactive menus.Changes
PLUGIN_REQUIRED_COMMANDSinsrc/cli/program/preaction.tsto include'configure'and'onboard'commandsImpact
✅ External channel plugins are now discoverable in interactive menus:
openclaw configure --section channelsnow shows linked plugins in channel selectionopenclaw onboardnow shows linked plugins during onboarding flow✅ No performance impact:
✅ Backward compatible:
channels,message,directory) continue to work unchangedVerification
Tested with DingTalk plugin (linked locally via
openclaw plugins install -l .):Related Patterns
This follows the existing pattern used in:
channelscommand: loads plugins to display channel statusmessagecommand: loads plugins for message routingdirectorycommand: loads plugins for provider discoveryThe same plugin discovery mechanism is now available to
configureandonboardfor interactive user flows.Greptile Summary
Adds
configureandonboardtoPLUGIN_REQUIRED_COMMANDSwhitelist insrc/cli/program/preaction.ts:23-29, ensuring external channel plugins (like DingTalk) appear in interactive menus.Key changes:
PLUGIN_REQUIRED_COMMANDSSet from 3 to 5 entries by adding'configure'and'onboard'listChannelPlugins()in their wizards (src/commands/configure.channels.ts:18andsrc/commands/onboard-channels.ts:116), which requires the plugin registry to be loadedchannels,message, anddirectorycommandsImpact:
openclaw configure --section channelsandopenclaw onboardinteractive flowsConfidence Score: 5/5
Last reviewed commit: feb4e41
(3/5) Reply to the agent's comments like "Can you suggest a fix for this @greptileai?" or ask follow-up questions!