-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Overview
Add a plugin registry system that allows enabling/disabling plugins via environment variables. This will allow different deployments (Lullabot vs Tugboat) to control which features are active without code changes.
Approach: Environment Variable Registry
Use a single environment variable with comma-separated plugin names:
ENABLED_PLUGINS=karma,factoids,help,uptime,botsnack,hello,conversions,add-promptCurrent Plugins
- karma
- factoids
- help
- uptime
- botsnack
- hello
- conversions
- add-prompt
- channel-security (pending from Feature Request: When adding the bot to new slack channels check that the channel is not shared (with customers) #74)
Implementation Tasks
-
Create
src/services/plugin-registry.ts- Parse
ENABLED_PLUGINSenv var - Provide
isPluginEnabled(pluginName: string)method - Default behavior if env var not set (all enabled or specific list?)
- Parse
-
Update
src/bot.tsplugin loader- Check registry before loading each plugin
- Log which plugins are enabled/disabled on startup
- Maintain existing error handling
-
Documentation
- Update CLAUDE.md with plugin registry info
- Update README with environment variable documentation
- Add example .env entries
-
Testing
- Test with various combinations of enabled plugins
- Verify default behavior when ENABLED_PLUGINS not set
- Ensure disabled plugins don't load
Benefits
- Per-deployment control (Lullabot vs Tugboat can have different configs)
- Simple to understand and manage
- No architecture changes needed
- Future-proof for new plugins
Related
- Feature Request: When adding the bot to new slack channels check that the channel is not shared (with customers) #74 - Channel security plugin needs to be optional for Tugboat deployment
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels